Commit Graph

350 Commits

Author SHA1 Message Date
Amit Mehta
34497ea2d1 qcacmn: Add changes to get link ID in Tx/Rx Path
Add changes to get link ID in Tx/Rx Path

Change-Id: I6b52093697b138e5a5d3878af2dd8db0d65cc488
CRs-Fixed: 3450541
2023-05-28 09:28:46 -07:00
Bing Sun
415a9c3a40 qcacmn: Free every nbuf in the list before reset the list
nbuf is queued to head_nbuf in dp_rx_reo_err_entry_process. Before
reset head_nbuf, free all the nbuf queued to head_nbuf. Otherwise
there is nbuf memory leak.

Change-Id: Ib4bd64b51d750dac972298ddc46acd4294f2ed81
CRs-Fixed: 3449992
2023-05-24 14:28:40 -07:00
Kenvish Butani
0df4b5eaea 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: I1c9e6e767bbf6565567d998ae8e1357398de5803
CRs-Fixed: 3486304
2023-05-24 05:19:41 -07:00
Yu Tian
fc12609405 qcacmn: Add bit mask control for special frame deliver
Add bit mask control for special frames deliver in error
path.

Change-Id: I9f30e53028bf75d02578e5132f62b15ea480d1bd
CRs-Fixed: 3457564
2023-05-16 17:33:38 -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
ba2e146b5a qcacmn: Add fix to update msdu start bit and other bits in nbuf
Add fix to update msdu start bit and other bits in network buffer.

Here is the list of bits set in network buffer
	a. msdu start bit,
	b. msdu end bit,
	c. packet is MCBC and da bit is set
	d. da valid bit is set
	e. sa valid bit is set

Change-Id: I2abf346de36a7f5ac7f86b33615145bb02065dc2
CRs-Fixed: 3479230
2023-05-05 11:34:44 -07:00
Jinwei Chen
58b1c384df qcacmn: Fix skb memory leak in RX REO error path
If host receive REO error code 0 - NULL REO queue descriptor from
REO exception ring, it will be raw data and likely spread across
multiple msdu buffers for amsdu packets. in this case, only the
last msdu will contain the valid rx msdu length, but currently host
use msdu length from head skb (msdu length is 0), then the sub-skbs
followed after head skb will be leaked as following,
(1) dp_rx_sg_create() fail to add sub-skbs into frag_list of head_skb,
then sub-skbs still exist in head_skb->next.
(2) As peer_id is not valid, dp_rx_null_q_desc_handle()->
dp_rx_chain_msdus_be() will configure head_skb->next = NULL during
DP_RX_LIST_APPEND, then all sub-skbs get leaked.

Get msdu length from last skb and overwrite it in head_skb, then
dp_rx_sg_create() will process all skbs correctly.

Change-Id: I1953afb4e3b44450ff5e8269ef0f4f0c38e1d446
CRs-Fixed: 3476534
2023-04-27 04:08:20 -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
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
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
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
Kenvish Butani
1e6fe4c3a2 qcacmn: Enable MLO Link Stats Support
1) Enable MLO Link Stats Support
2) Add Stats counter to capture Invalid Link ID
3) Fix the FW Recovery crash while ol_stats
   disable.

Change-Id: I1b5263ae024579c5ec2018f8082f0d03ffdf0030
CRs-Fixed: 3431319
2023-03-22 05:58:57 -07:00
Kenvish Butani
bad3898323 qcacmn: Ini and Config command Support for MLO Link Peer Stats
Add support to enable/disable MLO Link Peer stats through
ini and cfg80211tool enable_ol stats command

Change-Id: Id1229a149befa416d060e1b07eee150e6b295abf
CRs-Fixed: 3397721
2023-03-08 07:43:00 -08: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
Kenvish Butani
3243b9e4f4 qcacmn: Add Support of Rx Err MLO Link Stats for ML Peer
Add Support to update Rx Error path, MLO Link stats
for ML Peer

