summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-03-31 09:12:54 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-04-02 09:29:13 +0300
commit5d4f929e3d0c09838677a116ffd168d9d519ada7 (patch)
tree53c9caa380c065bc8862ddaa3de4227f2a2f8cc3 /drivers/net/wireless/iwlwifi/mvm/rx.c
parent0d365ae5f2715a4a749e41ce5e75e34f03090db6 (diff)
downloadop-kernel-dev-5d4f929e3d0c09838677a116ffd168d9d519ada7.zip
op-kernel-dev-5d4f929e3d0c09838677a116ffd168d9d519ada7.tar.gz
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/rx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/rx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c
index 6177e24..78ec7db 100644
--- a/drivers/net/wireless/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/rx.c
@@ -362,7 +362,7 @@ int iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
iwl_fw_dbg_trigger_check_stop(mvm, mvmsta->vif,
trig);
if (trig_check && rx_status->signal < rssi)
- iwl_mvm_fw_dbg_collect_trig(mvm, trig, NULL, 0);
+ iwl_mvm_fw_dbg_collect_trig(mvm, trig, NULL);
}
}
@@ -552,7 +552,7 @@ iwl_mvm_rx_stats_check_trigger(struct iwl_mvm *mvm, struct iwl_rx_packet *pkt)
if (le32_to_cpup((__le32 *) (pkt->data + trig_offset)) < trig_thold)
return;
- iwl_mvm_fw_dbg_collect_trig(mvm, trig, NULL, 0);
+ iwl_mvm_fw_dbg_collect_trig(mvm, trig, NULL);
}
void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,
OpenPOWER on IntegriCloud