提交 f6e8cb72 编写于 作者: E Eliad Peller 提交者: John W. Linville

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: NEliad Peller <eliad@wizery.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b156579b
...@@ -162,6 +162,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, ...@@ -162,6 +162,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
mutex_lock(&local->iflist_mtx); mutex_lock(&local->iflist_mtx);
list_for_each_entry(sdata, &local->interfaces, list) { 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)) if (!ieee80211_sdata_running(sdata))
continue; continue;
...@@ -173,7 +176,6 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, ...@@ -173,7 +176,6 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
} }
if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
/* /*
* This may wake up queues even though the driver * This may wake up queues even though the driver
* currently has them stopped. This is not very * currently has them stopped. This is not very
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册