Commit Graph

823 Commits

Author SHA1 Message Date
Neha Bisht
5e70737f80 qcacmn: Handle special descriptor cases for global tx pool
Handle special descriptor cases for global tx desc pool

Change-Id: I33253b726b1b8a2e7438b3bc1dddcac43ad8fb25
CRs-Fixed: 3592887
2023-08-30 13:40:05 -07:00
Amit Mehta
16ff49ada0 qcacmn: Add additional check for qdf_walt_get_cpus_taken
Current if CONFIG_SCHED_WALT is disabled in kernel it is
resulting in compilation error.

So to fix the issue move the API under CONFIG_SCHED_WALT.

Change-Id: Ia720b3d707e0119e90c1cce8bf99590525a7f5ba
CRs-Fixed: 3599900
2023-08-30 04:53:33 -07:00
Aman Mehta
cfefc49a09 qcacmn: Add support for xmit type flag on skb->cb
Add support for xmit type flag on skb->cb for tx packets. The field will
be used to update ingress stats to the respective indices

Change-Id: Ifad61a97b3424df90a2fe722f1c264678a67e949
CRs-Fixed: 3562152
2023-08-28 21:13:04 -07:00
Amit Mehta
6f26807730 qcacmn: Add band in nbuf priv cb
Add band in nbuf priv cb

Change-Id: I0e740609982eaafc3678b8d17db77a6d8eeed5de
CRs-Fixed: 3598829
2023-08-25 18:05:56 -07:00
Nijun Gong
4cadebf03f qcacmn: try to allocate contiguous dma buffer
For some target like ROME, CE try to read more data than expected as
prefetch. For example in UDP TX case, when CE read a tx_desc(44 bytes)
located in host memory with SMMU mapped address 0x1025FFD4~0x1025FFFF,
SMMU will detect CE read beyond 0x1025FFFF to access 0x10260000. SMMU
fault will happen if 0x10260000 is not mapped to host memory.

To fix this issue, allocate contiguous dma buffer for all 1056 tx_descs,
which will map to contiguous SMMU address region.

CRs-Fixed: 3588459
Change-Id: Id0287b051f792f18d746baf39e1c66d076c9be3c
2023-08-24 01:26:38 -07:00
Abhishek Suryawanshi
a9e5f6f098 qcacmn: Added indices in QDF_MODULE_ID enum
Added indices in QDF_MODULE_ID enum in qdf_types.h file

Change-Id: Ie2ab6286b83a4c1b13b84b1c37e464dc6f8534ba
CRs-Fixed: 3576567
2023-08-17 18:07:14 -07:00
Himanshu Batra
f86703892d qcacmn: Add qdf API for dev_hold
Add qdf API for dev_hold

Change-Id: I585e6781718fd55e8359906e5355f068376406c2
CRs-Fixed: 3579431
2023-08-11 01:24:21 -07:00
Krunalsinh Padhar
d3e95e7607 qcacmn: Send rf path WMI command
Prepare and Send WMI command to fw to set the rf path. Also, add module
ID for rf path switch for qdf log prints.

CRs-Fixed: 3568221
Change-Id: I7ef0ffe66eaed837424699641d3e5b8537cd0304
2023-08-04 02:49:21 -07:00
Vinod Kumar Pirla
a147f231ea qcacmn: Use VDEV response timer in PSOC for MAC update
Use the VDEV response timer infrastructure to hold MAC address update
requests sent to FW on VDEV which is in link switch progress.

As post disconnect and sending set MAC address request, the scheduler
thread is exited and to notify MLO mgr about set MAC address update
complete (or either timer expiry due to FW response timeout) and
further the link switch process based on response.

This code is only applicable for Link switch VDEV MAC address update
path. For MAC update request from userspace still use the same path
without starting the timer as for those wait event is already in place.

Change-Id: Ice3e6f7b00f0d9d08d6aa62ee9c1e4d183142358
CRs-Fixed: 3556517
2023-08-02 04:55:03 -07:00
Amir Patel
98252fa466 qcacmn: Fix undefined symbol when QCA_KMEM_CACHE_SUPPORT is disabled
Fix undefined symbol when QCA_KMEM_CACHE_SUPPORT is disabled

