aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-03-28 04:34:02 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-04-23 17:19:31 -0400
commitd23f78e61f6b37159df6bfce7023500d731f61f3 (patch)
tree90c804e06178720d26db180479170c8da0648c7a /drivers/net
parent226c02ca7fd182b24599d205820e159b0e7bc405 (diff)
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: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index 589037d6e39..8e1cf97dfad 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -1438,12 +1438,22 @@ error:
1438 1438
1439static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans) 1439static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans)
1440{ 1440{
1441 bool hw_rfkill;
1442
1441 iwl_apm_stop(trans); 1443 iwl_apm_stop(trans);
1442 1444
1443 iwl_write32(trans, CSR_INT, 0xFFFFFFFF); 1445 iwl_write32(trans, CSR_INT, 0xFFFFFFFF);
1444 1446
1445 /* Even if we stop the HW, we still want the RF kill interrupt */ 1447 /* Even if we stop the HW, we still want the RF kill interrupt */
1446 iwl_enable_rfkill_int(trans); 1448 iwl_enable_rfkill_int(trans);
1449
1450 /*
1451 * Check again since the RF kill state may have changed while all the
1452 * interrupts were disabled, in this case we couldn't receive the
1453 * RF kill interrupt and update the state in the op_mode.
1454 */
1455 hw_rfkill = iwl_is_rfkill_set(trans);
1456 iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill);
1447} 1457}
1448 1458
1449static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn, 1459static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,