summaryrefslogtreecommitdiffstats
path: root/net/mac80211/pm.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-19 15:44:42 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-10-26 12:57:06 +0200
commit1041638f2bba0f1de75e66086d50fb1251d64dcf (patch)
tree95d5ea3a83302d27887dcdc2d425682216937f3f /net/mac80211/pm.c
parentmac80211: move AP teardown code to correct place (diff)
downloadlinux-1041638f2bba0f1de75e66086d50fb1251d64dcf.tar.xz
linux-1041638f2bba0f1de75e66086d50fb1251d64dcf.zip
mac80211: add explicit AP/GO driver operations
Depending on the driver, a lot of setup may be necessary to start operating as an AP, some of which may fail. Add an explicit AP start driver method to make such failures easier to handle, and add an AP stop driver method for symmetry. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r--net/mac80211/pm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 9f404ac901ab..0f1c434638bc 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -135,6 +135,10 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
ieee80211_bss_info_change_notify(sdata,
BSS_CHANGED_BEACON_ENABLED);
+ if (sdata->vif.type == NL80211_IFTYPE_AP &&
+ rcu_access_pointer(sdata->u.ap.beacon))
+ drv_stop_ap(local, sdata);
+
/* the interface is leaving the channel and is removed */
ieee80211_vif_release_channel(sdata);
drv_remove_interface(local, sdata);