Change-Id: Ie5000d0d30a41fa69c86259bae0fd7a8094bddf7
CRs-Fixed: 3397721
2023-03-08 07:42:07 -08:00
Jeff Johnson
3cbfba9824 qcacmn: Fix dp wifi3.0 documentation
The kernel-doc script identified a large number of kernel-doc issues
in the dp/wifi3.0 folder. A series of patches have addressed most of
the issues, so now fix the remaining issues. Just like in the previous
patches, there are a number of instances where public functions have
their implementation documented instead of having their interface
documented, so make sure that the interfaces are documented.

Change-Id: I4bc39b0e1a9d8c264b72ec6db76ff7e92d24f277
CRs-Fixed: 3373822
2023-02-13 18:39:57 -08:00
Kenvish Butani
2fbc8c8ab0 qcacmn: Optimize DP Rx Error Handling (Part-1)
1) In WBM2SW Rx Error path, code to reap and
the process the HAL descriptor is split into
BE and LI architecture specific functionality
in dp_be_rx and dp_li_rx files respectively.
2) The function to handle Null Queue desc.
error for WBM and REO Rx Error path is split
into BE and LI architecture specific
functionality in dp_be_rx and dp_li_rx files
respectively.

Change-Id: Ic51a9742f65cee677ed7f3081f49fb3ece5b42f1
CRs-Fixed: 3356179
2023-02-07 07:00:22 -08:00
Jinwei Chen
c4db9c63b8 qcacmn: remove raw mpdu check in dp_rx_reo_err_entry_process
Raw mpdu check in dp_rx_reo_err_entry_process() is introduced
from change "Free the raw mode mpdus in REO error ring",
it is fixing the low memory issue during MLO STA T-put test
which reports REO error code 0 - HAL_REO_ERR_QUEUE_DESC_ADDR_0
frequently.
this introduce regression for SAP certification case 4.3.3.1.

it seems REO error 0 is hard and not expected to be reproduced
during MLO STA T-put test, remove the raw mpdu check in
dp_rx_reo_err_entry_process() to not block SAP certification.

Change-Id: I509e80eb38d57f20b24c32ba1da2ad7132358030
CRs-Fixed: 3387453
2023-02-07 04:55:44 -08:00
KARTHIK KUMAR T
31278694e1 qcacmn: single dev reinject cleanup
single dev reinject cleanup in DP

Change-Id: I2376a17ac5e850ca21db83714124fd0ccf62243d
CRs-Fixed: 3359180
2023-02-07 04:55:31 -08:00
Rakesh Pillai
6414ec0d33 qcacmn: Enhance NULL peer debug log in WBM error handler
Currently the debug log for NULL peer, just gives
the REO error code info, which may not be relevant
if the error source is not REO.

Dump both REO and RXDMA push reason and error code
if NULL peer is encountered in WBM error handler.

Change-Id: I95dabb8c9de1bf95081ccb389805d3ef3376915a
CRs-Fixed: 3374313
2023-01-10 05:32:04 -08:00
Chaithanya Garrepalli
720568a65d qcacmn: For fast recycle case invalidate TLV header
In case of fast_recycled is set we can avoid invalidating
the complete buffer as it would have been invalidated
by tx driver before giving to recycler.

But we need to still invalidate rx_pkt_tlv_size as this
area will not be invalidated in TX path

Change-Id: I9e5202d8b251a5d59117609a705a311e499d05b0
CRs-Fixed: 3332713
2022-11-13 12:13:44 -08:00
Rakesh Pillai
927771f08c qcacmn: WAR for incorrect indication of first_msdu_in_mpdu
Currently the mdpu_desc_info from the msdu buffer tlvs,
for 2K-jump or OOR errors, if its the first-msdu-in-mpdu.
But if this flag is incorrectly indicated, there is a chance
of decoding garbage data and accessing invalid/NULL memory area.

In order to mitigate the above mentioned issue, add a sanity
check to determine if the first-msdu-in-mpdu has been processed
once and process/drop subsequent msdus based on this flag. This
flag also helps in handling cases, where first-msdu-in-mpdu
is indicated incorrectly for multiple msdus in an mpdu.

