Commit Graph

311 Commits

Author SHA1 Message Date
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
Ananya Gupta
207111647e qcacmn: Validate rx desc unmap in RXDMA err ring
Currently, in STA+Monitor mode, the first MSDU in MPDU is
unmapped and goes down. This MSDU is now processed as rxdma
err packet and crashes due to double unmap as rxdma err ring
is configured as monitor dest ring in monitor mode.
To fix this, validate rx descriptor unmapped flag in rxdma
err processing.

Change-Id: Ic503aa18e2269d8bda6aaf9b349c1ad8be11dcff
CRs-Fixed: 3175972
2022-04-26 17:28:33 -07:00
Jinwei Chen
247d541b4f qcacmn: Get Phy address for HW CC exception case
Even if HW cookie conversion is enabled on KIWI, there is some
case HW cookie conversion might not be done by HW, check the cookie
conversion done bit and get Phy Address accordingly.

Change-Id: I4ee7ed9776086812774637f07da1e4504898c3c4
CRs-Fixed: 3153433
2022-03-24 08:01:46 -07:00
Ananya Gupta
42dd66b280 qcacmn: Allow all OOR frames to deliver to stack
Few APs are sending bar frame right after sending a
packet but the packet is not received and its retry
is received with the same sequence number. As SSN
is moved ahead due to bar frame, this packet is being
dropped.
To fix this, allow all frames to get delivered to stack.

Change-Id: I17f7126c8d318415e88b037b72563cf53cb14066
CRs-Fixed: 3151908
2022-03-21 13:09:13 -07:00
Mohit Khanna
21f6f3ad8f qcacmn: Donot do PN-Check for open mode OOR frames
Currently pn-check logic for OOR frames does not take into account
the security mode. For open mode case, BE hardware does not populate
current and previous pn_numbers. Hence a PN-check comparison may yield
incorrect results.

Check for secure mode, before checking for PN numbers.

Change-Id: I398872d467058bc1ee1d04c811818ea20c5aec7e
CRs-Fixed: 3129986
2022-02-23 11:10:29 -08:00
Pavankumar Nandeshwar
70bd47772e qcacmn: Sanity check for phy addr in cb against ring_desc
Check phy addr in cb against ring_desc for sanity
in wbm rx path

Change-Id: I40dd2949993129d1da548da45160f9eace094bff
2022-02-18 15:32:02 -08:00
Jinwei Chen
9e68866ec2 qcacmn: Add reo error code 0 processing
Add REO error code 0 processing in REO error path to
handle invalid peer case.

Change-Id: Ie060987850917711c484ad9b8ce1d69e1fce1bed
CRs-Fixed: 3125131
2022-02-15 18:50:27 -08:00
Pavankumar Nandeshwar
9979d1a189 qcacmn: Initialize txrx_ref_handle for whunt bypass
Initialize txrx_ref_handle for whunt bypass,
Which is complaining use of uninitialized txrx_ref_handle,
as it is not able to detect that txrx_ref_handle is
populated from another API.

Change-Id: I0f69cf4c8442a5655559622a5825d7af35b9ae5e
CRs-Fixed: 3127788
2022-02-11 04:13:31 -08:00
Pavankumar Nandeshwar
d5a07afa5d qcacmn: WAR for invalid length buffers in wbm rx error path
WAR for wrong length in first msdu in wbm rx error path while
handling scatter gather buffers. Get the msdu length from the
last buffer instead.

Change-Id: I869391ef5ca7005dce972013679c2143be836ecb
2022-02-10 01:38:15 -08:00
Harsh Kumar Bijlani
93cd9e0af8 qcacmn: Update stats in dp_txrx_peer in per packet path
Update stats in dp_txrx_peer in per packet Tx completion and
Rx path.

Change-Id: I807cb5ca9fe2aeeabdd4cb95d6e30cb9781560f4
CRs-Fixed: 3092123
2022-02-09 11:54:46 -08:00
Pavankumar Nandeshwar
b9038e9d4e qcacmn: Move per packet stats params to txrx_peer
Move the stats parameters from the dp_peer which are used
in per packet path to txrx_peer

Change-Id: Ieb68b6950740791b37bbd2bfdc4815c3d7bc4834
CRs-Fixed: 3095637
2022-02-09 11:54:01 -08:00
Pavankumar Nandeshwar
98b25a2ee6 qcacmn: use txrx_peer in rx and tx paths
Use txrx_peer in rx and tx data paths instead of
main dp peer.

