diff options
author | Eliad Peller <eliad@wizery.com> | 2011-12-22 18:48:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-04 14:30:43 -0500 |
commit | f6e8cb72ad4b0381d79df4575ec1f5c5df2e73b9 (patch) | |
tree | 83ebc7844b19211de72a89e54596bc656816dace /net/mac80211/offchannel.c | |
parent | b156579b1404871d97d2713c1f93c9526618e3ba (diff) |
mac80211: always clear SDATA_STATE_OFFCHANNEL flag
If the vif is stopped while it is offchannel (e.g. right
after p2p negotiation) the SDATA_STATE_OFFCHANNEL flag
is never get cleared, resulting in various bad effects
(e.g. GO can't start beaconing).
Fix it by clearing the SDATA_STATE_OFFCHANNEL flag
even if the vif is stopped.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/offchannel.c')
-rw-r--r-- | net/mac80211/offchannel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index e4330d843575..2948f8e2e675 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c | |||
@@ -162,6 +162,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, | |||
162 | 162 | ||
163 | mutex_lock(&local->iflist_mtx); | 163 | mutex_lock(&local->iflist_mtx); |
164 | list_for_each_entry(sdata, &local->interfaces, list) { | 164 | list_for_each_entry(sdata, &local->interfaces, list) { |
165 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR) | ||
166 | clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state); | ||
167 | |||
165 | if (!ieee80211_sdata_running(sdata)) | 168 | if (!ieee80211_sdata_running(sdata)) |
166 | continue; | 169 | continue; |
167 | 170 | ||
@@ -173,7 +176,6 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, | |||
173 | } | 176 | } |
174 | 177 | ||
175 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { | 178 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { |
176 | clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state); | ||
177 | /* | 179 | /* |
178 | * This may wake up queues even though the driver | 180 | * This may wake up queues even though the driver |
179 | * currently has them stopped. This is not very | 181 | * currently has them stopped. This is not very |