Graphe des révisions

239 Révisions

Auteur SHA1 Message Date
Prakash Manjunathappa
fb7d334b7c qcacmn: Mitigate the slab allocation failures with __GFP_DIRECT_RECLAIM
__qdf_nbuf_frag_alloc fallback allocation using alloc_skb slab
allocation, use GFP_KERNEL flag which is inclusive of
__GFP_DIRECT_RECLAIM. This will mitigate the allocation failures.

Change-Id: Ib852bf0f812839f0a99093855cebc928d0c79fd1
CRs-Fixed: 3585716
2023-08-15 00:44:52 -07:00
Karthik Kantamneni
6e1fe7f344 qcacmn: Reset nbuf data pointer properly in RX fast path handling
Currently RX nbuf data pointer is reset considering
headroom reserve size of NET_SKB_PAD. So while reattaching
buffer back to H.W always data pointer is reset back to head plus
NET_SKB_PAD offset. But if skb is not allocated with head room
reserve then we should not reset data pointer taking NET_SKB_PAD
as consideration.

Fix this by pushing nbuf data pointer back to the state when
nbuf entered the host.

Change-Id: Ie96f99fdd92deaa921619a45cd5993a42f7b8f6e
CRs-Fixed: 3582873
2023-08-10 14:42:45 -07:00
Shivam Kumar
f7142b0fd4 qcacmn: add/remove recommended error/debug print
add/remove recommended error/debug print

Change-Id: I2c5e2ed73fbc4299289b0d6c3059c514ef5052e9
CRs-Fixed: 3528661
2023-08-03 22:43:05 -07:00
Shivam Kumar
f337d69b2a qcacmn: add/remove recommended error/debug print
add/remove recommended error/debug print

Change-Id: I23075a7e5a0512ac9a5d87748f1ef75e4a799fe1
CRs-Fixed: 3528661
2023-08-03 22:42:53 -07:00
Prakash Manjunathappa
a57c1c99b5 qcacmn: Fallback to 4k slab allocation on page_frag alloc fail
In low memory conditions 32K page frag allocations via
qdf_nbuf_frag_alloc will fail, fallback and try 4k slab allocations.

Change-Id: I3c9b08af8b1cc3aa881a91338a88b736589fb4dd
CRs-Fixed: 3571487
2023-07-30 15:08:50 -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
Sai Pratyusha Magam
1ff2f1dee8 qcacmn: Fix EAPOL Drop in Big Endian mode
Fix EAPOL Drop in DP when host is running in
Big Endian mode

Change-Id: If85845c73028429333595b639b3e29231e9bc7ee
CRs-Fixed: 3515114
2023-07-12 02:27:18 -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
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
Balaji Pothunoori
c922aed7f2 qcacmn: update tx flags for radiotap header prepare
Currently radiotap header is malformed due to incorrect
tx flags update.

This change is update tx flags properly to prepare radiotap
header.

Change-Id: I0d3205b215c9fc363a71c4e7a6b54e40fb10a966
CRs-Fixed: 3442934
2023-05-25 08:09:56 -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
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
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
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
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
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
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
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
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
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
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
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
KARTHIK KUMAR T
ea38e7997e qcacmn: update RSSI specific parameters in mon pdev
Before we are updating RSSI params directly into mon_rx_status
this structure will reset every PPDU this breaks iwconfig,
wlanconfig and monitor packet RSSI values.
Fix added to storing the values in the mon_pdev.

Change-Id: I9f8fa776c65cbad84fac5e8c2f65b3fce1386e20
CRs-Fixed: 3276503
2022-10-17 16:22:51 -07:00
Jeff Johnson
3bdf954afc qcacmn: qdf: Fix misspellings
Fix misspellings in qdf/...

Change-Id: If61ee47fba94b2bb60f33ab74feda56dbe5cb7bd
CRs-Fixed: 3277902
2022-10-12 23:22:37 -07:00
Devender Kumar
736edd06a2 qcacmn: Definitions to support SMMU debug framework
To support SMMU debug framework, add new definitions
and add logic to track the mapping and unmapping of
a buffer via nbuf tracker.

CRs-Fixed: 3255423
Change-Id: I0b9e2828e6cd5e3204b6bba57af8806c4d080b32
2022-09-13 03:24:41 -07:00
Ripan Deuri
c0e0b4f1e1 qcacmn: Add QDF API to get skb timestamp in microsecond
Add QDF API to get skb timestamp in microsecond.

Change-Id: I14019e5e60599c1499285b92b8727e8d6a9bf782
CRs-Fixed: 3286751
2022-09-12 08:15:11 -07:00
vijaraj
8b843ae157 qcacmn: Enable EAPOL logging for FILS Authentication
In api __qdf_nbuf_data_get_eapol_subtype(), the EAPOL key_info
is evaluated only for SAE authentication, which result in EAPOL
logging failure for FILS authentication.

Check ACK and Secure bit in EAPOL key_info to determine
EAPOL packet irrespective of authentication protocol.

