Commit-Graf

34 Incheckningar

Upphovsman SHA1 Meddelande Datum
Srinivas Girigowda
51ba6fe67c qcacmn: utils: Remove redundant __func__ from the logs
1. The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

2. Instead of adding __func__ to the qdf_nofl_* macros, its better to use
   qdf_* which already takes care of adding __func__.

Change-Id: If5717c811016845b5cffcf3fdc97805f3a1b731b
CRs-Fixed: 2774457
2020-09-15 02:45:54 -07:00
Alok Kumar
0265d7917a qcacmn: Add INI support for packet log buffer size
Add INI parameter "PacketLogBufSize" to populate
packet log buffer size.

Change-Id: Ic9b963a88a6f6d884d5fa3a63b4fed6768ba2fc4
CRs-Fixed: 2611409
2020-01-30 23:23:53 -08:00
Vevek Venkatesan
4a07e3949d qcacmn: cdp: Converge cdp_ctrl_ops
Currently cdp ops are given pdev/vdev handle
as its arguments, which is directly accessed
in those APIs. This can cause a race-condition
in access of the respective handles if it has
been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id/vdev_id which will be used to get the
respective handles, and hence avoiding unwanted
access of the handles if it has been deleted.
Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.

- txrx_get_psoc_param
- wdi_event_sub
- wdi_event_unsub

Change-Id: Id089d9b6b4737d700d2436e2081291a3741affb5
CRs-Fixed: 2541658
2020-01-20 17:52:48 -08:00
Venkata Sharath Chandra Manchala
1affbbad46 qcacmn: Move pktlog API to platform specific file
Move process_sw_event API to pktlog_wifi2.c file as
it is only applicable to legacy product line.

Change-Id: I8eee102ea2eb70c0ffcec4ac20dfdf6ef48bca5b
CRs-Fixed: 2585613
2020-01-17 13:42:45 -08:00
Venkata Sharath Chandra Manchala
1140065e4c qcacmn: Move pktlog API's to specific files
Move pktlog hardware dependent API's from pktlog_internal.c
to pktlog_wifi3.c as they are hardware dependent.

Change-Id: I421b3116a35e735a51c82839005bbc2d4cb138d7
CRs-Fixed: 2585613
2020-01-17 13:41:54 -08:00
Alok Kumar
a316b315d8 qcacmn: Protect pktlog under mutex to avoid possible race conditions
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
2019-12-09 23:04:45 -08:00
Tiger Yu
720673fd7a qcacmn: Fix the regression issue for pktlog failure with ROME module
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
2019-09-15 22:48:36 -07:00
Vulupala Shashank Reddy
3027c86227 qcacmn: Remove excessive logging in console for packet logs
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
2019-04-29 04:17:46 -07:00
Jeff Johnson
4c5ac90746 qcacmn: utils: Replace explicit comparison to NULL
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
2019-03-26 10:30:31 -07:00
Venkata Sharath Chandra Manchala
cad74add80 qcacmn: Add support for full pktlog
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
2019-02-21 23:25:30 -08:00
hangtian
b75e3446b7 qcacmn: Use qdf_mem_zero for zero initialization, utils part
Use qdf_mem_zero for zero initialization, utils part.

Change-Id: I88ba8a279c31fe779ca1bf563cd8882fe644c2c0
CRs-Fixed: 2378005
2019-02-21 01:47:09 -08:00
Jianmin Zhu
860380d062 qcacmn: Remove CONFIG_MCL in pktlog
Since WIN are not using this code at the moment, just remove
CONFIG_MCL directly.

Change-Id: Iff35f533f4f32a6d8b22aea5f890ec4d935fc88c
CRs-Fixed: 2388751
2019-02-06 14:39:22 -08:00
Manjunathappa Prakash
c6e684b128 qcacmn: pkt_log: Use qdf_spin_lock APIs debug infrastructure
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
2018-11-16 13:34:38 -08:00
Venkata Sharath Chandra Manchala
0ce469e330 qcacmn: Add pktlog handler to process rate events
Add dp_msg_pktlog_handler to handle
rate events from the firmware.

