Protect pktlog funcitonality under given mutex to avoid possible
race condition between pktlog_release/pktlog_open and pktlogmod_exit.
Also call pktlogmod_exit before calling wdi_event_detach to avoid
accessing freed memory in pktlog release.
Change-Id: I5ca4b304d0f4dc1af289daa167958d5b773d9a6e
CRs-Fixed: 2578623
The pktlog will fail with ROME module due to the change IDs:
I24776caa3b78ec38d94421f243ec72d81ee3102d
Ifb70ac0993f2402201f88758845f730cf677b1a0
Define new macro PKTLOG_LEGACY for HELIUM/ROME to avoid the ROME PKTLOG
failure.
Change-Id: Ibaa20b7af208a261e0fd8682de45ad8eb4a69212
CRs-Fixed: 2523511
The packet logs show in console logs which are redundant.
Change the log level from qdf_print to qdf_debug to avoid
excessive logging.
Change-Id: I2a43a0072bb7f940df007a590013e500ddda5e8a
CRs-Fixed: 2437278
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within utils replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: Iae6c2f2f0b3041a9397dd13092ea500a8b995fd2
CRs-Fixed: 2418251
1. Enable CE5 and allow it to service
pktlog messages from the firmware.
2. Register full pktlog callback handlers
for handling sw_events and full tx pktlog.
Change-Id: Ifb70ac0993f2402201f88758845f730cf677b1a0
CRs-Fixed: 2388906
Since WIN are not using this code at the moment, just remove
CONFIG_MCL directly.
Change-Id: Iff35f533f4f32a6d8b22aea5f890ec4d935fc88c
CRs-Fixed: 2388751
Use QDF spin_lock APIs so that we can make use the debug infra.
This will help to identify catch issue related to unbalanced lock
operations or unexpectedely long locks.
Change-Id: I318bcb90340d98813f19862fda14e6ada30bbed6
CRs-Fixed: 2349308
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg
Replace the scheduler_post_msg with scheduler_post_message
Change-Id: I166f4c943b9a21749c53ed19101b0ed0defd8491
CRs-Fixed: 2306013
Clean up spectral, tif and umac component prints by correcting trace
levels for regularly occurring prints and removing newlines from
converged print APIs since qdf_trace_msg appends them by default.
Change-Id: Ib10f1b1c54ecbcb9f4076be7c2c4708359d488e0
CRs-Fixed: 2243843
If user tries to enable pktlog multiple times, pktlog enable
fails as the pktlog is already enabled.
while returning failure, current pktlog state is not updated
to PKTLOG_OPR_NOT_IN_PROGRESS in pktlog_enable api.
Now if user tries to get pktlog using cat command driver
returns resource busy from pktlog_enable as the current
pktlog state is not set to PKTLOG_OPR_NOT_IN_PROGRESS.
To address this issue, set the current pktlog state to
PKTLOG_OPR_NOT_IN_PROGRESS in case of failure.
Change-Id: I08e67c13e7a781340a97ad4c37308f3e61972c99
CRs-Fixed: 2278363
If log state 1, 2, 0, 1 are set serially, log state 2 can't be set
successfully, while log state 1 is set to wdi twice, which results
in two same pointers in doubly linked list txrx_pdev->wdi_event_list
and causes dead loop.
Update pl_info->log_stat only when it is subscribed to wdi and sent
to firmware successfully.
Change-Id: I8d67b9f02a2fb2c958d2553a743cbabcedfb2f42
CRs-Fixed: 2250715
Currently data in "pl_tgt_hdr" is used directly from firmware without
any length check which may cause buffer over-read.
To address this issue add length check before accessing data offset
Change-Id: Ic2930fdf7168b79a8522be282b0e1cd19214742a
CRs-Fixed: 2191170
%p is considered a security hole. Fix an instance of such a hole
introduced recently.
Change-Id: Iaaa8d94de3077f987605058d417b472966ad9931
CRs-Fixed: 2180521
Restrict the pktlog buffer size to a minimum of 1MB and maximum
of 16MB using pktlogconf tool or through sysctl command.
Change-Id: I1c67ed724c512f57c5d6e555be14b0b0e23d203f
CRs-Fixed: 2133723
Add sanity check for pktlog messages, as we have seen a single case
of inconsisten nbuf. Assert if fails.
Change-Id: I6a076c4dfaa2ff8e1972dd795cadeca1302b2c0e
CRs-Fixed: 2131952
implicit conversion from enumeration type 'A_STATUS' to different enumeration type 'QDF_STATUS'
implicit conversion from enumeration type 'QDF_STATUS' to different enumeration type 'A_STATUS'
CRs-Fixed: 2063344
Change-Id: Id3613d0b7fca58c3d94c5af59838b0bff3ef26de
There can be a race condition if the pktlog_buf inside pktlog APIs,
is accessed simultanously from two threads.
To prevent this use mutex in the caller functions of pktlog APIs.
Change-Id: Iea6e3cd28a7a347c1753fe71d0646fb43ee184fa
CRs-Fixed: 2047150
There can be a race condition if two different threads use the
pkt log buffer at the same time. This issue can lead to Use-After-Free
of the packet log buffer.
To address this issue, protect the pktlog buffer access using spinlock.
Change-Id: I75d9375c9d85ac26dab1c06658d3f0fdbeb62935
CRs-Fixed: 2034486
Add infrastructure in pktlog utils to collect pktlogs as part
of bug report generation. As part of this when pktlog read command
is received on host:
1. disable pktlog,
2. read pktlog,
3. clear pktlog buffer,and
4. Retain pktlog initial state
Change-Id: I67e2231c2897007b58fa42a4f931b3c35ad1f418
CRs-Fixed: 2031287
Implement iwpriv pktlog command to clear pktlog buffer.
This command is effective only if pktlog disable is issued previously.
This command needs one argument.
Command to use this feature : iwpriv wlan0 pktlog 4
Change-Id: I431169a10828b6cfcd21c7d8065f325c5eb8cbba
CRs-Fixed: 2031212