Change-Id: If628543092be220021240b6f25ee43b009592bac
CRs-Fixed: 3095637
2022-02-09 11:53:55 -08:00
Pavankumar Nandeshwar
04bb406179 qcacmn: use txrx_peer in defrag and rx error paths
Use txrx_peer in defragmentation and rx error paths instead of
main dp peer.

Change-Id: I95bb2f672e49d0f6ddb94a093688b0fbce5e373d
CRs-Fixed: 3095637
2022-02-09 11:53:43 -08:00
Adil Saeed Musthafa
40663d0990 qcacmn: For EAPOL packets on MLO, accept EAPOL destined to MLD mac
EAPOL packets on MLO are destined to MLD mac address of the VDEV. So
we have to accept these packets as well, in case of MLO

Change-Id: If424d145341073806ba313f415e88a738360214d
CRs-Fixed: 3121164
2022-02-02 13:15:32 -08:00
Tallapragada Kalyan
b265fdd7fc qcacmn: introduce simple nbuf_free API in RX path
simple Alloc is being used in RX path which avoids
certain debug logic. during free of nbuf we should
avoid this debug logic else it will report it as
double free, this will be triggered only when debug
is enabled

Change-Id: Iadb40071fb733cc4de3291784df5075d5a099a8e
2022-02-02 12:06:34 -08:00
Ananya Gupta
f54a51648c qcacmn: Send EAPOL pkt to stack in rx_err path
Send only eapol packets to stack and drop other packets
when found in rx err path when either REO or RXDMA push
reason is set to ROUTE type.

Change-Id: If1f43426adf21f7d00f17d369cd7fde7f7f85866
CRs-Fixed: 3114312
2022-01-25 09:23:13 -08:00
Sai Rupesh Chevuru
6bbb8971e2 qcacmn: Fix for ping issue in NAWDS Learning repeater mode
In qcn9224, NAWDS Learning repeater mode will receive packets
with reason as HAL_RXDMA_UNAUTHORIZED_WDS.

Change-Id: I6fe8428a5f8e2bac0e1db45b87169db0bd4cc271
2021-12-30 03:23:12 -08:00
sandhu
ad2829718c qcacmn: Remove IP from files
remove IP from code

Change-Id: If119a4af213b10aadb9f1344e50b0342e72405c2
CRs-Fixed: 3073864
2021-12-29 04:28:58 -08:00
Sai Rupesh Chevuru
b43e679a58 qcacmn: Multicast support for MLO
Multicast support for MLO
1. Following functions are newly added.
	dp_rx_igmp_handler()
	dp_tx_mlo_mcast_handler_be()
	dp_rx_mlo_mcast_handler_be()
	dp_mlo_get_mcast_primary_vdev()

Change-Id: If215f843369e6e2621ef302b924e524c86f0d30b
2021-12-16 05:35:30 -08:00
Chaithanya Garrepalli
63cbee363b qcacmn: Correct RBM value when giving link_desc to HW
Use correct RBM value while giving back link descriptors
to HW from RX defrag path

Change-Id: I75eb41cd166dde2d26f32d3165ac52f732c83d82
2021-12-04 15:34:53 -08:00
Harsh Kumar Bijlani
af17c944fb qcacmn: Rx stats changes for BE HW vdev stats
Following peer stats are updated in per packet Rx path:
    to_stack
    multicast
    broadcast

In BE architecture, HW provides the support for basic vdev stats and
hence per packet stats updation of above parameters can be done only
when enhanced stats is enabled or HW vdev offload stats is disabled.

Avoiding per packet stats updation reduces CPU load and improves KPI.

Change-Id: Id7c11c025a8464951b615a7f7b006ce61db487fc
CRs-Fixed: 3067843
2021-11-30 00:58:04 -08:00
Pavankumar Nandeshwar
ef490e7713 qcacmn: avoid source port learn when ast offload is enabled
avoid source port learn when ast offload is enabled in the
rx error path

Change-Id: I88f6847aceecd39095fdaefb942bccfa434ebbb9
2021-11-23 02:38:22 -08:00
Chaithanya Garrepalli
41fda10bc5 qcacmn: In WBM err process read peer_id from peer_meta_data
In WBM error processing read peer_id from peer_meta_data
instead of sw_peer_id.

