diff options
author | Arik Nemtsov <arik@wizery.com> | 2015-09-30 04:19:55 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2015-10-05 07:02:07 -0400 |
commit | 1a3fe0b2b6778b7866e2b3f5c9a299d5e9bbd89c (patch) | |
tree | 77074d2910ff83fdaee5bb299d147e350d28c924 | |
parent | f08f625876476b6c4a87834dc86e3b927f4697d2 (diff) |
iwlwifi: mvm: init card correctly on ctkill exit check
During the CT-kill exit flow, the card is powered up and partially
initialized to check if the temperature is already low enough.
Unfortunately the init bails early because the CT-kill flag is set.
Make the code bail early only for HW RF-kill, as was intended by the
author. CT-kill is self-imposed and is not really RF-kill.
Fixes: 31b8b343e019 ("iwlwifi: fix RFkill while calibrating")
Cc: <stable@vger.kernel.org> [3.18+]
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c index 4a0ce83315bd..5c7f7cc9ffcc 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/iwlwifi/mvm/fw.c | |||
@@ -703,7 +703,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) | |||
703 | * abort after reading the nvm in case RF Kill is on, we will complete | 703 | * abort after reading the nvm in case RF Kill is on, we will complete |
704 | * the init seq later when RF kill will switch to off | 704 | * the init seq later when RF kill will switch to off |
705 | */ | 705 | */ |
706 | if (iwl_mvm_is_radio_killed(mvm)) { | 706 | if (iwl_mvm_is_radio_hw_killed(mvm)) { |
707 | IWL_DEBUG_RF_KILL(mvm, | 707 | IWL_DEBUG_RF_KILL(mvm, |
708 | "jump over all phy activities due to RF kill\n"); | 708 | "jump over all phy activities due to RF kill\n"); |
709 | iwl_remove_notification(&mvm->notif_wait, &calib_wait); | 709 | iwl_remove_notification(&mvm->notif_wait, &calib_wait); |
@@ -736,7 +736,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) | |||
736 | ret = iwl_wait_notification(&mvm->notif_wait, &calib_wait, | 736 | ret = iwl_wait_notification(&mvm->notif_wait, &calib_wait, |
737 | MVM_UCODE_CALIB_TIMEOUT); | 737 | MVM_UCODE_CALIB_TIMEOUT); |
738 | 738 | ||
739 | if (ret && iwl_mvm_is_radio_killed(mvm)) { | 739 | if (ret && iwl_mvm_is_radio_hw_killed(mvm)) { |
740 | IWL_DEBUG_RF_KILL(mvm, "RFKILL while calibrating.\n"); | 740 | IWL_DEBUG_RF_KILL(mvm, "RFKILL while calibrating.\n"); |
741 | ret = 1; | 741 | ret = 1; |
742 | } | 742 | } |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index b95a07ec9e36..c754051a4cea 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -860,6 +860,11 @@ static inline bool iwl_mvm_is_radio_killed(struct iwl_mvm *mvm) | |||
860 | test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status); | 860 | test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status); |
861 | } | 861 | } |
862 | 862 | ||
863 | static inline bool iwl_mvm_is_radio_hw_killed(struct iwl_mvm *mvm) | ||
864 | { | ||
865 | return test_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); | ||
866 | } | ||
867 | |||
863 | /* Must be called with rcu_read_lock() held and it can only be | 868 | /* Must be called with rcu_read_lock() held and it can only be |
864 | * released when mvmsta is not needed anymore. | 869 | * released when mvmsta is not needed anymore. |
865 | */ | 870 | */ |