aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-03-31 03:12:54 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-04-02 02:29:13 -0400
commit5d4f929e3d0c09838677a116ffd168d9d519ada7 (patch)
tree53c9caa380c065bc8862ddaa3de4227f2a2f8cc3 /drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
parent0d365ae5f2715a4a749e41ce5e75e34f03090db6 (diff)
iwlwifi: mvm: do string formatting in debug triggers
The current code has a lot of duplicates of printing into a buffer (while having to make sure it's NUL-filled and -terminated) and then passing that to the debug trigger collection. Since that's error-prone, instead make the debug trigger collection function take a format string and format arguments (with compiler validity checking) and handle the buffer internally. This makes one behavioural change -- instead of sending the whole buffer to userspace (clearing is needed to not leak stack data) it just passes the actual string (including NUL-terminator.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 09f0124db76e..8088c7137f7c 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -1412,7 +1412,7 @@ static void iwl_mvm_beacon_loss_iterator(void *_data, u8 *mac,
1412 1412
1413 if (rx_missed_bcon_since_rx >= stop_trig_missed_bcon_since_rx || 1413 if (rx_missed_bcon_since_rx >= stop_trig_missed_bcon_since_rx ||
1414 rx_missed_bcon >= stop_trig_missed_bcon) 1414 rx_missed_bcon >= stop_trig_missed_bcon)
1415 iwl_mvm_fw_dbg_collect_trig(mvm, trigger, NULL, 0); 1415 iwl_mvm_fw_dbg_collect_trig(mvm, trigger, NULL);
1416} 1416}
1417 1417
1418int iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm, 1418int iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm,