aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/pm.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-03-13 06:44:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:13:03 -0400
commit827b1fb44b7e41377a5498b9d070a11dfae2c283 (patch)
tree5a54acadb35e35d64e4db0cfde5a7105c85916e2 /net/mac80211/pm.c
parent3e3ccb3d9b8d5a1b65b34e1be2decf213ba3bebb (diff)
mac80211: resume properly, add suspend/resume test
When mac80211 resumes, it currently doesn't reconfigure the interfaces entirely and also doesn't reconfigure BSS information -- fix this. Also, to be able to test this, add a debugfs file that just calls the suspend/resume code to see what happens when we go through that, without needing the time-consuming suspend/resume cycle. (Original version broke the build for CONFIG_PM=n. Define alternative functions for that situation. -- JWL) Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r--net/mac80211/pm.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 1e6152ac6778..027302326498 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -143,6 +143,35 @@ int __ieee80211_resume(struct ieee80211_hw *hw)
143 ieee80211_configure_filter(local); 143 ieee80211_configure_filter(local);
144 netif_addr_unlock_bh(local->mdev); 144 netif_addr_unlock_bh(local->mdev);
145 145
146 /* Finally also reconfigure all the BSS information */
147 list_for_each_entry(sdata, &local->interfaces, list) {
148 u32 changed = ~0;
149 if (!netif_running(sdata->dev))
150 continue;
151 switch (sdata->vif.type) {
152 case NL80211_IFTYPE_STATION:
153 /* disable beacon change bits */
154 changed &= ~IEEE80211_IFCC_BEACON;
155 /* fall through */
156 case NL80211_IFTYPE_ADHOC:
157 case NL80211_IFTYPE_AP:
158 case NL80211_IFTYPE_MESH_POINT:
159 WARN_ON(ieee80211_if_config(sdata, changed));
160 ieee80211_bss_info_change_notify(sdata, ~0);
161 break;
162 case NL80211_IFTYPE_WDS:
163 break;
164 case NL80211_IFTYPE_AP_VLAN:
165 case NL80211_IFTYPE_MONITOR:
166 /* ignore virtual */
167 break;
168 case NL80211_IFTYPE_UNSPECIFIED:
169 case __NL80211_IFTYPE_AFTER_LAST:
170 WARN_ON(1);
171 break;
172 }
173 }
174
146 ieee80211_wake_queues_by_reason(hw, 175 ieee80211_wake_queues_by_reason(hw,
147 IEEE80211_QUEUE_STOP_REASON_SUSPEND); 176 IEEE80211_QUEUE_STOP_REASON_SUSPEND);
148 177