Commit dd1d467d authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luis Henriques

iwlwifi: mvm: init card correctly on ctkill exit check

commit 1a3fe0b2 upstream.

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: 31b8b343 ("iwlwifi: fix RFkill while calibrating")
Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent d6317d4d
...@@ -324,7 +324,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) ...@@ -324,7 +324,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm)
* abort after reading the nvm in case RF Kill is on, we will complete * abort after reading the nvm in case RF Kill is on, we will complete
* the init seq later when RF kill will switch to off * the init seq later when RF kill will switch to off
*/ */
if (iwl_mvm_is_radio_killed(mvm)) { if (iwl_mvm_is_radio_hw_killed(mvm)) {
IWL_DEBUG_RF_KILL(mvm, IWL_DEBUG_RF_KILL(mvm,
"jump over all phy activities due to RF kill\n"); "jump over all phy activities due to RF kill\n");
iwl_remove_notification(&mvm->notif_wait, &calib_wait); iwl_remove_notification(&mvm->notif_wait, &calib_wait);
...@@ -359,7 +359,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) ...@@ -359,7 +359,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm)
if (!ret) if (!ret)
mvm->init_ucode_complete = true; mvm->init_ucode_complete = true;
if (ret && iwl_mvm_is_radio_killed(mvm)) { if (ret && iwl_mvm_is_radio_hw_killed(mvm)) {
IWL_DEBUG_RF_KILL(mvm, "RFKILL while calibrating.\n"); IWL_DEBUG_RF_KILL(mvm, "RFKILL while calibrating.\n");
ret = 1; ret = 1;
} }
......
...@@ -672,6 +672,11 @@ static inline bool iwl_mvm_is_radio_killed(struct iwl_mvm *mvm) ...@@ -672,6 +672,11 @@ static inline bool iwl_mvm_is_radio_killed(struct iwl_mvm *mvm)
test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status); test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status);
} }
static inline bool iwl_mvm_is_radio_hw_killed(struct iwl_mvm *mvm)
{
return test_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status);
}
static inline struct iwl_mvm_sta * static inline struct iwl_mvm_sta *
iwl_mvm_sta_from_staid_protected(struct iwl_mvm *mvm, u8 sta_id) iwl_mvm_sta_from_staid_protected(struct iwl_mvm *mvm, u8 sta_id)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment