OSDN Git Service

iwlwifi: allow rate-limited error messages
authorJohannes Berg <johannes.berg@intel.com>
Sun, 17 Oct 2021 13:26:03 +0000 (16:26 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 22 Oct 2021 07:49:03 +0000 (10:49 +0300)
commite5f1cc98cc1bd07bc6d4f75e34d89db06a2f8bdb
tree0ded6654201e6c415e5a6a8f0d66b5dc59017b0a
parent6b1259d1046ce068dc5448b65c26534fb22e37ac
iwlwifi: allow rate-limited error messages

Sometimes we might want to have an error message for something
related to TX/RX, but if that somehow happens frequently it'll
overwhelm the logs. Add IWL_ERR_LIMIT() to alleviate that by
rate-limiting those messages.

To do this, rework __iwl_err() a bit to have a mode argument
instead of passing yet another (bool) argument to it.

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.20211017162352.2cb1e6b75672.Iec5b1c1bcc6ebc87c586921a6c5c2a937f49e83c@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/dvm/agn.h
drivers/net/wireless/intel/iwlwifi/iwl-debug.c
drivers/net/wireless/intel/iwlwifi/iwl-debug.h