Add support for the MediaTek/Ralink RT3593 chipset.

Committed over the ZyXEL NWD2705 on amd64 with WPA.
This commit is contained in:
Kevin Lo 2014-01-03 06:01:05 +00:00
parent b88aef1dcf
commit 7a7e01caa4
5 changed files with 683 additions and 146 deletions

View File

@ -16,7 +16,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd December 27, 2013
.Dd January 3, 2014
.Dt RUN 4
.Os
.Sh NAME
@ -64,8 +64,17 @@ 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
The RT3900E is a single-chip solution based on an RT5390 MAC/BBP and
an RT5370 (1T1R) or RT5372 (2T2R) single-band radio transceiver.
The RT3900E is a single-chip USB 2.0 802.11n solution.
The MAC/Baseband Processor can be an RT3593, RT5390, RT5392 or an RT5592.
The radio can be an RT3053, RT5370, RT5372 or an RT5572.
The RT3053 chip operates in the 2GHz and 5GHz spectra and supports up to
3 transmit paths and 3 receiver paths (3T3R).
The RT5370 chip operates in the 2GHz spectrum and supports 1 transmit path
and 1 receiver path (1T1R).
The RT5372 chip operates in the 2GHz spectrum and supports up to 2 transmit
paths and 2 receiver paths (2T2R).
The RT5572 chip operates in the 2GHz and 5GHz spectra and supports up to
2 transmit paths and 2 receiver paths (2T2R).
.Pp
These are the modes the
.Nm
@ -116,11 +125,13 @@ driver supports the following wireless adapters:
.It Airlink101 AWLL6090
.It ASUS USB-N11
.It ASUS USB-N13 ver. A1
.It ASUS USB-N66
.It ASUS WL-160N
.It Belkin F5D8051 ver 3000
.It Belkin F5D8053
.It Belkin F5D8055
.It Belkin F6D4050 ver 1
.It Belkin F9L1103
.It Buffalo WLI-UC-AG300N
.It Buffalo WLI-UC-G300N
.It Buffalo WLI-UC-G301N
@ -134,11 +145,13 @@ driver supports the following wireless adapters:
.It D-Link DWA-130 rev B1
.It D-Link DWA-140 rev B1, B2, B3, D1
.It D-Link DWA-160 rev B2
.It D-Link DWA-162
.It DrayTek Vigor N61
.It Edimax EW-7711UAn
.It Edimax EW-7711UTn
.It Edimax EW-7717Un
.It Edimax EW-7718Un
.It Edimax EW-7733UnD
.It Gigabyte GN-WB30N
.It Gigabyte GN-WB31N
.It Gigabyte GN-WB32L
@ -164,6 +177,7 @@ driver supports the following wireless adapters:
.It TP-LINK TL-WN727N v3
.It Unex DNUR-81
.It Unex DNUR-82
.It ZyXEL NWD2705
.It ZyXEL NWD210N
.It ZyXEL NWD270N
.El
@ -235,4 +249,4 @@ driver was written by
The
.Nm
driver does not support any of the 802.11n capabilities offered by the
RT2800 and RT3000 chipsets.
RT2800, RT3000 and RT3900 chipsets.

View File