Change-Id: I990301d5a101dc7aa71303420bf49ab6fcee27c6
CRs-Fixed: 3325334
2022-11-07 18:44:17 -08:00
Chaithanya Garrepalli
86f7649e19 qcacmn: gracefully handle error packets on partner soc
Ideally in MLO, Rx buffers should be routed to error
rings of the SOC which owns the RX buffer or link desc
incase of any error or fragment

But in case of HW issue if the packets are routed to
partner soc. Handle gracefully instead of assert

Change-Id: Ia56188808dfd034e960e1c1345de8f760e4b05f1
CRs-Fixed: 3327959
2022-11-07 14:58:21 -08:00
Yu Tian
aa6032dba5 qcacmn: Use rate limit print for BAR frames
Use rate limit print for BAR frames to in avoid of
slow processing when BAR flood happens.

Change-Id: I92063787501c8f6467a211bd2695108a9fe42724
CRs-Fixed: 3325043
2022-11-07 13:10:30 -08:00
Sai Rupesh Chevuru
692be85e20 qcacmn: Forward 4 addr eapol frames to hostapd
Forward the 4 addr eapol packets received in
dp_rx_process_rxdma_err() to osif stack instead of network stack.

Change-Id: I1d8ff065096844ebe61974329754e54fc9d28640
CRs-Fixed: 3323480
2022-11-04 15:24:21 +05:30
Azmath Mohammed
66a71fac21 qcacmn: Add pdev valid check
Add pdev valid check to avoid dereferencing of pointer

Change-Id: I5936797895e250cb6cea3087f273e7631223bc88
CRs-Fixed: 3320380
2022-10-28 04:59:04 -07:00
Chaithanya Garrepalli
65ccbf611c qcacmn: Add assert for RBM id in REO error
On REO error ring only fragments should be
received and for MLO case fragments are not
supported we should not see any entries from
partner soc

Hence adding the assert to catch this case

Change-Id: I908b2dec88ec7f23fcd963d0c71515dee8865b71
CRs-Fixed: 3317715
2022-10-22 01:50:38 -07:00
Sai Rupesh Chevuru
12c8b0d0be qcacmn: compact tlv support for QCN9224
Adding compact tlv support for QCN9224, As part of this change
Rx tlv size will reduce from 384 bytes to 128 bytes.

Change-Id: I3f42a781e42b2e696a5b25d9c5f333c8cc83b7fe
CRs-Fixed: 3274152
2022-10-14 23:42:02 -07:00
Rakesh Pillai
21bce3501c qcacmn: Access mpdu start tlv only for first msdu-in-mpdu
Currently the mpdu level flags/values are obtained
from the MPDU_START tlv of each msdu, when processing
in the RX error path.

The MPDU_START tlv is valid in an msdu only if it is
the first msdu-in-mpdu and will not be valid for all
the subsequent msdus-in-mpdu.

Accessing and using the incorrect values from the
MPDU_START tlv leads to unwanted exception/behaviour.

To fix the above mentioned issue, cache the mpdu level
information from the tlv when processing the first
msdu-in-mpdu and use it for the processing of the
subsequent msdus from the same mpdu.

Change-Id: Ic0b47716d3d428bb0b536c4ee23c1392f183d1fe
CRs-Fixed: 3306327
2022-10-13 01:02:57 -07:00
Jeff Johnson
ebfbc0d927 qcacmn: dp: Fix misspellings
Fix misspellings in dp/...

Change-Id: I6ef7a19ee03104ae38a8a77e229b90aa80329592
CRs-Fixed: 3304682
2022-10-07 22:42:22 -07:00
Ripan Deuri
cb33f7e1d3 qcacmn: Acquire lock before calling rx tid setup
The rx tid setup function is called from multiple contexts.
Acquire lock before calling that function to avoid race condition.

