diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-30 10:35:45 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-30 10:35:45 -0700 |
commit | a1b97440eec0ea3e53183cde8fe82ff8c1ffb091 (patch) | |
tree | e634dc66b0094cf26281704cce56d5117b0a15f9 /drivers/net/wireless/libertas/scan.c | |
parent | 27fed4175acf81ddd91d9a4ee2fd298981f60295 (diff) | |
parent | 89c3a8aca28e6d57f2ae945d97858a372d624b81 (diff) | |
download | op-kernel-dev-a1b97440eec0ea3e53183cde8fe82ff8c1ffb091.zip op-kernel-dev-a1b97440eec0ea3e53183cde8fe82ff8c1ffb091.tar.gz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 601b542..6c95af3 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c @@ -5,6 +5,7 @@ * for sending scan commands to the firmware. */ #include <linux/types.h> +#include <linux/kernel.h> #include <linux/etherdevice.h> #include <linux/if_arp.h> #include <asm/unaligned.h> @@ -876,7 +877,7 @@ static inline char *lbs_translate_scan(struct lbs_private *priv, iwe.u.bitrate.disabled = 0; iwe.u.bitrate.value = 0; - for (j = 0; bss->rates[j] && (j < sizeof(bss->rates)); j++) { + for (j = 0; j < ARRAY_SIZE(bss->rates) && bss->rates[j]; j++) { /* Bit rate given in 500 kb/s units */ iwe.u.bitrate.value = bss->rates[j] * 500000; current_val = iwe_stream_add_value(info, start, current_val, |