diff options
author | Luciano Coelho <coelho@ti.com> | 2011-03-21 17:16:14 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-04-19 09:49:12 -0400 |
commit | 4a31c11c7d8c482598754a577a8fb71abb61ffa0 (patch) | |
tree | c43a18ce0e9ee6bc54dc3dcda83b2e6e3ae85438 /drivers/net/wireless/wl12xx/wl12xx.h | |
parent | 4623ec7d97afaf7a8489036e2c2e71e8349716b4 (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.h | 3 |
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 | ||
305 | struct wl1271_scan { | 306 | struct 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]; |