aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-18 14:15:05 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-18 14:15:05 -0500
commit4092762aebfe55c1f8e31440b80a053c2dbe519b (patch)
tree8fb9fd14131194174c12daf5d8195afd3b62bc3e /drivers/net/wireless/rt2x00
parent745b1626dd71ce9661a05ea4db57859ed5c773d2 (diff)
parent1de9e8e70f5acc441550ca75433563d91b269bbe (diff)
Merge branch 'tracing/ftrace'; commit 'v2.6.29-rc2' into tracing/core
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c23
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00leds.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00lib.h11
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c1
7 files changed, 17 insertions, 36 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 30028e2422fc..af6b5847be5c 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -38,7 +38,7 @@
38/* 38/*
39 * Allow hardware encryption to be disabled. 39 * Allow hardware encryption to be disabled.
40 */ 40 */
41static int modparam_nohwcrypt = 1; 41static int modparam_nohwcrypt = 0;
42module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 42module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
43MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 43MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
44 44
@@ -376,11 +376,11 @@ static int rt2500usb_config_key(struct rt2x00_dev *rt2x00dev,
376 376
377 /* 377 /*
378 * The driver does not support the IV/EIV generation 378 * The driver does not support the IV/EIV generation
379 * in hardware. However it doesn't support the IV/EIV 379 * in hardware. However it demands the data to be provided
380 * inside the ieee80211 frame either, but requires it 380 * both seperately as well as inside the frame.
381 * to be provided seperately for the descriptor. 381 * We already provided the CONFIG_CRYPTO_COPY_IV to rt2x00lib
382 * rt2x00lib will cut the IV/EIV data out of all frames 382 * to ensure rt2x00lib will not strip the data from the
383 * given to us by mac80211, but we must tell mac80211 383 * frame after the copy, now we must tell mac80211
384 * to generate the IV/EIV data. 384 * to generate the IV/EIV data.
385 */ 385 */
386 key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; 386 key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
@@ -1181,7 +1181,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1181 test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); 1181 test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags));
1182 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); 1182 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
1183 rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); 1183 rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len);
1184 rt2x00_set_field32(&word, TXD_W0_CIPHER, txdesc->cipher); 1184 rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher);
1185 rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx); 1185 rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx);
1186 rt2x00_desc_write(txd, 0, word); 1186 rt2x00_desc_write(txd, 0, word);
1187} 1187}
@@ -1334,14 +1334,7 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,
1334 1334
1335 /* ICV is located at the end of frame */ 1335 /* ICV is located at the end of frame */
1336 1336
1337 /* 1337 rxdesc->flags |= RX_FLAG_MMIC_STRIPPED;
1338 * Hardware has stripped IV/EIV data from 802.11 frame during
1339 * decryption. It has provided the data seperately but rt2x00lib
1340 * should decide if it should be reinserted.
1341 */
1342 rxdesc->flags |= RX_FLAG_IV_STRIPPED;
1343 if (rxdesc->cipher != CIPHER_TKIP)
1344 rxdesc->flags |= RX_FLAG_MMIC_STRIPPED;
1345 if (rxdesc->cipher_status == RX_CRYPTO_SUCCESS) 1338 if (rxdesc->cipher_status == RX_CRYPTO_SUCCESS)
1346 rxdesc->flags |= RX_FLAG_DECRYPTED; 1339 rxdesc->flags |= RX_FLAG_DECRYPTED;
1347 else if (rxdesc->cipher_status == RX_CRYPTO_FAIL_MIC) 1340 else if (rxdesc->cipher_status == RX_CRYPTO_FAIL_MIC)
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 6d92542fcf0d..87c0f2c83077 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -807,13 +807,11 @@ static void rt2x00lib_rate(struct ieee80211_rate *entry,
807{ 807{
808 entry->flags = 0; 808 entry->flags = 0;
809 entry->bitrate = rate->bitrate; 809 entry->bitrate = rate->bitrate;
810 entry->hw_value = rt2x00_create_rate_hw_value(index, 0); 810 entry->hw_value =index;
811 entry->hw_value_short = entry->hw_value; 811 entry->hw_value_short = index;
812 812
813 if (rate->flags & DEV_RATE_SHORT_PREAMBLE) { 813 if (rate->flags & DEV_RATE_SHORT_PREAMBLE)
814 entry->flags |= IEEE80211_RATE_SHORT_PREAMBLE; 814 entry->flags |= IEEE80211_RATE_SHORT_PREAMBLE;
815 entry->hw_value_short |= rt2x00_create_rate_hw_value(index, 1);
816 }
817} 815}
818 816
819static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, 817static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/rt2x00/rt2x00leds.c b/drivers/net/wireless/rt2x00/rt2x00leds.c
index 68f4e0fc35b9..a0cd35b6beb5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00leds.c
+++ b/drivers/net/wireless/rt2x00/rt2x00leds.c
@@ -97,7 +97,7 @@ void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, bool enabled)
97 97
98void rt2x00leds_led_radio(struct rt2x00_dev *rt2x00dev, bool enabled) 98void rt2x00leds_led_radio(struct rt2x00_dev *rt2x00dev, bool enabled)
99{ 99{
100 if (rt2x00dev->led_radio.type == LED_TYPE_ASSOC) 100 if (rt2x00dev->led_radio.type == LED_TYPE_RADIO)
101 rt2x00led_led_simple(&rt2x00dev->led_radio, enabled); 101 rt2x00led_led_simple(&rt2x00dev->led_radio, enabled);
102} 102}
103 103
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 03024327767b..86cd26fbf769 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -52,22 +52,11 @@ struct rt2x00_rate {
52 52
53extern const struct rt2x00_rate rt2x00_supported_rates[12]; 53extern const struct rt2x00_rate rt2x00_supported_rates[12];
54 54
55static inline u16 rt2x00_create_rate_hw_value(const u16 index,
56 const u16 short_preamble)
57{
58 return (short_preamble << 8) | (index & 0xff);
59}
60
61static inline const struct rt2x00_rate *rt2x00_get_rate(const u16 hw_value) 55static inline const struct rt2x00_rate *rt2x00_get_rate(const u16 hw_value)
62{ 56{
63 return &rt2x00_supported_rates[hw_value & 0xff]; 57 return &rt2x00_supported_rates[hw_value & 0xff];
64} 58}
65 59
66static inline int rt2x00_get_rate_preamble(const u16 hw_value)
67{
68 return (hw_value & 0xff00);
69}
70
71/* 60/*
72 * Radio control handlers. 61 * Radio control handlers.
73 */ 62 */
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index eaec6bd93ed5..746a8f36b931 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -313,7 +313,7 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
313 * When preamble is enabled we should set the 313 * When preamble is enabled we should set the
314 * preamble bit for the signal. 314 * preamble bit for the signal.
315 */ 315 */
316 if (rt2x00_get_rate_preamble(rate->hw_value)) 316 if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
317 txdesc->signal |= 0x08; 317 txdesc->signal |= 0x08;
318 } 318 }
319} 319}
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 83df312ac56f..0b29d767a258 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -434,11 +434,11 @@ static int rt2x00usb_find_endpoints(struct rt2x00_dev *rt2x00dev)
434 434
435 if (usb_endpoint_is_bulk_in(ep_desc)) { 435 if (usb_endpoint_is_bulk_in(ep_desc)) {
436 rt2x00usb_assign_endpoint(rt2x00dev->rx, ep_desc); 436 rt2x00usb_assign_endpoint(rt2x00dev->rx, ep_desc);
437 } else if (usb_endpoint_is_bulk_out(ep_desc)) { 437 } else if (usb_endpoint_is_bulk_out(ep_desc) &&
438 (queue != queue_end(rt2x00dev))) {
438 rt2x00usb_assign_endpoint(queue, ep_desc); 439 rt2x00usb_assign_endpoint(queue, ep_desc);
440 queue = queue_next(queue);
439 441
440 if (queue != queue_end(rt2x00dev))
441 queue = queue_next(queue);
442 tx_ep_desc = ep_desc; 442 tx_ep_desc = ep_desc;
443 } 443 }
444 } 444 }
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index d638a8a59370..96a8d69f8790 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -2321,6 +2321,7 @@ static struct usb_device_id rt73usb_device_table[] = {
2321 /* Linksys */ 2321 /* Linksys */
2322 { USB_DEVICE(0x13b1, 0x0020), USB_DEVICE_DATA(&rt73usb_ops) }, 2322 { USB_DEVICE(0x13b1, 0x0020), USB_DEVICE_DATA(&rt73usb_ops) },
2323 { USB_DEVICE(0x13b1, 0x0023), USB_DEVICE_DATA(&rt73usb_ops) }, 2323 { USB_DEVICE(0x13b1, 0x0023), USB_DEVICE_DATA(&rt73usb_ops) },
2324 { USB_DEVICE(0x13b1, 0x0028), USB_DEVICE_DATA(&rt73usb_ops) },
2324 /* MSI */ 2325 /* MSI */
2325 { USB_DEVICE(0x0db0, 0x6877), USB_DEVICE_DATA(&rt73usb_ops) }, 2326 { USB_DEVICE(0x0db0, 0x6877), USB_DEVICE_DATA(&rt73usb_ops) },
2326 { USB_DEVICE(0x0db0, 0x6874), USB_DEVICE_DATA(&rt73usb_ops) }, 2327 { USB_DEVICE(0x0db0, 0x6874), USB_DEVICE_DATA(&rt73usb_ops) },