Change-Id: I7a0443e5e09a068301de171afeb4d400bf54b1c8
CRs-Fixed: 3291079
2022-09-30 04:26:34 -07:00
Prakash Manjunathappa
60c0c089cd qcacmn: Free the raw mode mpdus in REO error ring
Raw mode mpdus in REO end up resulting in NULL_QUEUE_DESCRIPTOR error.
Raw mode mpdus are not expected in REO, free them without further
processing.

Change-Id: Ica920caecf90a1107ce17836051e1019c9dfc994
CRs-Fixed: 3282836
2022-09-23 10:23:44 -07:00
Tallapragada Kalyan
f3d7c5cd52 qcacmn: perform length sanity check for all chipsets
length sanity check is now performed for all the chipsets
in RX error path

Change-Id: I2a2c136d29319a463908c0f5cdbc463fc5a38bca
CRs-Fixed: 3290123
2022-09-20 23:26:50 -07:00
Sai Rupesh Chevuru
74dfcfa989 qcacmn: Handling of raw frames in mesh mode
In order to handle raw frames in mesh mode pass the valid
txrx_peer to dp_rx_process_rxdma_err()

Change-Id: I24c697c8e55533ecc6ff1992c0da7bf101c8d6cc
CRs-Fixed: 3281431
2022-09-14 00:41:10 -07:00
Pavankumar Nandeshwar
67de6bcbfd qcacmn: Handle Umac post reset at host
Handle Umac post reset and post reset complete
events from firmware.

Change-Id: I76ac1b96f01f026535d31edcbd245b3643ecf6ee
CRs-Fixed: 3267222
2022-08-21 00:37:46 -07:00
Yu Tian
226e9258ba qcacmn: Add force break quota for REO error ring process
In some conditions REO error ring may have RX flood, but
there is no force break scheme for that ring process. This
leads to starvation of RX refill buffer ring and then FW
crashes due to no refill buffer. Change is aimed to force
break of ring processing and refill buffers in small batch
count.

Change-Id: I3c543ebb16bd1709e782be759c9063a356a96562
CRs-Fixed: 3262685
2022-08-14 21:58:06 -07:00
Sai Rupesh Chevuru
086f192c0a qcacmn: Forward the igmp packet for intra bss processing
Forward the igmp packet for intra bss processing

Change-Id: Ie4838a00542e49e8d76503297332b99cf3e67563
CRs-Fixed: 3261921
2022-08-12 16:46:59 -07:00
Sai Rupesh Chevuru
ceccc982e3 qcacmn: Get the peer meta data from msdu end tlv
In QCN9224 fetch the peer meta data from the msdu end tlv
instead of MPDU start

Change-Id: Icd9420cd83e06abe5e54e9e05cc8cbf8d8312ae1
CRs-Fixed: 3245626
2022-08-10 01:18:45 -07:00
Amit Mehta
7e799fcbae qcacmn: Fix Rx packet logging issue
Currently while sending nbuf to rx fate logs
we are not removing rx tlv before sending nbuf
to logger which is causing issue of incorrect
packet type issue.

To Fix issue make changes to make sure that
rx tlv is removed and nbuf length is set

Change-Id: Ib56c8e009398b3410c43be910feb4048bfb06b54
CRs-Fixed: 3241828
2022-07-24 23:07:50 -07:00
Namita Nair
ec77b33cd4 qcacmn: Rate limit PN error handle message
Currently, the PN error message is logged with
QDF_TRACE for every occurrence of PN_CHECK_FAILED
or PN_ERROR_HANDLING_FLAG_SET. This causes a crash
due to excessive logging when there is a high number
of PN errors. Hence rate-limit this message.

Change-Id: I57bc3401ba8239151f0791040c649d372ec0a953
CRs-Fixed: 3236492
2022-07-08 14:48:00 -07:00
David Oladunjoye
5c6ac7b887 qcacmn: dp: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: I443da8d7f5e1771dceb3386c4458b0da6a5e9476
CRs-Fixed: 3218236
2022-07-07 00:52:07 -07:00
Rakesh Pillai
4b31289715 qcacmn: Skip sanity of sw_cookie in RX error for KIWI
Currently the sw_cookie is validated in RX error path
using the pool_id logic, which is not valid for KIWI target.
Kiwi target has a different logic to assign rx sw_cookie, as
compared to other legacy chipsets.

