Commit Graph

994 Commits

Author SHA1 Message Date
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
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
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
Tallapragada Kalyan
44e4444e61 qcacmn: create qdf_nbuf_cb definition for win and mcc
WIN and MCC shared a common definition od qdf_nbuf_cb
considering that there are various fields which are
not common it is decided to have 2 different definitions
for WIN and MCC. in case of WIN he per pkt cycles will
be significantly reduced in RX path.

CRs-Fixed: 3257879
Change-Id: I5d3fa7c91592afb905702f2dca49972be89664e3
2023-02-20 10:39:00 -08:00
Meng Yuan
fadf69f0d9 qcacmn: fix uninitialized array elements issue
Fix the issue about using uninitialized array elements.

Change-Id: I400fae1283bdee34c2e455aae21e0d3bb122a928
CRs-Fixed: 3394984
2023-02-20 07:06:09 -08:00
Meng Yuan
855b4f9fec qcacmn: Fix wlan build error in qcacmn
Fix the error: 'LINUX_VERSION_CODE' is not defined
 in i_qdf_ipa_wdi3.h:31:6.

Change-Id: Ic2ed7908d3bc5191e0cd4049c68f6d11ab10dfea
CRs-Fixed: 3335578
2023-02-20 07:05:58 -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
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
Jinwei Chen
b4f81eace0 qcacmn: Set TX flow queue for TCP ack
If TX data is TCP ACK, configure TX flow index 3 in
SW2TCL data cmd ring descriptor.

Change-Id: Ibd08b13ba8f0481aa11cd9c3dc54a49cd73674fb
CRs-Fixed: 3368303
2023-01-30 01:34:05 -08:00
Amit Mehta
1db627cc73 qcacmn: Distinguish EAPOL-Key msg 4/4 from 2/4 based on Key Nonce
IEEE 802.11be adds the MAC Address KDE into the EAPOL-Key msg 4/4 when
MLO is used and as such, the previously used check for Key Data Length
value 0 is not sufficient for recognizing the EAPOL-Key msg 4/4 anymore.
Also check for an all zero Key Nonce value since that field is supposed
to be zero in EAPOL-Key msg 4/4 and it has to be a random value in
EAPOL-Key msg 2/4.

Change-Id: Iafb2f0e59a3fd52fa47317f8f3daff3f115271d1
CRs-Fixed: 3380806
2023-01-20 22:11:56 -08:00
Mohammed Ahmed
e1de611cdd qcacmn: add SSR host log collection API
Current code does not have functionality to collect host driver logs
upon SSR.
Fix this by adding host log collection API for SSR case.

Change-Id: I2bb848e59ad87da52446fcb8d18367c1b0768cf9
CRs-Fixed: 3339916
2023-01-19 18:41:07 -08:00
Amit Mehta
7e50aa48ab qcacmn: Log additional EAPOL packets
Add changes to log additional EAPOL packet types.

Change-Id: I02f1de89f7e0fcf68cea20208df1ed153126852d
CRs-Fixed: 3370979
2023-01-11 06:53:40 -08:00
Pavankumar Nandeshwar
fd6fed3e07 qcacmn: Cleanup the tx desc cleanup logic
Cleanup the tx desc clean up logic used in
direct switch and umac reset cases.
The excess code being removed tries to
get the next descriptor address in boundary
conditions is not useful, as the descriptor
extracted this way will be overwritten
immediately in the beginning of next iteration
of the loop.

Change-Id: Ibcd873719929b94147152ff48205774d3ed4f452
CRs-Fixed: 3371831
2023-01-10 05:31:53 -08:00
Sai Rupesh Chevuru
88dd4c6970 qcacmn: IGMP leave message handling in MLO MCAST
IGMP leave message handling in MLO MCAST scenarios.

Change-Id: Ic0ac16dbe75b4ef2b27e97be3f42c498b503ca06
CRs-Fixed: 3359488
2023-01-06 00:28:12 -08:00
Asutosh Mohapatra
1ade380fc3 qcacmn: Use mac_addr pointer as constant
Use mac_addr pointer as constant in wlan_hdd_ml_sap_get_peer,
hdd_set_mld_address and use the same for consecutive APIs.

