Skip to content

Commit d73d2c6

Browse files
egrumbachjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: don't try to talk to a dead firmware
This fixes: bad state = 0 WARNING: CPU: 10 PID: 702 at drivers/net/wireless/inel/iwlwifi/iwl-trans.c:178 iwl_trans_send_cmd+0xba/0xe0 [iwlwifi] Call Trace: <TASK> ? __warn+0xca/0x1c0 ? iwl_trans_send_cmd+0xba/0xe0 [iwlwifi 64fa9ad799a0e0d2ba53d4af93a53ad9a531f8d4] iwl_fw_dbg_clear_monitor_buf+0xd7/0x110 [iwlwifi 64fa9ad799a0e0d2ba53d4af93a53ad9a531f8d4] _iwl_dbgfs_fw_dbg_clear_write+0xe2/0x120 [iwlmvm 0e8adb18cea92d2c341766bcc10b18699290068a] Ask whether the firmware is alive before sending a command. Fixes: 268712d ("wifi: iwlwifi: mvm: add a debugfs hook to clear the monitor data") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250209143303.8e1597b62c70.I12ea71dd9b805b095c9fc12a10c9f34a4e801b61@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent d48ff3c commit d73d2c6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • drivers/net/wireless/intel/iwlwifi/mvm

drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,13 @@ static ssize_t iwl_dbgfs_fw_dbg_clear_write(struct iwl_mvm *mvm,
14791479
if (mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_9000)
14801480
return -EOPNOTSUPP;
14811481

1482+
/*
1483+
* If the firmware is not running, silently succeed since there is
1484+
* no data to clear.
1485+
*/
1486+
if (!iwl_mvm_firmware_running(mvm))
1487+
return count;
1488+
14821489
mutex_lock(&mvm->mutex);
14831490
iwl_fw_dbg_clear_monitor_buf(&mvm->fwrt);
14841491
mutex_unlock(&mvm->mutex);

0 commit comments

Comments
 (0)