Skip to content

Commit 6f3afc6

Browse files
egrumbachjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: use the new command to clear the internal buffer
The firmware can allow to clear the internal debug buffer. This can be used to sanitize the data when requested to. Signed-off-by: Emmanuel Grumbach <[email protected]> Reviewed-by: Gregory Greenman <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20231219215605.99aed3efbacb.Ib5bda1d1ff4bae476667737d4081ad066d1d7e6b@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent ea5cca7 commit 6f3afc6

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

drivers/net/wireless/intel/iwlwifi/fw/api/debug.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ enum iwl_debug_cmds {
5959
* &struct iwl_dbg_dump_complete_cmd
6060
*/
6161
FW_DUMP_COMPLETE_CMD = 0xB,
62+
/**
63+
* @FW_CLEAR_BUFFER:
64+
* clears the firmware's internal buffer
65+
* no payload
66+
*/
67+
FW_CLEAR_BUFFER = 0xD,
6268
/**
6369
* @MFU_ASSERT_DUMP_NTF:
6470
* &struct iwl_mfu_assert_dump_notif

drivers/net/wireless/intel/iwlwifi/fw/dbg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3401,6 +3401,15 @@ void iwl_fw_dbg_clear_monitor_buf(struct iwl_fw_runtime *fwrt)
34013401
struct iwl_fw_dbg_params params = {0};
34023402

34033403
iwl_fw_dbg_stop_sync(fwrt);
3404+
3405+
if (fw_has_api(&fwrt->fw->ucode_capa,
3406+
IWL_UCODE_TLV_API_INT_DBG_BUF_CLEAR)) {
3407+
struct iwl_host_cmd hcmd = {
3408+
.id = WIDE_ID(DEBUG_GROUP, FW_CLEAR_BUFFER),
3409+
};
3410+
iwl_trans_send_cmd(fwrt->trans, &hcmd);
3411+
}
3412+
34043413
iwl_dbg_tlv_init_cfg(fwrt);
34053414
iwl_fw_dbg_stop_restart_recording(fwrt, &params, false);
34063415
}

drivers/net/wireless/intel/iwlwifi/fw/file.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_api_t;
245245
* SCAN_CONFIG_DB_CMD_API_S.
246246
* @IWL_UCODE_TLV_API_NO_HOST_DISABLE_TX: Firmware offloaded the station disable tx
247247
* logic.
248+
* @IWL_UCODE_TLV_API_INT_DBG_BUF_CLEAR: Firmware supports clearing the debug
249+
* internal buffer
248250
*
249251
* @NUM_IWL_UCODE_TLV_API: number of bits used
250252
*/
@@ -282,7 +284,9 @@ enum iwl_ucode_tlv_api {
282284
IWL_UCODE_TLV_API_ADWELL_HB_DEF_N_AP = (__force iwl_ucode_tlv_api_t)57,
283285
IWL_UCODE_TLV_API_SCAN_EXT_CHAN_VER = (__force iwl_ucode_tlv_api_t)58,
284286
IWL_UCODE_TLV_API_BAND_IN_RX_DATA = (__force iwl_ucode_tlv_api_t)59,
287+
/* API Set 2 */
285288
IWL_UCODE_TLV_API_NO_HOST_DISABLE_TX = (__force iwl_ucode_tlv_api_t)66,
289+
IWL_UCODE_TLV_API_INT_DBG_BUF_CLEAR = (__force iwl_ucode_tlv_api_t)67,
286290

287291
NUM_IWL_UCODE_TLV_API
288292
/*

0 commit comments

Comments
 (0)