cfg80211: check lost scans later, fix bug
commit01a0ac417ce9b4f1216a266f2fd454cffefc5aee
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 20 Aug 2009 19:36:16 +0000 (20 21:36 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Aug 2009 18:40:25 +0000 (28 14:40 -0400)
tree3bc13cf46eebc77a44e65b16132d26f71b131f50
parent40ba60ddfeff8ef42fb33c0bdacfbb5f83e96b32
cfg80211: check lost scans later, fix bug

When we lose a scan, cfg80211 tries to clean up after
the driver. However, it currently does this too early,
it does this in GOING_DOWN already instead of DOWN, so
it may happen with mac80211. Besides fixing this, also
make it more robust by leaking the scan request so if
the driver later actually finishes the scan, it won't
crash. Also check in ___cfg80211_scan_done whether a
scan request is still pending and exit if not.

Reported-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/core.c
net/wireless/core.h
net/wireless/scan.c