Johannes Berg 5bc75728fd mac80211: fix scan vs. interface removal race
When we remove an interface, we can currently end up having
a pointer to it left in local->scan_sdata after it has been
set down, and then with a hardware scan the scan completion
can try to access it which is a bug. Alternatively, a scan
that started as a hardware scan may terminate as though it
was a software scan, if the timing is just right.

On SMP systems, software scan also has a similar problem,
just canceling the delayed work and setting a flag isn't
enough since it may be running concurrently; in this case
we would also never restore state of other interfaces.

This patch hopefully fixes the problems by always invoking
ieee80211_scan_completed or requiring it to be invoked by
the driver, I suspect the drivers that have ->hw_scan() are
buggy. The bug will not manifest itself unless you remove
the interface while hw-scanning which will also turn off
the hw, and then add a new interface which will be unusable
until you scan once.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:20 -04:00
..
2008-05-14 19:23:27 -05:00
2008-07-08 23:00:25 -07:00
2008-09-12 16:30:20 -07:00
2008-07-26 20:53:40 -04:00
2008-08-04 23:04:08 -07:00
2008-07-05 21:26:57 -07:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-08-22 03:31:39 -07:00
2008-08-27 02:27:10 -07:00
2008-06-11 21:00:38 -07:00
2008-08-28 02:53:51 -07:00
2008-07-05 21:25:39 -07:00