Commit Graph

794 Commits

Author SHA1 Message Date
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
Namita Nair
149071276c qcacmn: WAR for opt_wifi_dp feature to disable IPA(2)
IPA_OFFLOAD path will be enabled by default for MSM,
inorder to support optional wifi datapath feature.
This change is a WAR to disable IPA offload during
compile time, if the feature is not enabled.
This is done using the IPA_WDI_OPT_DPATH feature flag
from IPA. If the flag is not defined in the IPA test
module file, IPA offload path and optional wifi dp
feature will be disabled.

This is a WAR, and will be fixed once a Kernel config is
available from IPA to enable or disable the optional
wifi datapath feature.

Change-Id: Ic1b961656f52fa009ab4c3b3d8d3cac305c2c7c4
CRs-Fixed: 3431972
2023-04-02 01:22:52 -07:00
Paul Zhang
310c7ce085 qcacmn: Add enums for TDLS for MLO feature
1\ Add QDF_STATUS_TDLS_MLO_SYNC,
2\ Add WLAN_ELEMID_LINK_IDENTIFIER.

Change-Id: I58e912dc46a48b9ba7c2d411a2ccd7e107df1b22
CRs-Fixed: 3435983
2023-03-30 14:44:29 -07:00
Devender Kumar
905bc10886 qcacmn: Add support for pmac_id in QDF layer
To support splitphy and MLO operation when multiple
TX ring are present under single soc, then to differentiate
the TX lmac, pmac id in per packet is require. As pmac_id in
bank register is always constant for pinnacle case, so need
to pass per packet in TX desc.

Change-Id: Ic6d8e14e8c1948e218c52c8eeaf99fcd6c437753
CRs-Fixed: 3356413
2023-03-17 01:41:16 -07:00
Devender Kumar
8e3fc021bf qcacmn: Add qdf_nbuf_fast_xmit() API
Some platforms support a skb_recycler feature which patches the Linux
kernel to add a bool fast_xmit member to struct sk_buff.
Add a QDF abstraction to return the value of this member when it is
supported, and return false when it is not supported.

Change-Id: I6dfe6276779218f4d0245ec44035b4aa596d0e2a
CRs-Fixed: 3418516
2023-03-15 20:59:36 -07:00
Aravind Kishore Sukla
a3a4e67eed qcacmn: Add check for buffer overflow and null pointer dereference
There is a chance for null pointer dereference for
num_eht_user_info_valid and array out of bounds for eht_user_info.

Add checks for both the cases as it may cause crash.

Change-Id: Icb5235612a1225b9991c99519b5ee49536c577bc
CRs-Fixed: 3426873
2023-03-15 17:41:32 -07:00
Chaoli Zhou
6de3f20f10 qcacmn: Add common memory alloc/free API
Add qdf_mem_common_alloc/qdf_mem_common_free for
the platform that want to replace malloc with valloc
due to limited continuous physical memory.

Change-Id: If3c5716ff6d62c0a4f6f21b7ebf9eef1e3f0e529
CRs-Fixed: 3429140
2023-03-14 03:26:03 -07:00
Tiger Yu
60bdb7983d qcacmn: Create new qdf_in_atomic interface to wrap the kernel API
Create the new qdf_in_atomic to wrap the kernel API in_atomic to be
used in the driver to check whether current running thread is in atomic
context.

Change-Id: I69843ff79559612561d57965a6754990e9b6f4f9
CRs-Fixed: 3414725
2023-02-28 00:42:50 -08:00
Jeff Johnson
8dd3d7f449 qcacmn: Fix QDF time-related documentation
The kernel-doc script identified documentation issues in the QDF
time-related abstractions, so fix those issues.

Change-Id: Ieffd4a5b2a38674da1b19735ad6f35844d355f09
CRs-Fixed: 3406200
2023-02-28 00:42:37 -08:00
Surabhi Vishnoi
bbae800e14 qcacmn: Fix checksum offload logic for rx packets
Currently, hardware supports checksum offload for only ipv4, tcpv4/v6 and
udpv4/v6 packets. But driver sets checksum as CHECKSUM_UNNECESSARY for
all rx packets if tcp_udp_err and ip_err bit in rx_attention_tlv is not
set. If driver sets CHECKSUM_UNNECESSARY in skb then network stack will
not validate checksum and will reply to even wrong checksum packets
which is incorrect.

