aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-05-12 09:28:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-12 14:10:55 -0400
commit85a9994a0a6cba1a6cc6af4bd3ebd85f778be0fe (patch)
treee9dd8fff75d9c0ee2f5aec129bb6132499c72461 /net/mac80211/ieee80211_i.h
parenta3836e02ba4c50db958d32d710b226f2408623dc (diff)
cfg80211/mac80211: avoid bounce back mac->cfg->mac on sched_scan_stopped
When sched_scan_stopped was called by the driver, mac80211 calls cfg80211, which in turn was calling mac80211 back with a flag "driver_initiated". This flag was used so that mac80211 would do the necessary cleanup but would not call the driver. This was enough to prevent the bounce back between the driver and mac80211, but not between mac80211 and cfg80211. To fix this, we now do the cleanup in mac80211 before calling cfg80211. To help with locking issues, the workqueue was moved from cfg80211 to mac80211. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 6f55a789c099..82f90ff8bb18 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -849,6 +849,7 @@ struct ieee80211_local {
849 849
850 bool sched_scanning; 850 bool sched_scanning;
851 struct ieee80211_sched_scan_ies sched_scan_ies; 851 struct ieee80211_sched_scan_ies sched_scan_ies;
852 struct work_struct sched_scan_stopped_work;
852 853
853 unsigned long leave_oper_channel_time; 854 unsigned long leave_oper_channel_time;
854 enum mac80211_scan_state next_scan_state; 855 enum mac80211_scan_state next_scan_state;
@@ -1160,8 +1161,8 @@ void ieee80211_rx_bss_put(struct ieee80211_local *local,
1160/* scheduled scan handling */ 1161/* scheduled scan handling */
1161int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, 1162int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
1162 struct cfg80211_sched_scan_request *req); 1163 struct cfg80211_sched_scan_request *req);
1163int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata, 1164int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
1164 bool driver_initiated); 1165void ieee80211_sched_scan_stopped_work(struct work_struct *work);
1165 1166
1166/* off-channel helpers */ 1167/* off-channel helpers */
1167bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local); 1168bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local);