__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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
If TX data is TCP ACK, configure TX flow index 3 in
SW2TCL data cmd ring descriptor.
Change-Id: Ibd08b13ba8f0481aa11cd9c3dc54a49cd73674fb
CRs-Fixed: 3368303
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
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
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
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
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
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
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
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
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
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
Add API to check ICMPV4 and ICMPV6 are redirect or not
This is to avoid a security breach.
Change-Id: I61e7c54c6d9279c1e7d2f316381fbc1c83ce5b4a
CRs-Fixed: 3233925
Add rssi dbm support bit for rssi_comb calculation
using parameters received from the fw.
Change-Id: Ice57ed69db74852a8b03752632bae747c043e93d
CRs-Fixed: 3183406
calculate rssi_comb and rssi per chain values using
parameters received from the fw.
Change-Id: Ide56549c7d7ee9bde609dc6764013d509f7ccac0
CRs-Fixed: 3157484
Introduce new QDF API's to handle skb and net dev handling in
os abstract code.
Change-Id: If5a460df2c6c1b4068909fed6e5b3036623c2093
CRs-Fixed: 3164916
Add handling for jumbo pkts in debug version on qdf_nbuf_unshare to
resolve false positive alarms.
Change-Id: If18f81490f145de21d01c19e868252274c7dfefa
CRs-Fixed: 3145824
Fill tx flags in radiotap header based on tx status for
tx packets capture in packet capture component.
Change-Id: I52da01a2c0677d32bfb05a1f3095a0e6df084fca
CRs-Fixed: 3132140
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