diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 85cb4daac9a0..9663326c0dfa 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -1423,8 +1423,7 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl) | |||
1423 | 1423 | ||
1424 | if (wl->scan.state != WL1271_SCAN_STATE_IDLE) { | 1424 | if (wl->scan.state != WL1271_SCAN_STATE_IDLE) { |
1425 | wl->scan.state = WL1271_SCAN_STATE_IDLE; | 1425 | wl->scan.state = WL1271_SCAN_STATE_IDLE; |
1426 | kfree(wl->scan.scanned_ch); | 1426 | memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch)); |
1427 | wl->scan.scanned_ch = NULL; | ||
1428 | wl->scan.req = NULL; | 1427 | wl->scan.req = NULL; |
1429 | ieee80211_scan_completed(wl->hw, true); | 1428 | ieee80211_scan_completed(wl->hw, true); |
1430 | } | 1429 | } |
@@ -3502,6 +3501,10 @@ int wl1271_init_ieee80211(struct wl1271 *wl) | |||
3502 | wl->hw->wiphy->max_scan_ie_len = WL1271_CMD_TEMPL_MAX_SIZE - | 3501 | wl->hw->wiphy->max_scan_ie_len = WL1271_CMD_TEMPL_MAX_SIZE - |
3503 | sizeof(struct ieee80211_header); | 3502 | sizeof(struct ieee80211_header); |
3504 | 3503 | ||
3504 | /* make sure all our channels fit in the scanned_ch bitmask */ | ||
3505 | BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) + | ||
3506 | ARRAY_SIZE(wl1271_channels_5ghz) > | ||
3507 | WL1271_MAX_CHANNELS); | ||
3505 | /* | 3508 | /* |
3506 | * We keep local copies of the band structs because we need to | 3509 | * We keep local copies of the band structs because we need to |
3507 | * modify them on a per-device basis. | 3510 | * modify them on a per-device basis. |