1 .\" $OpenBSD: rtwn.4,v 1.2 2015/07/09 11:28:53 stsp Exp $
3 .\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
4 .\" Copyright (c) 2015 Stefan Sperling <stsp@openbsd.org>
5 .\" Copyright (c) 2016 Andriy Voskoboinyk <avos@freebsd.org>
7 .\" Permission to use, copy, modify, and distribute this software for any
8 .\" purpose with or without fee is hereby granted, provided that the above
9 .\" copyright notice and this permission notice appear in all copies.
11 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26 .Nd Realtek IEEE 802.11 wireless network driver
28 .Cd "options RTWN_DEBUG"
29 .Cd "options RTWN_WITHOUT_UCODE"
31 To compile this driver into the kernel,
32 place the following lines in your
33 kernel configuration file:
34 .Bd -ragged -offset indent
43 Alternatively, to load the driver as a
44 module at boot time, place following lines in
46 .Bd -literal -offset indent
47 if_rtwn_pci_load="YES"
48 if_rtwn_usb_load="YES"
53 driver provides support for wireless network devices based on
54 the Realtek RTL8192C, RTL8188E, RTL8192E, RTL8812A and RTL8821A
56 These APIs are used by a wide variety of chips;
57 most chips with USB and some with PCI interface are supported.
59 To enable use for PCI/PCIe systems, see the rtwn_pci(4) driver;
60 for USB devices, use the rtwn_usb(4) driver.
69 There are no limitations for number of
72 virtual interfaces; in addition to any other virtual interface
75 interface can be added (Note: RTL8821AU supports two non-monitor
76 mode interfaces at the same time).
78 All chips have hardware support for WEP, AES-CCM and TKIP encryption.
82 driver can be configured at runtime with
85 .Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact
86 .It Pa /usr/share/doc/legal/realtek.LICENSE
91 The driver (if not compiled with
92 .Cd options RTWN_WITHOUT_UCODE
93 ) may use following firmware files, which are loaded
94 when an interface is brought up:
95 .Bl -tag -width Ds -offset indent -compact
96 .It Pa /boot/kernel/rtwn-rtl8188eefw.ko
97 .It Pa /boot/kernel/rtwn-rtl8188eufw.ko
98 .It Pa /boot/kernel/rtwn-rtl8192cfwE_B.ko
99 .It Pa /boot/kernel/rtwn-rtl8192cfwE.ko
100 .It Pa /boot/kernel/rtwn-rtl8192cfwT.ko
101 .It Pa /boot/kernel/rtwn-rtl8192cfwU.ko
102 .It Pa /boot/kernel/rtwn-rtl8192eufw.ko
103 .It Pa /boot/kernel/rtwn-rtl8812aufw.ko
104 .It Pa /boot/kernel/rtwn-rtl8821aufw.ko
107 Join an existing BSS network (i.e., connect to an access point):
108 .Bd -literal -offset indent
109 ifconfig wlan create wlandev rtwn0 inet 192.168.0.20 \e
113 Join a specific BSS network with network name
116 .Dl "ifconfig wlan create wlandev rtwn0 ssid my_net up"
118 Join a specific BSS network with 64-bit WEP encryption:
119 .Bd -literal -offset indent
120 ifconfig wlan create wlandev rtwn0 ssid my_net \e
121 wepmode on wepkey 0x1234567890 weptxkey 1 up
124 Create an IBSS network with 128-bit WEP encryption on the channel 4:
125 .Bd -literal -offset indent
126 ifconfig wlan create wlandev rtwn0 wlanmode adhoc ssid my_net \e
127 wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 \e
131 Join/create an 802.11b IBSS network with network name
133 .Bd -literal -offset indent
134 ifconfig wlan0 create wlandev rtwn0 wlanmode adhoc
135 ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
139 Create a host-based access point:
140 .Bd -literal -offset indent
141 ifconfig wlan0 create wlandev rtwn0 wlanmode hostap
142 ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap
145 Tunables can be set at the
147 prompt before booting the kernel or stored in
149 .Bl -tag -width indent
150 .It Va dev.rtwn.%d.hwcrypto
151 This tunable controls how key slots are assigned:
153 0 - disable h/w crypto support. Features that require access
154 to frame contents (e.g., TCP/UDP/IP Rx checksum validation)
157 1 - use h/w crypto support for pairwise keys only;
159 2 - use h/w crypto support for all keys; may not work for
160 multi-vap configurations.
162 By default it is set to 1.
163 .It Va dev.rtwn.%d.ratectl
164 This tunable switches between rate control implementations:
168 1 - driver sends 'tx complete' reports to net80211; algorithm
169 is controlled via net80211;
171 2 - firmware-based rate control.
173 By default it is set to 1; however driver may choose another
174 algorithm in case if it is not implemented
176 Currently selected algorithm is reported via
177 .Em Va dev.rtwn.%d.ratectl_selected
179 .It Va dev.rtwn.%d.rx_buf_size
180 (USB only) Controls size of temporary Rx buffer; smaller buffer size
181 may increase number of interrupts.
185 .It "rtwn%d: could not read efuse byte at address 0x%x"
186 .It "rtwn%d: %s: cannot read rom, error %d"
187 There was an error while reading ROM; device attach will be aborted.
188 This should not happen.
189 .It "rtwn%d: failed loadfirmware of file %s"
190 For some reason, the driver was unable to read the microcode file from the
192 The file might be missing or corrupted.
193 The driver will disable firmware-dependent features.
194 .It "rtwn%d: wrong firmware size (%zu)"
195 .It "rtwn%d: %s: failed to upload firmware %s (error %d)"
196 .It "rtwn%d: timeout waiting for firmware readiness"
197 Firmware upload failed; the file might be corrupted.
198 The driver will disable firmware-dependent features.
199 This should not happen.
200 .It "rtwn%d: device timeout"
201 A frame dispatched to the hardware for transmission did not complete in time.
202 The driver will reset the hardware.
203 This should not happen.
223 driver first appeared in
229 driver first appeared in
234 driver was initially written by
236 .An Stefan Sperling Aq Mt stsp@openbsd.org
238 .An Kevin Lo Aq Mt kevlo@freebsd.org .
242 .An Damien Bergamini Aq Mt damien.bergamini@free.fr .
246 driver currently does not implement firmware-based rate control.