cfg80211/mac80211: avoid bounce back mac->cfg->mac on sched_scan_stopped
authorLuciano Coelho <coelho@ti.com>
Thu, 12 May 2011 13:28:29 +0000 (16:28 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 May 2011 18:10:55 +0000 (14:10 -0400)
commit85a9994a0a6cba1a6cc6af4bd3ebd85f778be0fe
treee9dd8fff75d9c0ee2f5aec129bb6132499c72461
parenta3836e02ba4c50db958d32d710b226f2408623dc
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>
include/net/cfg80211.h
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/main.c
net/mac80211/scan.c
net/wireless/core.c
net/wireless/core.h
net/wireless/scan.c