Commit d23f78e6 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy

iwlwifi: check RF kill register when interrupts have been disabled

Since the interrupts have been disabled, we may have missed an RF
kill interrupt. Check the register to be sure the op_mode is in
sync.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 226c02ca
...@@ -1438,12 +1438,22 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans) ...@@ -1438,12 +1438,22 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans) static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans)
{ {
bool hw_rfkill;
iwl_apm_stop(trans); iwl_apm_stop(trans);
iwl_write32(trans, CSR_INT, 0xFFFFFFFF); iwl_write32(trans, CSR_INT, 0xFFFFFFFF);
/* Even if we stop the HW, we still want the RF kill interrupt */ /* Even if we stop the HW, we still want the RF kill interrupt */
iwl_enable_rfkill_int(trans); iwl_enable_rfkill_int(trans);
/*
* Check again since the RF kill state may have changed while all the
* interrupts were disabled, in this case we couldn't receive the
* RF kill interrupt and update the state in the op_mode.
*/
hw_rfkill = iwl_is_rfkill_set(trans);
iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill);
} }
static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn, static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
......
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