Преглед изворни кода

iwlwifi: pcie: clean RFKILL interrupt in AMPG

Newer firmware don't clean the RFKILL interrupt in APMG, do
it in driver instead.
If we forget to do so, we can't send HCMD to firmware while
the NIC is in RFKILL state.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach пре 12 година
родитељ
комит
889b169650
2 измењених фајлова са 5 додато и 0 уклоњено
  1. 2 0
      drivers/net/wireless/iwlwifi/iwl-prph.h
  2. 3 0
      drivers/net/wireless/iwlwifi/pcie/trans.c

+ 2 - 0
drivers/net/wireless/iwlwifi/iwl-prph.h

@@ -97,6 +97,8 @@
 
 
 #define APMG_PCIDEV_STT_VAL_L1_ACT_DIS		(0x00000800)
 #define APMG_PCIDEV_STT_VAL_L1_ACT_DIS		(0x00000800)
 
 
+#define APMG_RTC_INT_STT_RFKILL		(0x10000000)
+
 /* Device system time */
 /* Device system time */
 #define DEVICE_SYSTEM_TIME_REG 0xA0206C
 #define DEVICE_SYSTEM_TIME_REG 0xA0206C
 
 

+ 3 - 0
drivers/net/wireless/iwlwifi/pcie/trans.c

@@ -220,6 +220,9 @@ static int iwl_pcie_apm_init(struct iwl_trans *trans)
 	iwl_set_bits_prph(trans, APMG_PCIDEV_STT_REG,
 	iwl_set_bits_prph(trans, APMG_PCIDEV_STT_REG,
 			  APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
 			  APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
 
 
+	/* Clear the interrupt in APMG if the NIC is in RFKILL */
+	iwl_write_prph(trans, APMG_RTC_INT_STT_REG, APMG_RTC_INT_STT_RFKILL);
+
 	set_bit(STATUS_DEVICE_ENABLED, &trans_pcie->status);
 	set_bit(STATUS_DEVICE_ENABLED, &trans_pcie->status);
 
 
 out:
 out: