Commit Graph

65 Commits

Author SHA1 Message Date
Nirav Shah
8f44a7e494 qcacmn: Add credit tracking for HL Data Path
Add credit tracking for HL Data Path in DPTRACE.

Change-Id: I6e2971209940c16a13a8ca7f1f0a3d7c1a26e305
CRs-Fixed: 2574057
2019-12-13 07:04:10 -08:00
Saket Jha
d8d9d99f94 Revert "qcacmn: Enable EAPOL/DHCP message tracing in Wifi driver"
This reverts commit I010c9295fd6ca42a950f84f0d7a19b00d8b0c0da due to
crash caused by excessive logging.

Change-Id: I38701eb5be9a25f38e4cb5738824b635a2b0442c
CRs-Fixed: 2535471
2019-10-03 12:34:48 -07:00
Karunakar Dasineni
af64fd1868 qcacmn: QDF wrapper to remove minidump entries
As part of minidump support, add QDF wrapper to remove
previously added entries.

Change-Id: Iae5ed874d6dbd2f6701f174b54d839fb0a13989c
2019-07-24 17:10:02 -07:00
Himanshu Batra
bcb10e6676 qcacmn: Add ascii dump support to qdf hex dump API
The existing hex dump API dumps hex data only.
Add API so that the ascii data can also be
dumped along with hex dump

Change-Id: Icbe74b26f47601a249e3d7ac701f2a19d70fb83b
CRs-Fixed: 2464738
2019-07-17 02:15:41 -07:00
Ashish Kumar Dhanotiya
709f9fb68f qcacmn: Update feature flag for qdf_trace macros
Currently qdf_print, qdf_alert, qdf_err, qdf_warn,
qdf_info, qdf_debug, qdf_nofl_print, qdf_nofl_alert,
qdf_nofl_err, qdf_nofl_warn, qdf_nofl_info, qdf_nofl_debug
macros are defined under CONFIG_MCL feature flag since
these trace prints are supposed to be used only for QDF
module with module ID as QDF_MODULE_ID_QDF, WIN is using
these definitions with module ID as QDF_MODULE_ID_ANY and
these are separated with feature flag CONFIG_MCL.
As a part of cleanup activity of CONFIG_MCL feature flag
move these WIN specific trace definitions under WIN
specific feature flag QDF_TRACE_PRINT_ENABLE.

Change-Id: I838f76f2e3f4c2dd28f0463fa6c9d981304b136e
CRs-Fixed: 2472021
2019-06-21 05:47:56 -07:00
Ashish Kumar Dhanotiya
f8ddbe1707 qcacmn: Remove unused QDF_DEFAULT_TRACE_LEVEL macro
QDF_DEFAULT_TRACE_LEVEL macro is not getting used in case of
MCL, as part of cleanup of CONFIG_MCL macro dependency,
move this macro definition to correct WIN specific
feature flag.

Change-Id: I75cbfd856308f0027ecb805a41c15966528f314e
CRs-Fixed: 2468286
2019-06-18 22:27:42 -07:00
Jeff Johnson
796998f706 qcacmn: Remove obsolete g_qdf_trace_info infrastructure
The original version of the QDF trace functionality, introduced in
Change-Id I1d0cdfd8730a5c021aaa50b7dc8549d491d760b3, included a log
filtering mechanism inherited from the MCC code.  This mechanism used
an internal table g_qdf_trace_info along with the following APIs which
were used to configure and query the table:
- qdf_trace_set_level
- qdf_trace_set_module_trace_level
- qdf_trace_set_value
- qdf_trace_get_level

Subsequently, as part of the MCC/WIN QDF convergence project,
Change-Id I871c09189202d021405777db732e8821e7aaca7c ("qcacmn: Update
QDF Debug Framework") updated the QDF trace functionality, and as a
result the usage of the g_qdf_trace_info table was replaced.

Since the legacy infrastructure is no longer used, remove it.

Change-Id: I1bb0c0e03c1d1e3227550477779d5db1549ff570
CRs-Fixed: 2461904
2019-05-31 21:56:14 -07:00
Karunakar Dasineni
23d22c6d8a qcacmn: Add minidump support in QDF
Add QDF wrappers for minidump logging, which logs
memory locations to be collected as part of minidump.

Change-Id: I2c6b648d3fbb3aed9aaf7eb4872df5befcae971f
CRs-Fixed: 2444081
2019-05-14 16:23:05 -07:00
Lin Bai
0577a01ab2 qcacmn: Fix compiler issue without CONFIG_DP_TRACE
Compiler threw error -
implicit declaration of function 'qdf_dp_trace_apply_tput_policy'
when CONFIG_DP_TRACE not enabled.

Change-Id: Ia4e6fdf129b7fdc31c901b6fa78ce2cb0935b369
CRs-Fixed: 2433430
2019-04-18 20:45:58 -07:00
Srinivas Girigowda
22953dc004 qcacmn: Enable EAPOL/DHCP message tracing in Wifi driver
Enable EAPOL/DHCP message tracing in Wifi driver.

Change-Id: I010c9295fd6ca42a950f84f0d7a19b00d8b0c0da
CRs-Fixed: 2421835
2019-03-26 17:16:45 -07:00
Jeff Johnson
5b92ee0716 qcacmn: Replace session_id with vdev_id in qdf_trace APIs
To align with the converged nomenclature replace the identifier
session_id with vdev_id in qdf_trace APIs.

Change-Id: Ic97a2df848e2b687edbd29c419193f4285125f81
CRs-Fixed: 2381424
2019-01-17 22:20:38 -08:00
Rakshith Suresh Patkar
e105ac141d qcacmn: Add support to dump last n dpt stat records
Add support to dump only last n dpt records of debug fs
dump_set_dpt_logs file.

Change-Id: Ic6418803d53cc2abbfc200f62df2a24c3bc55d54
CRs-Fixed: 2362523
2018-12-14 07:15:20 -08:00
Adil Saeed Musthafa
12205b544b qcacmn: Add timer to flush out log buffers periodically
Add timer to flush out log buffers periodically. Add command to set the
time period value.

Change-Id: I8e796a9bc7caac2661d00852420dd5fa66f5bca5
CRs-Fixed: 2296362
2018-09-21 20:50:55 -07:00
Ashish Kumar Dhanotiya
308f575884 qcacmn: Add wmi wrapper function for mtrace logging
For qdf_mtrace 15 bits are reserved for message id and currently
WMI message IDs are getting used as 32 bit IDs.

Write a wrapper function which accepts 32 bit message IDs and
converts this 32 bit message id to 15 bit by extracting
WMI_GRP_ID and WMI_MESSAGE_ID in that group. New 15 bit
message ID for qdf_mtrace will be constucted as 8 bits
(From LSB) specifies the WMI_GRP_ID and remaining 7 bits
specifies the actual WMI command. With this notation there
can be maximum 256 groups and each group can have max 128
commands which can be supported.

Change-Id: Ia5adfc079b63c2311bdc8ae4c73488d89afd462f
CRs-Fixed: 2298877
2018-09-09 09:36:44 -07:00
Ashish Kumar Dhanotiya
89921da033 qcacmn: Define qdf_mtrace api within TRACE_RECORD macro
Currently qdf_mtrace is defined outside TRACE_RECORD macro which
is using qdf_trace api and this is defined inside TRACE_RECORD
macro for MCL. since qdf_trace is having different definitions
for MCL and WIN as for MCL it is defined as a function and for
WIN it is defined as a MACRO.

To resolve this put qdf_mtrace inside TRACE_RECORD macro

Change-Id: I5de2cdff3942ca10b6d5d562f28d359f7f655ed4
CRs-Fixed: 2310167
2018-09-09 01:27:05 -07:00
Ashish Kumar Dhanotiya
27bcaf88dd qcacmn: Add qdf api support for mtrace logging
Currently mtrace messages are getting recorded in circular
queue but are not getting used for DIAG Infrastructure.
Add support to print the mtrace messages on DIAG infrastructure in
format such that there will be two 32 bit fields printed on the
logs. These two fields will be constructed as explained below:
1. First field will be constructed using below bit positions:
   a. Bit 0 – 14 ( 15 Bits Lsb ) will contain the messageIDs
   b. The bit 15-22 will represent the destination module,
      and the 23-30 will represent the source module which is
      initiating the message.
   c. Bit 31 will represent whether the message is from host
      or from FW. If bit is 0, it indicates the message is
      from host and if it is 1 it indicates the message is
      from FW.
2. Second field will be constructed using below bit positions:
   a. First 16 bits (From LSB )will be used for counter.
   b. Next 8 bits would be the vdev id.
   c. Remaining 8 bits are reserved for future use.

Here counter is static unsigned 16 bit value which will be
used to keep track of number of logs given to QXDM and out of
these logs how many logs have been missed.

Change-Id: I4cec762ef17222d6adda9fd3e283c101afb92955
CRs-Fixed: 2290898
2018-08-14 16:50:18 -07:00
Mohit Khanna
163c3170a1 qcacmn: fix dptrace for data packets
Enable tracing for TX/RX data packets
Donot print stats with 0 value

Change-Id: I4bab6537494c4ee0fe290e3778fb5662bf5abd66
CRs-Fixed: 2269193
2018-07-13 02:58:46 -07:00
Rachit Kankane
371fce287d qcacmn: Allocate MAC Trace buffer dynamically
Allocate memory for g_qdf_trace_tbl buffer dynamically.

Change-Id: I5e9ba0a33e220ead36e0775f00000346aae68373
CRs-Fixed: 2267922
2018-07-08 23:30:46 -07:00
Linux Build Service Account
cb090521de Merge "qcacmn: Allocate DP_TRACE buffer dynamically" 2018-07-03 05:33:24 -07:00
Manjunathappa Prakash
cf4286b730 qcacmn: DPtrace: Do not log to memory during high throughput
During high TPUT scenario logging of DPT trace is not useful,
require more MIPS. Disable datapacket DPtrace logging during
TPUT runs, but contiue to log special packets like ARP/DHCP/ICMP etc..

Change-Id: I70c9368de4cb2423901449b267452a34d652213d
CRs-Fixed: 2255756
2018-07-02 12:23:38 -07:00
Rachit Kankane
b3ba76975e qcacmn: Allocate DP_TRACE buffer dynamically
Allocate memory for g_qdf_dp_trace_tbl buffer dynamically.

Change-Id: Id5cc51776f4378ecc97d7d758d5e502055423fb2
CRs-Fixed: 2268793
2018-07-02 11:24:53 +05:30
Nirav Shah
79ec3e999b qcacmn: Add support to configure buffer size from kbuild
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.

Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
2018-06-15 21:31:16 -07:00
Mohit Khanna
4b3b7e7110 qcacmn: debug prints for monitor mode TLVs
Add prints to track:
* Incoming TLVs in the monitor mode status ring.
* HE, HE-MU and HE-MU-Other values being passed to the
  stack.

Change-Id: Ib23336353dc4a2253a62444b767d2a706ce372ea
CRs-Fixed: 2242514
2018-05-22 13:00:04 -07:00
Nirav Shah
9106902215 qcacmn: Featurize dp trace
Featurize dp trace to compile out cleanly.

Change-Id: If244fba87a50cde57ec55e54249b41dd30dcc92d
CRs-Fixed: 2227771
2018-05-22 09:34:12 -07:00
Jeff Johnson
1974e07df2 qcacmn: qdf: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Ia920daa3248677b9446f4203c7698cbc37648fbd
CRs-Fixed: 2230684
2018-05-18 02:17:38 -07:00
Wen Gong
a5dfb6d847 qcacmn: Add hdd memory dump feature flag
Add config flag to enable / disable hdd memory dump feature

CRs-Fixed: 2231694
Change-Id: I6b565bd7007223a51b67a2ea9fbafd6a737d22d9
2018-05-17 21:39:10 -07:00
Mohit Khanna
0425280d73 qcacmn: add DPTRACE Enhancements - Phase 2
Change data packets printing to one line
Add msdu-id to TX packets
Increase data packets size to include the complete IP packets
Indication/print when the throttling occurs

Change-Id: I07fc664ea08bc8746e31260599c5892701ae52e7
CRs-Fixed: 2157769
2018-05-01 21:37:34 -07:00
Rakshith Suresh Patkar
dcd073313e qcacmn: ADD APIs to set/dump dp trace buffer
Add APIs to dump dp trace buffer and set
proto bitmap, number of records and
verbosity of dp trace.

Change-Id: I23cda36515e1f3299d6c1c28dee2489a89bb15d9
CRs-Fixed: 2180984
2018-04-23 07:51:00 -07:00
Yun Park
c60a22b88d qcacmn: Fix use after free of SKB in DP trace path
qdf_dp_trace could access nbuf already freed after sending to CE ring.
Move trace log before sending skb and add error log when fail to send.

Change-Id: I8ce36b9d196b7d44e0e9f7dcfe05db404a77e32f
CRs-Fixed: 2090277
2018-04-18 21:02:21 -07:00
Manjunathappa Prakash
2c3dba28d9 qcacmn: Fix qdf_tso_seg_dbg_bug to use qdf_print format string
Fix build issue with extra compile flags [-Werror,-Wformat-security]

Change-Id: Ia2d516f3ff35d8d3b48a337b24d74ff8f3d83363
CRs-Fixed: 2174715
2018-04-18 19:49:55 -07:00
Orhan K AKYILDIZ
c6b4a7be50 qcacmn: Fix a race btw tx and tx-compl
While handling a multi-segment TSO packet, there is a race condition
where, if tx complete arrives fast enough, the un-sent TSO segments
may be lost forever and a previously sent segment would be attempted
to be sent over.

Fix the race condition. Dont use the entry after send to go to
next entry.

Change-Id: I023587a48bea6f3b58aac62e398cc15939bbb773
CRs-Fixed: 2174715
2018-04-14 07:37:57 -07:00
Rachit Kankane
9cc217ab6a qcacmn: Compile out MTRACE feature
Fix to disabled MTRACE feature

Change-Id: I3cc30b47a9ba9dc9f99bf1185f99f0ae621f5f31
CRs-Fixed: 2189886
2018-03-15 08:05:06 -07:00
Mohit Khanna
90d7ebd385 qcacmn: add periodic data traffic stats
Add support for periodic stats for data packets to be displayed in
wlan driver logs.

Change-Id: Ifb8fc5cabb8ecd31da83b5d307721c1d41a30f9d
CRs-Fixed: 2118581
2017-12-04 19:47:14 -08:00
Poddar, Siddarth
bf4231b6d8 qcacmn: Add support to log ICMPv6 packets in DP Trace
Add support to log ICMPv6 packets such as NS/NA, RS/RA and
ICMPv6 Req/Res in dp trace.

Change-Id: I11aab230b03254ea46c019cdb4488d1439a9504d
CRs-Fixed: 2075963
2017-10-03 16:02:25 -07:00
Mohit Khanna
7750a17a55 qcacmn: Dptrace enhancements
* Log EAPOL, ARP, DHCP, MGMT, ROAM Events, ICMP, Data packets,
  TX-Completions by default.
* Set default verbosity as low (existing is high)
* Throttle ICMP and Data packets if threshold exceeds.
* Enable live mode by default. Added ini entry to disable
  it and configure high throughput thresh - gDptraceConfig
* Log only SA and DA for proto packets (and not 32 bytes)
* Format prints to fit in 1 line.

CRs-Fixed: 2051134
Change-Id: I2f82c38f5fda73f440c4c4c760e633904705b5a2
2017-09-12 03:37:55 -07:00
Zhu Jianmin
af3420af93 qcacmn: Add icmp dptrace for latency issue debug
Ping latency is a key performance KPI for some customers,
need log in debug mode

Change-Id: I96eebf3f249668dd220aa1062fb339f940d36975
CRs-Fixed: 2039646
2017-06-22 04:38:28 -07:00
Nandha Kishore Easwaran
e43583f3c1 qcacmn: Dptrace changes to take per pdev stats
Initial changes for adding dp trace in common framework. Modified dp_trace
record sturcture to include pdev_id as a member to take per_pdev stats.
Dump command has been modified to dump stats per pdev.

Change-Id: I8aede0bd8ab6f381c7fa0542d077bdd8bf66b3d2
CRs-fixed: 2038944
2017-06-05 22:52:34 -07:00
Venkata Sharath Chandra Manchala
35503cce26 qcacmn: TSO fixes
1. Unmap tso common segment only after receiving
   completions for all the tso segments for a given
   skb.
2. Keep a track of num of free tso descriptors available
   in the pool of tso descriptors.

Change-Id: I01bdbb9e40b7259f77dbcfeec22c6d8cd0c0a6dd
CRs-Fixed: 2042950
2017-05-22 17:05:21 -07:00
Sathish Kumar
470c620cf9 qcacmn: Modify trace related APIs to support dynamic configuration in WIN
New iwpriv commands are implemented in WIN to support dynamic configuration
of verbose level for each of the module IDs.

Add following changes in trace module to support above requirement -

1. Make qdf_get_pidx and qdf_set_pidx common to WIN and MCL
2. Export g_qdf_category_name to be accessible in WIN driver
3. Add macros to derive upper and lower 16-bits from a 32-bit value
   combining module and trace level information used for dynamic trace
   level configuration per module
4. Address trace level NONE case during registration to set the correct
   mask

Change-Id: I97be5f26b0d611e96409837fb0c03d55ce5f6e07
CRs-Fixed: 2041247
2017-05-16 22:08:07 -07:00
Orhan K AKYILDIZ
c59be52d47 qcacmn: Add debug for TSO seg double-free
Add TSO segment debug code, in a featurized way, so that
when disabled, it will tolerate redundant returns to the internal
pool and when enabled, it will check sanity on free, and record a
history of last 16 actions on the segment in the object.

Goes with the corresponding cld3 component counterpart.

Change-Id: Ifee2ceae940043031e4861d0e4f5d19a51262229
CRs-Fixed: 2036665
2017-04-28 13:19:43 -07:00
Dustin Brown
e226cebdd2 qcacmn: Add Scheduler Watchdog Timer
In order to catch long running scheduler messages, start a watchdog
timer before processing each message, and stop the timer after each
message is processed. When the watchdog timer expires, immediately
crash the device in debug builds for easier debugging.

Change-Id: I4b43a9e12fc1f5b8a795fec790fe7548a100d9db
CRs-Fixed: 2037094
2017-04-26 17:01:52 -07:00
Dustin Brown
536064a37e qcacmn: Implement WMI/Credit History log print APIs
Create output agnostic log print APIs for WMI and Credit History to
enhance the debugging experience.

Change-Id: Ie89a9cb3b54c373ac2610d62003e940da17696d8
CRs-Fixed: 2028762
2017-04-11 11:04:24 -07:00
Adil Saeed Musthafa
3318807269 qcacmn: Add shared print_ctrl_obj for qdf_trace_msg
At this point lot of Win code already uses QDF_TRACE macro. It will be
difficult to translate QDF_TRACE to qdf_trace_msg unless all the modules
(already using QDF_TRACE) make changes to use the qdf_print_ctrl
framework. Until that happens, we can have a shared object temporarily
so that wlan_log_to_user and hence user space logging of messages can be
in place

Change-Id: Ia149b86de8c2c36ed1c8508570b31db25f6bc41e
CRs-Fixed: 2018767
2017-03-28 13:50:42 -07:00
Adil Saeed Musthafa
bcf62ed43e qcacmn: Initialize utils/logging module from QDF
When LOGGING_UTILS_SUPPORT is turned on, initialize utils/logging
module

Change-Id: I07421ab8979e6f58133ba7b386b9772707be5930
CRs-Fixed: 2010251
2017-02-23 20:15:24 -08:00
Himanshu Agarwal
f30a9e9314 qcacmn: Add support to dump few bytes of rx packet in DPTRACE
Propagation from qcacld-2.0 to qcacmn.

Add support to dump few bytes of rx packets in DPTRACE by adding
QDF_DP_TRACE_HDD_RX_PACKET_RECORD in DPTRACE enum.

Change-Id: I950108b9d1c9094ce3d285493ee36bda4f9d7e41
CRs-Fixed: 1074551
2017-02-03 23:37:16 -08:00
Houston Hoffman
94f80a1b70 qcacmn: make qdf_print useable without qdf_trace.h (2)
qdf_trace prototype needs to be defined as well.
note: i_qdf_trace.h is still needed for qdf_print
to be used, but we have removed dependencies of
i_qdf_trace.h on other include files (so this is fine).

Change-Id: I01052d00c1619e4847de702a687554badd47882f
CRs-Fixed: 1100505
2017-01-31 13:51:17 -08:00
Houston Hoffman
125692a240 qcacmn: make qdf_print useable without qdf_trace.h
Allow qdf to print messages without including qdf_trace headers.
qdf_trace.h contents are not available in several qdf headers because
qdf_trace.h includes those headers.  By moving the log level enum
to the types.h file, qdf_print will be universally available.

Change-Id: Ia8f53ed86bdd68b79341b4526a404e5d62c91170
CRs-Fixed: 1100505
2017-01-31 13:49:51 -08:00
Sathish Kumar
febd4b7b54 qcacmn: Update QDF Debug Framework
Update QDF debug framework with API to store and to get the print index.

As a part of QDF framework convergence, we need to update the QDF framework.

Add API to handle the print index in the converged QDF framework.

Change-Id: I871c09189202d021405777db732e8821e7aaca7c
CRs-Fixed: 1108907
2017-01-31 19:33:48 +05:30
Sathish Kumar
fc93b2d84d qcacmn: QDF Converged Debug Framework
QDF Debug Framework is implemented that will be used across
WIN and MCL to converge the debug methods used currently.

These changes have passed basic dev validation, carried out
by exercising each of the APIs.

Also, WIN validation is complete with these framework changes tested by
registering to the framework and adapting to the new converged trace API
qdf_trace_msg_cmn.

Change-Id: I4b87c910906cf0a49e91b1000f5218402cd45fe2
CRs-Fixed: 1102956
2017-01-23 04:32:15 -08:00
Sathish Kumar
59113a4840 qcacmn: Add generic logging API adhering to converged framework
As part of cleaning up direct printk calls in WIN driver, a new
generic wrapper API QDF_PRINT_INFO() is added that is based on
the converged QDF debug framework.

All printks in the WIN driver will be replaced by calls to QDF_PRINT_INFO()
which will in-turn compile converged QDF trace API. Generic shared print
control index and module ID are defined for this purpose.

Change-Id: I818fbce9e46526ccdb4824d988b76c43e43eb3a4
CRs-Fixed: 1106829
2017-01-09 02:00:03 -08:00