Commit Graph

1313 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
Rakesh Pillai
5b087aa295 qcacmn: Add API to get the cluster ID for a cpu
Kernel 6.0 and above has deprecated the use of
topology_physical_package_id() and instead of this
API topology_cluster_id() needs to be used to get
the cluster ID of a given CPU.

Add QDF abstraction API for topology_cluster_id().

Change-Id: I4ca555c016730afc6cac2a4bf55d9f48c6f4cae0
CRs-Fixed: 3488031
2023-05-12 05:03:58 -07:00
Vijay Raj
1214390842 qcacmn: Remove unused connectivity log for datapath events
Diag logging is used for logging datapath event such
as EAPOL and DHCP events

Remove legacy logging mechanism for datapath events

Change-Id: I8a987c1a4ab9954c7662e2f76e7904b02619f661
CRs-Fixed: 3470476
2023-05-09 08:49:37 -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
Biswajit Dash
d62608cb2a qcacmn: Hybrid mld netdev support
-Support to route IGMP packet to correct netdev coming from
 legacy and mld sta.
-Support to detect mld model based on ini setting

Change-Id: I10ea5af9a4315642b262c8404d7bebd88ee06ab1
CRs-Fixed: 3467808
2023-05-09 06:30:09 -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
D Harilakshmi
82bd3d9009 Revert "qcacmn: Optimize DP Rx Error Handling (Part-2)"
This reverts Change-Id:	I760694073a06c1829f28e7e92cd1657560d8eb06

Change-Id: If1573653da912702bd343acfa42f9ae32a3f7844
CRs-Fixed: 3472220
2023-04-26 06:39:59 -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
a515fb6ef8 Merge "qcacmn: Optimize DP Rx Error Handling (Part-2)" 2023-04-21 09:15:17 -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
Kenvish Butani
969c5bdf1f qcacmn: Optimize DP Rx Error Handling (Part-2)
In WBM2SW Rx Error path for BE
specific functionality
1) HAL API's/Function pointers are replaced
with specific function calls.
2) Efficient read/write of WBM Error Info
from HAL Rx desc.
3) Minimize reading data from Nbuf TLV.
4) Peer_id fix for MLO clients with security

Change-Id: I760694073a06c1829f28e7e92cd1657560d8eb06
CRs-Fixed: 3472220
2023-04-20 13:29:39 +05:30
Kenvish Butani
711fb71599 qcacmn: Revert "Optimize DP Rx Error Handling (Part-2)"
This reverts the commit.

Change-Id: Ia1a304daa5d63a063bfc2d22b9b99ccad02af0e1
CRs-Fixed: 3472017
2023-04-19 05:43:51 -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
Rajesh Chauhan
d7d85dfad9 Revert "qcacmn: modify QDF functions for memory allocation and free"
This reverts Change-Id: I2c19b72b82092d553d474a50385ed3095a0fab39
since it results in increased memory allocation due to 8 bytes of
headroom at the beginning of buffer, particularly for data path modules
when size is at the edge of the page boundary.

Change-Id: I72fd7e63b93f2646812acc09e817e3be531f27d8
CRs-Fixed: 3458603
2023-04-10 18:25:06 -07:00
Namita Nair
59a36d8e87 qcacmn: Handle deprecated interface calls to IPA
As IPA has moved out of the kernel, ipa_uc_reg_rdyCB
interface call from WLAN is not needed anymore
as ipa_wdi_init_per_inst() initialization call will
handle this. This change will add support to retain
this call only for legacy devices.

Change-Id: Icb479562e091d388e03ef5a38b3e95d4dbf06271
CRs-Fixed: 3459071
2023-04-08 13:33:12 -07:00
Kenvish Butani
d0d9a987fc qcacmn: Optimize DP Rx Error Handling (Part-2)
In WBM2SW Rx Error path for BE
specific functionality
1) HAL API's/Function pointers are replaced
with specific function calls.
2) Efficient read/write of WBM Error Info
from HAL Rx desc.
3) Minimize reading data from Nbuf TLV.

