CHROMIUM: iwl7000: mac80211: fix another suspend vs. association race

Since cfg80211 disconnects, but has no insight into the association
process, it can happen that it disconnects while association is in
progress. We then try to abort association in mac80211, but this is
only later so the association can complete between the two.

This results in removing an interface from the driver while bound
to the channel context, obviously causing confusion and issues.

Solve this by also checking if we're associated during quiesce and
if so deauthenticating. The frame will no longer go out to the AP
which is a bit unfortunate, but it'll resolve the crash (and before
we would have suspended without telling the AP as well.)

I'm working on a better, but more complex solution as well, which
should avoid that problem.

BUG=chrome-os-partner:34821
TEST=run suspend stress test checking for SYSASSERT 3481

Note that this addresses one of the many issues in that bug, but
it seems like this one was actually recoverable (though with a lot
of kernel warnings), so is perhaps not so important.

Change-Id: I5dc760afb102bdb61eb1147273e8e0eb08cb6ccf
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/247040
Reviewed-by: Paul Stewart <pstew@chromium.org>
1 file changed