Skip to content

Commit

Permalink
mac80211: always clear SDATA_STATE_OFFCHANNEL flag
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eliad Peller authored and John W. Linville committed Jan 4, 2012
1 parent b156579 commit f6e8cb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/mac80211/offchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,

mutex_lock(&local->iflist_mtx);
list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type != NL80211_IFTYPE_MONITOR)
clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);

if (!ieee80211_sdata_running(sdata))
continue;

Expand All @@ -173,7 +176,6 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
}

if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
/*
* This may wake up queues even though the driver
* currently has them stopped. This is not very
Expand Down

0 comments on commit f6e8cb7

Please sign in to comment.