Change-Id: Ieef143d36d85cbf473b682810d658de93dbbdad2
CRs-Fixed: 3268362
2022-09-12 08:15:04 -07:00
nakul kachhwaha
ef9ad9d2d2 qcacmn: Add qdf APIs to set/get IPv4/6 TOS and TC field
Add QDF APIs to set/get IPv4/6 TOS and TC field.

Change-Id: Ie048b74bacea33e9b1c57c5561064673247ee14c
CRs-Fixed: 3207377
2022-08-16 07:40:35 -07:00
Author Amrit Sahai
dc5cc15bba qcacmn: Check ICMPV4 and ICMV6 are redirect or not
Add API to check ICMPV4 and ICMPV6 are redirect or not
This is to avoid a security breach.

Change-Id: I61e7c54c6d9279c1e7d2f316381fbc1c83ce5b4a
CRs-Fixed: 3233925
2022-08-08 00:16:44 -07:00
Neha Bisht
87596da3e4 qcacmn: Avoid qdf framework for nbuf free in Tx. simple path
Avoid qdf framework for nbuf_free in Tx. simple path.

Change-Id: Ic0a82279586a16f07625fc78d3e07d1a134af3a4
CRs-Fixed: 3224285
2022-06-29 04:31:25 -07:00
Amir Patel
ca9379b181 qcacmn: Add fraglist to skb if num_frags exceeds MAX_FRAG
Add fraglist to skb if num_frags exceeds MAX_FRAG

CRs-Fixed: 3186124
Change-Id: I3112d63276fe00aea4fce2e287650078b1573d8a
2022-05-06 16:42:41 -07:00
KARTHIK KUMAR T
1bc325d4f3 qcacmn: calculate RSSI DBM in WKIKI
Add rssi dbm support bit for rssi_comb calculation
using parameters received from the fw.

Change-Id: Ice57ed69db74852a8b03752632bae747c043e93d
CRs-Fixed: 3183406
2022-04-28 11:51:10 -07:00
KARTHIK KUMAR T
c7acbbd7ba qcacmn: calculate RSSI in DBM
calculate rssi_comb and rssi per chain values using
parameters received from the fw.

Change-Id: Ide56549c7d7ee9bde609dc6764013d509f7ccac0
CRs-Fixed: 3157484
2022-04-25 04:12:10 -07:00
Karthik Kantamneni
6380170e35 qcacmn: Introduce new QDF API's to handle skb and net dev requirements
Introduce new QDF API's to handle skb and net dev handling in
os abstract code.

Change-Id: If5a460df2c6c1b4068909fed6e5b3036623c2093
CRs-Fixed: 3164916
2022-04-22 13:19:19 -07:00
Amir Patel
6b69543b79 qcacmn: Add API to remove frag from skb
Add API to remove frag from skb

CRs-Fixed: 3172668
Change-Id: I0b392366760036c6fda545f558f72a64138d2b11
2022-04-19 05:17:19 -07:00
Harsh Kumar Bijlani
a95a769c93 qcacmn: Add handling for jumbo pkts in qdf_nbuf_unshare_debug()
Add handling for jumbo pkts in debug version on qdf_nbuf_unshare to
resolve false positive alarms.

Change-Id: If18f81490f145de21d01c19e868252274c7dfefa
CRs-Fixed: 3145824
2022-03-17 03:45:03 -07:00
Tallapragada Kalyan
7ec6dc2b01 qcacmn: Access shinfo fields only if qdf debug is enabled
Access shinfo fields only if qdf debug is enabled

CRs-Fixed: 3140011
Change-Id: Ifafeb678d7e9d469fd05da4845376a290e42c452
2022-03-06 01:26:00 -08:00
Vulupala Shashank Reddy
f4a25a4af0 qcacmn: Add support for tx flags for packet capture mode
Fill tx flags in radiotap header based on tx status for
tx packets capture in packet capture component.

Change-Id: I52da01a2c0677d32bfb05a1f3095a0e6df084fca
CRs-Fixed: 3132140
2022-03-02 01:28:21 -08:00
Mohit Khanna
4d03fcbd12 qcacmn: Check for IPV6 before checking DHCPv6
Currently we are not checking whether the packet is a IPV6 packet when
checking for a DHCPv6 packet. This can be error prone if done for a IPV4
packet.
Check for IPv6 before checking for DHCPv6.
Add QDF_NBUF_CB_PACKET_TYPE_DHCPV6 packet type in qdf_nbuf_cb.

Change-Id: Ic24dbaad8bd910c85bb1086317c12ad46466a128
CRs-Fixed: 3114311
2022-02-24 00:59:55 -08:00
Rakesh Pillai
1c6617edf5 qcacmn: Add EHT radiotap header fields
Add the EHT radiotap header definition and
support to parse these fields.

Change-Id: If988753b497cc2feb79f358afea2674effd8270c
CRs-Fixed: 3092818
2022-02-15 17:27:51 -08:00