Change-Id: I3ab7b0f3c03e9175c62179029efb53fb9fe75277
CRs-Fixed: 3342115
2023-01-02 15:01:22 -08:00
Tallapragada Kalyan
36ed11fcdd qcacmn: save flow related fields from TLV to SKB CB
flow related fields like flow_idx_invalid and
flow_idx_timeout are needed to send the packet
to PPE_VP hence need to be saved in SKB CB

CRs-Fixed: 3359237
Change-Id: I2166566c53641f6569f69ff316d1bafb67a828d0
2022-12-26 22:50:09 -08:00
Nanda Krishnan
97f88fb874 qcacmn: New Alloc API for DS
Requirement:
In skb recycler, if recyler module allocates the buffers
already used by DS module to DS, then memzero, shinfo
reset can be avoided, since the DS packets were not
processed by SW (host).
Hence, we will achieve good KPI with less CPU
utilization.

Fix:
Implemented an new qdf wrapper API qdf_nbuf_alloc_ppe_ds
in wifi driver, which in turn invokes
__netdev_alloc_skb_no_skb_reset API to linux module.
With the use of new netdev_alloc API shinfo reset
will be avoided for DS used buffers alone.
Skb recycler changes are delivered already via
4360331

Change-Id: I3fe8dc07ca12c01136eaee4fcdb1ff6036f80f74
CRs-Fixed: 3350807
2022-12-26 03:23:57 -08:00
Tiger Yu
ba6c61a462 qcacmn: Remove the export symbol for static variable and function
Fix the compiling issue by removing the export symbol for static
qdf_timer_clean and mem_debug_disabled.

Change-Id: I01f886e04af2f294ed9cb93afdbb69d7d8b9f2ee
CRs-Fixed: 3363506
2022-12-22 07:04:24 -08:00
Jeff Johnson
161c891e60 qcacmn: Add qdf_napi_disable() abstraction
Linux API napi_enable() is abstracted, but napi_disable() is not.  Add
an abstraction so that all of the native NAPI API calls in HIF can be
changed to use QDF abstractions.

