diff options
author | Patrick McHardy <kaber@trash.net> | 2010-06-15 11:31:06 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-06-15 11:31:06 -0400 |
commit | f9181f4ffc71d7b7dd1906c9a11d51d6659220ae (patch) | |
tree | 194f22e8216a1b9ee2c0dd019142202d73a7dc87 /drivers/net/wireless/rt2x00/rt2500usb.c | |
parent | 0902b469bd25065aa0688c3cee6f11744c817e7c (diff) | |
parent | 1ab6c163dee279559e3a62d774af7e4c4c9b4c67 (diff) |
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts:
include/net/netfilter/xt_rateest.h
net/bridge/br_netfilter.c
net/netfilter/nf_conntrack_core.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 9ae96a626e6d..002db646ae0b 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -345,7 +345,6 @@ static int rt2500usb_config_key(struct rt2x00_dev *rt2x00dev, | |||
345 | struct rt2x00lib_crypto *crypto, | 345 | struct rt2x00lib_crypto *crypto, |
346 | struct ieee80211_key_conf *key) | 346 | struct ieee80211_key_conf *key) |
347 | { | 347 | { |
348 | int timeout; | ||
349 | u32 mask; | 348 | u32 mask; |
350 | u16 reg; | 349 | u16 reg; |
351 | 350 | ||
@@ -367,18 +366,8 @@ static int rt2500usb_config_key(struct rt2x00_dev *rt2x00dev, | |||
367 | 366 | ||
368 | key->hw_key_idx += reg ? ffz(reg) : 0; | 367 | key->hw_key_idx += reg ? ffz(reg) : 0; |
369 | 368 | ||
370 | /* | 369 | rt2500usb_register_multiwrite(rt2x00dev, reg, |
371 | * The encryption key doesn't fit within the CSR cache, | 370 | crypto->key, sizeof(crypto->key)); |
372 | * this means we should allocate it separately and use | ||
373 | * rt2x00usb_vendor_request() to send the key to the hardware. | ||
374 | */ | ||
375 | reg = KEY_ENTRY(key->hw_key_idx); | ||
376 | timeout = REGISTER_TIMEOUT32(sizeof(crypto->key)); | ||
377 | rt2x00usb_vendor_request_large_buff(rt2x00dev, USB_MULTI_WRITE, | ||
378 | USB_VENDOR_REQUEST_OUT, reg, | ||
379 | crypto->key, | ||
380 | sizeof(crypto->key), | ||
381 | timeout); | ||
382 | 371 | ||
383 | /* | 372 | /* |
384 | * The driver does not support the IV/EIV generation | 373 | * The driver does not support the IV/EIV generation |
@@ -1034,7 +1023,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1034 | struct txentry_desc *txdesc) | 1023 | struct txentry_desc *txdesc) |
1035 | { | 1024 | { |
1036 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | 1025 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); |
1037 | __le32 *txd = (__le32 *)(skb->data - TXD_DESC_SIZE); | 1026 | __le32 *txd = (__le32 *) skb->data; |
1038 | u32 word; | 1027 | u32 word; |
1039 | 1028 | ||
1040 | /* | 1029 | /* |
@@ -1080,6 +1069,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1080 | /* | 1069 | /* |
1081 | * Register descriptor details in skb frame descriptor. | 1070 | * Register descriptor details in skb frame descriptor. |
1082 | */ | 1071 | */ |
1072 | skbdesc->flags |= SKBDESC_DESC_IN_SKB; | ||
1083 | skbdesc->desc = txd; | 1073 | skbdesc->desc = txd; |
1084 | skbdesc->desc_len = TXD_DESC_SIZE; | 1074 | skbdesc->desc_len = TXD_DESC_SIZE; |
1085 | } | 1075 | } |
@@ -1108,9 +1098,20 @@ static void rt2500usb_write_beacon(struct queue_entry *entry, | |||
1108 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); | 1098 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); |
1109 | 1099 | ||
1110 | /* | 1100 | /* |
1111 | * Take the descriptor in front of the skb into account. | 1101 | * Add space for the descriptor in front of the skb. |
1112 | */ | 1102 | */ |
1113 | skb_push(entry->skb, TXD_DESC_SIZE); | 1103 | skb_push(entry->skb, TXD_DESC_SIZE); |
1104 | memset(entry->skb->data, 0, TXD_DESC_SIZE); | ||
1105 | |||
1106 | /* | ||
1107 | * Write the TX descriptor for the beacon. | ||
1108 | */ | ||
1109 | rt2500usb_write_tx_desc(rt2x00dev, entry->skb, txdesc); | ||
1110 | |||
1111 | /* | ||
1112 | * Dump beacon to userspace through debugfs. | ||
1113 | */ | ||
1114 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
1114 | 1115 | ||
1115 | /* | 1116 | /* |
1116 | * USB devices cannot blindly pass the skb->len as the | 1117 | * USB devices cannot blindly pass the skb->len as the |