* [PATCH] ath9k: use correct type for test_bit/set_bit
@ 2008-07-23 16:53 Christoph Hellwig
2008-07-23 17:14 ` Luis R. Rodriguez
2008-07-23 17:29 ` Andreas Schwab
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2008-07-23 16:53 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, ath9k-devel
The test_bit/set_bit/etc family of routines operates on arrays of
unsigned long, so declare sc_keymap as such using the DECLARE_BITMAP
helper.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/drivers/net/wireless/ath9k/core.h
===================================================================
--- linux-2.6.orig/drivers/net/wireless/ath9k/core.h 2008-07-23 18:36:39.000000000 +0200
+++ linux-2.6/drivers/net/wireless/ath9k/core.h 2008-07-23 18:37:28.000000000 +0200
@@ -1042,7 +1042,7 @@ struct ath_softc {
/* Crypto */
u_int sc_keymax; /* size of key cache */
- u_int8_t sc_keymap[ATH_KEYBYTES];/* key use bit map */
+ DECLARE_BITMAP (sc_keymap, ATH_KEYBYTES);/* key use bit map */
u_int8_t sc_splitmic; /* split TKIP MIC keys */
int sc_keytype; /* type of the key being used */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath9k: use correct type for test_bit/set_bit
2008-07-23 16:53 [PATCH] ath9k: use correct type for test_bit/set_bit Christoph Hellwig
@ 2008-07-23 17:14 ` Luis R. Rodriguez
2008-07-23 17:29 ` Andreas Schwab
1 sibling, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2008-07-23 17:14 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-wireless, ath9k-devel
On Wed, Jul 23, 2008 at 9:53 AM, Christoph Hellwig <hch@lst.de> wrote:
> The test_bit/set_bit/etc family of routines operates on arrays of
> unsigned long, so declare sc_keymap as such using the DECLARE_BITMAP
> helper.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath9k: use correct type for test_bit/set_bit
2008-07-23 16:53 [PATCH] ath9k: use correct type for test_bit/set_bit Christoph Hellwig
2008-07-23 17:14 ` Luis R. Rodriguez
@ 2008-07-23 17:29 ` Andreas Schwab
2008-07-23 19:32 ` Christoph Hellwig
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2008-07-23 17:29 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Luis R. Rodriguez, linux-wireless, ath9k-devel
Christoph Hellwig <hch@lst.de> writes:
> The test_bit/set_bit/etc family of routines operates on arrays of
> unsigned long, so declare sc_keymap as such using the DECLARE_BITMAP
> helper.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6/drivers/net/wireless/ath9k/core.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-2.6.orig/drivers/net/wireless/ath9k/core.h 2008-07-23 18:36=
:39.000000000 +0200
> +++ linux-2.6/drivers/net/wireless/ath9k/core.h 2008-07-23 18:37:28.0=
00000000 +0200
> @@ -1042,7 +1042,7 @@ struct ath_softc {
> =20
> /* Crypto */
> u_int sc_keymax; /* size of key cache */
> - u_int8_t sc_keymap[ATH_KEYBYTES];/* key use bit map =
*/
> + DECLARE_BITMAP (sc_keymap, ATH_KEYBYTES);/* key use bit map */
DECLARE_BITMAP expects the number of bits, not bytes.
Andreas.
--=20
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany
PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4=
ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath9k: use correct type for test_bit/set_bit
2008-07-23 17:29 ` Andreas Schwab
@ 2008-07-23 19:32 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2008-07-23 19:32 UTC (permalink / raw)
To: Andreas Schwab
Cc: Christoph Hellwig, Luis R. Rodriguez, linux-wireless, ath9k-devel
On Wed, Jul 23, 2008 at 07:29:57PM +0200, Andreas Schwab wrote:
> > + DECLARE_BITMAP (sc_keymap, ATH_KEYBYTES);/* key use bit map */
>
> DECLARE_BITMAP expects the number of bits, not bytes.
Indeed, updated version below:
Index: linux-2.6/drivers/net/wireless/ath9k/core.h
===================================================================
--- linux-2.6.orig/drivers/net/wireless/ath9k/core.h 2008-07-23 18:36:39.000000000 +0200
+++ linux-2.6/drivers/net/wireless/ath9k/core.h 2008-07-23 21:26:59.000000000 +0200
@@ -888,7 +888,6 @@ void ath_setdefantenna(void *sc, u_int a
* up to ATH_KEYMAX entries (could dynamically allocate state).
*/
#define ATH_KEYMAX 128 /* max key cache size we handle */
-#define ATH_KEYBYTES (ATH_KEYMAX/NBBY) /* storage space in bytes */
#define RESET_RETRY_TXQ 0x00000001
#define ATH_IF_ID_ANY 0xff
@@ -1042,7 +1041,7 @@ struct ath_softc {
/* Crypto */
u_int sc_keymax; /* size of key cache */
- u_int8_t sc_keymap[ATH_KEYBYTES];/* key use bit map */
+ DECLARE_BITMAP (sc_keymap, ATH_KEYMAX);/* key use bit map */
u_int8_t sc_splitmic; /* split TKIP MIC keys */
int sc_keytype; /* type of the key being used */
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-23 19:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-23 16:53 [PATCH] ath9k: use correct type for test_bit/set_bit Christoph Hellwig
2008-07-23 17:14 ` Luis R. Rodriguez
2008-07-23 17:29 ` Andreas Schwab
2008-07-23 19:32 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).