CRs-Fixed: 3571636
Change-Id: I7c3aad7992c11b77533de055226d0d6455cbe4f5
2023-08-01 20:29:43 -07:00
Manikanta Pubbisetty
e2b9779df7 qcacmn: Add WBUFF statistics
Currently, there are no statistics whatsoever present in WBUFF module.
To start with, add some basic statistics to the WBUFF module.

Change-Id: I63c06cfb8b1430b2e86539f88025e6d74a00012b
CRs-Fixed: 3548509
2023-07-20 19:19:23 -07:00
Manikanta Pubbisetty
d621993b84 qcacmn: Add new API for custom page frag cache nbuf allocations
SKBs that are allocated using __netdev_alloc_skb() share a single
page frag cache that is maintained in the network layer and is
common for all network drivers/devices. There is always a chance
where memory can be fragmented when the WLAN driver shares a page
frag cache with other slow network devices. Over the time, lot of
memory would be wasted due to fragmentation eventually resulting
in SKB allocation failures due to OOM.

To circumvent this, define a QDF NBUF allocation API which accepts
custom page frag cache maintained in the driver as an input and
allocates memory for skb->head from the custom page frag cache.

Such an API will be of great help when used for allocating reusable
SKBs in the driver. This also avoids the aforementioned memory
fragmentation issue.

Change-Id: I33f3096bba4057fd06ef55bbed5dc7a3f0f5c759
CRs-Fixed: 3543424
2023-07-18 09:51:14 -07:00
Aditya Kodukula
54ab05a36f qcacmn: Replace QDF_FULL_MAC_FMT with QDF_MAC_ADDR_FMT
Currently in driver, two macros are defined to specify the
mac address printing format. Since both macros achieve
the same result, replace all instances of QDF_FULL_MAC_FMT
with QDF_MAC_ADDR_FMT.

Change-Id: I195448267ef8e77a7fd5b232ffbf2cfb0ded1be4
CRs-Fixed: 3559488
2023-07-17 22:37:34 -07:00
Amit Mehta
1d7c991d04 qcacmn: Move qdf_walt_get_cpus_taken under WALT_GET_CPU_TAKEN_SUPPORT
qdf_walt_get_cpus_taken under WALT_GET_CPU_TAKEN_SUPPORT feature
flag to avoid compilation failure on branch where changes is not
present.

Change-Id: Iddcc777a476e41cd20fa0ff40ad2dd80af0748ef
CRs-Fixed: 3559247
2023-07-17 05:01:24 -07:00
Sijun Wu
27f8cfff08 qcacmn: Add a set of nbuf fragment allocation APIs
It adds a set of frag way allocation APIs explicitly.
IPA Tx nbufs change to frag way allocation API, which saves memory.

Current __qdf_nbuf_alloc changes to non-frag way allocation by
default if SKB RECYLCER not defined.

Change-Id: I5f87ffac54c49f9af920775c13b6dfdd147476dd
CRs-Fixed: 3534452
2023-07-10 21:22:46 -07:00
Surya Prakash Raajen
9b765b9738 qcacmn: Add support to get category verbose mask from qdf
Add support to get category verbose mask from qdf

Change-Id: I25aecc1dd13ad157cc5f27c1b9a7e6cfe05562a1
CRs-Fixed: 3525582
2023-06-22 12:49:31 -07:00
Himanshu Batra
c387b92230 qcacmn: Add print module for telemetry agent
Add print module for telemetry agent

Change-Id: Ie44af9cb25e1567a30b36dff62d20baf203e453b
CRs-Fixed: 3528401
2023-06-20 09:58:52 -07:00
Aditya Kodukula
58e80d75bd qcacmn: Fix typographical errors
Fix typographical errors spanned over various files in cmn.

Change-Id: I9fcf3b7f9bb7d7dd406e6576a60aa4eb783c9ceb
CRs-Fixed: 3529628
2023-06-14 22:02:33 -07:00
Pooja T C
7fb2d5f4b1 qcacmn: Add QDF Module id for Co-Hosted BSS module
Added a QDF module id for Co-Hosted BSS  module.

