Skip to content

Commit

Permalink
iwlwifi: pcie: clear RFKILL interrupt in AMPG
Browse files Browse the repository at this point in the history
If we forget to do so, we can't send HCMD to firmware while
the NIC is in RFKILL state.

Cc: stable@vger.kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Emmanuel Grumbach authored and Johannes Berg committed Jul 26, 2013
1 parent b6658ff commit a53ee0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-prph.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@

#define APMG_PCIDEV_STT_VAL_L1_ACT_DIS (0x00000800)

#define APMG_RTC_INT_STT_RFKILL (0x10000000)

/* Device system time */
#define DEVICE_SYSTEM_TIME_REG 0xA0206C

Expand Down
8 changes: 8 additions & 0 deletions drivers/net/wireless/iwlwifi/pcie/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,14 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id)

iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill);
if (hw_rfkill) {
/*
* Clear the interrupt in APMG if the NIC is going down.
* Note that when the NIC exits RFkill (else branch), we
* can't access prph and the NIC will be reset in
* start_hw anyway.
*/
iwl_write_prph(trans, APMG_RTC_INT_STT_REG,
APMG_RTC_INT_STT_RFKILL);
set_bit(STATUS_RFKILL, &trans_pcie->status);
if (test_and_clear_bit(STATUS_HCMD_ACTIVE,
&trans_pcie->status))
Expand Down

0 comments on commit a53ee0a

Please sign in to comment.