[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200911051942.17500.IvDoorn@gmail.com>
Date: Thu, 5 Nov 2009 19:42:17 +0100
From: Ivo van Doorn <ivdoorn@...il.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Cc: linux-wireless@...r.kernel.org,
Gertjan van Wingerde <gwingerde@...il.com>,
linux-kernel@...r.kernel.org,
"John W. Linville" <linville@...driver.com>
Subject: Re: [PATCH 08/41] rt2800usb: use rt2x00usb_register_multiwrite() to set key entries
On Wednesday 04 November 2009, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> Subject: [PATCH] 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@...il.com>
Acked-by: Ivo van Doorn <IvDoorn@...il.com>
> ---
> drivers/net/wireless/rt2x00/rt2800usb.c | 18 ++++--------------
> 1 file changed, 4 insertions(+), 14 deletions(-)
>
> Index: b/drivers/net/wireless/rt2x00/rt2800usb.c
> ===================================================================
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -392,7 +392,6 @@ static int rt2800usb_config_shared_key(s
> {
> 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(s
> 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 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
> 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));
> }
>
> /*
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists