Commit Graph

363 Commits

Author SHA1 Message Date
Amit Mehta
92aea0f061 qcacmn: Fix band info update issue in error case
Currently during error process band is updated if txrx_peer is valid.
but in current logic txrx_peer was retrieved later which will always
result in condition failure and will cause band not to be update.

To fix the issue move getting txrx_peer part before band update.

Change-Id: I3ebec6d695e25c2a19304e11ec780215a26dd016
CRs-Fixed: 3648441
2023-11-03 10:07:49 -07:00
Ruben Columbus
70b5c653d0 qcacmn: set customizable rx_buffer_size
introduce custom rx_buffer_size from INI within the bounds of
2048-4096

Change-Id: I17ad727cea74fc559d6407d3c8662cb6a4cd6b0a
CRs-Fixed: 3631271
2023-10-10 19:37:37 -07:00
Ruben Columbus
4a7db7f38e qcacmn: revert 2 gerrits from 4k ini change
This reverts commit Icd1bbe85182d6baf1e25dceed0b45994aa9f55fc.
This reverts commit Id00c6351bf6bc1b9df5e19064b2057dadd315e9b.

- revert add rx_buffer_size to softumac case
- revert 4k skb buffer change.

Change-Id: I623b200c0c5f08f0e372629cb1c972b521c25eaa
CRs-Fixed: 3623665
2023-09-26 14:41:43 -07:00
Surya Prakash Raajen
06a7a53dde qcacmn: Add support trap protocol tagged packets for trigger
Add support to trap protocol tagged packets for the unique
metadata to send it as trigger to standby application

Change-Id: I76644477d1df2a0851472283623c1dc3dbe19b8b
CRs-Fixed: 3608436
2023-09-15 21:09:01 -07:00
Ruben Columbus
4902c68f4d qcacmn: 4k skb buffer change
add new ini to configure skb size and change it in each place its used
correspondingly

Change-Id: Id00c6351bf6bc1b9df5e19064b2057dadd315e9b
CRs-Fixed: 3584462
2023-09-13 14:19:51 -07:00
Pavankumar Nandeshwar
978f044cfb qcacmn: Move the rx err handling API inside build flags
Move the rx err handling API inside build flags to avoid
compilation issue.

Change-Id: I41839bf2f1ee4681bcead9b8291a514e26cd7c8c
CRs-Fixed: 3605183
2023-09-04 06:21:44 -07:00
Tallapragada Kalyan
3d0b34dab2 qcacmn: Add a WAR to free a regular msdu in REO Exception ring
SW WAR added in REO exception ring handling where only a
link descriptor is expected but HW gave a regular buffer.
instead of asserting, the WAR will simply free the nbuf
and return the descriptor to free pool.

Change-Id: I1871f0b52afaf2f1755fab51b592d89a67ad95c8
CRs-Fixed: 3530621
2023-08-31 11:01:19 -07:00
Amit Mehta
fcf4ae51f3 qcacmn: Add changes to update band info in nbuf cb
Add changes to update band info into nbuf cb for
connectivity logging.

Change-Id: Iec5e91fe6b39a9a0f8a7a37d4945914d7a9e748f
CRs-Fixed: 3571823
2023-08-25 18:06:06 -07:00
Pavankumar Nandeshwar
ad866ad37f qcacmn: Avoid asserts in dp related to HW interactions
Avoid asserts in data path which related to HW interactions
and instead use work arounds.

Change-Id: I86089d21c5be23784f8a077b085f3f3b8a2308e4
CRs-Fixed: 3564940
2023-08-23 10:33:18 -07:00
Amrit Sahai
f223bd29ee qcacmn: Add support for to_stack at link level
Add support for to_stack at link level

Change-Id: I794a1bd8ef78a3af15f006ac3306b1c9b23e457d
CRs-Fixed: 3571870
2023-08-18 18:10:07 -07:00
Amit Mehta
ca46c1b02d qcacmn: Add changes to get link_id in reo error path
Add changes to get link_id in reo error path.

Change-Id: Ia0ac59318b992be97be5ae15a8e111a730866609
CRs-Fixed: 3566184
2023-07-24 15:51:19 -07:00
Amit Mehta
725454258b qcacmn: Add additional stats to dp_dev
Add additional stats to dp_vdev:
	1. tx. fragment_count
	2. rx.duplicate_count
	3. rx.fragment_count

Change-Id: Ib9fec3b5e7733bbdda09ae5598a092072ebaaee4
CRs-Fixed: 3554690
2023-07-11 12:49:22 -07:00
Nirav Shah
a4610e3cf6 qcacmn: Use correct txrx_peer in dp_2k_jump_handle
Use correct txrx_peer in dp_2k_jump_handle to
avoid NULL pointer dereference.

Change-Id: I7b044f506fdc51fdc122ee16f253afc880bd74f8
CRs-Fixed: 3503645
2023-06-18 23:38:37 -07:00
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