mac80211: clean up remain-on-channel on interface stop
authorJohannes Berg <johannes.berg@intel.com>
Thu, 31 May 2012 13:09:27 +0000 (15:09 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 19 Jun 2012 22:18:11 +0000 (23:18 +0100)
commit68d214eda1a87c9045ab8c5247d1911cfc47bede
tree40ccaa8108700829621f121cbad01a8b2e6f3f99
parentc022fe20a36fa5c578a76b6c9a64b5d663f82f4b
mac80211: clean up remain-on-channel on interface stop

commit 71ecfa1893034eeb1c93e02e22ee2ad26d080858 upstream.

When any interface goes down, it could be the one that we
were doing a remain-on-channel with. We therefore need to
cancel the remain-on-channel and flush the related work
structs so they don't run after the interface has been
removed or even destroyed.

It's also possible in this case that an off-channel SKB
was never transmitted, so free it if this is the case.
Note that this can also happen if the driver finishes
the off-channel period without ever starting it.

Reported-by: Nirav Shah <nirav.j2.shah@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/mac80211/iface.c
net/mac80211/offchannel.c