diff options
| author | Gregory Greenman <[email protected]> | 2023-09-13 11:56:41 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2023-09-13 14:11:40 +0000 |
| commit | fc2fe0a5e856efe58e86115b87c3efe348b8e9ea (patch) | |
| tree | 66c3958f97ecc0c28a29f0f7df2985c9ecbd68f0 /drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |
| parent | wifi: iwlwifi: remove dead-code (diff) | |
| download | kernel-fc2fe0a5e856efe58e86115b87c3efe348b8e9ea.tar.gz kernel-fc2fe0a5e856efe58e86115b87c3efe348b8e9ea.zip | |
wifi: iwlwifi: fw: disable firmware debug asserts
Disable firmware debug asserts, which are used for internal
firmware testing purposes only.
Signed-off-by: Gregory Greenman <[email protected]>
Link: https://lore.kernel.org/r/20230913145231.8feafd9b17be.Ia7bec82ac25897caab581692d67055aa1aca2ed2@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/dbg.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index 3ab6a68f1e9f..e236c1d95e8e 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -3228,3 +3228,28 @@ void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, #endif } IWL_EXPORT_SYMBOL(iwl_fw_dbg_stop_restart_recording); + +void iwl_fw_disable_dbg_asserts(struct iwl_fw_runtime *fwrt) +{ + struct iwl_fw_dbg_config_cmd cmd = { + .type = cpu_to_le32(DEBUG_TOKEN_CONFIG_TYPE), + .conf = cpu_to_le32(IWL_FW_DBG_CONFIG_TOKEN), + }; + struct iwl_host_cmd hcmd = { + .id = WIDE_ID(LONG_GROUP, LDBG_CONFIG_CMD), + .data[0] = &cmd, + .len[0] = sizeof(cmd), + }; + u32 preset = u32_get_bits(fwrt->trans->dbg.domains_bitmap, + GENMASK(31, IWL_FW_DBG_DOMAIN_POS + 1)); + + /* supported starting from 9000 devices */ + if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_9000) + return; + + if (fwrt->trans->dbg.yoyo_bin_loaded || (preset && preset != 1)) + return; + + iwl_trans_send_cmd(fwrt->trans, &hcmd); +} +IWL_EXPORT_SYMBOL(iwl_fw_disable_dbg_asserts); |
