aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/trace.h
AgeCommit message (Collapse)Author
2018-03-26ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowaitCarl Huang
The skb may be freed in tx completion context before trace_ath10k_wmi_cmd is called. This can be easily captured when KASAN(Kernel Address Sanitizer) is enabled. The fix is to move trace_ath10k_wmi_cmd before the send operation. As the ret has no meaning in trace_ath10k_wmi_cmd then, so remove this parameter too. Signed-off-by: Carl Huang <cjhuang@codeaurora.org> Tested-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-27ath10k: update copyright yearKalle Valo
Update year for Qualcomm Atheros, Inc. copyrights. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-03-03ath10k: add hw_rev to trace events to support pktlogAshok Raj Nagarajan
pktlog data is different between firmware variants (eg. 10.2 vs 10.4). To have a unified user space script to decode pktlog trace events generated, it is desirable to know which firmware variant has provided the events and thereby decode the pktlogs appropriately. Hardware revision (hw_rev) helps to determine the firmware variant sending these trace events. So add hw_rev to trace events. Signed-off-by: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-17ath10k: add extra check for frame tracingMichal Kazior
Frames are logged via tracing in two slices: header and payload, separately. This is done for performance reasons when one wants to, e.g. analyse metadata only of frames only. If for some reason device delivered a frame buffer which was sized below what 802.11 header implied tracing logic would blow doing an invalid memory accesses. I've hit this problem when running IBSS on QCA988X with 999.999.0.636 and tracing at the same time. Fixes: 5ce8e7fdcc7a ("ath10k: handle ieee80211 header and payload tracing separately") Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09ath10k: fix insufficient tracing buffer sizeMichal Kazior
Some trace messages were truncated and a kernel splat could be seen in the log: WARNING: CPU: 3 PID: 0 at /devel/src/linux/drivers/net/wireless/ath/ath10k/./trace.h:114 ftrace_raw_event_ath10k_log_dbg+0x20e/0x220 [ath10k_core]() Modules linked in: ath10k_pci(O) ath10k_core(O) ath iwldvm iwlwifi [last unloaded: iwlwifi] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G W O 4.0.0-rc3-wl-ath+ #703 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 ffffffffa01d4cb0 ffff88001fd83998 ffffffff8191b86c ffffffff81e3b718 0000000000000000 ffff88001fd839d8 ffffffff8105573a ffff88001c0a5528 ffff88001bea9ae0 ffff88001c3dd940 00000000000d0018 ffff88001fd83a80 Call Trace: <IRQ> [<ffffffff8191b86c>] dump_stack+0x45/0x57 [<ffffffff8105573a>] warn_slowpath_common+0x8a/0xc0 [<ffffffff8105582a>] warn_slowpath_null+0x1a/0x20 [<ffffffffa01c61fe>] ftrace_raw_event_ath10k_log_dbg+0x20e/0x220 [ath10k_core] [<ffffffffa01aaa6b>] ath10k_dbg+0xbb/0xd0 [ath10k_core] [<ffffffff810eed89>] ? trace_clock_local+0x9/0x10 [<ffffffffa01bd069>] ath10k_wmi_event_service_ready+0x479/0x520 [ath10k_core] [<ffffffff810fdf90>] ? trace_buffer_unlock_commit+0x50/0x60 [<ffffffffa01c2113>] ath10k_wmi_tlv_op_rx+0x6b3/0x8b0 [ath10k_core] This could be reproduced with: trace-cmd record -e ath10k ifconfig wlan0 down ifconfig wlan0 up Fixes: 5c01aa3de918 ("ath10k: deduplicate wmi service ready logic") Fixes: ca996ec56608 ("ath10k: implement wmi-tlv backend") Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-01-27ath10k: implement diag eventMichal Kazior
Some firmware revisions may report this event as part of their diagnostics. This avoids `unknown event` warnings and adds tracing for the event. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-01-27ath10k: implement diag data container eventMichal Kazior
Some firmware revisions may report this event as part of their diagnostics. This avoids `unknown event` warnings and adds tracing for the event. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: add pointer constness to tracesMichal Kazior
Traces shouldn't modified passed data. This will make it possible to pass const arguments to traces. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-17ath10k: handle ieee80211 header and payload tracing separatelyRajkumar Manoharan
For packet log, the transmitted frame 802.11 header alone is sufficient. Recording entire packet is also consuming lot of disk space. To optimize this, tx and rx data tracepoints are splitted into header and payload tracepoints. To record tx ieee80211 headers trace-cmd record -e ath10k_tx_hdr To record complete packets trace-cmd record -e ath10k_tx_hdr -e ath10k_tx_payload Cc: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-10-24ath10k: re-use trace classMichal Kazior
Instead of defining a completely new tracepoint use an existing tracepoint class. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-10-24ath10k: remove tsf argument from rx_desc tracingMichal Kazior
Fundamentally this was wrong. Tsf is only valid in last MPDU of a PPDU. This means tsf value was wrong most of the time during heavy traffic. Also I don't see much point in exposing a redundant (and broken) tsf value. Userspace can already read it from the dumped rx descriptor buffer. Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-10-08ath10k: add tracing for frame transmissionRajkumar Manoharan
Add tracing support to forward management and data frames to user space for packet inspection. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-10-07ath10k: add tracing for tx infoRajkumar Manoharan
The tx info such as msdu_id, frame len, vdev id and tid are reported to user space by tracepoint. This is useful for collecting tx statistics. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-10-07ath10k: add tracing for rx descriptorRajkumar Manoharan
Upon the reception of frame, the descriptor status are reported to user space by tracepoint. This is useful for collecting rx statistics. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-10-07ath10k: add tracing for ath10k_htt_pktlogRajkumar Manoharan
This is useful for collecting pktlog statistics of tx, rx and rate information, so add tracing for the API call. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-09-02ath10k: add device/driver strings to tracepointsMichal Kazior
This makes it easier to log and debug via tracing with more than 1 ath10k device on a system. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-01-10ath10k: add trace event for WMI_DEBUG_MESG_EVENTIDKalle Valo
Send firmware WMI debug logs to user space for further processing. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: fix tracing build for ath10k_wmi_cmdMichal Kazior
Commit be8b394390 ("ath10k: make WMI commands block by design") broke the build if CONFIG_ATH10K_TRACING was enabled. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-16ath10k: make WMI commands block by designMichal Kazior
This will be necessary for further changes in command submission scheme. Once HTC is cleaned up WMI commands will finally block. This requires for SWBA to be processed in a non-atomic context for now. Once other necessary changes are in this will be reverted. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-06ath10k: add trace event ath10k_htt_statsKalle Valo
For analysing various data path statistics in user space. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-06-12ath10k: mac80211 driver for Qualcomm Atheros 802.11ac CQA98xx devicesKalle Valo
Here's a new mac80211 driver for Qualcomm Atheros 802.11ac QCA98xx devices. A major difference from ath9k is that there's now a firmware and that's why we had to implement a new driver. The wiki page for the driver is: http://wireless.kernel.org/en/users/Drivers/ath10k The driver has had many authors, they are listed here alphabetically: Bartosz Markowski <bartosz.markowski@tieto.com> Janusz Dziedzic <janusz.dziedzic@tieto.com> Kalle Valo <kvalo@qca.qualcomm.com> Marek Kwaczynski <marek.kwaczynski@tieto.com> Marek Puzyniak <marek.puzyniak@tieto.com> Michal Kazior <michal.kazior@tieto.com> Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>