diff options
-rw-r--r-- | net/mac80211/scan.c | 3 | ||||
-rw-r--r-- | net/mac80211/util.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 379f178eab5f..1ff04f689d1f 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -928,6 +928,9 @@ int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, | |||
928 | } | 928 | } |
929 | 929 | ||
930 | for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | 930 | for (i = 0; i < IEEE80211_NUM_BANDS; i++) { |
931 | if (!local->hw.wiphy->bands[i]) | ||
932 | continue; | ||
933 | |||
931 | local->sched_scan_ies.ie[i] = kzalloc(2 + | 934 | local->sched_scan_ies.ie[i] = kzalloc(2 + |
932 | IEEE80211_MAX_SSID_LEN + | 935 | IEEE80211_MAX_SSID_LEN + |
933 | local->scan_ies_len + | 936 | local->scan_ies_len + |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 64493a7bef1a..596db0c2a113 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -999,6 +999,8 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | |||
999 | int ext_rates_len; | 999 | int ext_rates_len; |
1000 | 1000 | ||
1001 | sband = local->hw.wiphy->bands[band]; | 1001 | sband = local->hw.wiphy->bands[band]; |
1002 | if (WARN_ON_ONCE(!sband)) | ||
1003 | return 0; | ||
1002 | 1004 | ||
1003 | pos = buffer; | 1005 | pos = buffer; |
1004 | 1006 | ||