aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl12xx.h
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-03-21 17:16:14 -0400
committerLuciano Coelho <coelho@ti.com>2011-04-19 09:49:12 -0400
commit4a31c11c7d8c482598754a577a8fb71abb61ffa0 (patch)
treec43a18ce0e9ee6bc54dc3dcda83b2e6e3ae85438 /drivers/net/wireless/wl12xx/wl12xx.h
parent4623ec7d97afaf7a8489036e2c2e71e8349716b4 (diff)
wl12xx: use a bitmask instead of list of booleans in scanned_ch
We were using an array of booleans to mark the channels we had already scanned. This was causing a sparse error, because bool is not a type with defined size. To fix this, use bitmasks instead, which is much cleaner anyway. Thanks Johannes Berg for the idea. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl12xx.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl12xx.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index b04481aadf9c..ba98e1853842 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -302,9 +302,10 @@ struct wl1271_rx_mem_pool_addr {
302 u32 addr_extra; 302 u32 addr_extra;
303}; 303};
304 304
305#define WL1271_MAX_CHANNELS 64
305struct wl1271_scan { 306struct wl1271_scan {
306 struct cfg80211_scan_request *req; 307 struct cfg80211_scan_request *req;
307 bool *scanned_ch; 308 unsigned long scanned_ch[BITS_TO_LONGS(WL1271_MAX_CHANNELS)];
308 bool failed; 309 bool failed;
309 u8 state; 310 u8 state;
310 u8 ssid[IW_ESSID_MAX_SIZE+1]; 311 u8 ssid[IW_ESSID_MAX_SIZE+1];