diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/iface.c | 10 | ||||
-rw-r--r-- | net/mac80211/main.c | 3 | ||||
-rw-r--r-- | net/mac80211/pm.c | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 6c655b6547f..6614d4ff273 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -522,6 +522,16 @@ static int ieee80211_stop(struct net_device *dev) ieee80211_scan_completed(&local->hw, true); } + /* + * Disable beaconing for AP and mesh, IBSS can't + * still be joined to a network at this point. + */ + if (sdata->vif.type == NL80211_IFTYPE_AP || + sdata->vif.type == NL80211_IFTYPE_MESH_POINT) { + ieee80211_bss_info_change_notify(sdata, + BSS_CHANGED_BEACON_ENABLED); + } + conf.vif = &sdata->vif; conf.type = sdata->vif.type; conf.mac_addr = dev->dev_addr; diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 9dd8d25611e..5e76dd1daf7 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -198,7 +198,8 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, } if (changed & BSS_CHANGED_BEACON_ENABLED) { - if (test_bit(SCAN_SW_SCANNING, &local->scanning)) { + if (local->quiescing || !netif_running(sdata->dev) || + test_bit(SCAN_SW_SCANNING, &local->scanning)) { sdata->vif.bss_conf.enable_beacon = false; } else { /* diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 5e3d476972f..3320f7daaf2 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c @@ -96,6 +96,10 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) if (!netif_running(sdata->dev)) continue; + /* disable beaconing */ + ieee80211_bss_info_change_notify(sdata, + BSS_CHANGED_BEACON_ENABLED); + conf.vif = &sdata->vif; conf.type = sdata->vif.type; conf.mac_addr = sdata->dev->dev_addr; |