Hence this sanity of sw_cookie fails always for RX error
packets on KIWI target, and these corresponding buffers are
never released/replenished back. Eventually as more RX error
packets are received, the device runs out of buffers in the
refill ring and induces a backpressure.

Hence disable this sanity check for sw_cookie in rx error
path for KIWI target.

Change-Id: I320fcb268c1fe24695daeb4677af6cc0cbc445ed
CRs-Fixed: 3228792
2022-06-25 03:03:37 -07:00
Amit Mehta
6b576c65bb qcacmn: Add packet logging support for initial 32 packets
Add packet logging support by registering
Rx and Tx callback functions for packet logging of
initial 32 Tx and Rx packets.

Change-Id: I91b59b7c5f65f505e3ee730c497347be28955128
CRs-Fixed: 3224881
2022-06-23 07:03:56 -07:00
Venkateswara Naralasetty
d5720bc4a3 qcacmn: Skip invalid Rx descriptor access in wbm err path
There is a possibility where host can receive invalid SW cookie
in wbm internal error path which causes invalid rx descriptor
access.

Add a sanity check on received SW cookie to prevent the invalid
rx descriptor access. Also, add sanity check for the duplicate
rx descriptors.

Change-Id: I6400cb1fc067f4bc474f2768c18c8f7ce587fbbe
CRs-Fixed: 3220371
2022-06-20 14:22:18 -07:00
Venkateswara Naralasetty
c92ceccc09 qcacmn: Fix invalid pool_id used in wbm internal error handling
Currenly pool id retrieved from the sw cookie is used in rx buffer
replenish for both buffer type and link desc type in wbm internal
error handling.

In case of wbm internal error with link desc type, pool id can't be
used for rx buffers replenish because pool id notion of rx desc is
different from link desc and this could cause out of memory access
issue.

Fix this issue by using the pool id retrieved from the msdu sw cookie.

Change-Id: I7184571e1f6a67c7266335154121b345fa12b4ab
CRs-Fixed: 3214867
2022-06-20 12:45:44 -07:00
Karthik Kantamneni
b70014489c qcacmn: Avoid invalid Rx descriptor access in error path
There is possibility of receiving invalid SW cookie
which maps to invalid rx descriptor access, to avoid such
issues validate the SW cookie before using it for fetching
rx descriptor

Change-Id: Ib90a398865c5e0afedd5804615d6df6ad5ee77f6
CRs-Fixed: 3214570
2022-06-17 13:11:11 -07:00
Amit Mehta
817418566e qcacmn: Add check for duplicate entry
Add changes to check if current descriptor which
is being process is not already reaped. In case
if the descriptor is already process and yet to
be replenished drop the descriptor and continue.

Change-Id: I2c46b7f4e50a27e2566f0ce2d9708cecb26c38e4
CRs-Fixed: 3177257
2022-06-09 05:38:03 -07:00
Shiva Sankar Gajula
5b5d4cb57a qcacmn: Handling MIC failures for QCN9224 target
For QCN9224 target, All the MIC failures are reported
as decrypt error from FW.

So, added changes to handle MIC failures for QCN9224
target .

Change-Id: I32e616e01e3cd6e76ef105d73fd8a87ce2c81cb9
CRs-Fixed: 3192749
2022-06-07 10:54:02 -07:00
Varsha Mishra
f9424745bb qcacmn: Drop 3 addr multicast in rx
Drop 3 address multicast packet on rx when vdev is
has drop_3addr_mcast enabled.

Change-Id: I726bdc9383ea6e5a052a5d754e8f48c98f9ce874
CRs-Fixed: 3163011
2022-04-27 00:50:38 -07:00