Skip to content

Commit

Permalink
Merge tag 'iwlwifi-for-kalle-2015-01-15' of https://git.kernel.org/pu…
Browse files Browse the repository at this point in the history
…b/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.
  • Loading branch information
Kalle Valo committed Jan 19, 2015
2 parents 781f51d + 90ea15c commit 7b05520
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/wireless/iwlwifi/mvm/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 7b05520

Please sign in to comment.