aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/ieee80211_sta.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 8b991ebcbb4e..86da69f44384 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -2356,6 +2356,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
2356 struct sta_info *sta; 2356 struct sta_info *sta;
2357 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 2357 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
2358 u64 beacon_timestamp, rx_timestamp; 2358 u64 beacon_timestamp, rx_timestamp;
2359 struct ieee80211_channel *channel;
2359 DECLARE_MAC_BUF(mac); 2360 DECLARE_MAC_BUF(mac);
2360 DECLARE_MAC_BUF(mac2); 2361 DECLARE_MAC_BUF(mac2);
2361 2362
@@ -2420,6 +2421,11 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
2420 else 2421 else
2421 freq = rx_status->freq; 2422 freq = rx_status->freq;
2422 2423
2424 channel = ieee80211_get_channel(local->hw.wiphy, freq);
2425
2426 if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
2427 return;
2428
2423#ifdef CONFIG_MAC80211_MESH 2429#ifdef CONFIG_MAC80211_MESH
2424 if (elems.mesh_config) 2430 if (elems.mesh_config)
2425 bss = ieee80211_rx_mesh_bss_get(dev, elems.mesh_id, 2431 bss = ieee80211_rx_mesh_bss_get(dev, elems.mesh_id,