mac80211: fix work removal on deauth request
authorJohannes Berg <johannes.berg@intel.com>
Wed, 18 Jan 2012 13:10:25 +0000 (14:10 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 18 Jan 2012 19:38:06 +0000 (14:38 -0500)
commitbc4934bc61d0a11fd62c5187ff83645628f8be8b
treee5c26315009133b19ae39469d9278d5e3f2a6919
parent65e8b0ccb6cf176f8eddb1b05534be46580da9dd
mac80211: fix work removal on deauth request

When deauth is requested while an auth or assoc
work item is in progress, we currently delete it
without regard for any state it might need to
clean up. Fix it by cleaning up for those items.

In the case Pontus found, the problem manifested
itself as such:

authenticate with 00:23:69:aa:dd:7b (try 1)
authenticated
failed to insert Dummy STA entry for the AP (error -17)
deauthenticating from 00:23:69:aa:dd:7b by local choice (reason=2)

It could also happen differently if the driver
uses the tx_sync callback.

We can't just call the ->done() method of the work
items because that will lock up due to the locking
in cfg80211. This fix isn't very clean, but that
seems acceptable since I have patches pending to
remove this code completely.

Cc: stable@vger.kernel.org
Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Tested-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c