Change-Id: If93df1026edcce0958fc7cb751abc4f32c887ec1
CRs-Fixed: 3501897
2023-06-13 09:42:45 -07:00
Devender Kumar
1204ed01ea qcacmn: Add qdf_nbuf_set_fast_xmit() API support
Add support for filling fast_xmit in SKB for platform
which support skb_recycler feature.

Add a QDF abstraction to update fast_xmit in skb, when it is supported.

Change-Id: Ibc562023ddeb0bf5c2709bbb60b596676c932b5a
CRs-Fixed: 3522028
2023-06-12 16:26:46 -07:00
Zhiwei Yang
c8e31677da qcacmn: Fix wlan_dp_mem_stats TX_NBUF_CNT error
The TX_NBUF_CNT never decreases, which is an incorrect debug info.
We should decrease dp_tx_skb_count when nbuf unmap.

Change-Id: I3be63047f47305c5d24c5c40696e1c6db69ec4d6
CRs-Fixed: 3508530
2023-06-09 13:50:35 -07:00
Namita Nair
5582448dca qcacmn: Handle Tasklet context for filter notify
Currently, opt_wifi_dp filter reserve and release
notification to IPA, is sent in a tasklet
context. As QMI calls tend to acquire mutexes, this
will cause an assert as we cannot sleep in a tasklet
context. To resolve this, WLAN will schedule the
notification call in a workqueue before calling
into IPA. This change ensures IPA calls from WLAN are
not made in an interrupt context.

Change-Id: Ic716e14340651db76d7dd7dc216c595c01732ee8
CRs-Fixed: 3492465
2023-06-08 02:12:06 -07:00
Aditya Kodukula
4cbabdad1c qcacmn: Fix typos in cmn
Fix typos spanned over multiple files in cmn.

Change-Id: I9886114cd9cde934e084d0977e6272f8dd04df76
CRs-Fixed: 3521888
2023-06-07 13:58:38 -07:00
Amit Mehta
bc2323fc08 qcacmn: Only allow connectivity logging for STA mode
Currently connectivity logging is done for all opmode
but logging should be done only for STA mode.

So to fix the issue add check for opmode and skip
connectivity logging if opmode is not STA

Change-Id: Ie6175a02c8167f5ebfd81553837206640431f701
CRs-Fixed: 3515365
2023-06-05 08:33:55 -07:00
Ashish Kumar Dhanotiya
a82c7a6227 qcacmn: Create new ll_sap component
Add enums for ll_sap component.

Change-Id: I17011aa35bf0c99adb2b8b6ef60ea014fc1bbe37
CRs-Fixed: 3482575
2023-05-30 06:06:20 -07:00
Naveen S
78a6dc3b84 qcacmn: Fix for qdf_get_log_timestamp_lightweight not being defined
qdf_get_log_timestamp_lightweight function is defined only when
ENHANCED_OS_ABSTRACTION is not enabled, defining it when
ENHANCED_OS_ABSTRACTION is enabled as well.

Change-Id: Ia146feed5536a7b99653d7690f3204e6cbaf3f4c
CRs-Fixed: 3471529
2023-05-30 02:57:44 -07:00
Yeshwanth Sriram Guntuka
4dc955351e qcacmn: Move prealloc DP descriptor types to QDF
Move prealloc DP descriptor types to QDF so that
the macros can be used in HIF layer.

Change-Id: I3de60876735e5aa37d80e9e698a86503b18574c1
CRs-Fixed: 3502615
2023-05-26 16:06:57 -07:00
Amit Mehta
4a4c634bb0 qcacmn: Add new QDF API to check if walt_get_cpus_taken supported
Add new QDF API qdf_walt_get_cpus_taken to check if
walt_get_cpus_taken API is supported.

Change-Id: I8ed8e5608c35c45b5e630ee39a497bca31b3502d
CRs-Fixed: 3508584
2023-05-26 10:27:45 -07:00
Amit Mehta
9fb079e747 qcacmn: Add new QDF APIs
1. qdf_cpumask_and - *dstp = *src1p & *src2p
2. qdf_cpumask_andnot - *dstp = *src1p & ~*src2p
3. qdf_cpumask_equal - *src1p == *src2p
4. qdf_cpumask_complement *dstp = ~*srcp
5. qdf_walt_get_cpus_taken - Get taken CPUs

Change-Id: I3a9038cfe033b155bd098e88e3bf176513b728e8
CRs-Fixed: 3479945
2023-05-23 03:25:08 -07:00
Rakesh Pillai
474298906b qcacmn: Fix perf cluster interrupt affinity
The number of perf CPU clusters can vary across
different targets. Currently only the second CPU
cluster is considered as the perf cluster, whereas
there can be more than 1 perf clusters.

Fix this perf cluster derivation for interrupt
affinity.

Change-Id: Ie4407064ac5124fc050715fd75400ca516c9c6b8
CRs-Fixed: 3498024
2023-05-18 21:20:19 -07:00
Srinivas Girigowda
91e11d5efa qcacmn: Increase DPTRACE data size to 66 bytes
2 bytes for meta data and 64 bytes of packet data

Change-Id: Iee6875fd44844382c2248175925271e98da091c7
CRs-Fixed: 3492510
2023-05-18 18:42:39 -07:00
Zhiwei Yang
dcc5bcfd68 qcacmn: Avoid using small buffer address
On some third-party platforms, we observe the memory physical
address below 0x2000 is allocated will cause HW/FW NOC error,
so this region memory should not use by host.

This change will hold the memory if the allocated memory physical
address below 0x2000 until driver unload.

Change-Id: I37b6abc98033230dc4f572dafb849101497f6e93
CRs-Fixed: 3419648
2023-05-15 12:23:50 -07:00
Venkateswara Swamy Bandaru
2d6091a62e qcacmn: Add EPCS module id
Add EPCS module id and initialize to default info
debug level.

Change-Id: Idec60fcab1bdef90660a24c54f6c7b09d0ddc2eb
CRs-Fixed: 3490401
2023-05-12 23:09:19 -07:00
aloksing
7856b6f99e qcacmn: Add check for frame control version
PMAC is giving fatal when mgmt packet is getting queued
with non-zero version in frame control

Adding a check for version before queueing mgmt packets.

Change-Id: I606513b6ce027f1126e9cd40a9909886441de240
CRs-Fixed: 3422973
2023-05-09 06:30:20 -07:00
nobelj
fffa314bff qcacmn: Add support to invoke debug function before assert
qdf assert always, assert without debug information.
Added support to dump needed information before assert.

Change-Id: I19898ec11c1bade4340cf1737a760d9507012f12
CRs-Fixed: 3480596
2023-05-08 06:43:24 -07:00
Ripan Deuri
8866260ca4 qcacmn: Add module-id for SAWF
Add module-id for SAWF to be used in the qdf-trace framework.

Change-Id: I53a044a2f41b18a232063bd18c5508104e0e34cb
CRs-Fixed: 3475867
2023-05-04 13:50:22 -07:00
Roopavathi Lingampalli
36d5ce6684 qcacmn: Add new QDF API's to handle gpio requirements
Add new QDF APIs to handle gpio, irqf and timer related
handling in TSF feature.

Change-Id: Iff6f85c6debe351c5533906559400b4a51333d4d
CRs-Fixed: 3469020
2023-04-29 05:17:22 -07:00
Harsh Kumar Bijlani
2be2bf6a69 qcacmn: Fix memory leaks in Rx monitor path
Fix the following 2 memory leaks in Rx monitor path:

1. When MPDU queue is empty and MON_BUF_ADDR_TLV is received,
   then free page fragment memory.

2. In case of small size packets, 1 MPDU can have more than
   2*QDF_NBUF_MAX_FRAGS fragments wherein each nbuf can have maximum of
   QDF_NBUF_MAX_FRAGS frags. In this case, add the frags to nbuf in the
   following way.

   parent_nbuf (QDF_NBUF_MAX_FRAGS frags attached)
	|
	| (fraglist)
	|
	----> tmp_nbuf1 (QDF_NBUF_MAX_FRAGS frags attached) ----> tmp_nbuf2
							    (next)

Change-Id: I54e8162bf0b9da8629a3c80d123421fbeaf8df11
CRs-Fixed: 3453676
2023-04-27 04:08:30 -07:00
Naveen Gurujala
ef4db9909e Revert "qcacmn: Avoid using small buffer address"
This reverts Change-Id:	I9d5df20cbdf23c230d7c910cce9b9489dd9dd614

