summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/queue
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-12-04 18:49:44 +0300
committerLuca Coelho <luciano.coelho@intel.com>2021-12-07 21:06:51 +0300
commit4b992db6ebdaaee244a7931753f5b49d049a760a (patch)
tree6d5c1f874e2e8b507fb81d29f4faacb4c10addd2 /drivers/net/wireless/intel/iwlwifi/queue
parent953e66a7238b90ba1d0766ce3342bad799f83b52 (diff)
downloadlinux-4b992db6ebdaaee244a7931753f5b49d049a760a.tar.xz
iwlwifi: mvm: optionally suppress assert log
Normally, when we hit an assert, we print out all the assert data. However, in certain tests, when we trigger it from debugfs intentionally, that can be useless and confusing. Allow writing the string "nolog\n" to the fw_nmi and fw_restart files suppressing the assert dump as well as - in the case of fw_restart - the iwlwifi 0000:00:00.0: FW error in SYNC CMD REPLY_ERROR message. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20211204174546.75e29a2ab68d.Id3064feda2ce7a77c116c6d6e71ce5ff447c6e86@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/queue')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/queue/tx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/queue/tx.c b/drivers/net/wireless/intel/iwlwifi/queue/tx.c
index 0f3526b0c5b0..0730657d54bf 100644
--- a/drivers/net/wireless/intel/iwlwifi/queue/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/queue/tx.c
@@ -1753,8 +1753,11 @@ static int iwl_trans_txq_send_hcmd_sync(struct iwl_trans *trans,
}
if (test_bit(STATUS_FW_ERROR, &trans->status)) {
- IWL_ERR(trans, "FW error in SYNC CMD %s\n", cmd_str);
- dump_stack();
+ if (!test_and_clear_bit(STATUS_SUPPRESS_CMD_ERROR_ONCE,
+ &trans->status)) {
+ IWL_ERR(trans, "FW error in SYNC CMD %s\n", cmd_str);
+ dump_stack();
+ }
ret = -EIO;
goto cancel;
}