diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 49 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 17 |
3 files changed, 54 insertions, 14 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index fa33b5edf931..e3eb95292a7f 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h | |||
@@ -52,6 +52,7 @@ | |||
52 | * RF3322 2.4G 2T2R(RT3352/RT3371/RT3372/RT3391/RT3392) | 52 | * RF3322 2.4G 2T2R(RT3352/RT3371/RT3372/RT3391/RT3392) |
53 | * RF3053 2.4G/5G 3T3R(RT3883/RT3563/RT3573/RT3593/RT3662) | 53 | * RF3053 2.4G/5G 3T3R(RT3883/RT3563/RT3573/RT3593/RT3662) |
54 | * RF5592 2.4G/5G 2T2R | 54 | * RF5592 2.4G/5G 2T2R |
55 | * RF3070 2.4G 1T1R | ||
55 | * RF5360 2.4G 1T1R | 56 | * RF5360 2.4G 1T1R |
56 | * RF5370 2.4G 1T1R | 57 | * RF5370 2.4G 1T1R |
57 | * RF5390 2.4G 1T1R | 58 | * RF5390 2.4G 1T1R |
@@ -70,6 +71,7 @@ | |||
70 | #define RF3322 0x000c | 71 | #define RF3322 0x000c |
71 | #define RF3053 0x000d | 72 | #define RF3053 0x000d |
72 | #define RF5592 0x000f | 73 | #define RF5592 0x000f |
74 | #define RF3070 0x3070 | ||
73 | #define RF3290 0x3290 | 75 | #define RF3290 0x3290 |
74 | #define RF5360 0x5360 | 76 | #define RF5360 0x5360 |
75 | #define RF5370 0x5370 | 77 | #define RF5370 0x5370 |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 88ce656f96cd..25aaa5e12d4e 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -3152,6 +3152,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, | |||
3152 | case RF3322: | 3152 | case RF3322: |
3153 | rt2800_config_channel_rf3322(rt2x00dev, conf, rf, info); | 3153 | rt2800_config_channel_rf3322(rt2x00dev, conf, rf, info); |
3154 | break; | 3154 | break; |
3155 | case RF3070: | ||
3155 | case RF5360: | 3156 | case RF5360: |
3156 | case RF5370: | 3157 | case RF5370: |
3157 | case RF5372: | 3158 | case RF5372: |
@@ -3166,7 +3167,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, | |||
3166 | rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info); | 3167 | rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info); |
3167 | } | 3168 | } |
3168 | 3169 | ||
3169 | if (rt2x00_rf(rt2x00dev, RF3290) || | 3170 | if (rt2x00_rf(rt2x00dev, RF3070) || |
3171 | rt2x00_rf(rt2x00dev, RF3290) || | ||
3170 | rt2x00_rf(rt2x00dev, RF3322) || | 3172 | rt2x00_rf(rt2x00dev, RF3322) || |
3171 | rt2x00_rf(rt2x00dev, RF5360) || | 3173 | rt2x00_rf(rt2x00dev, RF5360) || |
3172 | rt2x00_rf(rt2x00dev, RF5370) || | 3174 | rt2x00_rf(rt2x00dev, RF5370) || |
@@ -3315,29 +3317,37 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, | |||
3315 | rt2800_rfcsr_write(rt2x00dev, 8, 0x80); | 3317 | rt2800_rfcsr_write(rt2x00dev, 8, 0x80); |
3316 | 3318 | ||
3317 | if (rt2x00_rt(rt2x00dev, RT3593)) { | 3319 | if (rt2x00_rt(rt2x00dev, RT3593)) { |
3318 | if (rt2x00_is_usb(rt2x00dev)) { | 3320 | rt2800_register_read(rt2x00dev, GPIO_CTRL, ®); |
3319 | rt2800_register_read(rt2x00dev, GPIO_CTRL, ®); | ||
3320 | 3321 | ||
3321 | /* Band selection. GPIO #8 controls all paths */ | 3322 | /* Band selection */ |
3323 | if (rt2x00_is_usb(rt2x00dev) || | ||
3324 | rt2x00_is_pcie(rt2x00dev)) { | ||
3325 | /* GPIO #8 controls all paths */ | ||
3322 | rt2x00_set_field32(®, GPIO_CTRL_DIR8, 0); | 3326 | rt2x00_set_field32(®, GPIO_CTRL_DIR8, 0); |
3323 | if (rf->channel <= 14) | 3327 | if (rf->channel <= 14) |
3324 | rt2x00_set_field32(®, GPIO_CTRL_VAL8, 1); | 3328 | rt2x00_set_field32(®, GPIO_CTRL_VAL8, 1); |
3325 | else | 3329 | else |
3326 | rt2x00_set_field32(®, GPIO_CTRL_VAL8, 0); | 3330 | rt2x00_set_field32(®, GPIO_CTRL_VAL8, 0); |
3331 | } | ||
3327 | 3332 | ||
3333 | /* LNA PE control. */ | ||
3334 | if (rt2x00_is_usb(rt2x00dev)) { | ||
3335 | /* GPIO #4 controls PE0 and PE1, | ||
3336 | * GPIO #7 controls PE2 | ||
3337 | */ | ||
3328 | rt2x00_set_field32(®, GPIO_CTRL_DIR4, 0); | 3338 | rt2x00_set_field32(®, GPIO_CTRL_DIR4, 0); |
3329 | rt2x00_set_field32(®, GPIO_CTRL_DIR7, 0); | 3339 | rt2x00_set_field32(®, GPIO_CTRL_DIR7, 0); |
3330 | 3340 | ||
3331 | /* LNA PE control. | ||
3332 | * GPIO #4 controls PE0 and PE1, | ||
3333 | * GPIO #7 controls PE2 | ||
3334 | */ | ||
3335 | rt2x00_set_field32(®, GPIO_CTRL_VAL4, 1); | 3341 | rt2x00_set_field32(®, GPIO_CTRL_VAL4, 1); |
3336 | rt2x00_set_field32(®, GPIO_CTRL_VAL7, 1); | 3342 | rt2x00_set_field32(®, GPIO_CTRL_VAL7, 1); |
3337 | 3343 | } else if (rt2x00_is_pcie(rt2x00dev)) { | |
3338 | rt2800_register_write(rt2x00dev, GPIO_CTRL, reg); | 3344 | /* GPIO #4 controls PE0, PE1 and PE2 */ |
3345 | rt2x00_set_field32(®, GPIO_CTRL_DIR4, 0); | ||
3346 | rt2x00_set_field32(®, GPIO_CTRL_VAL4, 1); | ||
3339 | } | 3347 | } |
3340 | 3348 | ||
3349 | rt2800_register_write(rt2x00dev, GPIO_CTRL, reg); | ||
3350 | |||
3341 | /* AGC init */ | 3351 | /* AGC init */ |
3342 | if (rf->channel <= 14) | 3352 | if (rf->channel <= 14) |
3343 | reg = 0x1c + 2 * rt2x00dev->lna_gain; | 3353 | reg = 0x1c + 2 * rt2x00dev->lna_gain; |
@@ -4264,6 +4274,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev) | |||
4264 | rt2800_rfcsr_write(rt2x00dev, 7, rfcsr); | 4274 | rt2800_rfcsr_write(rt2x00dev, 7, rfcsr); |
4265 | break; | 4275 | break; |
4266 | case RF3053: | 4276 | case RF3053: |
4277 | case RF3070: | ||
4267 | case RF3290: | 4278 | case RF3290: |
4268 | case RF5360: | 4279 | case RF5360: |
4269 | case RF5370: | 4280 | case RF5370: |
@@ -5985,7 +5996,7 @@ static void rt2800_init_rfcsr_30xx(struct rt2x00_dev *rt2x00dev) | |||
5985 | rt2800_rfcsr_write(rt2x00dev, 20, 0xba); | 5996 | rt2800_rfcsr_write(rt2x00dev, 20, 0xba); |
5986 | rt2800_rfcsr_write(rt2x00dev, 21, 0xdb); | 5997 | rt2800_rfcsr_write(rt2x00dev, 21, 0xdb); |
5987 | rt2800_rfcsr_write(rt2x00dev, 24, 0x16); | 5998 | rt2800_rfcsr_write(rt2x00dev, 24, 0x16); |
5988 | rt2800_rfcsr_write(rt2x00dev, 25, 0x01); | 5999 | rt2800_rfcsr_write(rt2x00dev, 25, 0x03); |
5989 | rt2800_rfcsr_write(rt2x00dev, 29, 0x1f); | 6000 | rt2800_rfcsr_write(rt2x00dev, 29, 0x1f); |
5990 | 6001 | ||
5991 | if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) { | 6002 | if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) { |
@@ -6653,17 +6664,20 @@ int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
6653 | u16 word; | 6664 | u16 word; |
6654 | 6665 | ||
6655 | /* | 6666 | /* |
6656 | * Initialize all registers. | 6667 | * Initialize MAC registers. |
6657 | */ | 6668 | */ |
6658 | if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev) || | 6669 | if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev) || |
6659 | rt2800_init_registers(rt2x00dev))) | 6670 | rt2800_init_registers(rt2x00dev))) |
6660 | return -EIO; | 6671 | return -EIO; |
6661 | 6672 | ||
6673 | /* | ||
6674 | * Wait BBP/RF to wake up. | ||
6675 | */ | ||
6662 | if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev))) | 6676 | if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev))) |
6663 | return -EIO; | 6677 | return -EIO; |
6664 | 6678 | ||
6665 | /* | 6679 | /* |
6666 | * Send signal to firmware during boot time. | 6680 | * Send signal during boot time to initialize firmware. |
6667 | */ | 6681 | */ |
6668 | rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0); | 6682 | rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0); |
6669 | rt2800_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0); | 6683 | rt2800_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0); |
@@ -6672,9 +6686,15 @@ int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
6672 | rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0, 0, 0); | 6686 | rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0, 0, 0); |
6673 | msleep(1); | 6687 | msleep(1); |
6674 | 6688 | ||
6689 | /* | ||
6690 | * Make sure BBP is up and running. | ||
6691 | */ | ||
6675 | if (unlikely(rt2800_wait_bbp_ready(rt2x00dev))) | 6692 | if (unlikely(rt2800_wait_bbp_ready(rt2x00dev))) |
6676 | return -EIO; | 6693 | return -EIO; |
6677 | 6694 | ||
6695 | /* | ||
6696 | * Initialize BBP/RF registers. | ||
6697 | */ | ||
6678 | rt2800_init_bbp(rt2x00dev); | 6698 | rt2800_init_bbp(rt2x00dev); |
6679 | rt2800_init_rfcsr(rt2x00dev); | 6699 | rt2800_init_rfcsr(rt2x00dev); |
6680 | 6700 | ||
@@ -7021,6 +7041,7 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
7021 | case RF3022: | 7041 | case RF3022: |
7022 | case RF3052: | 7042 | case RF3052: |
7023 | case RF3053: | 7043 | case RF3053: |
7044 | case RF3070: | ||
7024 | case RF3290: | 7045 | case RF3290: |
7025 | case RF3320: | 7046 | case RF3320: |
7026 | case RF3322: | 7047 | case RF3322: |
@@ -7543,6 +7564,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
7543 | rt2x00_rf(rt2x00dev, RF2020) || | 7564 | rt2x00_rf(rt2x00dev, RF2020) || |
7544 | rt2x00_rf(rt2x00dev, RF3021) || | 7565 | rt2x00_rf(rt2x00dev, RF3021) || |
7545 | rt2x00_rf(rt2x00dev, RF3022) || | 7566 | rt2x00_rf(rt2x00dev, RF3022) || |
7567 | rt2x00_rf(rt2x00dev, RF3070) || | ||
7546 | rt2x00_rf(rt2x00dev, RF3290) || | 7568 | rt2x00_rf(rt2x00dev, RF3290) || |
7547 | rt2x00_rf(rt2x00dev, RF3320) || | 7569 | rt2x00_rf(rt2x00dev, RF3320) || |
7548 | rt2x00_rf(rt2x00dev, RF3322) || | 7570 | rt2x00_rf(rt2x00dev, RF3322) || |
@@ -7671,6 +7693,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
7671 | case RF3320: | 7693 | case RF3320: |
7672 | case RF3052: | 7694 | case RF3052: |
7673 | case RF3053: | 7695 | case RF3053: |
7696 | case RF3070: | ||
7674 | case RF3290: | 7697 | case RF3290: |
7675 | case RF5360: | 7698 | case RF5360: |
7676 | case RF5370: | 7699 | case RF5370: |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 96961b9a395c..96677ce55da4 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -1176,6 +1176,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1176 | /* Linksys */ | 1176 | /* Linksys */ |
1177 | { USB_DEVICE(0x13b1, 0x002f) }, | 1177 | { USB_DEVICE(0x13b1, 0x002f) }, |
1178 | { USB_DEVICE(0x1737, 0x0079) }, | 1178 | { USB_DEVICE(0x1737, 0x0079) }, |
1179 | /* Logitec */ | ||
1180 | { USB_DEVICE(0x0789, 0x0170) }, | ||
1179 | /* Ralink */ | 1181 | /* Ralink */ |
1180 | { USB_DEVICE(0x148f, 0x3572) }, | 1182 | { USB_DEVICE(0x148f, 0x3572) }, |
1181 | /* Sitecom */ | 1183 | /* Sitecom */ |
@@ -1199,6 +1201,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1199 | { USB_DEVICE(0x050d, 0x1103) }, | 1201 | { USB_DEVICE(0x050d, 0x1103) }, |
1200 | /* Cameo */ | 1202 | /* Cameo */ |
1201 | { USB_DEVICE(0x148f, 0xf301) }, | 1203 | { USB_DEVICE(0x148f, 0xf301) }, |
1204 | /* D-Link */ | ||
1205 | { USB_DEVICE(0x2001, 0x3c1f) }, | ||
1202 | /* Edimax */ | 1206 | /* Edimax */ |
1203 | { USB_DEVICE(0x7392, 0x7733) }, | 1207 | { USB_DEVICE(0x7392, 0x7733) }, |
1204 | /* Hawking */ | 1208 | /* Hawking */ |
@@ -1212,6 +1216,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1212 | { USB_DEVICE(0x0789, 0x016b) }, | 1216 | { USB_DEVICE(0x0789, 0x016b) }, |
1213 | /* NETGEAR */ | 1217 | /* NETGEAR */ |
1214 | { USB_DEVICE(0x0846, 0x9012) }, | 1218 | { USB_DEVICE(0x0846, 0x9012) }, |
1219 | { USB_DEVICE(0x0846, 0x9013) }, | ||
1215 | { USB_DEVICE(0x0846, 0x9019) }, | 1220 | { USB_DEVICE(0x0846, 0x9019) }, |
1216 | /* Planex */ | 1221 | /* Planex */ |
1217 | { USB_DEVICE(0x2019, 0xed19) }, | 1222 | { USB_DEVICE(0x2019, 0xed19) }, |
@@ -1220,6 +1225,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1220 | /* Sitecom */ | 1225 | /* Sitecom */ |
1221 | { USB_DEVICE(0x0df6, 0x0067) }, | 1226 | { USB_DEVICE(0x0df6, 0x0067) }, |
1222 | { USB_DEVICE(0x0df6, 0x006a) }, | 1227 | { USB_DEVICE(0x0df6, 0x006a) }, |
1228 | { USB_DEVICE(0x0df6, 0x006e) }, | ||
1223 | /* ZyXEL */ | 1229 | /* ZyXEL */ |
1224 | { USB_DEVICE(0x0586, 0x3421) }, | 1230 | { USB_DEVICE(0x0586, 0x3421) }, |
1225 | #endif | 1231 | #endif |
@@ -1236,6 +1242,9 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1236 | { USB_DEVICE(0x2001, 0x3c1c) }, | 1242 | { USB_DEVICE(0x2001, 0x3c1c) }, |
1237 | { USB_DEVICE(0x2001, 0x3c1d) }, | 1243 | { USB_DEVICE(0x2001, 0x3c1d) }, |
1238 | { USB_DEVICE(0x2001, 0x3c1e) }, | 1244 | { USB_DEVICE(0x2001, 0x3c1e) }, |
1245 | { USB_DEVICE(0x2001, 0x3c20) }, | ||
1246 | { USB_DEVICE(0x2001, 0x3c22) }, | ||
1247 | { USB_DEVICE(0x2001, 0x3c23) }, | ||
1239 | /* LG innotek */ | 1248 | /* LG innotek */ |
1240 | { USB_DEVICE(0x043e, 0x7a22) }, | 1249 | { USB_DEVICE(0x043e, 0x7a22) }, |
1241 | { USB_DEVICE(0x043e, 0x7a42) }, | 1250 | { USB_DEVICE(0x043e, 0x7a42) }, |
@@ -1258,12 +1267,17 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1258 | { USB_DEVICE(0x043e, 0x7a32) }, | 1267 | { USB_DEVICE(0x043e, 0x7a32) }, |
1259 | /* AVM GmbH */ | 1268 | /* AVM GmbH */ |
1260 | { USB_DEVICE(0x057c, 0x8501) }, | 1269 | { USB_DEVICE(0x057c, 0x8501) }, |
1261 | /* D-Link DWA-160-B2 */ | 1270 | /* Buffalo */ |
1271 | { USB_DEVICE(0x0411, 0x0241) }, | ||
1272 | /* D-Link */ | ||
1262 | { USB_DEVICE(0x2001, 0x3c1a) }, | 1273 | { USB_DEVICE(0x2001, 0x3c1a) }, |
1274 | { USB_DEVICE(0x2001, 0x3c21) }, | ||
1263 | /* Proware */ | 1275 | /* Proware */ |
1264 | { USB_DEVICE(0x043e, 0x7a13) }, | 1276 | { USB_DEVICE(0x043e, 0x7a13) }, |
1265 | /* Ralink */ | 1277 | /* Ralink */ |
1266 | { USB_DEVICE(0x148f, 0x5572) }, | 1278 | { USB_DEVICE(0x148f, 0x5572) }, |
1279 | /* TRENDnet */ | ||
1280 | { USB_DEVICE(0x20f4, 0x724a) }, | ||
1267 | #endif | 1281 | #endif |
1268 | #ifdef CONFIG_RT2800USB_UNKNOWN | 1282 | #ifdef CONFIG_RT2800USB_UNKNOWN |
1269 | /* | 1283 | /* |
@@ -1333,6 +1347,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1333 | { USB_DEVICE(0x1d4d, 0x0010) }, | 1347 | { USB_DEVICE(0x1d4d, 0x0010) }, |
1334 | /* Planex */ | 1348 | /* Planex */ |
1335 | { USB_DEVICE(0x2019, 0xab24) }, | 1349 | { USB_DEVICE(0x2019, 0xab24) }, |
1350 | { USB_DEVICE(0x2019, 0xab29) }, | ||
1336 | /* Qcom */ | 1351 | /* Qcom */ |
1337 | { USB_DEVICE(0x18e8, 0x6259) }, | 1352 | { USB_DEVICE(0x18e8, 0x6259) }, |
1338 | /* RadioShack */ | 1353 | /* RadioShack */ |