So, fix is to set checksum for all rx packets other than ipv4, tcpv4/v6 and
udpv4/v6 to CHECKSUM_NONE instead of CHECKSUM_UNNECESSARY so that network
stack validates checksum.

Change-Id: Ifb9c74fb729361da6db715fa667f926b71ce948f
CRs-Fixed: 3378925
2023-02-27 04:13:44 -08:00
Jeff Johnson
1e4a1adb96 qcacmn: Fix QDF memory documentation
The kernel-doc script identified a large number of documentation
issues in the QDF memory abstractions, so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: I4e30fd85e65567485cdc7a9adfc38c69df0cfa55
CRs-Fixed: 3406199
2023-02-24 08:50:13 -08:00
Jeff Johnson
b9fcc44fd3 qcacmn: Fix QDF MC Timer documentation
The kernel-doc script identified documentation issues in the QDF MC
Timer abstractions, so fix those issues. In addition, there are a
number of instances where public functions have their implementation
documented. In those cases make sure only the interface is documented.

Change-Id: Ied6cf02d2091099351cd82245a667fd1e6cad461
CRs-Fixed: 3405262
2023-02-24 08:50:01 -08:00
Jeff Johnson
c3c262ca32 qcacmn: Fix QDF trace documentation
The kernel-doc script identified documentation issues in the QDF trace
abstractions, so fix those issues. In addition, there are instances
where public functions have their implementation documented instead of
having their interface documented, so move that documentation.

Change-Id: Ife16fe9527dbe013003c5f2f04d7e9d0a9aa385a
CRs-Fixed: 3406201
2023-02-24 08:49:36 -08:00
Chaithanya Garrepalli
4eedfd8cf7 qcacmn: For WDS EXT use descriptor fields for 4-addr
For WDS ext use fr_ds and to_ds fields to check for
4-addr instead of reading value from TLV

Change-Id: I261746018de2320367e8650332a5c355edfb1489
CRs-Fixed: 3410639
2023-02-24 07:05:02 -08:00
Jeff Johnson
0af71c50d8 qcacmn: Fix QDF lock documentation
The kernel-doc script identified documentation issues in the QDF lock
abstractions, so fix those issues.

Change-Id: Iee0576e2e64d9d67942238d758f3cbca36069356
CRs-Fixed: 3406198
2023-02-24 00:06:10 -08:00
Venkateswara Naralasetty
2021fc9249 qcacmn: Move CE descriptor related macros out of qdf
Currently few macros related to CE descriptor are defined in qdf_types.h
Which is not the right place to have such macros. Hence moving them to
ce_internal.h file.

Also, have different macros for WCN6450 as the ce descriptor offsets got
changed for WCN6450.

Change-Id: I20414273793034bbab80304bcd643371d281fb7f
CRs-Fixed: 3386470
2023-02-24 00:05:59 -08:00
Namita Nair
c9c59b99ed qcacmn: Qdf changes to support optional wifi dp feature
Qdf changes to support optional wifi dp feature.

Change-Id: Iaec8374548a991e4660f0a0a31f1d6309b572bea
CRs-Fixed: 3403427
2023-02-23 17:20:25 -08:00
Anbarasan Ganesan
bc5188b115 qcacmn: Add qdf wrapper for jiffes_to_nsecs()
Add qdf wrapper for kernel API jiffies_to_nsecs().

Change-Id: I023dc2293f731bd2ee20278785ebf14ffba4787b
CRs-Fixed: 3396843
2023-02-22 00:00:24 -08:00
Edayilliam Jayadev
98f1131240 qcacmn: Add an API to decrement an atomic variable if it is positive
Add an API to decrement an atomic variable if its value is positive.

CRs-Fixed: 3408572
Change-Id: I9649f1093850452a38acae6fa48e663a4e6d9c68
2023-02-21 22:03:59 -08:00
Pragaspathi Thilagaraj
0faa9d7218 qcacmn: Trigger recovery when WMI command is sent in wow mode
Trigger recovery when WMI command is sent in wow mode