@ -1146,6 +1146,7 @@ product ASUS USBN13 0x1784 USB-N13
product ASUS RT3070_1 0x1790 RT3070
product ASUS USBN10 0x1786 USB-N10
product ASUS RTL8192CU 0x17ab RTL8192CU
product ASUS USBN66 0x17ad USB-N66
product ASUS RTL8192SU 0x1791 RTL8192SU
product ASUS A730W 0x4202 ASUS MyPal A730W
product ASUS P535 0x420f ASUS P535 PDA
@ -1245,6 +1246,7 @@ product BELKIN F5U409 0x0409 F5U409 Serial
product BELKIN F6C550AVR 0x0551 F6C550-AVR UPS
product BELKIN F5U120 0x1203 F5U120-PC Hub
product BELKIN RTL8188CU 0x1102 RTL8188CU Wireless Adapter
product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter
product BELKIN RTL8192CU 0x2102 RTL8192CU Wireless Adapter
product BELKIN F7D2102 0x2103 F7D2102 Wireless Adapter
product BELKIN ZD1211B 0x4050 ZD1211B
@ -1558,6 +1560,7 @@ product DLINK RT3072 0x3c0a RT3072
product DLINK DWA140B3 0x3c15 DWA-140 rev B3
product DLINK DWA160B2 0x3c1a DWA-160 rev B2
product DLINK DWA127 0x3c1b DWA-127 Wireless Adapter
product DLINK DWA162 0x3c1f DWA-162 Wireless Adapter
product DLINK DWA140D1 0x3c20 DWA-140 rev D1
product DLINK DSB650C 0x4000 10Mbps Ethernet
product DLINK DSB650TX1 0x4001 10/100 Ethernet
@ -1619,6 +1622,7 @@ product EDIMAX EW7622UMN 0x7622 EW-7622UMn
product EDIMAX RT2870_1 0x7711 RT2870
product EDIMAX EW7717 0x7717 EW-7717
product EDIMAX EW7718 0x7718 EW-7718
product EDIMAX EW7733UND 0x7733 EW-7733UnD
product EDIMAX EW7811UN 0x7811 EW-7811Un
product EDIMAX RTL8192CU 0x7822 RTL8192CU
@ -3608,6 +3612,7 @@ product RALINK RT3071 0x3071 RT3071
product RALINK RT3072 0x3072 RT3072
product RALINK RT3370 0x3370 RT3370
product RALINK RT3572 0x3572 RT3572
product RALINK RT3573 0x3573 RT3573
product RALINK RT5370 0x5370 RT5370
product RALINK RT5572 0x5572 RT5572
product RALINK RT8070 0x8070 RT8070
@ -3629,10 +3634,11 @@ product REALTEK RTL8171 0x8171 RTL8171
product REALTEK RTL8172 0x8172 RTL8172
product REALTEK RTL8173 0x8173 RTL8173
product REALTEK RTL8174 0x8174 RTL8174
product REALTEK RTL8188CE_1 0x817e RTL8188CE
product REALTEK RTL8188CU_0 0x8176 RTL8188CU
product REALTEK RTL8188CU_1 0x817a RTL8188CU
product REALTEK RTL8188CU_2 0x817b RTL8188CU
product REALTEK RTL8188CU_0 0x8176 RTL8188CU
product REALTEK RTL8188EU 0x8179 RTL8188EU
product REALTEK RTL8188CE_1 0x817e RTL8188CE
product REALTEK RTL8188CU_1 0x817a RTL8188CU
product REALTEK RTL8188CU_2 0x817b RTL8188CU
product REALTEK RTL8187 0x8187 RTL8187 Wireless Adapter
product REALTEK RTL8187B_0 0x8189 RTL8187B Wireless Adapter
product REALTEK RTL8187B_1 0x8197 RTL8187B Wireless Adapter

File diff suppressed because it is too large Load Diff

View File