This changes is needed because we need to process Rx packet
on ML peer. But in MLO case sw_peer_id field contains
link_peer_id where as peer_meta_data has ml_peer_id.

Change-Id: I3f469adfdf7efa88cb081e94fa9fe0c54c1fb078
2021-11-12 04:46:16 -08:00
Rakesh Pillai
c634e23cf7 qcacmn: Fix the parsing of current pn in REO error path
The current PN is a 128-bit field which was incorrectly
stored into a 64-bit variable, leading to stack corruption.

Fix this by increasing the size of the variable
for current PN to 128-bits.

Change-Id: Ib26cc0bb7d244360afb258a55d5b9a8ddd6aa4ca
CRs-Fixed: 3059345
2021-10-22 03:04:53 -07:00
Rakesh Pillai
57e2c01e5e qcacmn: Peer id parsing changes for beryllium
Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
2021-10-15 13:13:27 -07:00
Jinwei Chen
5c85cfb5a0 qcacmn: cdp/dp peer change for MLO
cdp/dp peer change for MLO

Change-Id: I9b8eb741317a0dc7337aff7e773148892e531ba2
CRs-Fixed: 3031166
2021-10-15 13:13:12 -07:00
Chaithanya Garrepalli
3c3e5709ac qcacmn: Increse num TX rings for QCN9224
This change includes below
1) Changes needed to increase Tx rings to 4
2) Use WBM2SW4 ring for rx error in QCN9224
3) memset srng at alloc to avoid populating RBM_id
in per packet path and enable implicit RBM

Change-Id: Icbd5ac2378273b8f3c6adc41c611e29551fff22f
2021-10-13 13:12:19 -07:00
Pavankumar Nandeshwar
851b1f68c0 qcacmn: enable MEC support for Beryllium
The multicast echo check feature is moved to hardware in
Beryllium. Enable this hardware feature and also disable
the MEC handing code for Beryllium in the host.

Change-Id: I86d319963191f3ed77aba16dcccbc659906edd9f
2021-10-01 15:18:25 -07:00
Karthik Kantamneni
663626d52d qcacmn: Skip updating OOR/2K jump BAR frames to H.W
Currently error BAR frames are routed to host, but host
doesn't have complete information to check whether these
frames are valid and really action need to be taken or not.
If host updates H.W without validating SSN it is causing
window movement and REO HW aging timeout happening for
next set of RX packets and delay is induced.

To avoid RX packets delay skipping BAR update to H.W

Change-Id: I92c1614993b6985218a453fe528fbd274fab254f
CRs-Fixed: 2995461
2021-09-08 00:19:34 -07:00
Shiva Sankar Gajula
dcbdb29d04 qcacmn: Register separate function pointer to receive EAPOL frames
Add changes to register separate function pointer to receive EAPOL
frames instead of using regular RX path and adding export symbol
for __qdf_nbuf_data_get_eapol_subtype() to access in it multiple
modules

Change-Id: Id05b982d31a7e008536d10dd5281e88cceba96db
2021-09-07 07:59:06 -07:00
Karthik Kantamneni
48b496eabd qcacmn: Conditionally update BAR frame info to H.W
Host updates BAR info to H.W when out of order or 2K jump
BAR frame is received. But some AP's frequently transmitting
out of order BAR frames even before reception of all the
frames in the current window, if station updates window
and SSN based on BAR frame, RX frames sequence number in
older window range which are yet to be received suffers
REO aging timeout and causes RX packet delay to avoid
this skipping BAR update to H.W conditionally.

Change-Id: If56571ffc0dc0880d7104ea3bb193ed9766124dd
CRs-Fixed: 3015643
2021-09-02 12:16:58 -07:00
aloksing
b158abe417 qcacmn: API renaming for monitor module
Add prefix dp for all monitor APIs
Add mon_debug/mon_info/mon_err for logs

Change-Id: I71d49f6bcacd77f5695269817fed83337169227b
CRs-Fixed: 3006497
2021-08-12 05:32:47 -07:00
Chaithanya Garrepalli
d7637a443d qcacmn: Add handling for rxdma_rx_flush and invalid psh_rsn
In WBM error path, add handling for packets received with
rxdma_psh_rsn as rxdma_rx_flush. Also add assert for packets
received with an invalid push reason.

Change-Id: I4e445d52f00bbbdca358225aef488da0e8dccaa7
CRs-Fixed: 2978262
2021-08-03 04:36:34 -07:00
aloksing
c60b9619a3 qcacmn: Conditionally compile monitor related features and issue fixes
PATCH[7/7]:
This patch consists following changes:
 -Conditionally compile all monitor destination ring related code
  Macro used QCA_MONITOR_PKT_SUPPORT
 -Add QCA_ENHANCED_STATS_SUPPORT macro to conditionally compile
  enhanced stats support
 -Use QCA_MCOPY_SUPPORT and QCA_TX_CAPTURE_SUPPORT macros
  to conditionally compile MCOPY and Tx capture features
  respectively
 -Use QCN_IE macro to conditionally compile BPR
  feature
 -Use QCA_ADVANCE_MON_FILTER_SUPPORT macro to conditionally
  compile advance monitor filter feature
 -Fix vdev attach issue for special and smart monitor vap
 -Fix status ring initialization issue.

Change-Id: I0deaa28a9a54bf34b0f41e6dd510fdd8d4992db2
CRs-Fixed: 2983780
2021-07-30 21:51:26 -07:00
aloksing
53fe7000ba qcacmn: Move monitor related fields from soc/pdev to mon_soc/mon_pdev
PATCH[6/7]:
This patch consists following changes:
 -Move monitor related pdev variables to struct dp_mon_pdev
 -Move monitor relted soc variables to struct dp_mon_soc
 -Move cookie to monitor link desc va to monitor file
 -Add APIs to access monitor related variables
 -Add dummy APIs to build without monitor support.

Change-Id: I032a480b1383d061f984cee3ba6b10ac7a0ff350
CRs-Fixed: 2983781
2021-07-30 21:51:21 -07:00
aloksing
e7cc727374 qcacmn: Move core monitor and monitor dependent feature func
PATCH[4/7]:
This patch consists following changes:
 - Move core monitor and monitor dependent feature functions
   to monitor file
 - Move enhanced stats functions from htt to monitor file
 - Move vdev set monitor mode rings function to monitor file
 - Create and initialize relevant funct ptrs
 - Initialize cdp monitor related ops.

Change-Id: Iac1ab43eb1c4b98bd21bbb8a5741ee53034da2f1
CRs-Fixed: 2984635
2021-07-30 21:51:12 -07:00
Yeshwanth Sriram Guntuka
5246cc0bf2 qcacmn: Assert only when unmapped is true in rx_desc
The existing assertions for unmapped variable in
rx descriptor results in an undesired bug_on since
the unmapped value is 0 for active descriptors.

The fix is to modify this assertion so that bug_on will
be triggered only if the unmapped value is 1 in rx
desc.

Change-Id: I03b27e0e42ce3c42b9fa148da9258063b0209b08
CRs-Fixed: 2985248
2021-07-08 00:11:22 -07:00
Vevek Venkatesan
723721e67f qcacmn: add CDP reason code support for send_delba
Add CDP reason code support for sending DELBA request,
so protocol layer can make decisions for special cases.

Change-Id: I4e4b2e7f7232a8ab12d4c7838f97908f481dc787
CRs-Fixed: 2983553
2021-07-06 02:16:09 -07:00
Karthik Kantamneni
8c19a927bf qcacmn: Skip sending WMI REORDER_QUEUE_SETUP for BAR frames
When host receives BAR frames with OOR/2K jump in sequence
number it updates REO HW with new starting sequence number
and requests F.W to setup peer reorder queue. But REORDER_QUEUE_SETUP
is already requested to F.W as part of initial add BA in host.

So while handling OOR/2K jump BAR frames don't send
REORDER_QUEUE_SETUP to F.W

Change-Id: Idc3657e901dc792f699b53c45e4ae5133d286891
CRs-Fixed: 2981280
2021-07-01 22:18:37 -07:00
Vevek Venkatesan
05487e226c qcacmn: rate limit error log in dp_2k_jump_handle
Error log peer not found is coming spurious in
dp_2k_jump_handle on continuous error pkts, so
rate limit the same.

Change-Id: If4b577a7759136ea824ca62b63ef91d102b8decb
CRs-Fixed: 2978939
2021-07-01 04:24:36 -07:00