aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/offchannel.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-01-28 13:54:03 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-28 13:54:03 -0500
commit9ebea3829fac7505e0cd2642fbd13cfa9c038831 (patch)
treeed690568a27b7231b8a507e8ba07c1ae34868e5c /net/mac80211/offchannel.c
parentc5e818ef081c4144177fdbdeed154332cd7e4d7a (diff)
parent83f0c6d1f502bd75bb4a9e31e8d64e59c6894ad1 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/iwlwifi/dvm/tx.c
Diffstat (limited to 'net/mac80211/offchannel.c')
-rw-r--r--net/mac80211/offchannel.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 1430b48600fc..82baf5b6ecf4 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -102,8 +102,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
102 ieee80211_sta_reset_conn_monitor(sdata); 102 ieee80211_sta_reset_conn_monitor(sdata);
103} 103}
104 104
105void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, 105void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local)
106 bool offchannel_ps_enable)
107{ 106{
108 struct ieee80211_sub_if_data *sdata; 107 struct ieee80211_sub_if_data *sdata;
109 108
@@ -136,8 +135,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
136 135
137 if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { 136 if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
138 netif_tx_stop_all_queues(sdata->dev); 137 netif_tx_stop_all_queues(sdata->dev);
139 if (offchannel_ps_enable && 138 if (sdata->vif.type == NL80211_IFTYPE_STATION &&
140 (sdata->vif.type == NL80211_IFTYPE_STATION) &&
141 sdata->u.mgd.associated) 139 sdata->u.mgd.associated)
142 ieee80211_offchannel_ps_enable(sdata); 140 ieee80211_offchannel_ps_enable(sdata);
143 } 141 }
@@ -145,8 +143,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
145 mutex_unlock(&local->iflist_mtx); 143 mutex_unlock(&local->iflist_mtx);
146} 144}
147 145
148void ieee80211_offchannel_return(struct ieee80211_local *local, 146void ieee80211_offchannel_return(struct ieee80211_local *local)
149 bool offchannel_ps_disable)
150{ 147{
151 struct ieee80211_sub_if_data *sdata; 148 struct ieee80211_sub_if_data *sdata;
152 149
@@ -165,11 +162,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
165 continue; 162 continue;
166 163
167 /* Tell AP we're back */ 164 /* Tell AP we're back */
168 if (offchannel_ps_disable && 165 if (sdata->vif.type == NL80211_IFTYPE_STATION &&
169 sdata->vif.type == NL80211_IFTYPE_STATION) { 166 sdata->u.mgd.associated)
170 if (sdata->u.mgd.associated) 167 ieee80211_offchannel_ps_disable(sdata);
171 ieee80211_offchannel_ps_disable(sdata);
172 }
173 168
174 if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { 169 if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
175 /* 170 /*
@@ -388,7 +383,7 @@ void ieee80211_sw_roc_work(struct work_struct *work)
388 local->tmp_channel = NULL; 383 local->tmp_channel = NULL;
389 ieee80211_hw_config(local, 0); 384 ieee80211_hw_config(local, 0);
390 385
391 ieee80211_offchannel_return(local, true); 386 ieee80211_offchannel_return(local);
392 } 387 }
393 388
394 ieee80211_recalc_idle(local); 389 ieee80211_recalc_idle(local);