[package] mac80211: update compat-wireless to 2009-03-05, add more rt2x00 and ath9k...
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 309-rt2x00-Use-rt2x00usb_register_multiwrite-rt2800u.patch
1 From d98dacd4b09b7ec428d5e9093a5e6f1f564b1d3c Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Wed, 4 Mar 2009 22:23:53 +0100
4 Subject: [PATCH] rt2x00: Use rt2x00usb_register_multiwrite() (rt2800usb)
5
6 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
7 ---
8 drivers/net/wireless/rt2x00/rt2800usb.c | 31 ++++++++-----------------------
9 1 files changed, 8 insertions(+), 23 deletions(-)
10
11 --- a/drivers/net/wireless/rt2x00/rt2800usb.c
12 +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
13 @@ -396,7 +396,6 @@ static int rt2800usb_config_shared_key(s
14 {
15 struct hw_key_entry key_entry;
16 struct rt2x00_field32 field;
17 - int timeout;
18 u32 offset;
19 u32 reg;
20
21 @@ -411,12 +410,8 @@ static int rt2800usb_config_shared_key(s
22 sizeof(key_entry.rx_mic));
23
24 offset = SHARED_KEY_ENTRY(key->hw_key_idx);
25 - timeout = REGISTER_TIMEOUT32(sizeof(key_entry));
26 - rt2x00usb_vendor_request_large_buff(rt2x00dev, USB_MULTI_WRITE,
27 - USB_VENDOR_REQUEST_OUT,
28 - offset, &key_entry,
29 - sizeof(key_entry),
30 - timeout);
31 + rt2x00usb_register_multiwrite(rt2x00dev, offset,
32 + &key_entry, sizeof(key_entry));
33 }
34
35 /*
36 @@ -449,7 +444,6 @@ static int rt2800usb_config_pairwise_key
37 struct ieee80211_key_conf *key)
38 {
39 struct hw_key_entry key_entry;
40 - int timeout;
41 u32 offset;
42
43 if (crypto->cmd == SET_KEY) {
44 @@ -467,12 +461,8 @@ static int rt2800usb_config_pairwise_key
45 sizeof(key_entry.rx_mic));
46
47 offset = PAIRWISE_KEY_ENTRY(key->hw_key_idx);
48 - timeout = REGISTER_TIMEOUT32(sizeof(key_entry));
49 - rt2x00usb_vendor_request_large_buff(rt2x00dev, USB_MULTI_WRITE,
50 - USB_VENDOR_REQUEST_OUT,
51 - offset, &key_entry,
52 - sizeof(key_entry),
53 - timeout);
54 + rt2x00usb_register_multiwrite(rt2x00dev, offset,
55 + &key_entry, sizeof(key_entry));
56 }
57
58 /*
59 @@ -1217,11 +1207,8 @@ static int rt2800usb_load_firmware(struc
60 /*
61 * Write firmware to device.
62 */
63 - rt2x00usb_vendor_request_large_buff(rt2x00dev, USB_MULTI_WRITE,
64 - USB_VENDOR_REQUEST_OUT,
65 - FIRMWARE_IMAGE_BASE,
66 - data + offset, length,
67 - REGISTER_TIMEOUT32(length));
68 + rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
69 + (void *)(data + offset), length);
70
71 rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
72 rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0);
73 @@ -2067,10 +2054,8 @@ static void rt2800usb_write_beacon(struc
74 * Write entire beacon with descriptor to register.
75 */
76 beacon_base = HW_BEACON_OFFSET(entry->entry_idx);
77 - rt2x00usb_vendor_request_large_buff(rt2x00dev, USB_MULTI_WRITE,
78 - USB_VENDOR_REQUEST_OUT, beacon_base,
79 - entry->skb->data, entry->skb->len,
80 - REGISTER_TIMEOUT32(entry->skb->len));
81 + rt2x00usb_register_multiwrite(rt2x00dev, beacon_base,
82 + entry->skb->data, entry->skb->len);
83
84 /*
85 * Clean up the beacon skb.