aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500usb.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-06-03 04:51:51 -0400
committerIvo van Doorn <IvDoorn@gmail.com>2010-06-03 04:51:51 -0400
commit96b61bafe22b2f2abcc833d651739edb977f1b1e (patch)
tree232a49d57e1525a77d882fe39334bae064a42335 /drivers/net/wireless/rt2x00/rt2500usb.c
parenta903ae004a766a675ff063b88b168bd411e7760c (diff)
rt2x00: Clean up USB vendor request buffer functions.
There is no need to force the separation between a buffer USB vendor request that does fit the CSR cache and one that doesn't onto the callers. This is something that the rt2x00usb_vendor_request_buff function can figure out by itself. Combine the rt2x00usb_vendor_request_buff and rt2x00usb_vendor_request_large_buff functions into a single one, as both of them were equivalent for small buffers anyway. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 9dab1dccdaff..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