diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-04-25 10:58:25 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-06-23 00:13:01 +0300 |
commit | fa4de7f7c349d0fca751d1ad331c1fa8f528a47d (patch) | |
tree | 0431e081a784c179518b0c552359d33b67288512 /drivers/net/wireless/intel/iwlwifi/pcie/internal.h | |
parent | 3a6e168baa7097bcd747c1689cff509297c6d612 (diff) | |
download | linux-fa4de7f7c349d0fca751d1ad331c1fa8f528a47d.tar.xz |
iwlwifi: pcie: add fake RF-kill to debugfs
In order to debug "hardware" RF-kill flows, add a low-level hook to
allow changing the "hardware" RF-kill from debugfs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie/internal.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h index 4b7be7ba9780..17bd95614483 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h +++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h @@ -404,6 +404,7 @@ struct iwl_trans_pcie { int ict_index; bool use_ict; bool is_down; + bool debug_rfkill; struct isr_statistics isr_stats; spinlock_t irq_lock; @@ -675,6 +676,8 @@ static inline void iwl_enable_rfkill_int(struct iwl_trans *trans) } } +void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans); + static inline void iwl_wake_queue(struct iwl_trans *trans, struct iwl_txq *txq) { @@ -713,7 +716,12 @@ static inline u8 get_cmd_index(struct iwl_txq *q, u32 index) static inline bool iwl_is_rfkill_set(struct iwl_trans *trans) { - lockdep_assert_held(&IWL_TRANS_GET_PCIE_TRANS(trans)->mutex); + struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); + + lockdep_assert_held(&trans_pcie->mutex); + + if (trans_pcie->debug_rfkill) + return true; return !(iwl_read32(trans, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW); |