1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn devices.

This driver was written for OpenBSD by Damien Bergamini and ported over by
Akinori Furukoshi.
This commit is contained in:
Andrew Thompson 2010-01-28 22:24:54 +00:00
parent c1517c0df5
commit 069f1a8056
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203134
12 changed files with 6008 additions and 2 deletions

219
share/man/man4/run.4 Normal file
View File

@ -0,0 +1,219 @@
.\" $OpenBSD: run.4,v 1.22 2009/11/23 06:16:32 jmc Exp $
.\"
.\" Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $FreeBSD$
.\"
.Dd January 29, 2010
.Os
.Dt RUN 4
.Sh NAME
.Nm run
.Nd Ralink Technology USB IEEE 802.11a/g/n wireless network device
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "device ehci"
.Cd "device uhci"
.Cd "device ohci"
.Cd "device usb"
.Cd "device run"
.Cd "device wlan"
.Cd "device wlan_amrr"
.Ed
.Pp
Alternatively, to load the driver as a
module at boot time, place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
if_run_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
driver supports USB 2.0 wireless adapters based on the Ralink RT2700U,
RT2800U and RT3000U chipsets.
.Pp
The RT2700U chipset consists of two integrated chips, an RT2770 MAC/BBP and
an RT2720 (1T2R) or RT2750 (dual-band 1T2R) radio transceiver.
.Pp
The RT2800U chipset consists of two integrated chips, an RT2870 MAC/BBP and
an RT2820 (2T3R) or RT2850 (dual-band 2T3R) radio transceiver.
.Pp
The RT3000U is a single-chip solution based on an RT3070 MAC/BBP and
an RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio
transceiver.
.Pp
These are the modes the
.Nm
driver can operate in:
.Bl -tag -width "IBSS-masterXX"
.It BSS mode
Also known as
.Em infrastructure
mode, this is used when associating with an access point, through
which all traffic passes.
This mode is the default.
.It monitor mode
In this mode the driver is able to receive packets without
associating with an access point.
This disables the internal receive filter and enables the card to
capture packets from networks which it wouldn't normally have access to,
or to scan for access points.
.El
.Pp
The
.Nm
driver can be configured to use
Wired Equivalent Privacy (WEP) or
Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
WPA is the de facto encryption standard for wireless networks.
It is strongly recommended that WEP
not be used as the sole mechanism
to secure wireless communication,
due to serious weaknesses in it.
The
.Nm
driver offloads both encryption and decryption of data frames to the
hardware for the WEP40, WEP104, TKIP(+MIC) and CCMP ciphers.
.Pp
The
.Nm
driver can be configured at runtime with
.Xr ifconfig 8
or on boot with
.Xr hostname.if 5 .
.Sh HARDWARE
The following adapters should work:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It Airlink101 AWLL6090
.It ASUS USB-N11
.It ASUS USB-N13
.It ASUS WL-160N
.It Belkin F5D8051 ver 3000
.It Belkin F5D8053
.It Belkin F5D8055
.It Belkin F6D4050 ver 1
.It Buffalo WLI-UC-AG300N
.It Buffalo WLI-UC-G300N
.It Buffalo WLI-UC-GN
.It Corega CG-WLUSB2GNL
.It Corega CG-WLUSB2GNR
.It Corega CG-WLUSB300AGN
.It Corega CG-WLUSB300GNM
.It D-Link DWA-130 rev B1
.It D-Link DWA-140
.It DrayTek Vigor N61
.It Edimax EW-7711UAn
.It Edimax EW-7711UTn
.It Edimax EW-7717Un
.It Edimax EW-7718Un
.It Gigabyte GN-WB30N
.It Gigabyte GN-WB31N
.It Gigabyte GN-WB32L
.It Hawking HWDN1
.It Hawking HWUN1
.It Hawking HWUN2
.It Hercules HWNU-300
.It Linksys WUSB54GC v3
.It Linksys WUSB600N
.It Mvix Nubbin MS-811N
.It Planex GW-USMicroN
.It Planex GW-US300MiniS
.It Sitecom WL-182
.It Sitecom WL-188
.It Sitecom WL-301
.It Sitecom WL-302
.It Sitecom WL-315
.It SMC SMCWUSBS-N2
.It Sweex LW303
.It Sweex LW313
.It Unex DNUR-81
.It Unex DNUR-82
.It ZyXEL NWD210N
.It ZyXEL NWD270N
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Pp
.Bd -literal -offset indent
ifconfig wlan create wlandev run0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Pp
.Dl "ifconfig wlan create wlandev run0 ssid my_net up"
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev run0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Join a specific BSS network with 128-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev run0 wlanmode adhoc ssid my_net \e
wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
.Ed
.Sh DIAGNOSTICS
.Bl -diag
.It "run%d: error %d, could not read firmware %s"
For some reason, the driver was unable to read the microcode file from the
filesystem.
The file might be missing or corrupted.
.It "run%d: could not load 8051 microcode"
An error occurred while attempting to upload the microcode to the onboard 8051
microcontroller unit.
.It "run%d: device timeout"
A frame dispatched to the hardware for transmission did not complete in time.
The driver will reset the hardware.
This should not happen.
.El
.Sh SEE ALSO
.Xr intro 4 ,
.Xr netintro 4 ,
.Xr usb 4 ,
.Xr wlan 4 ,
.Xr wlan_amrr 4 ,
.Xr wlan_ccmp 4 ,
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr wlan_xauth 4 ,
.Xr ifconfig 8 ,
.Xr hostapd 8 ,
.Xr wpa_supplicant 8 .
.Pp
Ralink Technology:
.Pa http://www.ralinktech.com/
.Sh HISTORY
The
.Nm
driver first appeared in
.Ox 4.5 .
.Sh AUTHORS
The
.Nm
driver was written by
.An Damien Bergamini Aq damien@openbsd.org .
.Sh CAVEATS
The
.Nm
driver does not support any of the 802.11n capabilities offered by the
RT2800 and RT3000 chipsets.

View File

@ -1692,6 +1692,7 @@ dev/usb/net/uhso.c optional uhso
# USB WLAN drivers
#
dev/usb/wlan/if_rum.c optional rum
dev/usb/wlan/if_run.c optional run
dev/usb/wlan/if_uath.c optional uath
dev/usb/wlan/if_upgt.c optional upgt
dev/usb/wlan/if_ural.c optional ural

View File

@ -0,0 +1,39 @@
Copyright (c) 2007, Ralink Technology Corporation
All rights reserved.
Redistribution. Redistribution and use in binary form, without
modification, are permitted provided that the following conditions are
met:
* Redistributions must reproduce the above copyright notice and the
following disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of Ralink Technology Corporation nor the names of its
suppliers may be used to endorse or promote products derived from this
software without specific prior written permission.
* No reverse engineering, decompilation, or disassembly of this software
is permitted.
Limited patent license. Ralink Technology Corporation grants a world-wide,
royalty-free, non-exclusive license under patents it now or hereafter
owns or controls to make, have made, use, import, offer to sell and
sell ("Utilize") this software, but solely to the extent that any
such patent is necessary to Utilize the software alone, or in
combination with an operating system licensed under an approved Open
Source license as listed by the Open Source Initiative at
http://opensource.org/licenses. The patent license shall not apply to
any other combinations which include this software. No hardware per
se is licensed hereunder.
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

Binary file not shown.

View File

