diff options
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/ht.c | 4 | ||||
-rw-r--r-- | net/mac80211/iface.c | 15 |
3 files changed, 15 insertions, 7 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 94b4acb5aabb..33acdca4a1df 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1090,8 +1090,6 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
1090 | kfree(sdata->u.ap.next_beacon); | 1090 | kfree(sdata->u.ap.next_beacon); |
1091 | sdata->u.ap.next_beacon = NULL; | 1091 | sdata->u.ap.next_beacon = NULL; |
1092 | 1092 | ||
1093 | cancel_work_sync(&sdata->u.ap.request_smps_work); | ||
1094 | |||
1095 | /* turn off carrier for this interface and dependent VLANs */ | 1093 | /* turn off carrier for this interface and dependent VLANs */ |
1096 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) | 1094 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) |
1097 | netif_carrier_off(vlan->dev); | 1095 | netif_carrier_off(vlan->dev); |
@@ -1103,6 +1101,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
1103 | kfree_rcu(old_beacon, rcu_head); | 1101 | kfree_rcu(old_beacon, rcu_head); |
1104 | if (old_probe_resp) | 1102 | if (old_probe_resp) |
1105 | kfree_rcu(old_probe_resp, rcu_head); | 1103 | kfree_rcu(old_probe_resp, rcu_head); |
1104 | sdata->u.ap.driver_smps_mode = IEEE80211_SMPS_OFF; | ||
1106 | 1105 | ||
1107 | __sta_info_flush(sdata, true); | 1106 | __sta_info_flush(sdata, true); |
1108 | ieee80211_free_keys(sdata, true); | 1107 | ieee80211_free_keys(sdata, true); |
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index fab7b91923e0..70dd013de836 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -466,7 +466,9 @@ void ieee80211_request_smps_ap_work(struct work_struct *work) | |||
466 | u.ap.request_smps_work); | 466 | u.ap.request_smps_work); |
467 | 467 | ||
468 | sdata_lock(sdata); | 468 | sdata_lock(sdata); |
469 | __ieee80211_request_smps_ap(sdata, sdata->u.ap.driver_smps_mode); | 469 | if (sdata_dereference(sdata->u.ap.beacon, sdata)) |
470 | __ieee80211_request_smps_ap(sdata, | ||
471 | sdata->u.ap.driver_smps_mode); | ||
470 | sdata_unlock(sdata); | 472 | sdata_unlock(sdata); |
471 | } | 473 | } |
472 | 474 | ||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 3dfd20a453ab..ae2eb148a028 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -770,12 +770,19 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
770 | 770 | ||
771 | ieee80211_roc_purge(local, sdata); | 771 | ieee80211_roc_purge(local, sdata); |
772 | 772 | ||
773 | if (sdata->vif.type == NL80211_IFTYPE_STATION) | 773 | switch (sdata->vif.type) { |
774 | case NL80211_IFTYPE_STATION: | ||
774 | ieee80211_mgd_stop(sdata); | 775 | ieee80211_mgd_stop(sdata); |
775 | 776 | break; | |
776 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) | 777 | case NL80211_IFTYPE_ADHOC: |
777 | ieee80211_ibss_stop(sdata); | 778 | ieee80211_ibss_stop(sdata); |
778 | 779 | break; | |
780 | case NL80211_IFTYPE_AP: | ||
781 | cancel_work_sync(&sdata->u.ap.request_smps_work); | ||
782 | break; | ||
783 | default: | ||
784 | break; | ||
785 | } | ||
779 | 786 | ||
780 | /* | 787 | /* |
781 | * Remove all stations associated with this interface. | 788 | * Remove all stations associated with this interface. |