Change-Id: I2ce7c3cacc3fec007e511a9e3d15aed89173fbd9
CRs-Fixed: 3419648
2023-04-25 12:08:45 -07:00
D Harilakshmi
f86fcf9524 Revert "qcacmn: Add support to invoke debug function before assert"
This reverts Change-Id: I2b53b7fa6a600b2a1aafdbc608b95b75feb2133d

Change-Id: Ib2e4bc6b5970b78b5e9fd8efb8fe34fbf7f7160e
CRs-Fixed: 3464724
2023-04-25 12:06:43 -07:00
Linux Build Service Account
1ddb746e6d Merge "qcacmn: Add support to invoke debug function before assert" 2023-04-21 09:15:32 -07:00
Linux Build Service Account
eba7bbfa2f Merge "qcacmn: Add API qdf_file_read_bytes to read a file from host" 2023-04-21 09:15:16 -07:00
Linux Build Service Account
752d15e049 Merge "qcacmn: Avoid using small buffer address" 2023-04-21 03:18:18 -07:00
Amith A
aed594f4b8 qcacmn: Add API qdf_file_read_bytes to read a file from host
Add an API qdf_file_read_bytes to read a file from within the driver
and return the contents of it along with its size.

Change-Id: If777e1b9c610e8cc7dd35be42fa9ced2bb1c6560
CRs-Fixed: 3456115
2023-04-19 01:28:49 -07:00
Nobel Sharanyan Jeganathan
bb213216f3 qcacmn: Add support to invoke debug function before assert
qdf assert always, assert without debug information.
Added support to dump needed information before assert.

Change-Id: I2b53b7fa6a600b2a1aafdbc608b95b75feb2133d
CRs-Fixed: 3464724
2023-04-17 12:39:01 -07:00
Srinivas Girigowda
cfbf0f77e5 qcacmn: qdf: Add IEEE80211 type/subtype macros
As part of TX Mon 2.0, WIN has IEEE80211 specific macros only in WIN side
header file, but now Tx Mon 2.0 is required to be supported on MCC side
and these macros are not available. Hence extend by adding the required
type/subtype macros in qdf common header file.

Change-Id: I76cf0a0c226664c34c9c8bd10e280a500b3c61a9
CRs-Fixed: 3415715
2023-04-14 08:24:10 -07:00
Zhiwei Yang
f52c8b1f36 qcacmn: Avoid using small buffer address
On some third-party platforms, we observe the memory physical
address below 0x2000 is allocated will cause HW/FW NOC error,
so this region memory should not use by host.

This change will hold the memory if the allocated memory physical
address below 0x2000 until driver unload.

Change-Id: I9d5df20cbdf23c230d7c910cce9b9489dd9dd614
CRs-Fixed: 3419648
2023-04-12 02:53:41 -07:00
Liangwei Dong
3a759ca431 qcacmn: Update candidate list before try next
Some IOT APs only allow to connect if last 3 bytes of
BSSID and self MAC is same. They create a new bssid on
receiving unicast probe/auth req from STA and allow STA to
connect to this matching BSSID only. So boost the matching BSSID
to try to connect to this BSSID.
And add logic to refresh the candidate list before next
candidate try when the last candidate connect fail.

Change-Id: I482e122c8c9febbab42f64013fbb78c266f49655
CRs-Fixed: 3432618
2023-04-11 02:28:01 -07:00
Pooja T C
933db0e737 qcacmn: Add QDF Module id for SOUNDING module
Added a QDF module id for SOUNDING module.

Change-Id: If237f91d52ad6f73921481e85327006563c9382b
CRs-Fixed: 3439637
2023-04-05 02:04:46 -07:00
Namita Nair
d252ffb791 Revert "qcacmn: WAR for opt_wifi_dp feature to disable IPA(2)"
This reverts commit 
with Change-Id: Ic1b961656f52fa009ab4c3b3d8d3cac305c2c7c4.

Change-Id: Idc5101d3bac08a64f7de0a828841222eca8d3c01
CRs-Fixed: 3443469
2023-04-02 01:23:03 -07:00