@ -524,6 +524,7 @@ vendor ELCON 0x0db7 ELCON Systemtechnik
vendor NETAC 0x0dd8 Netac
vendor SITECOMEU 0x0df6 Sitecom Europe
vendor MOBILEACTION 0x0df7 Mobile Action
vendor AMIGO 0x0e0b Amigo Technology
vendor SPEEDDRAGON 0x0e55 Speed Dragon Multimedia
vendor HAWKING 0x0e66 Hawking
vendor FOSSIL 0x0e67 Fossil, Inc
@ -589,12 +590,14 @@ vendor NETGEAR3 0x1385 Netgear
vendor BALTECH 0x13ad Baltech
vendor CISCOLINKSYS 0x13b1 Cisco-Linksys
vendor SHARK 0x13d2 Shark
vendor AZUREWAVE 0x13d3 AsureWave
vendor EMTEC 0x13fe Emtec
vendor NOVATEL 0x1410 Novatel Wireless
vendor MERLIN 0x1416 Merlin
vendor WISTRONNEWEB 0x1435 Wistron NeWeb
vendor RADIOSHACK 0x1453 Radio Shack
vendor HUAWEI3COM 0x1472 Huawei-3Com
vendor ABOCOM2 0x1482 AboCom Systems
vendor SILICOM 0x1485 Silicom
vendor RALINK 0x148f Ralink Technology
vendor IMAGINATION 0x149a Imagination Technologies
@ -610,6 +613,7 @@ vendor OQO 0x1557 OQO
vendor UMEDIA 0x157e U-MEDIA Communications
vendor FIBERLINE 0x1582 Fiberline
vendor SPARKLAN 0x15a9 SparkLAN
vendor AMIT2 0x15c5 AMIT
vendor SOHOWARE 0x15e8 SOHOware
vendor UMAX 0x1606 UMAX Data Systems
vendor INSIDEOUT 0x1608 Inside Out Networks
@ -617,6 +621,7 @@ vendor AMOI 0x1614 Amoi Electronics
vendor GOODWAY 0x1631 Good Way Technology
vendor ENTREGA 0x1645 Entrega
vendor ACTIONTEC 0x1668 Actiontec Electronics
vendor CISCOLINKSYS2 0x167b Cisco-Linksys
vendor ATHEROS 0x168c Atheros Communications
vendor GIGASET 0x1690 Gigaset
vendor GLOBALSUN 0x16ab Global Sun Technology
@ -626,6 +631,8 @@ vendor CMOTECH 0x16d8 C-motech
vendor AXESSTEL 0x1726 Axesstel Co., Ltd.
vendor LINKSYS4 0x1737 Linksys
vendor SENAO 0x1740 Senao
vendor ASUS2 0x1761 ASUS
vendor SWEEX2 0x177f Sweex
vendor METAGEEK 0x1781 MetaGeek
vendor AMIT 0x18c5 AMIT
vendor QCOM 0x18e8 Qcom
@ -637,11 +644,15 @@ vendor TCTMOBILE 0x1bbb TCT Mobile
vendor TELIT 0x1bc7 Telit
vendor MPMAN 0x1cae MpMan
vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
vendor PEGATRON 0x1d4d Pegatron
vendor QISDA 0x1da5 Qisda
vendor ALINK 0x1e0e Alink
vendor AIRTIES 0x1eda AirTies
vendor DLINK 0x2001 D-Link
vendor PLANEX2 0x2019 Planex Communications
vendor TLAYTECH 0x20b9 Tlay Tech
vendor ENCORE 0x203d Encore
vendor PARA 0x20b8 PARA Industrial
vendor ERICSSON 0x2282 Ericsson
vendor MOTOROLA2 0x22b8 Motorola
vendor TRIPPLITE 0x2478 Tripp-Lite
@ -667,6 +678,7 @@ vendor ZINWELL 0x5a57 Zinwell
vendor SITECOM 0x6189 Sitecom
vendor ARKMICRO 0x6547 Arkmicro Technologies Inc.
vendor 3COM2 0x6891 3Com
vendor EDIMAX 0x7392 Edimax
vendor INTEL 0x8086 Intel
vendor INTEL2 0x8087 Intel
vendor SITECOM2 0x9016 Sitecom
@ -701,6 +713,12 @@ product 3COMUSR USR56K 0x3021 U.S. Robotics 56000 Voice FaxModem Pro
/* AboCom products */
product ABOCOM XX1 0x110c XX1
product ABOCOM XX2 0x200c XX2
product ABOCOM RT2770 0x2770 RT2770
product ABOCOM RT2870 0x2870 RT2870
product ABOCOM RT3070 0x3070 RT3070
product ABOCOM RT3071 0x3071 RT3071
product ABOCOM RT3072 0x3072 RT3072
product ABOCOM2 RT2870_1 0x3c09 RT2870
product ABOCOM URE450 0x4000 URE450 Ethernet Adapter
product ABOCOM UFE1000 0x4002 UFE1000 Fast Ethernet Adapter
product ABOCOM DSB650TX_PNA 0x4003 1/10/100 Ethernet Adapter
@ -731,6 +749,17 @@ product ACCTON SMCWUSBTG2_NF 0x4507 SMCWUSBT-G2 (no firmware)
product ACCTON SMCWUSBTG2 0x4508 SMCWUSBT-G2
product ACCTON PRISM_GT 0x4521 PrismGT USB 2.0 WLAN
product ACCTON SS1001 0x5046 SpeedStream Ethernet Adapter
product ACCTON RT2870_2 0x6618 RT2870
product ACCTON RT3070 0x7511 RT3070
product ACCTON RT2770 0x7512 RT2770
product ACCTON RT2870_3 0x7522 RT2870
product ACCTON RT2870_5 0x8522 RT2870
product ACCTON RT3070_4 0xa512 RT3070
product ACCTON RT2870_4 0xa618 RT2870
product ACCTON RT3070_1 0xa701 RT3070
product ACCTON RT3070_2 0xa702 RT3070
product ACCTON RT2870_1 0xb522 RT2870
product ACCTON RT3070_3 0xc522 RT3070
product ACCTON ZD1211B 0xe501 ZD1211B
/* Aceeca products */
@ -833,6 +862,9 @@ product AIRPLUS MCD650 0x3198 MCD650 modem
/* AirPrime products */
product AIRPRIME PC5220 0x0112 CDMA Wireless PC Card
/* AirTies products */
product AIRTIES RT3070 0x2310 RT3070
/* AKS products */
product AKS USBHASP 0x0001 USB-HASP 0.06
@ -872,8 +904,20 @@ product APC UPS 0x0002 Uninterruptible Power Supply
product AMBIT WLAN 0x0302 WLAN
product AMBIT NTL_250 0x6098 NTL 250 cable modem
/* American Power Conversion products */
product APC UPS 0x0002 Uninterruptible Power Supply
/* Amigo Technology products */
product AMIGO RT2870_1 0x9031 RT2870
product AMIGO RT2870_2 0x9041 RT2870
/* AMIT products */
product AMIT CGWLUSB2GO 0x0002 CG-WLUSB2GO
product AMIT CGWLUSB2GNR 0x0008 CG-WLUSB2GNR
product AMIT RT2870_1 0x0012 RT2870
/* AMIT(2) products */
product AMIT2 RT2870 0x0008 RT2870
/* Anchor products */
product ANCHOR EZUSB 0x2131 EZUSB
@ -933,6 +977,7 @@ product ASIX AX88772 0x7720 AX88772
product ASIX AX88772A 0x772a AX88772A USB 2.0 10/100 Ethernet
/* ASUS products */
product ASUS2 USBN11 0x0b05 USB-N11
product ASUS WL167G 0x1707 WL-167g Wireless Adapter
product ASUS WL159G 0x170c WL-159g
product ASUS A9T_WIFI 0x171b A9T wireless
@ -940,6 +985,12 @@ product ASUS P5B_WIFI 0x171d P5B wireless
product ASUS RT2573_1 0x1723 RT2573
product ASUS RT2573_2 0x1724 RT2573
product ASUS LCM 0x1726 LCM display
product ASUS RT2870_1 0x1731 RT2870
product ASUS RT2870_2 0x1732 RT2870
product ASUS RT2870_3 0x1742 RT2870
product ASUS RT2870_4 0x1760 RT2870
product ASUS RT2870_5 0x1761 RT2870
product ASUS RT3070 0x1784 RT3070
product ASUS P535 0x420f ASUS P535 PDA
product ASUS GMSC 0x422f ASUS Generic Mass Storage
product ASUS RT2570 0x1706 RT2500USB Wireless Adapter
@ -976,6 +1027,13 @@ product AVISION 1200U 0x0268 1200U scanner
/* Axesstel products */
product AXESSTEL DATAMODEM 0x1000 Data Modem
/* AsureWave products */
product AZUREWAVE RT2870_1 0x3247 RT2870
product AZUREWAVE RT2870_2 0x3262 RT2870
product AZUREWAVE RT3070_1 0x3273 RT3070
product AZUREWAVE RT3070_2 0x3284 RT3070
product AZUREWAVE RT3070_3 0x3305 RT3070
/* Baltech products */
product BALTECH CARDREADER 0x9999 Card reader
@ -1006,8 +1064,13 @@ product BELKIN F5D7050A 0x705a F5D7050A Wireless Adapter
/* Also sold as 'Ativa 802.11g wireless card' */
product BELKIN F5D7050_V4000 0x705c F5D7050 v4000 Wireless Adapter
product BELKIN F5D7050E 0x705e F5D7050E Wireless Adapter
product BELKIN RT2870_1 0x8053 RT2870
product BELKIN RT2870_2 0x805c RT2870
product BELKIN F5D8053V3 0x815c F5D8053 v3
product BELKIN F5D8055 0x825a F5D8055
product BELKIN F5D9050V3 0x905b F5D9050 ver 3 Wireless Adapter
product BELKIN2 F5U002 0x0002 F5U002 Parallel printer
product BELKIN F6D4050V1 0x935a F6D4050 v1
/* Billionton products */
product BILLIONTON USB100 0x0986 USB100N 10/100 FastEthernet
@ -1084,6 +1147,7 @@ product CISCOLINKSYS HU200TS 0x001a HU200TS Wireless Adapter
product CISCOLINKSYS WUSB54GC 0x0020 WUSB54GC
product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR
product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G
product CISCOLINKSYS2 RT3070 0x4001 RT3070
/* CMOTECH products */
product CMOTECH CNU510 0x5141 CDMA Technologies USB modem
@ -1110,6 +1174,15 @@ product CONCEPTRONIC AR5523_2 0x7811 AR5523
product CONCEPTRONIC AR5523_2_NF 0x7812 AR5523 (no firmware)
product CONCEPTRONIC2 C54RU 0x3c02 C54RU WLAN
product CONCEPTRONIC2 C54RU2 0x3c22 C54RU
product CONCEPTRONIC2 VIGORN61 0x3c25 VIGORN61
product CONCEPTRONIC2 RT2870_1 0x3c06 RT2870
product CONCEPTRONIC2 RT2870_2 0x3c07 RT2870
product CONCEPTRONIC2 RT2870_7 0x3c09 RT2870
product CONCEPTRONIC2 RT2870_8 0x3c12 RT2870
product CONCEPTRONIC2 RT2870_3 0x3c23 RT2870
product CONCEPTRONIC2 RT2870_4 0x3c25 RT2870
product CONCEPTRONIC2 RT2870_5 0x3c27 RT2870
product CONCEPTRONIC2 RT2870_6 0x3c28 RT2870
/* Connectix products */
product CONNECTIX QUICKCAM 0x0001 QuickCam
@ -1124,6 +1197,12 @@ product COREGA FETHER_USB2_TX 0x0017 FEther USB2-TX
product COREGA WLUSB_11_KEY 0x001a ULUSB-11 Key
product COREGA CGWLUSB2GL 0x002d CG-WLUSB2GL
product COREGA CGWLUSB2GPX 0x002e CG-WLUSB2GPX
product COREGA RT2870_1 0x002f RT2870
product COREGA RT2870_2 0x003c RT2870
product COREGA RT2870_3 0x003f RT2870
product COREGA RT3070 0x0041 RT3070
product COREGA CGWLUSB300GNM 0x0042 CG-WLUSB300GNM
product COREGA WLUSB_11_STICK 0x7613 WLAN USB Stick 11
product COREGA FETHER_USB_TXC 0x9601 FEther USB-TXC
@ -1152,6 +1231,7 @@ product CYBERPOWER 1500CAVRLCD 0x0501 1500CAVRLCD
/* CyberTAN Technology products */
product CYBERTAN TG54USB 0x1666 TG54USB
product CYBERTAN RT2870 0x1828 RT2870
/* Cypress Semiconductor products */
product CYPRESS MOUSE 0x0001 mouse
@ -1229,6 +1309,8 @@ product DLINK DWLAG122 0x3a04 DWL-AG122
product DLINK DWLAG122_NF 0x3a05 DWL-AG122 (no firmware)
product DLINK DWLG122 0x3c00 DWL-G122 b1 Wireless Adapter
product DLINK DUBE100B1 0x3c05 DUB-E100 rev B1
product DLINK RT2870 0x3c09 RT2870
product DLINK RT3072 0x3c0a RT3072
product DLINK DSB650C 0x4000 10Mbps Ethernet
product DLINK DSB650TX1 0x4001 10/100 Ethernet
product DLINK DSB650TX 0x4002 10/100 Ethernet
@ -1241,7 +1323,15 @@ product DLINK2 DWA120_NF 0x3a0d DWA-120 (no firmware)
product DLINK2 DWLG122C1 0x3c03 DWL-G122 c1
product DLINK2 WUA1340 0x3c04 WUA-1340
product DLINK2 DWA111 0x3c06 DWA-111
product DLINK2 RT2870_1 0x3c09 RT2870
product DLINK2 DWA110 0x3c07 DWA-110
product DLINK2 RT3072 0x3c0a RT3072
product DLINK2 RT3070_1 0x3c0d RT3070
product DLINK2 RT3070_2 0x3c0e RT3070
product DLINK2 RT3070_3 0x3c0f RT3070
product DLINK2 RT2870_2 0x3c11 RT2870
product DLINK2 DWA130 0x3c13 DWA-130
product DLINK2 RT3070_4 0x3c15 RT3070
product DLINK3 DWM652 0x3e04 DWM-652
/* DMI products */
@ -1257,6 +1347,12 @@ product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Ter
/* Dynastream Innovations */
product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board
/* Edimax products */
product EDIMAX EW7318USG 0x7318 USB Wireless dongle
product EDIMAX RT2870_1 0x7711 RT2870
product EDIMAX EW7717 0x7717 EW-7717
product EDIMAX EW7718 0x7718 EW-7718
/* Eicon Networks */
product EICON DIVA852 0x4905 Diva 852 ISDN TA
@ -1285,6 +1381,11 @@ product ELSA USB2ETHERNET 0x3000 Microlink USB2Ethernet
/* EMS products */
product EMS DUAL_SHOOTER 0x0003 PSX gun controller converter
/* Encore products */
product ENCORE RT3070_1 0x1480 RT3070
product ENCORE RT3070_2 0x14a1 RT3070
product ENCORE RT3070_3 0x14a9 RT3070
/* Entrega products */
product ENTREGA 1S 0x0001 1S serial
product ENTREGA 2S 0x0002 2S serial
@ -1429,6 +1530,11 @@ product GIGASET SMCWUSBTG_NF 0x0711 SMCWUSBT-G (no firmware)
product GIGASET AR5523 0x0712 AR5523
product GIGASET AR5523_NF 0x0713 AR5523 (no firmware)
product GIGASET RT2573 0x0722 RT2573
product GIGASET RT3070_1 0x0740 RT3070
product GIGASET RT3070_2 0x0744 RT3070
product GIGABYTE RT2870_1 0x800b RT2870
product GIGABYTE GNWB31N 0x800c GN-WB31N
product GIGABYTE GNWB32L 0x800d GN-WB32L
/* Global Sun Technology product */
product GLOBALSUN AR5523_1 0x7801 AR5523
@ -1464,6 +1570,7 @@ product GUILLEMOT DALEADER 0xa300 DA Leader
product GUILLEMOT HWGUSB254 0xe000 HWGUSB2-54 WLAN
product GUILLEMOT HWGUSB254LB 0xe010 HWGUSB2-54-LB
product GUILLEMOT HWGUSB254V2AP 0xe020 HWGUSB2-54V2-AP
product GUILLEMOT HWNU300 0xe030 HWNU-300
/* Hagiwara products */
product HAGIWARA FGSM 0x0002 FlashGate SmartMedia Card Reader
@ -1482,6 +1589,10 @@ product HANDSPRING TREO600 0x0300 Handspring Treo 600
product HAUPPAUGE WINTV_USB_FM 0x4d12 WinTV USB FM
/* Hawking Technologies products */
product HAWKING RT2870_1 0x0001 RT2870
product HAWKING RT2870_2 0x0003 RT2870
product HAWKING HWUN2 0x0009 HWUN2
product HAWKING RT3070 0x000b RT3070
product HAWKING UF100 0x400c 10/100 USB Ethernet
/* Hitachi, Ltd. products */
@ -1528,6 +1639,7 @@ product HP 2215 0x1016 iPAQ 22xx/Jornada 548
product HP 568J 0x1116 Jornada 568
product HP 930C 0x1204 DeskJet 930c
product HP P2000U 0x1801 Inkjet P-2000U
product HP HS2300 0x1e1d HS2300 HSDPA (aka MC8775)
product HP 640C 0x2004 DeskJet 640c
product HP 4670V 0x3005 ScanJet 4670v
product HP P1100 0x3102 Photosmart P1100
@ -1655,6 +1767,10 @@ product IODATA USBETTXS 0x0913 USB ETTX
product IODATA USBWNB11A 0x0919 USB WN-B11
product IODATA USBWNB11 0x0922 USB Airport WN-B11
product IODATA ETGUS2 0x0930 ETG-US2
product IODATA RT3072_1 0x0944 RT3072
product IODATA RT3072_2 0x0945 RT3072
product IODATA RT3072_3 0x0947 RT3072
product IODATA RT3072_4 0x0948 RT3072
product IODATA USBRSAQ 0x0a03 Serial USB-RSAQ1
product IODATA2 USB2SC 0x0a09 USB2.0-SCSI Bridge USB2-SC
@ -1779,7 +1895,11 @@ product LINKSYS2 WUSB11 0x2219 WUSB11 Wireless Adapter
product LINKSYS2 USB200M 0x2226 USB 2.0 10/100 Ethernet
product LINKSYS3 WUSB11v28 0x2233 WUSB11 v2.8 Wireless Adapter
product LINKSYS4 USB1000 0x0039 USB1000
product LINKSYS4 WUSB100 0x0070 WUSB100
product LINKSYS4 WUSB600N 0x0071 WUSB600N
product LINKSYS4 WUSB54GCV2 0x0073 WUSB54GC v2
product LINKSYS4 WUSB54GCV3 0x0077 WUSB54GC v3
product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2
/* Logitech products */
product LOGITECH M2452 0x0203 M2452 keyboard
@ -1809,6 +1929,9 @@ product LOGITECH QUICKCAMPRO2 0xd001 QuickCam Pro
/* Logitec Corp. products */
product LOGITEC LDR_H443SU2 0x0033 DVD Multi-plus unit LDR-H443SU2
product LOGITEC LDR_H443U2 0x00b3 DVD Multi-plus unit LDR-H443U2
product LOGITEC RT2870_1 0x0162 RT2870
product LOGITEC RT2870_2 0x0163 RT2870
product LOGITEC RT2870_3 0x0164 RT2870
/* Lucent products */
product LUCENT EVALKIT 0x1001 USS-720 evaluation kit
@ -1846,7 +1969,10 @@ product MELCO PCOPRS1 0x00b3 PC-OP-RS1 RemoteStation
product MELCO SG54HP 0x00d8 WLI-U2-SG54HP
product MELCO G54HP 0x00d9 WLI-U2-G54HP
product MELCO KG54L 0x00da WLI-U2-KG54L
product MELCO WLIUCG300N 0x00e8 WLI-UC-G300N
product MELCO SG54HG 0x00f4 WLI-U2-SG54HG
product MELCO WLIUCAG300N 0x012e WLI-UC-AG300N
product MELCO WLIUCGN 0x015d WLI-UC-GN
/* Merlin products */
product MERLIN V620 0x1110 Merlin V620
@ -1864,15 +1990,25 @@ product MGE UPS2 0xffff MGE UPS SYSTEMS PROTECTIONCENTER 2
/* Micro Star International products */
product MSI BT_DONGLE 0x1967 Bluetooth USB dongle
product MSI RT3070_1 0x3820 RT3070
product MSI RT3070_2 0x3821 RT3070
product MSI RT3070_3 0x3870 RT3070
product MSI UB11B 0x6823 UB11B
product MSI RT2570 0x6861 RT2570
product MSI RT2570_2 0x6865 RT2570
product MSI RT2570_3 0x6869 RT2570
product MSI RT2573_1 0x6874 RT2573
product MSI RT2573_2 0x6877 RT2573
product MSI RT3070_4 0x6899 RT3070
product MSI RT3070_5 0x821a RT3070
product MSI RT3070_6 0x870a RT3070
product MSI RT3070_7 0x899a RT3070
product MSI RT2573_3 0xa861 RT2573
product MSI RT2573_4 0xa874 RT2573
/* Microdia products */
product MICRODIA TWINKLECAM 0x600d TwinkleCam USB camera
/* Microsoft products */
product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro
product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse
@ -2021,8 +2157,12 @@ product NIKON D300 0x041a Digital Camera D300
product NOVATECH NV902 0x9020 NovaTech NV-902W
product NOVATECH RT2573 0x9021 RT2573
/* Nokia products */
product NOKIA N958GB 0x0070 Nokia N95 8GBc
/* Novatel Wireless products */
product NOVATEL V640 0x1100 Merlin V620
product NOVATEL CDMA_MODEM 0x1110 Novatel Wireless Merlin CDMA
product NOVATEL V620 0x1110 Merlin V620
product NOVATEL V740 0x1120 Merlin V740
product NOVATEL V720 0x1130 Merlin V720
@ -2034,6 +2174,7 @@ product NOVATEL X950D 0x1450 Merlin X950D
product NOVATEL ES620 0x2100 Expedite ES620
product NOVATEL E725 0x2120 Expedite E725
product NOVATEL ES620_2 0x2130 Expedite ES620
product NOVATEL ES620 0x2100 ES620 CDMA
product NOVATEL U720 0x2110 Merlin U720
product NOVATEL EU730 0x2400 Expedite EU730
product NOVATEL EU740 0x2410 Expedite EU740
@ -2140,6 +2281,14 @@ product PANASONIC KXLCB20AN 0x0d0a CD-R Drive KXL-CB20AN
product PANASONIC KXLCB35AN 0x0d0e DVD-ROM & CD-R/RW
product PANASONIC SDCAAE 0x1b00 MultiMediaCard
/* PARA Industrial products */
product PARA RT3070 0x8888 RT3070
/* Pegatron products */
product PEGATRON RT2870 0x0002 RT2870
product PEGATRON RT3070 0x000c RT3070
product PEGATRON RT3070_2 0x000e RT3070
/* Peracom products */
product PERACOM SERIAL1 0x0001 Serial
product PERACOM ENET 0x0002 Ethernet
@ -2157,6 +2306,7 @@ product PHILIPS SPE3030CC 0x083a USB 2.0 External Disk
product PHILIPS SNU5600 0x1236 SNU5600
product PHILIPS UM10016 0x1552 ISP 1581 Hi-Speed USB MPEG2 Encoder Reference Kit
product PHILIPS DIVAUSB 0x1801 DIVA USB mp3 player
product PHILIPS RT2870 0x200f RT2870
/* Philips Semiconductor products */
product PHILIPSSEMI HUB1122 0x1122 HUB
@ -2172,11 +2322,15 @@ product PLANEX GW_US11H 0x14ea GW-US11H WLAN
product PLANEX2 GW_US11S 0x3220 GW-US11S WLAN
product PLANEX2 GW_US54GXS 0x5303 GW-US54GXS WLAN
product PLANEX2 GWUS54HP 0xab01 GW-US54HP
product PLANEX2 GWUS300MINIS 0xab24 GW-US300MiniS
product PLANEX2 RT3070 0xab25 RT3070
product PLANEX2 GWUS54MINI2 0xab50 GW-US54Mini2
product PLANEX2 GWUS54SG 0xc002 GW-US54SG
product PLANEX2 GWUS54GZL 0xc007 GW-US54GZL
product PLANEX2 GWUS54GD 0xed01 GW-US54GD
product PLANEX2 GWUSMM 0xed02 GW-USMM
product PLANEX2 RT2870 0xed06 RT2870
product PLANEX2 GWUSMICRON 0xed14 GW-USMicroN
product PLANEX3 GWUS54GZ 0xab10 GW-US54GZ
product PLANEX3 GU1000T 0xab11 GU-1000T
product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini
@ -2234,6 +2388,7 @@ product PUTERCOM UPA100 0x047e USB-1284 BRIDGE
product QCOM RT2573 0x6196 RT2573
product QCOM RT2573_2 0x6229 RT2573
product QCOM RT2573_3 0x6238 RT2573
product QCOM RT2870 0x6259 RT2870
/* Qisda products */
product QISDA H21_1 0x4512 3G modem
@ -2320,6 +2475,8 @@ product QUALCOMMINC E2002 0x2002 3G modem
product QUALCOMMINC E2003 0x2003 3G modem
/* Quanta products */
/* Quanta products */
product QUANTA RT3070 0x0304 RT3070
product QUANTA Q101 0xea02 HSDPA modem
product QUANTA Q111 0xea03 HSDPA modem
product QUANTA GLX 0xea04 HSDPA modem
@ -2340,9 +2497,16 @@ product RAINBOW IKEY2000 0x1200 i-Key 2000
/* Ralink Technology products */
product RALINK RT2570 0x1706 RT2500USB Wireless Adapter
product RALINK RT2070 0x2070 RT2070
product RALINK RT2570_2 0x2570 RT2500USB Wireless Adapter
product RALINK RT2573 0x2573 RT2501USB Wireless Adapter
product RALINK RT2671 0x2671 RT2601USB Wireless Adapter
product RALINK RT2770 0x2770 RT2770
product RALINK RT2870 0x2870 RT2870
product RALINK RT3070 0x3070 RT3070
product RALINK RT3071 0x3071 RT3071
product RALINK RT3072 0x3072 RT3072
product RALINK RT3572 0x3572 RT3572
product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter
product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter
@ -2383,6 +2547,7 @@ product SAGEM XG76NA 0x0062 XG-76NA
product SAMSUNG ML6060 0x3008 ML-6060 laser printer
product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player
product SAMSUNG I500 0x6601 I500 Palm USB Phone
product SAMSUNG2 RT2870_1 0x2018 RT2870
/* Samsung Techwin products */
product SAMSUNG_TECHWIN DIGIMAX_410 0x000a Digimax 410
@ -2406,7 +2571,18 @@ product SCANLOGIC SL11R 0x0002 SL11R IDE Adapter
product SCANLOGIC 336CX 0x0300 Phantom 336CX - C3 scanner
/* Senao products */
product SENAO RT2870_3 0x0605 RT2870
product SENAO RT2870_4 0x0615 RT2870
product SENAO NUB8301 0x2000 NUB-8301
product SENAO RT2870_1 0x9701 RT2870
product SENAO RT2870_2 0x9702 RT2870
product SENAO RT3070 0x9703 RT3070
product SENAO RT3071 0x9705 RT3071
product SENAO RT3072_1 0x9706 RT3072
product SENAO RT3072_2 0x9707 RT3072
product SENAO RT3072_3 0x9708 RT3072
product SENAO RT3072_4 0x9709 RT3072
product SENAO RT3072_5 0x9801 RT3072
/* ShanTou products */
product SHANTOU ST268 0x0268 ST268
@ -2453,7 +2629,9 @@ product SIEMENS3 X75 0x0004 X75
product SIERRA EM5625 0x0017 EM5625
product SIERRA MC5720_2 0x0018 MC5720
product SIERRA MC5725 0x0020 MC5725
product SIERRA AIRCARD580 0x0112 Sierra Wireless AirCard 580
product SIERRA AIRCARD595 0x0019 Sierra Wireless AirCard 595
product SIERRA AC595U 0x0120 Sierra Wireless AirCard 595U
product SIERRA AC597E 0x0021 Sierra Wireless AirCard 597E
product SIERRA EM5725 0x0022 EM5725
product SIERRA C597 0x0023 Sierra Wireless Compass 597
@ -2553,8 +2731,24 @@ product SITECOM SERIAL 0x2068 USB to serial cable (v2)
product SITECOM2 WL022 0x182d WL-022
/* Sitecom Europe products */
product SITECOMEU RT2870_1 0x0017 RT2870
product SITECOMEU WL168V1 0x000d WL-168 v1
product SITECOMEU WL168V4 0x0028 WL-168 v4
product SITECOMEU RT2870_2 0x002b RT2870
product SITECOMEU RT2870_3 0x002c RT2870
product SITECOMEU RT2870_4 0x002d RT2870
product SITECOMEU RT2770 0x0039 RT2770
product SITECOMEU RT3070_2 0x003b RT3070
product SITECOMEU RT3070_3 0x003c RT3070
product SITECOMEU RT3070_4 0x003d RT3070
product SITECOMEU RT3070 0x003e RT3070
product SITECOMEU WL608 0x003f WL-608
product SITECOMEU RT3072_1 0x0041 RT3072
product SITECOMEU RT3072_2 0x0042 RT3072
product SITECOMEU RT3072_3 0x0047 RT3072
product SITECOMEU RT3072_4 0x0048 RT3072
product SITECOMEU RT3072_5 0x004a RT3072
product SITECOMEU RT3072_6 0x004d RT3072
product SITECOMEU LN028 0x061c LN-028
product SITECOMEU WL113 0x9071 WL-113
product SITECOMEU ZD1211B 0x9075 ZD1211B
@ -2612,7 +2806,9 @@ product SOURCENEXT KEIKAI8 0x039f KeikaiDenwa 8
product SOURCENEXT KEIKAI8_CHG 0x012e KeikaiDenwa 8 with charger
/* SparkLAN products */
product SPARKLAN RT2573 0x0004 RT2573
product SPARKLAN RT2573 0x0004 RT2573
product SPARKLAN RT2870_1 0x0006 RT2870
product SPARKLAN RT3070 0x0010 RT3070
/* Sphairon Access Systems GmbH products */
product SPHAIRON UB801R 0x0110 UB801R
@ -2682,6 +2878,8 @@ product SURECOM RT2573 0x31f3 RT2573
/* Sweex products */
product SWEEX ZD1211 0x1809 ZD1211
product SWEEX2 LW303 0x0302 LW303
product SWEEX2 LW313 0x0313 LW313
/* System TALKS, Inc. */
product SYSTEMTALKS SGCX2UL 0x1920 SGC-X2UL
@ -2775,6 +2973,7 @@ product UMEDIA TEW444UBEU_NF 0x3007 TEW-444UB EU (no firmware)
product UMEDIA TEW429UB_A 0x300a TEW-429UB_A
product UMEDIA TEW429UB 0x300b TEW-429UB
product UMEDIA TEW429UBC1 0x300d TEW-429UB C1
product UMEDIA RT2870_1 0x300e RT2870
product UMEDIA ALL0298V2 0x3204 ALL0298 v2
product UMEDIA AR5523_2 0x3205 AR5523
product UMEDIA AR5523_2_NF 0x3206 AR5523 (no firmware)
@ -2883,9 +3082,16 @@ product ZCOM AR5523 0x0012 AR5523
product ZCOM AR5523_NF 0x0013 AR5523 driver (no firmware)
product ZCOM XM142 0x0015 XM-142
product ZCOM ZD1211B 0x001a ZD1211B
product ZCOM RT2870_1 0x0022 RT2870
product ZCOM RT2870_2 0x0025 RT2870
/* Zinwell products */
product ZINWELL RT2570 0x0260 RT2570
product ZINWELL RT2870_1 0x0280 RT2870
product ZINWELL RT2870_2 0x0282 RT2870
product ZINWELL RT3072_1 0x0283 RT3072
product ZINWELL RT3072_2 0x0284 RT3072
product ZINWELL RT3070 0x5257 RT3070
/* Zoom Telephonics, Inc. products */
product ZOOM 2986L 0x9700 2986L Fax modem
@ -2906,3 +3112,4 @@ product ZYXEL AG225H 0x3409 AG-225H
product ZYXEL M202 0x340a M-202
product ZYXEL G220V2 0x340f G-220 v2
product ZYXEL G202 0x3410 G-202
product ZYXEL RT2870_1 0x3416 RT2870

