summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2015-01-19 09:47:28 +0200
committerKalle Valo <kvalo@codeaurora.org>2015-01-19 09:47:28 +0200
commit7b05520160a3252577f9a258609499b73f3bdef1 (patch)
tree38cee463c0b20bcc9dc6580b4db1707d908e7c6f /drivers
parent781f51d4c2038b694a774b070dcd93ea22d10655 (diff)
parent90ea15c1148bb1517e400ed14bb875e330aead2e (diff)
downloadlinux-7b05520160a3252577f9a258609499b73f3bdef1.tar.gz
linux-7b05520160a3252577f9a258609499b73f3bdef1.tar.bz2
linux-7b05520160a3252577f9a258609499b73f3bdef1.zip
Merge tag 'iwlwifi-for-kalle-2015-01-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
* one fix for rfkill while scheduled scan is running. Linus's system hit this issue. WiFi would be unavailable after this has happpened because of bad state in cfg80211.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 3fbba4b05bf4..844bf7c4c8de 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -1107,6 +1107,12 @@ int iwl_mvm_scan_offload_stop(struct iwl_mvm *mvm, bool notify)
return iwl_umac_scan_stop(mvm, IWL_UMAC_SCAN_UID_SCHED_SCAN,
notify);
+ if (mvm->scan_status == IWL_MVM_SCAN_NONE)
+ return 0;
+
+ if (iwl_mvm_is_radio_killed(mvm))
+ goto out;
+
if (mvm->scan_status != IWL_MVM_SCAN_SCHED &&
(!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_LMAC_SCAN) ||
mvm->scan_status != IWL_MVM_SCAN_OS)) {
@@ -1143,6 +1149,7 @@ int iwl_mvm_scan_offload_stop(struct iwl_mvm *mvm, bool notify)
if (mvm->scan_status == IWL_MVM_SCAN_OS)
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
+out:
mvm->scan_status = IWL_MVM_SCAN_NONE;
if (notify) {