커밋 그래프

30 커밋

작성자 SHA1 메시지 날짜
Pragaspathi Thilagaraj
a8d8b663b2 qcacmn: Define QDF API for vzalloc and vfree
Define QDF API for virtual memory allocation and free.
Also add new api to get time of the day in microseconds.

Change-Id: I2921055bbb6b5d2a1105d19448b2a10fa2d6ccc5
CRs-Fixed: 3038180
2021-09-28 21:12:18 -07:00
Vevek Venkatesan
6a3c9eaa85 qcacmn: add CDP interface support for pkt_log_exit
Add CDP interface API support for pkt_log_exit,
to cleanup pkt_log_init on failure.

Change-Id: Ib50efaed5997d341d3e76c2e1dbe42856df40191
CRs-Fixed: 3012201
2021-08-14 23:07:04 -07:00
Ananya Gupta
6d07f2a272 qcacmn: Clear g_pktlog_pde after de-init pktlog
When switching from mission mode to FTM or Epping mode,
g_pktlog_pde is not cleared after de-init. When switching
back to mission mode, a warning is produced as the proc
directory is not found.
To fix this, g_pktlog_pde is cleared when pktlog is
de-initialized.

Change-Id: I1b9c9259c220a1981151dcb1e44a5621d7fd8204
CRs-Fixed: 2872045
2021-02-08 10:51:48 -08:00
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
bings
e3fe6fc3c0 qcacmn: proc_create_data support for 5.6+ kernel
One parameter of proc_create_data is changed from struct
file_operations to struct proc_ops.
Add support for it under the kernel version compilation flag.

Change-Id: Ic87222f9c267debef56dcc66fc629854058ffabd
CRs-Fixed: 2666492
2020-06-01 00:04:11 -07: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
Vivek
0c4e20ff82 qcacmn: Replace printk with qdf_nofl_info
Replace printk with qdf_nofl_info in qdf folder.
So if we wish to change from printing on console
to other location, based on a logging daemon, we
can do that by only changing at the implementation
of QDF print API's

Change-Id: I6db67cee416ebbe0f2c51b2d4dbf2b3a335e972a
CRs-Fixed: 2442689
2019-10-29 04:07:12 -07:00
Himanshu Batra
7ee0677954 qcacmn: Replace linux print APIs with qdf print APIs
Replace linux print APIs with equivalent level qdf print APIs.

Change-Id: If0a4a5326de87c9f023e8f4de996a4734ed6cda2
CRs-Fixed: 2530137
2019-09-29 23:15:37 -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
Dustin Brown
50eab9871f qcacmn: Migrate qdf_ssr_protect/unprotect
qdf_op_protect/unprotect supersede qdf_ssr_protect/unprotect. Replace
calls to qdf_ssr_protect/unprotect with qdf_op_protect/qdf_op_unprotect.

Change-Id: Iab80e4cbf6b87b37a0d761e7ecea695b840c5e5e
CRs-Fixed: 2418450
2019-03-26 01:24:45 -07: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
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
Ryan Hsu
c84218fed7 qcacmn: Add SSR callbacks
As CDS is not usable by WIN, add callbacks that are
registered in QDF and correct the module dependencies.

Also moves the platform related function to qdf_platform.[c|h]

Change-Id: I3080e9df86770235ff46237b8a2ffb9c2a3c9c2c
CRs-fixed: 2130260
2018-06-20 04:05:54 -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
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
Ashish Kumar Dhanotiya
d36a315227 qcacmn: Add mutex lock for proc handlers
It will have race condition issue when multiple
threads access some fields of global shared
variable ctl concurrently.

Fix is to add mutex lock for proc handlers.

Change-Id: Ifba428ae6544ccbdae0547a63972ab241ae68d7c
CRs-Fixed: 2185522
2018-02-09 01:51:27 -08:00
Srinivas Pitla
f6b4bc8f02 qcacmn: Use new APIs to get dp handles
SON and DP modules use new APIs to get dp handles,

Change-Id: I1639b946f1660fcaa21b76688909451dcc0f94cc
CRs-Fixed: 2177109
2018-02-03 15:11:10 -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
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
9f7b297a38 qcacmn: Remove code related to mmap functionality for pktlog
Remove the code related to mmap functionality for pktlog
as it is no longer used/required.

Change-Id: Ib031148985055201810a7c32347c2e6efea57f35
CRs-Fixed: 2133878
2017-10-30 07:38:07 -07:00
Manjunathappa Prakash
2620760503 qcacmn: Add protection for pkt_log ops with module stop
Packet log ops are protected against load-unload and SSR, but not
against module stop. Take care to add check for module stop.
Also takecare to NULLing of wdi_event_list and NULL check before accessing.

Change-Id: I20d49ff587719fc14f60a53e86092383de6ef5b8
CRs-Fixed: 2131044
2017-10-25 13:41:05 -07:00
Manjunathappa Prakash
fe0b0d43c2 qcacmn: SSR protect the pktlog_fops functions
Protect pktlog_fops callback function from sub system restart.

Change-Id: Iaaa50f609a96058e5f1a669f88c97e4a97193562
CRs-Fixed: 2131028
2017-10-23 20:23:50 -07:00
Dustin Brown
4ff1c130d3 qcacmn: Remove vma from vm_operations_struct->fault handler
Linux kernel 4.10 removes the vm_area_struct parameter from the
vm_operations_struct->fault handler. Add conditional compilation to
provided the appropriate fault handler signature based on the version of
the Linux kernel being compiled against.

Change-Id: I467f4d8426ecfa55e4f2aac26a5326901239a752
CRs-Fixed: 2094824
2017-09-19 13:27:50 -07:00
Dustin Brown
8f6788d071 qcacmn: Use vm_fault->address instead of virtual_address
Linux kernel 4.10 removed vm_fault->virtual_address in favor of simply
using vm_fault->address. Add conditional compilation to use the
appropriate vm_fault address field based on the version of the Linux
kernel being compiled against.

Change-Id: I3f29721888bf349a7ac4f5f62d576b668ee0abc2
CRs-Fixed: 2094806
2017-09-08 01:57:46 -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
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
6bb2c1755f qcacmn: Return the error value if pktlog is not enabled
When pktlog enable gives an error as part of pktlog_release,
then return the error value.

Change-Id: I88289226d3dc933a46d6dba0cd6ee0b6d2abb2d5
CRs-Fixed: 2031287
2017-04-17 04:47:57 -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
e0a0247ead qcacmn: Reduce the log spam in kmsg
Move the logs to appropriate log levels to avoid excessive
logging in kmsg. Also log the error reason and line number.

Change-Id: I08ed38861ff0b3d50861b957de34b1c62bc45afb
CRs-Fixed: 2024378
2017-04-03 13:47:20 -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