Change-Id: I65efe5601e15055c5407f085e1fdcae5b28d6b81
CRs-Fixed: 3372322
2023-02-20 13:03:01 -08:00
Jeff Johnson
4042de592d qcacmn: Fix QDF documentation
The kernel-doc script identified a large number of documentation
issues in the QDF. A series of patches has already fixed many of the
issues, so fix most of the remaining ones.

Note that the QDF IPA abstraction still has issues, but it is under
rework, so not trying to clean it up until after the rework is
complete.

Change-Id: I10c33e341cb6b46e0f8ada99069616d450c07189
CRs-Fixed: 3406197
2023-02-18 13:33:23 -08:00
Jeff Johnson
a81eb57e42 qcacmn: Fix QDF nbuf documentation
The kernel-doc script identified a large number of documentation
issues in the QDF nbuf abstractions, so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: I744e98469d0fd6d6a2c7c907b2f9af5307f84458
CRs-Fixed: 3398757
2023-02-14 13:34:05 -08:00
Amit Mehta
f9f4ba1b9d qcacmn: Log EAP 8-way handshake packets properly
Currently EAP 8-way handshake packets are logged as
EAP REQ and EAP RSP.
Fix the logging issue by logging EAP 8-way handshake
packets properly

Change-Id: I6af3b3140b5881ece58dd06a9725c103c9388b4c
CRs-Fixed: 3400396
2023-02-13 05:28:32 -08:00
Asutosh Mohapatra
de1e7e7e12 qcacmn: Enhance hang reason code mappings
Currently many host hang reason codes are not mapped to corresponding
userspace codes as a result these hang reason code will be invalid
for userspace and also QDF_REASON_UNSPECIFIED is used in some places
in host.

To add mappings for host hang codes to corresponding to userspace
hang codes and also add new hang codes.

Change-Id: Idb21ccb4a34c9c94872798404912bdb743e9270b
CRs-Fixed: 3381229
2023-02-10 12:21:38 -08:00
Asutosh Mohapatra
8cfe6b1005 qcacmn: Trigger recovery incase of scheduler watchdog timeout
Trigger recovery instead of the apps panic incase of scheduler
watchdog timeout, so that the current logs are captured to
analyze the issue.

Change-Id: I44a61bc5630c4866b9d9b18f7a7ba6221ca6e355
CRs-Fixed: 3312328
2023-02-10 12:21:24 -08:00
Nandha Kishore Easwaran
96c2363f18 qcacmn: Change flow_idx_invalid to flow_idx_valid
Change flow idx invalid to flow_idx_valid.
This change is made so that flows for which this field is not present
are identified as invalid flows and not forwarded to PPE.

Change-Id: I92c82bb0ef57012b2b884fe3fd18344b523a3f51
CRs-Fixed: 3390588
2023-02-07 04:55:19 -08:00
Anbarasan Ganesan
f066d5ca6a qcacmn: Use ioremap() instead of ioremap_nocache()
As part of compiling wifi driver in kernel version 5.15,
the kernel API ioremap_nocache() is no longer supported in
kernel version 5.15.

Kernel API ioremap_nocache() is being replaced with
ioremap() in kernel version 5.6

So, bringing ioremap_nocache() API under kernel version check.

Change-Id: I139556e55f8c20093137960f116b3fc067a1829f
CRs-Fixed: 3357183
2023-02-06 13:32:30 -08:00
Edayilliam Jayadev
06dfa5f812 qcacmn: Add API to iterate over a linked list
Add API to continue iteration of a linked list after
a given node.

Change-Id: Ic266a24623dbe24419e51c5b9a3f7343426712c2
CRs-Fixed: 3388232
2023-02-06 08:58:24 -08:00
Edayilliam Jayadev
49b0a152b5 qcacmn: Add API to get last entry of linked list
Add API to get last entry of linked list.

CRs-Fixed: 3386125
Change-Id: Id956f3976f4c7651ef367e44c1c430f6eea8d2f9
2023-02-06 08:58:05 -08:00
Madhavan Ganesan
a30c47e6cc qcacmn: Add qdf parser API of type uint8_t and uint16_t
Add QDF INI parser API of type uint8_t and uint16_t

Change-Id: I0716df7986f00c60ead852f368d06d37dba7db80
CRs-Fixed: 3389847
2023-01-31 13:18:05 -08:00