Change-Id: I26e4c1d301dc6744be19b3f4142542aefe0e6fec
CRs-Fixed: 3364272
2022-12-21 13:54:58 -08:00
Jeff Johnson
49e3273400 qcacmn: Support upstream 6.1 NAPI changes
Commit b48b89f9c189 ("net: drop the weight argument from
netif_napi_add") was introduced in Linux 6.1.  As described by the
subject, this removes the weight argument from netif_napi_add().

This was preceded in Linux 5.19 by commit 58caed3dacb4 ("netdev:
reshuffle netif_napi_add() APIs to allow dropping weight") which added
new APIs to call when a non-default weight wishes to be sent.

QDF function __qdf_netif_napi_add() is the abstraction of
netif_napi_add(). Update the implementation of this abstraction to
call either netif_napi_add() or netif_napi_add_weight() based upon
kernel version.

Change-Id: I4817614408c6eb2d4741444efc9db3a79a200550
CRs-Fixed: 3364271
2022-12-21 13:54:49 -08:00
Jeff Johnson
69cd76d3ad qcacmn: Cleanup QDF NAPI ENHANCED_OS_ABSTRACTION implementation
Currently the ENHANCED_OS_ABSTRACTION implementation of some of the
NAPI QDF APIs are directly calling Linux native APIs rather than
calling the __qdf static inline abstraction APIs.

An upcoming patch modifies the static inlines to handle changes made
to the NAPI APIs in Linux kernel versions 5.19 through 6.1, so update
the ENHANCED_OS_ABSTRACTION implementation to use the static inlines
so that the version-specific changes only need to be made in one
place.

Change-Id: I90473a8495e923c65d4e390057c421b6fc60f170
CRs-Fixed: 3364270
2022-12-21 13:54:39 -08:00
Xiaoning Ma
4b313c5aac qcacmn: Fix compile issue for WLAN_QCOM_VA_MINIDUMP
Add missing header file to avoid compile issue when
WLAN_QCOM_VA_MINIDUMP is enabled.

Change-Id: I2d413560f4cf6a5f9e6cce73d8aee723e963104c
CRs-Fixed: 3356409
2022-12-14 23:15:53 -08:00
Yeshwanth Sriram Guntuka
9fc190e537 qcacmn: Remove QMI QDF abstraction APIs
Remove QMI QDF abstraction APIs as QMI is now
added as a non converged component.

Change-Id: I91acd4560d456396aaebdbfbd82f71bf5c2ed4f6
CRs-Fixed: 3349631
2022-12-03 22:19:58 -08:00
Jia Ding
19a0237072 qcacmn: Properly declare nbuf smmu map unmap
With NBUF_MEMORY_DEBUG=n and IPA_OFFLOAD=y, below errors are seen.

qdf/linux/src/qdf_nbuf.c:943:12: error: no previous prototype for function
'qdf_nbuf_smmu_map_debug' [-Werror,-Wmissing-prototypes]

qdf/linux/src/qdf_nbuf.c:955:12: error: no previous prototype for function
'qdf_nbuf_smmu_unmap_debug' [-Werror,-Wmissing-prototypes]

Currently above two APIs are only declared with NBUF_MEMORY_DEBUG=y.
Checking their definitions, could see that they have two variants
with NBUF_SMMU_MAP_UNMAP_DEBUG=y|n and they should only be valid
with IPA_OFFLOAD=y since IPA API is referenced in them.

Hence properly declare qdf_nbuf_smmu_map_debug() and
qdf_nbuf_smmu_unmap_debug() so that they're only valid with
IPA_OFFLOAD=y. With that, two variants are still kept.
With NBUF_SMMU_MAP_UNMAP_DEBUG=y, smmu map and unmap operations
are tracked. With NBUF_SMMU_MAP_UNMAP_DEBUG=n, no trackings are
maintained.

Change-Id: I83b08b1152d98b3efed3e52e564af0ebfbe5a7f7
CRs-Fixed: 3348594
2022-12-02 20:08:16 -08:00
Jeevan Kukkalli
b0b3b2a793 qcacmn: Validate nbuf while processing MPDU/MSDU level TLVs
nbuf could be freed when some error conditions are hit so
always validate nbuf while processing MPDU/MSDU level TLVs.

Change-Id: I5e0756bc8ba0a8c68c6ce8d2886b5b63068626a0
CRs-Fixed: 3318966
2022-11-26 17:40:21 -08:00
Roopavathi Lingampalli
edc0d60122 qcacmn: Add new QDF API's to handle napi requirements
Add new QDF API's to handle napi, softirq related handling
in rx thread and rx refill thread.

Change-Id: I0f371c89e65d8b20f059c56097bac07ec1e19cc9
CRs-Fixed: 3341804
2022-11-25 16:32:44 -08:00
nobelj
88f6945a63 qcacmn: fix copyright comment
fix copyright comment

Change-Id: I3e823c0846a00f43471e902fd5d491adb592342e
CRs-Fixed: 3317602
2022-11-25 14:33:17 -08:00
Neha Bisht
5d0b7ea33f qcacmn: Create a list of skbs to be freed at once
Create a list of skbs to be freed at once in dp tx completion path

Change-Id: I42129b4306206f7224ceabc87d07e2a87b8fcab6
CRs-Fixed: 3274945
2022-11-25 12:35:45 -08:00
Devender Kumar
ef32f35aed qcacmn: Fix for Header File inclusion
Compilation is failing due to Missing definition
of KERNEL_VERSION as the Header file is added
before including <linux/version.h>.

Fix is to move the Header file at the end.

CRs-Fixed: 3338337
Change-Id: I83fc448becc4af81df9b4c7b3fe9193875c7f6f1
2022-11-25 00:08:34 -08:00
jinbaoliu
161650dffa qcacmn: Fix failing to distinguish between EAPOL M2 and M4
Currently we distinguish EAPOL frames by taking the secure bit in key
information field into account. This is sometimes error because for WPA
handshake M3/M4 secure bit is 0 (GTK is not included in M3) whereas for
WPA2 handshake M3/M4 secure bit is 1 for WPA2 handshake. This change uses
the ack bit in key information field to differentiate M1/M3 from M2/M4,
then uses the key data length as well as Key Mic and Encrypted Key Data
in key information field together to identify EAPOL M2 and M4 frames.

Change-Id: Iac88bc5b942415edee08dc4a98dbd4e811cb8604
CRs-Fixed: 3327876
2022-11-23 23:40:03 -08:00
Yeshwanth Sriram Guntuka
1d310855fa qcacmn: Add QMI module id
Add module id for QMI.

Change-Id: I44f363b45a6e43ebdf9a43ca266694e6e832f87b
CRs-Fixed: 3338288
2022-11-19 05:48:08 -08:00
Pavankumar Nandeshwar
d1ff8e1e65 qcacmn: Enable tx descpool clean up logic for ppe ds
Enable tx descpool clean up involving buffers cleanup
for ppe ds feature.

Change-Id: Iedefd312b58266e7a21978931838264518bc3d1e
CRs-Fixed: 3313738
2022-11-16 11:51:00 -08:00
Sushant Butta
9a6e6ec056 qcacmn: Enhancements of SKB Frag Debug Framework
Enhancements of SKB Frag Debug Framework as per
Waikiki monitor architecture.

Change-Id: Iea336348c0c4f6a5f40ea16777298dd529870aee
CRs-Fixed: 3300916
2022-11-11 03:55:57 -08:00
Jeff Johnson
6487fc4371 qcacmn: Fix misspellings of "whether"
The following change introduced misspellings of "whether", so fix
them.
- Change-Id I50b747710eb3c49eab60c81bbc61e75e2f8650ed
  qcacmn: Handling of IGMP packets in MLO Multipass

Change-Id: I09891388e45a210457d46fb3528efdd5a32905dd
CRs-Fixed: 3319323
2022-10-26 02:53:22 -07:00
Jeff Johnson
b24581bf28 qcacmn: qdf: Rename misspelled "suppressed" variables/functions
Multiple QDF rate limit identifiers use a misspelling of the word
"suppressed" so fix those misspellings. For two public functions
create macros with the old names to avoid breaking existing clients.

Change-Id: I0107b157374046ab8f3467801563c02f0f2651fa
CRs-Fixed: 3313685
2022-10-25 20:10:31 -07:00
vijaraj
d5104c49a5 qcacmn: Modify qdf_eapol_pkt_type_to_subtype() to log EAPOL Start
In the api qdf_eapol_pkt_type_to_subtype(), the EAPOL start
packet is not logged to userspace.

Modify the api qdf_eapol_pkt_type_to_subtype() to support
EAPOL Start logging

Change-Id: Ic985a3f6713d298ae04559a897312fdbadb57275
CRs-Fixed: 3311616
2022-10-21 01:29:42 -07:00
Vishal Miskin
d7ab161dea qcacmn: Add qdf wrapper for hrtimer_add_expires
hrtimer_add_expires added to update absolute timer expiry

Change-Id: Ie2b59322dfd02c22a8082a519b76a0f610adbd44
CRs-Fixed: 3277993
2022-10-20 23:48:51 -07:00
Sai Rupesh Chevuru
ef34b5b9ab qcacmn: Handling of IGMP packets in MLO Multipass
Due to the CCE rule in QCN9224 IGMP packets will be routed
to err ring. When multipass is enabled, perform multipass processing
before handing over the packet to stack.

Change-Id: I50b747710eb3c49eab60c81bbc61e75e2f8650ed
CRs-Fixed: 3275888
2022-10-20 06:10:52 -07:00
Jeff Johnson
61db6e2df1 qcacmn: qdf: Fix additional misspellings
Fix additional misspellings introduced since the last spelling
cleanup.

Change-Id: I04fc6b49c1876b80bdc3547cc50ad7f1e8ad00f2
CRs-Fixed: 3314151
2022-10-18 01:42:44 -07:00