iwlwifi: do not force complete scan too early
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 13 Sep 2010 12:46:41 +0000 (14:46 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 14 Sep 2010 20:14:25 +0000 (16:14 -0400)
commite7e16b90b477a07d17af37dceb2e8af1ddbd9712
treec7f58d181d8a0a06718d2e28c9e88c4653204a24
parent6bd1758d978f917dc0804f44e3528ef1a80d9d43
iwlwifi: do not force complete scan too early

Currently we force scan complete at the end of iwl_scan_cancel_timeout
function. This cause race condition when we can get a new scan request
from mac80211 and complete it by iwl_bg_complete from older scan. Change
code to force scan complete only when really needed: device goes down,
interface is removed or scan timeout occurs.

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-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-scan.c
drivers/net/wireless/iwlwifi/iwl3945-base.c