summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-04-17 12:18:31 +0300
committerJohannes Berg <johannes.berg@intel.com>2020-04-24 12:46:17 +0300
commit90e8f58dfc04d1bd48ca155cc55ebf7ba1824864 (patch)
tree894f317e0bcfd4b105154ed58bf9015a942ec098 /net/mac80211/cfg.c
parent1db364c88695272e3410eb4b5d4595c8cb15db30 (diff)
downloadlinux-90e8f58dfc04d1bd48ca155cc55ebf7ba1824864.tar.xz
mac80211: fix drv_config_iface_filter() behaviour
There are two bugs with this, first, it shouldn't be called on an interface that's down, and secondly, it should then be called when the interface comes up. Note that the currently only user (iwlwifi) doesn't seem to care about either of these scenarios. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://lore.kernel.org/r/20200417111830.401d82c7a0bf.I5dc7d718816460c2d8d89c7af6c215f9e2b3078f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0f72813fed53..b90f2131ec7a 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3421,12 +3421,15 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
if (!local->open_count)
break;
- if (sdata->vif.probe_req_reg == 1)
- drv_config_iface_filter(local, sdata, FIF_PROBE_REQ,
- FIF_PROBE_REQ);
- else if (sdata->vif.probe_req_reg == 0)
- drv_config_iface_filter(local, sdata, 0,
- FIF_PROBE_REQ);
+ if (ieee80211_sdata_running(sdata)) {
+ if (sdata->vif.probe_req_reg == 1)
+ drv_config_iface_filter(local, sdata,
+ FIF_PROBE_REQ,
+ FIF_PROBE_REQ);
+ else if (sdata->vif.probe_req_reg == 0)
+ drv_config_iface_filter(local, sdata, 0,
+ FIF_PROBE_REQ);
+ }
ieee80211_configure_filter(local);
break;