]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iwlwifi: fix scan abort
authorStanislaw Gruszka <sgruszka@redhat.com>
Thu, 29 Jul 2010 09:37:41 +0000 (11:37 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 17:54:12 +0000 (10:54 -0700)
commit9c9dc3c4df0c3cd899f2871dc4f5cea0b386f5fe
tree3d09337c2ee0dda9fbd19163c720bb134f0fd95c
parent2fb49ae6528c294776d8b6a90401c9567d5a670a
iwlwifi: fix scan abort

commit d28232b461b8d54b09e59325dbac8b0913ce2049 upstream.

Fix possible double priv->mutex lock introduced by commit
a69b03e941abae00380fc6bc1877fb797a1b31e6
"iwlwifi: cancel scan watchdog in iwl_bg_abort_scan" .
We can not call cancel_delayed_work_sync(&priv->scan_check) with
priv->mutex locked because workqueue function iwl_bg_scan_check()
take that lock internally.

We do not need to synchronize when canceling priv->scan_check work.
We can avoid races (sending double abort command or send no
command at all) using STATUS_SCAN_ABORT bit. Moreover
current iwl_bg_scan_check() code seems to be broken, as
we should not send abort commands when currently aborting.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-scan.c