4143
sys/dev/usb/wlan/if_run.c Normal file

File diff suppressed because it is too large Load Diff

1130
sys/dev/usb/wlan/if_runreg.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,222 @@
/* $OpenBSD: if_runvar.h,v 1.3 2009/03/26 20:17:27 damien Exp $ */
/*-
* Copyright (c) 2008,2009 Damien Bergamini <damien.bergamini@free.fr>
* ported to FreeBSD by Akinori Furukoshi <moonlightakkiy@yahoo.ca>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD$
*/
#ifndef _IF_RUNVAR_H_
#define _IF_RUNVAR_H_
#define RUN_MAX_RXSZ \
MIN(4096, MJUMPAGESIZE)
#if 0
(sizeof (uint32_t) + \
sizeof (struct rt2860_rxwi) + \
sizeof (uint16_t) + \
MCLBYTES + \
sizeof (struct rt2870_rxd))
#endif
/* NB: "11" is the maximum number of padding bytes needed for Tx */
#define RUN_MAX_TXSZ \
(sizeof (struct rt2870_txd) + \
sizeof (struct rt2860_rxwi) + \
MCLBYTES + 11)
#define RUN_TX_TIMEOUT 5000 /* ms */
/* Tx ring count was 8/endpoint, now 32 for all 4 (or 6) endpoints. */
#define RUN_TX_RING_COUNT 32
#define RUN_RX_RING_COUNT 1
#define RT2870_WCID_MAX 253
#define RUN_AID2WCID(aid) ((aid) & 0xff)
struct run_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
uint8_t wr_flags;
uint8_t wr_rate;
uint16_t wr_chan_freq;
uint16_t wr_chan_flags;
uint8_t wr_dbm_antsignal;
uint8_t wr_antenna;
uint8_t wr_antsignal;
} __packed;
#define RUN_RX_RADIOTAP_PRESENT \
(1 << IEEE80211_RADIOTAP_FLAGS | \
1 << IEEE80211_RADIOTAP_RATE | \
1 << IEEE80211_RADIOTAP_CHANNEL | \
1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL | \
1 << IEEE80211_RADIOTAP_ANTENNA | \
1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL)
struct run_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
uint8_t wt_hwqueue;
} __packed;
#define IEEE80211_RADIOTAP_HWQUEUE 15
#define RUN_TX_RADIOTAP_PRESENT \
(1 << IEEE80211_RADIOTAP_FLAGS | \
1 << IEEE80211_RADIOTAP_RATE | \
1 << IEEE80211_RADIOTAP_CHANNEL | \
1 << IEEE80211_RADIOTAP_HWQUEUE)
struct run_softc;
struct run_tx_data {
STAILQ_ENTRY(run_tx_data) next;
struct run_softc *sc;
struct mbuf *m;
struct ieee80211_node *ni;
uint32_t align[0]; /* dummy field */
uint8_t desc[sizeof(struct rt2870_txd) +
sizeof(struct rt2860_txwi)];
int ridx;
uint8_t mcs;
};
STAILQ_HEAD(run_tx_data_head, run_tx_data);
struct run_node {
struct ieee80211_node ni;
uint8_t ridx[IEEE80211_RATE_MAXSIZE];
uint8_t ctl_ridx[IEEE80211_RATE_MAXSIZE];
};
struct run_vap {
struct ieee80211vap vap;
struct ieee80211_beacon_offsets bo;
struct ieee80211_amrr amrr;
struct ieee80211_amrr_node amn[RT2870_WCID_MAX + 1];
struct usb_callout amrr_ch;
struct task amrr_task;
uint8_t amrr_run;
#define RUN_AMRR_ON 1
#define RUN_AMRR_OFF 0
int (*newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
};
#define RUN_VAP(vap) ((struct run_vap *)(vap))
/*
* There are 7 bulk endpoints: 1 for RX
* and 6 for TX (4 EDCAs + HCCA + Prio).
* Update 03-14-2009: some devices like the Planex GW-US300MiniS
* seem to have only 4 TX bulk endpoints (Fukaumi Naoki).
*/
enum {
RUN_BULK_TX_BE, /* = WME_AC_BE */
RUN_BULK_TX_BK, /* = WME_AC_BK */
RUN_BULK_TX_VI, /* = WME_AC_VI */
RUN_BULK_TX_VO, /* = WME_AC_VO */
RUN_BULK_TX_HCCA,
RUN_BULK_TX_PRIO,
RUN_BULK_RX,
RUN_N_XFER,
};
#define RUN_EP_QUEUES RUN_BULK_RX
struct run_endpoint_queue {
struct run_tx_data tx_data[RUN_TX_RING_COUNT];
struct run_tx_data_head tx_qh;
struct run_tx_data_head tx_fh;
uint32_t tx_nfree;
};
struct run_softc {
device_t sc_dev;
struct usb_device *sc_udev;
struct ifnet *sc_ifp;
struct run_vap *sc_rvp;
int (*sc_srom_read)(struct run_softc *,
uint16_t, uint16_t *);
const struct firmware *fwp;
uint32_t mac_rev;
uint8_t rf_rev;
uint8_t freq;
uint8_t ntxchains;
uint8_t nrxchains;
int fixed_ridx;
uint8_t rf24_20mhz;
uint8_t rf24_40mhz;
uint8_t ext_2ghz_lna;
uint8_t ext_5ghz_lna;
uint8_t calib_2ghz;
uint8_t calib_5ghz;
int8_t txpow1[50];
int8_t txpow2[50];
int8_t rssi_2ghz[3];
int8_t rssi_5ghz[3];
uint8_t lna[4];
struct {
uint8_t reg;
uint8_t val;
} bbp[8];
uint8_t leds;
uint16_t led[3];
uint32_t txpow20mhz[5];
uint32_t txpow40mhz_2ghz[5];
uint32_t txpow40mhz_5ghz[5];
uint8_t sc_bssid[6];
struct mtx sc_mtx;
struct run_endpoint_queue sc_epq[RUN_EP_QUEUES];
struct task wme_task;
struct task usb_timeout_task;
struct usb_xfer *sc_xfer[RUN_N_XFER];
struct mbuf *rx_m;
int sifs;
union {
struct run_rx_radiotap_header th;
uint8_t pad[64];
} sc_rxtapu;
#define sc_rxtap sc_rxtapu.th
int sc_rxtap_len;
union {
struct run_tx_radiotap_header th;
uint8_t pad[64];
} sc_txtapu;
#define sc_txtap sc_txtapu.th
int sc_txtap_len;
};
#define RUN_LOCK(sc) mtx_lock(&(sc)->sc_mtx)
#define RUN_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx)
#define RUN_LOCK_ASSERT(sc, t) mtx_assert(&(sc)->sc_mtx, t)
#endif /* _IF_RUNVAR_H_ */

View File

@ -239,6 +239,7 @@ SUBDIR= ${_3dfx} \
re \
reiserfs \
rl \
runfw \
${_s3} \
${_safe} \
${_sbni} \

View File

@ -0,0 +1,8 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../contrib/dev/run
KMOD= runfw
FIRMWS= run-rt2870:runfw:1
.include <bsd.kmod.mk>

View File

@ -27,7 +27,7 @@
SUBDIR = usb
SUBDIR += ehci musb ohci uhci uss820dci ${_at91dci} ${_atmegadci}
SUBDIR += rum uath upgt ural zyd ${_urtw}
SUBDIR += rum run uath upgt ural zyd ${_urtw}
SUBDIR += atp uhid ukbd ums udbp ufm
SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \
umct umodem umoscom uplcom uslcom uvisor uvscom

View File

@ -0,0 +1,36 @@
#
# $FreeBSD$
#
# Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
S= ${.CURDIR}/../../..
.PATH: $S/dev/usb/wlan
KMOD= if_run
SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \
if_run.c
.include <bsd.kmod.mk>