Change-Id: I24776caa3b78ec38d94421f243ec72d81ee3102d
CRs-Fixed: 2340639
2018-11-11 09:27:32 -08:00
gaurank kathpalia
85e55d12d6 qcacmn: Add src, and dst id support in PKTLOG(WMA)
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
2018-09-17 06:09:52 -07:00
Aditya Sathish
f78a3d8ca5 qcacmn: Clean up spectral, tif and umac component prints
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
2018-08-10 18:11:18 -07:00
Ashish Kumar Dhanotiya
d9b88605c5 qcacmn: Update current pktlog state if pktlog enable fails
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
2018-08-06 22:43:12 -07:00
bings
315d67f3f4 qcacmn: Fix pl_info->log_stat update
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
2018-06-14 02:56:49 -07:00
Jeff Johnson
5f255001d9 qcacmn: utils: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I0bb870b4c83129d2466aeb4741d27783de888008
CRs-Fixed: 2230684
2018-05-18 02:17:50 -07:00
jitiphil
0081d767f1 qcacmn: Fix buffer overflow in process_tx_info and process_rx_info
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
2018-03-20 14:34:00 -07:00
Venkata Sharath Chandra Manchala
78e6478d29 qcacmn: Enable Pktlog Support
Retrieve pktlog handle through cdp api.
Register proper callbacks for handling WMI
responses from fw.

Change-Id: Iaa3dca5ba95e41d09c99f6d0bef12880ef8f72c0
CRs-Fixed: 2185217
2018-02-28 00:31:35 -08:00
Orhan K AKYILDIZ
dfdbf5f846 qcacmn: Fix security concern with %p
%p is considered a security hole. Fix an instance of such a hole
introduced recently.

Change-Id: Iaaa8d94de3077f987605058d417b472966ad9931
CRs-Fixed: 2180521
2018-02-12 15:44:58 -08:00
Amar Singhal
479698e1d7 qcacmn: Add NULL ptr and data initialization checks in pktlog
Add checks for NULL ptr. Also initialize data properly.

Change-Id: Ib6db409f038421c5a0c9033bea7948f9cd6376dd
CRs-Fixed: 2160752
2018-01-11 13:45:15 -08:00
psimha
9aec0b53dc qcacmn: Add NULL checks before accessing pldev
Add NULL checks before accessing pldev object in the pktlog module.

Change-Id: I7139480c028a54fab9d73d5b68494cc42ef6d427
CRs-Fixed: 2158642
2017-12-18 21:48:42 -08:00
Venkata Sharath Chandra Manchala
09adf5336c qcacmn: Enable Packetlog
Enable Packetlog for Lithium Based chipsets by:
Replacing ol_txrx calls with equivalent cdp calls

Change-Id: Ibf4431daca23c23c9e1c1a5e1ebb2579079e4969
CRs-Fixed: 2117063
2017-12-09 23:27:27 -08:00
Poddar, Siddarth
658455b413 qcacmn: Restrict max/min pktlog buffer size using pktlogconf tool
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
2017-10-30 03:25:50 -07:00
Orhan K AKYILDIZ
6bd48f118a qcacmn: Add sanity check for pktlog msgs
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
2017-10-26 17:47:30 -07:00
Rakesh Pillai
13146458f9 qcacmn: Fix CLANG warnings in Data path
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
2017-06-30 22:50:37 -07:00
Ashish Kumar Dhanotiya
a55792d148 qcacmn: Race condition while using pkt log buffer
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
2017-06-05 05:29:56 -07:00
Manikandan Mohan
50ec704606 qcacmn: Update for check patch fixes
Fix for compilation errors after check patch fixes

Change-Id: Ib530d8d860440754f526ac93f5b12dbeab45b8aa
CRs-fixed: 2033001
2017-05-02 13:29:33 -07:00
Ashish Kumar Dhanotiya
485d594ea1 qcacmn: Race condition while using pkt log buffer
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
2017-04-21 00:25:09 -07:00
Poddar, Siddarth
3a52bd7e6a qcacmn: Add support to collect pktlogs as part of bugreport
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
2017-04-17 04:47:56 -07:00
Poddar, Siddarth
5503c76aca qcacmn: Add iwpriv pktlog command to clear pktlog buffer
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
2017-04-12 01:14:08 -07:00
Srinivas Girigowda
60644c29e6 qcacmn: Add core\utils directory and files to qcacmn
As a part of UMAC convergence, move the core\utils logging to qcacmn.

CRs-Fixed: 1109855
Change-Id: I499a392f74f3e52e99df4d03e4a27bce6cf5be7c
2017-02-17 22:13:07 -08:00