diff options
author | Lior Cohen <lior2.cohen@intel.com> | 2018-05-03 10:17:05 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-11-23 13:01:07 +0200 |
commit | f7805b33f9b13a87b1fcf9dfbc3dcbce281a1436 (patch) | |
tree | af33846bb5bad8b31cf5a4016f73cff40a043626 /drivers/net/wireless/intel/iwlwifi/fw/dbg.h | |
parent | d47902f9f71d7679b9a2a9d14aa7d4b98d95430b (diff) | |
download | kernel_replicant_linux-f7805b33f9b13a87b1fcf9dfbc3dcbce281a1436.tar.gz kernel_replicant_linux-f7805b33f9b13a87b1fcf9dfbc3dcbce281a1436.tar.bz2 kernel_replicant_linux-f7805b33f9b13a87b1fcf9dfbc3dcbce281a1436.zip |
iwlwifi: add debugfs file to read fw debug data recording
FW debug data will oneshot read all data available in DRAM
and fill the supplied user buffer. In case the read request
is greater than the new data in DRAM, the driver will write
all data it has and return the buffer immediately.
Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Lior Cohen <lior2.cohen@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/dbg.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h index 6b3c5677c53a..ab81ea8b636f 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h @@ -266,6 +266,9 @@ _iwl_fw_dbg_stop_recording(struct iwl_trans *trans, iwl_write_prph(trans, DBGC_IN_SAMPLE, 0); udelay(100); iwl_write_prph(trans, DBGC_OUT_CTRL, 0); +#ifdef CONFIG_IWLWIFI_DEBUGFS + trans->dbg_rec_on = false; +#endif } static inline void @@ -296,6 +299,14 @@ _iwl_fw_dbg_restart_recording(struct iwl_trans *trans, } } +#ifdef CONFIG_IWLWIFI_DEBUGFS +static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt) +{ + if (fwrt->fw->dbg.dest_tlv && fwrt->cur_fw_img == IWL_UCODE_REGULAR) + fwrt->trans->dbg_rec_on = true; +} +#endif + static inline void iwl_fw_dbg_restart_recording(struct iwl_fw_runtime *fwrt, struct iwl_fw_dbg_params *params) @@ -304,6 +315,9 @@ iwl_fw_dbg_restart_recording(struct iwl_fw_runtime *fwrt, _iwl_fw_dbg_restart_recording(fwrt->trans, params); else iwl_fw_dbg_start_stop_hcmd(fwrt, true); +#ifdef CONFIG_IWLWIFI_DEBUGFS + iwl_fw_set_dbg_rec_on(fwrt); +#endif } static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) |