iwlwifi: rework iwl_scan_cancel_timeout
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 13 Sep 2010 12:46:37 +0000 (14:46 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 14 Sep 2010 20:08:04 +0000 (16:08 -0400)
commite693a802f06f538b711333a32a83e2732dc4773d
tree631e79a96476e98c67b7006a160f991fb3a9bc70
parentcd44600fdd89832c0bc898189270a81be0db01cd
iwlwifi: rework iwl_scan_cancel_timeout

Since on timeout version of iwl_scan_cancel procedure we can sleep,
do not have to schedule abort_scan work to begin and perform scanning,
can do this directly. Also now, as we do not queue abort_scan from
restart work anymore, we can queue abort_scan to priv->workqueue.

Don't drop mutex when waiting for scan complete. Use STATUS_HW_SCAN bit
to check if scanning is currently pending, because STATUS_SCANNING will
be cleared only with priv->mutex taken.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-scan.c