diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-12-14 08:22:10 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 07:01:36 -0500 |
commit | b8dc1a35c88dddcf62ce7bc59a7ed4c38c2f7597 (patch) | |
tree | 557b5f33c852896f353349c2d25ddba146848066 /net/mac80211/pm.c | |
parent | 8da349329ae52462253052f804ef30d086c9911a (diff) |
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.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 712c17ff6e22..8a67d7e982f7 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) | |||
121 | 121 | ||
122 | /* remove all interfaces */ | 122 | /* remove all interfaces */ |
123 | list_for_each_entry(sdata, &local->interfaces, list) { | 123 | list_for_each_entry(sdata, &local->interfaces, list) { |
124 | u32 changed = BSS_CHANGED_BEACON_ENABLED; | 124 | u32 changed = 0; |
125 | 125 | ||
126 | if (!ieee80211_sdata_running(sdata)) | 126 | if (!ieee80211_sdata_running(sdata)) |
127 | continue; | 127 | continue; |
@@ -136,14 +136,19 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) | |||
136 | changed = BSS_CHANGED_ASSOC | | 136 | changed = BSS_CHANGED_ASSOC | |
137 | BSS_CHANGED_BSSID | | 137 | BSS_CHANGED_BSSID | |
138 | BSS_CHANGED_IDLE; | 138 | BSS_CHANGED_IDLE; |
139 | else | 139 | break; |
140 | changed = 0; | 140 | case NL80211_IFTYPE_AP: |
141 | /* fall through */ | 141 | case NL80211_IFTYPE_ADHOC: |
142 | case NL80211_IFTYPE_MESH_POINT: | ||
143 | if (sdata->vif.bss_conf.enable_beacon) | ||
144 | changed = BSS_CHANGED_BEACON_ENABLED; | ||
145 | break; | ||
142 | default: | 146 | default: |
143 | ieee80211_quiesce(sdata); | ||
144 | break; | 147 | break; |
145 | } | 148 | } |
146 | 149 | ||
150 | ieee80211_quiesce(sdata); | ||
151 | |||
147 | sdata->suspend_bss_conf = sdata->vif.bss_conf; | 152 | sdata->suspend_bss_conf = sdata->vif.bss_conf; |
148 | memset(&sdata->vif.bss_conf, 0, sizeof(sdata->vif.bss_conf)); | 153 | memset(&sdata->vif.bss_conf, 0, sizeof(sdata->vif.bss_conf)); |
149 | sdata->vif.bss_conf.idle = true; | 154 | sdata->vif.bss_conf.idle = true; |