aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800.h8
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c27
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c14
6 files changed, 51 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 9348521e0832..1ca88cdc6ece 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -51,6 +51,7 @@
51 * RF3320 2.4G 1T1R(RT3350/RT3370/RT3390) 51 * RF3320 2.4G 1T1R(RT3350/RT3370/RT3390)
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 * RF5360 2.4G 1T1R
54 * RF5370 2.4G 1T1R 55 * RF5370 2.4G 1T1R
55 * RF5390 2.4G 1T1R 56 * RF5390 2.4G 1T1R
56 */ 57 */
@@ -67,9 +68,11 @@
67#define RF3320 0x000b 68#define RF3320 0x000b
68#define RF3322 0x000c 69#define RF3322 0x000c
69#define RF3053 0x000d 70#define RF3053 0x000d
71#define RF5360 0x5360
70#define RF5370 0x5370 72#define RF5370 0x5370
71#define RF5372 0x5372 73#define RF5372 0x5372
72#define RF5390 0x5390 74#define RF5390 0x5390
75#define RF5392 0x5392
73 76
74/* 77/*
75 * Chipset revisions. 78 * Chipset revisions.
@@ -1944,6 +1947,11 @@ struct mac_iveiv_entry {
1944#define RFCSR49_TX FIELD8(0x3f) 1947#define RFCSR49_TX FIELD8(0x3f)
1945 1948
1946/* 1949/*
1950 * RFCSR 50:
1951 */
1952#define RFCSR50_TX FIELD8(0x3f)
1953
1954/*
1947 * RF registers 1955 * RF registers
1948 */ 1956 */
1949 1957
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index dfc90d34be6d..4d3747c3010b 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1958,7 +1958,22 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
1958 rt2x00_set_field8(&rfcsr, RFCSR49_TX, info->default_power1); 1958 rt2x00_set_field8(&rfcsr, RFCSR49_TX, info->default_power1);
1959 rt2800_rfcsr_write(rt2x00dev, 49, rfcsr); 1959 rt2800_rfcsr_write(rt2x00dev, 49, rfcsr);
1960 1960
1961 if (rt2x00_rt(rt2x00dev, RT5392)) {
1962 rt2800_rfcsr_read(rt2x00dev, 50, &rfcsr);
1963 if (info->default_power1 > RT5390_POWER_BOUND)
1964 rt2x00_set_field8(&rfcsr, RFCSR50_TX,
1965 RT5390_POWER_BOUND);
1966 else
1967 rt2x00_set_field8(&rfcsr, RFCSR50_TX,
1968 info->default_power2);
1969 rt2800_rfcsr_write(rt2x00dev, 50, rfcsr);
1970 }
1971
1961 rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr); 1972 rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr);
1973 if (rt2x00_rt(rt2x00dev, RT5392)) {
1974 rt2x00_set_field8(&rfcsr, RFCSR1_RX1_PD, 1);
1975 rt2x00_set_field8(&rfcsr, RFCSR1_TX1_PD, 1);
1976 }
1962 rt2x00_set_field8(&rfcsr, RFCSR1_RF_BLOCK_EN, 1); 1977 rt2x00_set_field8(&rfcsr, RFCSR1_RF_BLOCK_EN, 1);
1963 rt2x00_set_field8(&rfcsr, RFCSR1_PLL_PD, 1); 1978 rt2x00_set_field8(&rfcsr, RFCSR1_PLL_PD, 1);
1964 rt2x00_set_field8(&rfcsr, RFCSR1_RX0_PD, 1); 1979 rt2x00_set_field8(&rfcsr, RFCSR1_RX0_PD, 1);
@@ -2060,9 +2075,11 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
2060 case RF3052: 2075 case RF3052:
2061 rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info); 2076 rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
2062 break; 2077 break;
2078 case RF5360:
2063 case RF5370: 2079 case RF5370:
2064 case RF5372: 2080 case RF5372:
2065 case RF5390: 2081 case RF5390:
2082 case RF5392:
2066 rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info); 2083 rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
2067 break; 2084 break;
2068 default: 2085 default:
@@ -2549,9 +2566,11 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
2549 rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1); 2566 rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
2550 rt2800_rfcsr_write(rt2x00dev, 7, rfcsr); 2567 rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
2551 break; 2568 break;
2569 case RF5360:
2552 case RF5370: 2570 case RF5370:
2553 case RF5372: 2571 case RF5372:
2554 case RF5390: 2572 case RF5390:
2573 case RF5392:
2555 rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr); 2574 rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr);
2556 rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 1); 2575 rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 1);
2557 rt2800_rfcsr_write(rt2x00dev, 3, rfcsr); 2576 rt2800_rfcsr_write(rt2x00dev, 3, rfcsr);
@@ -4263,9 +4282,11 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
4263 case RF3022: 4282 case RF3022:
4264 case RF3052: 4283 case RF3052:
4265 case RF3320: 4284 case RF3320:
4285 case RF5360:
4266 case RF5370: 4286 case RF5370:
4267 case RF5372: 4287 case RF5372:
4268 case RF5390: 4288 case RF5390:
4289 case RF5392:
4269 break; 4290 break;
4270 default: 4291 default:
4271 ERROR(rt2x00dev, "Invalid RF chipset 0x%04x detected.\n", 4292 ERROR(rt2x00dev, "Invalid RF chipset 0x%04x detected.\n",
@@ -4577,9 +4598,11 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
4577 rt2x00_rf(rt2x00dev, RF3021) || 4598 rt2x00_rf(rt2x00dev, RF3021) ||
4578 rt2x00_rf(rt2x00dev, RF3022) || 4599 rt2x00_rf(rt2x00dev, RF3022) ||
4579 rt2x00_rf(rt2x00dev, RF3320) || 4600 rt2x00_rf(rt2x00dev, RF3320) ||
4601 rt2x00_rf(rt2x00dev, RF5360) ||
4580 rt2x00_rf(rt2x00dev, RF5370) || 4602 rt2x00_rf(rt2x00dev, RF5370) ||
4581 rt2x00_rf(rt2x00dev, RF5372) || 4603 rt2x00_rf(rt2x00dev, RF5372) ||
4582 rt2x00_rf(rt2x00dev, RF5390)) { 4604 rt2x00_rf(rt2x00dev, RF5390) ||
4605 rt2x00_rf(rt2x00dev, RF5392)) {
4583 spec->num_channels = 14; 4606 spec->num_channels = 14;
4584 spec->channels = rf_vals_3x; 4607 spec->channels = rf_vals_3x;
4585 } else if (rt2x00_rf(rt2x00dev, RF3052)) { 4608 } else if (rt2x00_rf(rt2x00dev, RF3052)) {
@@ -4662,9 +4685,11 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
4662 case RF3022: 4685 case RF3022:
4663 case RF3320: 4686 case RF3320:
4664 case RF3052: 4687 case RF3052:
4688 case RF5360:
4665 case RF5370: 4689 case RF5370:
4666 case RF5372: 4690 case RF5372:
4667 case RF5390: 4691 case RF5390:
4692 case RF5392:
4668 __set_bit(CAPABILITY_VCO_RECALIBRATION, &rt2x00dev->cap_flags); 4693 __set_bit(CAPABILITY_VCO_RECALIBRATION, &rt2x00dev->cap_flags);
4669 break; 4694 break;
4670 } 4695 }
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index cad25bfebd7a..206158b67426 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -1188,6 +1188,7 @@ static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = {
1188 { PCI_DEVICE(0x1814, 0x3593) }, 1188 { PCI_DEVICE(0x1814, 0x3593) },
1189#endif 1189#endif
1190#ifdef CONFIG_RT2800PCI_RT53XX 1190#ifdef CONFIG_RT2800PCI_RT53XX
1191 { PCI_DEVICE(0x1814, 0x5360) },
1191 { PCI_DEVICE(0x1814, 0x5362) }, 1192 { PCI_DEVICE(0x1814, 0x5362) },
1192 { PCI_DEVICE(0x1814, 0x5390) }, 1193 { PCI_DEVICE(0x1814, 0x5390) },
1193 { PCI_DEVICE(0x1814, 0x5392) }, 1194 { PCI_DEVICE(0x1814, 0x5392) },
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index bf78317a6adb..20a504072895 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1137,6 +1137,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
1137#ifdef CONFIG_RT2800USB_RT33XX 1137#ifdef CONFIG_RT2800USB_RT33XX
1138 /* Belkin */ 1138 /* Belkin */
1139 { USB_DEVICE(0x050d, 0x945b) }, 1139 { USB_DEVICE(0x050d, 0x945b) },
1140 /* D-Link */
1141 { USB_DEVICE(0x2001, 0x3c17) },
1140 /* Panasonic */ 1142 /* Panasonic */
1141 { USB_DEVICE(0x083a, 0xb511) }, 1143 { USB_DEVICE(0x083a, 0xb511) },
1142 /* Philips */ 1144 /* Philips */
@@ -1237,7 +1239,6 @@ static struct usb_device_id rt2800usb_device_table[] = {
1237 /* D-Link */ 1239 /* D-Link */
1238 { USB_DEVICE(0x07d1, 0x3c0b) }, 1240 { USB_DEVICE(0x07d1, 0x3c0b) },
1239 { USB_DEVICE(0x07d1, 0x3c17) }, 1241 { USB_DEVICE(0x07d1, 0x3c17) },
1240 { USB_DEVICE(0x2001, 0x3c17) },
1241 /* Encore */ 1242 /* Encore */
1242 { USB_DEVICE(0x203d, 0x14a1) }, 1243 { USB_DEVICE(0x203d, 0x14a1) },
1243 /* Gemtek */ 1244 /* Gemtek */
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index e5404e576251..a6b88bd4a1a5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1161,6 +1161,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
1161 BIT(NL80211_IFTYPE_MESH_POINT) | 1161 BIT(NL80211_IFTYPE_MESH_POINT) |
1162 BIT(NL80211_IFTYPE_WDS); 1162 BIT(NL80211_IFTYPE_WDS);
1163 1163
1164 rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
1165
1164 /* 1166 /*
1165 * Initialize work. 1167 * Initialize work.
1166 */ 1168 */
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index dd24b2663b5e..4ff26c2159bf 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -506,9 +506,19 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
506 506
507 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) 507 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
508 return 0; 508 return 0;
509 else if (!test_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags)) 509
510 if (!test_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags))
511 return -EOPNOTSUPP;
512
513 /*
514 * To support IBSS RSN, don't program group keys in IBSS, the
515 * hardware will then not attempt to decrypt the frames.
516 */
517 if (vif->type == NL80211_IFTYPE_ADHOC &&
518 !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
510 return -EOPNOTSUPP; 519 return -EOPNOTSUPP;
511 else if (key->keylen > 32) 520
521 if (key->keylen > 32)
512 return -ENOSPC; 522 return -ENOSPC;
513 523
514 memset(&crypto, 0, sizeof(crypto)); 524 memset(&crypto, 0, sizeof(crypto));