diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-13 11:48:01 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-13 11:48:01 +0900 |
commit | e290861f99131fc42d98012a9ea2dc185f08f8f9 (patch) | |
tree | 5c8b92d095d74d03b281711c81bac54bd59989cd /drivers/net/wireless/libertas/scan.c | |
parent | b4a757367d36cebddcd332a4024d92f1e87af370 (diff) | |
parent | dbefd606a3b3634799b625f4900336e61c89e868 (diff) |
Merge branch 'sh/stable-updates'
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 601b5424967..6c95af3023c 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, |