1.\" $OpenBSD: ral.4,v 1.92 2009/02/16 08:15:22 jmc Exp $ 2.\" 3.\" Copyright (c) 2005-2008 4.\" Damien Bergamini <damien.bergamini@free.fr> 5.\" 6.\" Permission to use, copy, modify, and distribute this software for any 7.\" purpose with or without fee is hereby granted, provided that the above 8.\" copyright notice and this permission notice appear in all copies. 9.\" 10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17.\" 18.Dd $Mdocdate: February 16 2009 $ 19.Os 20.Dt RAL 4 21.Sh NAME 22.Nm ral 23.Nd Ralink Technology IEEE 802.11a/b/g/Draft-N wireless network device 24.Sh SYNOPSIS 25.Cd "ral* at cardbus?" 26.Cd "ral* at pci?" 27.Sh DESCRIPTION 28The 29.Nm 30driver supports PCI/PCIe/CardBus wireless adapters based on the Ralink RT2500, 31RT2501, RT2600, RT2700 and RT2800 chipsets. 32.Pp 33The RT2500 chipset is the first generation of 802.11b/g adapters from Ralink. 34It consists of two integrated chips, an RT2560 MAC/BBP and an RT2525 radio 35transceiver. 36.Pp 37The RT2501 chipset is the second generation of 802.11a/b/g adapters from 38Ralink. 39It consists of two integrated chips, an RT2561 MAC/BBP and an RT2527 radio 40transceiver. 41This chipset provides support for the IEEE 802.11e standard with multiple 42hardware transmission queues and allows scatter/gather for efficient DMA 43operations. 44.Pp 45The RT2600 chipset consists of two integrated chips, an RT2661 MAC/BBP and an 46RT2529 radio transceiver. 47This chipset uses the MIMO (multiple-input multiple-output) technology with 48multiple radio transceivers to extend the operating range of the adapter and 49to achieve higher throughput. 50However, the RT2600 chipset does not support any of the 802.11n features. 51.Pp 52The RT2700 chipset is a low-cost version of the RT2800 chipset. 53It supports a single transmit path and two receiver paths (1T2R). 54It consists of two integrated chips, an RT2760 or RT2790 (PCIe) MAC/BBP and 55an RT2720 (2.4GHz) or RT2750 (2.4GHz/5GHz) radio transceiver. 56.Pp 57The RT2800 chipset is the first generation of 802.11n adapters from Ralink. 58It consists of two integrated chips, an RT2860 or RT2890 (PCIe) MAC/BBP and 59an RT2820 (2.4GHz) or RT2850 (2.4GHz/5GHz) radio transceiver. 60The RT2800 chipset supports two transmit paths and up to three receiver 61paths (2T2R/2T3R). 62It can achieve speeds up to 144Mbps (20MHz bandwidth) and 300Mbps (40MHz 63bandwidth.) 64.Pp 65These are the modes the 66.Nm 67driver can operate in: 68.Bl -tag -width "IBSS-masterXX" 69.It BSS mode 70Also known as 71.Em infrastructure 72mode, this is used when associating with an access point, through 73which all traffic passes. 74This mode is the default. 75.It IBSS mode 76Also known as 77.Em IEEE ad-hoc 78mode or 79.Em peer-to-peer 80mode. 81This is the standardized method of operating without an access point. 82Stations associate with a service set. 83However, actual connections between stations are peer-to-peer. 84.It Host AP 85In this mode the driver acts as an access point (base station) 86for other cards. 87.It monitor mode 88In this mode the driver is able to receive packets without 89associating with an access point. 90This disables the internal receive filter and enables the card to 91capture packets from networks which it wouldn't normally have access to, 92or to scan for access points. 93.El 94.Pp 95The 96.Nm 97driver can be configured to use 98Wireless Equivalent Privacy (WEP) or 99Wi-Fi Protected Access (WPA-PSK and WPA2-PSK). 100WPA is the de facto encryption standard for wireless networks. 101It is strongly recommended that WEP 102not be used as the sole mechanism 103to secure wireless communication, 104due to serious weaknesses in it. 105.Pp 106The 107.Nm 108driver relies on the software 802.11 stack for both encryption and 109decryption of data frames on the RT2500, RT2501 and RT2600 chipsets. 110On the RT2700 and RT2800 chipsets, the 111.Nm 112driver offloads both encryption and decryption of data frames to the 113hardware for the WEP40, WEP104, TKIP(+MIC) and CCMP ciphers. 114.Pp 115The transmit speed is user-selectable or can be adapted automatically by the 116driver depending on the number of hardware transmission retries. 117.Pp 118The 119.Nm 120driver can be configured at runtime with 121.Xr ifconfig 8 122or on boot with 123.Xr hostname.if 5 . 124.Sh FILES 125The RT2501, RT2600, RT2700 and RT2800 chipsets require the following firmware 126files to be loaded when an interface is brought up: 127.Pp 128.Bl -tag -width Ds -offset indent -compact 129.It /etc/firmware/ral-rt2561 130.It /etc/firmware/ral-rt2561s 131.It /etc/firmware/ral-rt2661 132.It /etc/firmware/ral-rt2860 133.El 134.Pp 135The RT2500 chipset does not require a firmware to operate. 136.Sh HARDWARE 137The following PCI adapters should work: 138.Bd -filled 139A-Link WL54H. 140AirLive WN-5000PCI. 141Amigo AWI-926W. 142AMIT WL531P. 143AOpen AOI-831. 144ASUS WL-130G. 145ASUS WL-130N. 146ASUS WIFI-G-AAY. 147Atlantis Land A02-PCI-W54. 148Belkin F5D7000 v3. 149Canyon CN-WF511. 150CNet CWP-854. 151Compex WLP54G. 152Conceptronic C54Ri. 153Corega CG-WLPCI54GL. 154Digitus DN-7006G-RA. 155Dynalink WLG25PCI. 156E-Tech WGPI02. 157Edimax EW-7128g. 158Edimax EW-7628Ig. 159Edimax EW-7728In. 160Eminent EM3037. 161Encore ENLWI-G-RLAM. 162Eusso UGL2454-VPR. 163Fiberline WL-400P. 164Foxconn WLL-3350. 165Gigabyte GN-WPKG. 166Gigabyte GN-WP01GS. 167Gigabyte GN-WI02GM. 168Gigabyte GN-WP01GM. 169Hawking HWP54GR. 170Hercules HWGPCI-54. 171iNexQ CR054g-009 (R03). 172JAHT WN-4054PCI. 173KCORP LifeStyle KLS-660. 174LevelOne WNC-0301 v2. 175Linksys WMP54G v4. 176Longshine LCS-8031N. 177Micronet SP906GK. 178Minitar MN54GPC-R. 179MSI MS-6834. 180MSI PC54G2. 181OvisLink EVO-W54PCI. 182PheeNet HWL-PCIG/RA. 183Planex PCI-GW-DS300N. 184Pro-Nets PC80211G. 185Repotec RP-WP0854. 186SATech SN-54P. 187Signamax 065-1798. 188Sitecom WL-115. 189SparkLAN WL-660R. 190Surecom EP-9321-g. 191Surecom EP-9321-g1. 192Sweex LC700030. 193TekComm NE-9321-g. 194Tonze PC-6200C. 195Unex CR054g-R02. 196Zinwell ZWX-G361. 197Zonet ZEW1600. 198.Ed 199.Pp 200The following CardBus adapters should work: 201.Bd -filled 202A-Link WL54PC. 203Alfa AWPC036. 204Amigo AWI-914W. 205AMIT WL531C. 206ASUS WL-107G. 207Atlantis Land A02-PCM-W54. 208Belkin F5D7010 v2. 209Canyon CN-WF513. 210CC&C WL-2102. 211CNet CWC-854. 212Compex WL54. 213Conceptronic C54RC. 214Corega CG-WLCB54GL. 215Digiconnect WL591C. 216Digitus DN-7001G-RA. 217Dynalink WLG25CARDBUS. 218E-Tech WGPC02. 219E-Tech WGPC03. 220Edimax EW-7108PCg. 221Edimax EW-7708PN. 222Eminent EM3036. 223Encore ENPWI-G-RLAM. 224Eusso UGL2454-01R. 225Fiberline WL-400X. 226Gigabyte GN-WMKG. 227Gigabyte GN-WM01GS. 228Gigabyte GN-WM01GM. 229Hawking HWC54GR. 230Hercules HWGPCMCIA-54. 231JAHT WN-4054P(E). 232KCORP LifeStyle KLS-611. 233LevelOne WPC-0301 v2. 234Micronet SP908GK V3. 235Minitar MN54GCB-R. 236MSI CB54G2. 237MSI MS-6835. 238Pro-Nets CB80211G. 239Repotec RP-WB7108. 240SATech SN-54C. 241Sitecom WL-112. 242SparkLAN WL-611R. 243SparkLAN WPCR-501. 244Surecom EP-9428-g. 245Sweex LC500050. 246TekComm NE-9428-g. 247Tonze PW-6200C. 248Unex MR054g-R02. 249Zinwell ZWX-G160. 250Zonet ZEW1500. 251.Ed 252.Pp 253The following Mini PCI adapters should work: 254.Bd -filled 255Amigo AWI-922W. 256Billionton MIWLGRL. 257Gigabyte GN-WIKG. 258Gigabyte GN-WI01GS. 259Gigabyte GN-WI02GM. 260MSI MP54G2. 261MSI MS-6833. 262SparkLAN WMIR-215GN. 263Tonze PC-620C. 264Zinwell ZWX-G360. 265.Ed 266.Sh EXAMPLES 267The following 268.Xr hostname.if 5 269example configures ral0 to join whatever network is available on boot, 270using WEP key 271.Dq 0x1deadbeef1 , 272channel 11, obtaining an IP address using DHCP: 273.Bd -literal -offset indent 274dhcp NONE NONE NONE nwkey 0x1deadbeef1 chan 11 275.Ed 276.Pp 277The following 278.Xr hostname.if 5 279example creates a host-based access point on boot: 280.Bd -literal -offset indent 281inet 192.168.1.1 255.255.255.0 NONE media autoselect \e 282 mediaopt hostap nwid my_net chan 11 283.Ed 284.Pp 285Configure ral0 to join network 286.Dq my_net 287using WPA-PSK with passphrase 288.Dq my_passphrase : 289.Bd -literal -offset indent 290# ifconfig ral0 nwid my_net wpa wpapsk \e 291 `wpa-psk my_net my_passphrase` 292.Ed 293.Pp 294Return ral0 to its default settings: 295.Bd -literal -offset indent 296# ifconfig ral0 -bssid -chan media autoselect \e 297 nwid "" -nwkey -wpa -wpapsk 298.Ed 299.Pp 300Join an existing BSS network, 301.Dq my_net : 302.Bd -literal -offset indent 303# ifconfig ral0 192.168.1.1 netmask 0xffffff00 nwid my_net 304.Ed 305.Sh DIAGNOSTICS 306.Bl -diag 307.It "ral%d: error %d, could not read firmware %s" 308For some reason, the driver was unable to read the firmware image from the 309filesystem. 310The file might be missing or corrupted. 311.It "ral%d: could not load 8051 microcode" 312An error occurred while attempting to upload the microcode to the onboard 8051 313microcontroller unit. 314.It "ral%d: timeout waiting for MCU to initialize" 315The onboard 8051 microcontroller unit failed to initialize in time. 316.It "ral%d: device timeout" 317A frame dispatched to the hardware for transmission did not complete in time. 318The driver will reset the hardware. 319This should not happen. 320.El 321.Sh SEE ALSO 322.Xr arp 4 , 323.Xr cardbus 4 , 324.Xr ifmedia 4 , 325.Xr intro 4 , 326.Xr netintro 4 , 327.Xr pci 4 , 328.Xr hostname.if 5 , 329.Xr hostapd 8 , 330.Xr ifconfig 8 , 331.Xr wpa-psk 8 332.Pp 333Ralink Technology: 334.Pa http://www.ralinktech.com/ 335.Sh HISTORY 336The 337.Nm 338driver first appeared in 339.Ox 3.7 . 340Support for the RT2501 and RT2600 chipsets was added in 341.Ox 3.9 . 342Support for the RT2800 chipset was added in 343.Ox 4.3 . 344Support for the RT2700 chipset was added in 345.Ox 4.4 . 346.Sh AUTHORS 347The 348.Nm 349driver was written by 350.An Damien Bergamini Aq damien@openbsd.org . 351.Sh CAVEATS 352The 353.Nm 354driver does not make use of the hardware cryptographic engine present on 355the RT2500, RT2501 and RT2600 chipsets. 356.Pp 357The 358.Nm 359driver does not support any of the 802.11n capabilities offered by 360the RT2700 and RT2800 chipsets. 361Additional work is required in 362.Xr ieee80211 9 363before those features can be supported. 364.Pp 365Host AP mode doesn't support power saving. 366Clients attempting to use power saving mode may experience significant 367packet loss (disabling power saving on the client will fix this). 368.Pp 369Some PCI 370.Nm 371adapters seem to strictly require a system supporting PCI 2.2 or greater and 372will likely not work in systems based on older revisions of the PCI 373specification. 374Check the board's PCI version before purchasing the card. 375