@ -691,6 +691,8 @@
#define RT3070_TX0_PD (1 << 3)
#define RT3070_RX1_PD (1 << 4)
#define RT3070_TX1_PD (1 << 5)
#define RT3070_RX2_PD (1 << 6)
#define RT3070_TX2_PD (1 << 7)
/* possible flags for RT3020 RF register 15 */
#define RT3070_TX_LO2 (1 << 3)
@ -704,6 +706,15 @@
/* possible flags for RT3020 RF register 21 */
#define RT3070_RX_LO2 (1 << 3)
/* possible flags for RT3053 RF register 18 */
#define RT3593_AUTOTUNE_BYPASS (1 << 6)
/* possible flags for RT3053 RF register 50 */
#define RT3593_TX_LO2 (1 << 4)
/* possible flags for RT3053 RF register 51 */
#define RT3593_TX_LO1 (1 << 4)
/* Possible flags for RT5390 RF register 2. */
#define RT5390_RESCAL (1 << 7)
@ -853,6 +864,7 @@ struct rt2860_rxwi {
#define RT3070_RF_3021 0x0007 /* 1T2R */
#define RT3070_RF_3022 0x0008 /* 2T2R */
#define RT3070_RF_3052 0x0009 /* dual-band 2T2R */
#define RT3593_RF_3053 0x000d /* dual-band 3T3R */
#define RT5592_RF_5592 0x000f /* dual-band 2T2R */
#define RT5390_RF_5370 0x5370 /* 1T1R */
#define RT5390_RF_5372 0x5372 /* 2T2R */
@ -903,6 +915,25 @@ struct rt2860_rxwi {
#define RT2860_EEPROM_BBP_BASE 0x78
#define RT3071_EEPROM_RF_BASE 0x82
/* EEPROM registers for RT3593. */
#define RT3593_EEPROM_FREQ_LEDS 0x21
#define RT3593_EEPROM_FREQ 0x22
#define RT3593_EEPROM_LED1 0x22
#define RT3593_EEPROM_LED2 0x23
#define RT3593_EEPROM_LED3 0x24
#define RT3593_EEPROM_LNA 0x26
#define RT3593_EEPROM_LNA_5GHZ 0x27
#define RT3593_EEPROM_RSSI1_2GHZ 0x28
#define RT3593_EEPROM_RSSI2_2GHZ 0x29
#define RT3593_EEPROM_RSSI1_5GHZ 0x2a
#define RT3593_EEPROM_RSSI2_5GHZ 0x2b
#define RT3593_EEPROM_PWR2GHZ_BASE1 0x30
#define RT3593_EEPROM_PWR2GHZ_BASE2 0x37
#define RT3593_EEPROM_PWR2GHZ_BASE3 0x3e
#define RT3593_EEPROM_PWR5GHZ_BASE1 0x4b
#define RT3593_EEPROM_PWR5GHZ_BASE2 0x65
#define RT3593_EEPROM_PWR5GHZ_BASE3 0x7f
/*
* EEPROM IQ calibration.
*/
@ -1337,6 +1368,40 @@ struct rt2860_rxwi {
{ 30, 0x09 }, \
{ 31, 0x10 }
#define RT3593_DEF_RF \
{ 1, 0x03 }, \
{ 3, 0x80 }, \
{ 5, 0x00 }, \
{ 6, 0x40 }, \
{ 8, 0xf1 }, \
{ 9, 0x02 }, \
{ 10, 0xd3 }, \
{ 11, 0x40 }, \
{ 12, 0x4e }, \
{ 13, 0x12 }, \
{ 18, 0x40 }, \
{ 22, 0x20 }, \
{ 30, 0x10 }, \
{ 31, 0x80 }, \
{ 32, 0x78 }, \
{ 33, 0x3b }, \
{ 34, 0x3c }, \
{ 35, 0xe0 }, \
{ 38, 0x86 }, \
{ 39, 0x23 }, \
{ 44, 0xd3 }, \
{ 45, 0xbb }, \
{ 46, 0x60 }, \
{ 49, 0x81 }, \
{ 50, 0x86 }, \
{ 51, 0x75 }, \
{ 52, 0x45 }, \
{ 53, 0x18 }, \
{ 54, 0x18 }, \
{ 55, 0x18 }, \
{ 56, 0xdb }, \
{ 57, 0x6e }
#define RT5390_DEF_RF \
{ 1, 0x0f }, \
{ 2, 0x80 }, \

View File

@ -183,6 +183,7 @@ struct run_softc {
uint8_t txmixgain_5ghz;
int8_t txpow1[54];
int8_t txpow2[54];
int8_t txpow3[54];
int8_t rssi_2ghz[3];
int8_t rssi_5ghz[3];
uint8_t lna[4];