summaryrefslogtreecommitdiffstats
path: root/net/mac80211/pm.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-14 14:22:10 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 13:01:36 +0100
commitb8dc1a35c88dddcf62ce7bc59a7ed4c38c2f7597 (patch)
tree557b5f33c852896f353349c2d25ddba146848066 /net/mac80211/pm.c
parent8da349329ae52462253052f804ef30d086c9911a (diff)
downloadop-kernel-dev-b8dc1a35c88dddcf62ce7bc59a7ed4c38c2f7597.zip
op-kernel-dev-b8dc1a35c88dddcf62ce7bc59a7ed4c38c2f7597.tar.gz
mac80211: further simplify ieee80211_bss_info_change_notify
The special case in the function isn't really needed, instead make the suspend code a bit better and also easier to understand and move the warning into the driver op wrapper inline. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r--net/mac80211/pm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 712c17f..8a67d7e 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -121,7 +121,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
/* remove all interfaces */
list_for_each_entry(sdata, &local->interfaces, list) {
- u32 changed = BSS_CHANGED_BEACON_ENABLED;
+ u32 changed = 0;
if (!ieee80211_sdata_running(sdata))
continue;
@@ -136,14 +136,19 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
changed = BSS_CHANGED_ASSOC |
BSS_CHANGED_BSSID |
BSS_CHANGED_IDLE;
- else
- changed = 0;
- /* fall through */
+ break;
+ case NL80211_IFTYPE_AP:
+ case NL80211_IFTYPE_ADHOC:
+ case NL80211_IFTYPE_MESH_POINT:
+ if (sdata->vif.bss_conf.enable_beacon)
+ changed = BSS_CHANGED_BEACON_ENABLED;
+ break;
default:
- ieee80211_quiesce(sdata);
break;
}
+ ieee80211_quiesce(sdata);
+
sdata->suspend_bss_conf = sdata->vif.bss_conf;
memset(&sdata->vif.bss_conf, 0, sizeof(sdata->vif.bss_conf));
sdata->vif.bss_conf.idle = true;
OpenPOWER on IntegriCloud