Change-Id: Ic8793ffcbeb2411c9b81fb32acae062e8a1f40cc
CRs-Fixed: 3362828
2023-04-07 09:13:49 -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
Tallapragada Kalyan
e4798ea69b qcacmn: optimization changes to improve RX KPI for WIN
done the following changes to improve the RX path KPI
	1. remove the extra invalidate in RX path as
	we no longer dirty the RX TLV cache lines.
	we now store the rx error codes in nbuf cb instead
	of RX TLVs reserved memory bytes.

	2. with features like flow tag and wds extended mode
	enabled by default, the rx_fast_flag is always set
       	to false, this resulted	in lot more instructions
       	being executed in RX path.
	Now we ensured this flag is at least set for other
	features which are not enabled by default.

Change-Id: I04c6bdc52a2b3f1248b822a108d8bd1a70abcc7c
CRs-Fixed: 3406505
2023-03-30 02:32:40 -07:00
Kiran Venkatappa
7c49c2a5eb qcacmn: Add memory debug disabled version for __qdf_nbuf_alloc_ppe_ds
On some profiles memory debug is disabled. Add memory debug disabled
version to fix compilation error on such profiles.

Change-Id: I1ea99767a02e9b2e919cb1892c5d9ecbf04d470a
CRs-Fixed: 3442812
2023-03-29 09:45:34 -07:00
Sushant Butta
970718a889 qcacmn: Fix for HE info in Radio tap header
rx_user_stats were used to update HE info in
Radio tap header, but HE info is stored at ppdu level
stats.

So changes are done to update HE info using ppdu level
stats.

Change-Id: I4734ee5df73d3a865a8b63a9ed28d647cc52d9f2
CRs-Fixed: 3405611
2023-03-28 11:31:58 -07:00
Sushant Butta
b0fc42c8f8 qcacmn: Fix incorrect datarate in radiotap header
The datarate for Data packets and QOS NULL packets,
shown in the Radiotap header was wrong for QCN9224.

In Lithium based devices, for data packets datarate
is not included in the radiotap header.
So for WKK also changes are done to not to include
data rate.

Change-Id: I3fa8a65973e3e0b01ef589551c6621d35b34b984
CRs-Fixed: 3408916
2023-03-23 09:08:13 -07:00
Devender Kumar
4d6c9d0ddf qcacmn: Fix iommu domain attributes compilation issue with IPA enable
When CONFIG_QCOM_IOMMU_UTIL is enable in vendor config, we have to
use new set of API's to get iommu domain attributes, and while using
__qdf_iommu_attr_to_os seeing compilation issue as some identifiers
like, QCOM_IOMMU_MAPPING_CONF_S1_BYPASS are not declare.

even when CONFIG_QCOM_IOMMU_UTIL is not enable we have dependency
on qcom-iommu-util.h file as it has some identfiers which are in use,
with or without CONFIG_QOM_IOMMU_UTIL.

Fix is to include the header file qcom-iommu-util.h which contains
the declaration of all the identifiers used in __qdf_iommu_attr_to_os
and this file is included if CONFIG_ARCH_QCOM or CONFIG_ARCH_MSM
is enable.

Change-Id: I881622c0c447331c53576ce2263c587e1f074a22
CRs-Fixed: 3419264
2023-03-20 19:02:28 -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
Kenvish Butani
4c88b99fe7 qcacmn: Add support of HW Link ID
Add support of HW Link ID in PeerMetaData.
Retrieve the HW Link ID in both Rx per packet
path and RX Error path, store it in nbuf cb.
Use the stored value from nbuf while updating
MLO peer link statistics.

Change-Id: I11596d44fe8557af568fd399d0c0a04d2b887b2a
CRs-Fixed: 3397721
2023-03-08 07:42:49 -08:00
Himanshu Batra
2c0ca85f39 qcacmn: Add API to fetch ml_peer_valid field from skb cb
Add API to fetch ml_peer_valid field from skb cb

Change-Id: Ic2bdc8dd2ae03dad6f0234920c1312f234bc4339
CRs-Fixed: 3423453
2023-03-06 23:32:57 -08: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
jinbaoliu
2c76bff9c5 qcacmn: Fix failing to drop m-pkts from the DUT itself
The DUT should drop the mcast packet from itself when
receiving it. However, a mcast packet from the DUT
itself has been failed to be discarded due to code
refactoring. This change aims at fixing this issue.

Change-Id: Ic80aa2aeb107b7b5a1b1d88f2ee0a72e316d7fcc
CRs-Fixed: 3372169
2023-02-24 13:51:18 -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