mac80211: unset SDATA_STATE_OFFCHANNEL when cancelling a scan
authorBrian Cavagnolo <brian@cozybit.com>
Thu, 4 Nov 2010 23:59:28 +0000 (16:59 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Nov 2010 21:53:47 +0000 (16:53 -0500)
commit352ffad646c0e0c5cf9ae8cea99710ee0d66ee27
tree41987fe0c7e00dfc3aa6871f1a51007e42f22c03
parentfbb078fcd2fa83646ad9504d8e4c54a67b8729ae
mac80211: unset SDATA_STATE_OFFCHANNEL when cancelling a scan

For client STA interfaces, ieee80211_do_stop unsets the relevant
interface's SDATA_STATE_RUNNING state bit prior to cancelling an
interrupted scan.  When ieee80211_offchannel_return is invoked as
part of cancelling the scan, it doesn't bother unsetting the
SDATA_STATE_OFFCHANNEL bit because it sees that the interface is
down.  Normally this doesn't matter because when the client STA
interface is brought back up, it will probably issue a scan.  But
in some cases (e.g., the user changes the interface type while it
is down), the SDATA_STATE_OFFCHANNEL bit will remain set.  This
prevents the interface queues from being started.  So we
cancel the scan before unsetting the SDATA_STATE_RUNNING bit.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/iface.c