diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-11-04 18:32:58 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-04 18:44:51 -0500 |
commit | 3306ef642a4dec6ba5341eceb8b9cb1e4a82ddb0 (patch) | |
tree | a728df9ca05c1d6a152f765195456c6402de1bf0 | |
parent | 02a39c209bda97f5dfd0c390c3926c131a052e34 (diff) |
rt2800usb: use rt2x00usb_register_multiwrite() to set key entries
Since struct hw_key_entry is 32-bytes large and is smaller than
CSR cache size (which is 64-bytes large) we can use the standard
rt2x00usb_register_multiwrite() helper to set key entries.
This cleanup is a part of preparations for later code unification.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index b3e266e7790..39a652bc29d 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -392,7 +392,6 @@ static int rt2800usb_config_shared_key(struct rt2x00_dev *rt2x00dev, { struct hw_key_entry key_entry; struct rt2x00_field32 field; - int timeout; u32 offset; u32 reg; @@ -407,12 +406,8 @@ static int rt2800usb_config_shared_key(struct rt2x00_dev *rt2x00dev, sizeof(key_entry.rx_mic)); offset = SHARED_KEY_ENTRY(key->hw_key_idx); - timeout = REGISTER_TIMEOUT32(sizeof(key_entry)); - rt2x00usb_vendor_request_large_buff(rt2x00dev, USB_MULTI_WRITE, - USB_VENDOR_REQUEST_OUT, - offset, &key_entry, - sizeof(key_entry), - timeout); + rt2x00usb_register_multiwrite(rt2x00dev, offset, + &key_entry, sizeof(key_entry)); } /* @@ -445,7 +440,6 @@ static int rt2800usb_config_pairwise_key(struct rt2x00_dev *rt2x00dev, struct ieee80211_key_conf *key) { struct hw_key_entry key_entry; - int timeout; u32 offset; if (crypto->cmd == SET_KEY) { @@ -467,12 +461,8 @@ static int rt2800usb_config_pairwise_key(struct rt2x00_dev *rt2x00dev, sizeof(key_entry.rx_mic)); offset = PAIRWISE_KEY_ENTRY(key->hw_key_idx); - timeout = REGISTER_TIMEOUT32(sizeof(key_entry)); - rt2x00usb_vendor_request_large_buff(rt2x00dev, USB_MULTI_WRITE, - USB_VENDOR_REQUEST_OUT, - offset, &key_entry, - sizeof(key_entry), - timeout); + rt2x00usb_register_multiwrite(rt2x00dev, offset, + &key_entry, sizeof(key_entry)); } /* |