Commit Graph

279 Commits

Author SHA1 Message Date
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
Rakesh Pillai
daa5590673 qcacmn: Handle all the REO error codes
For certain wlan chips, eg WCN7850, all the REO error
codes are routed to the APPS core and none are handled
by the firmware.

Add support to handle all the REO errors. Currently for
all the newly handled REO errors, the packet is dropped
and the corresponding link descriptor is returned to the WBM.

Change-Id: I94f3afcbfc129befcb94db2dea855151bf8114f1
CRs-Fixed: 2965087
2021-06-30 13:48:50 -07:00
Rakesh Pillai
e28d968b5a qcacmn: BAR frame handling for 2K-jump and & OOR error
Currently the detection of whether a frame arriving on the
rx-error ring is done via the flags in the ring descriptor.
For targets which support providing previous PN in the
rx-error ring descriptor, the flags indicating BAR frame
will not be present in the ring descriptor.

Add BAR frame check and handling in the OOR and 2K-jump
frame processing handlers.

Change-Id: Iaba763559a84f1c1f6a193e01945124f08c506f2
CRs-Fixed: 2965086
2021-06-30 13:48:43 -07:00
Rakesh Pillai
5d44eac10a qcacmn: Enable PN check for 2K-jump and OOR frames
Currently the EAPOL/ARP/DHCP frames arriving as 2K-jump
or out-of-order frmaes are being delivered to the network
stack, without checking for the packet-number sequence.

WCN7850 has hardware support to provide the packet number
of the previous successful re-ordered packet from hardware.
Use this feature to check if the packet-number are in proper
sequence for these EAPOL/ARP/DHCP packets arriving as 2k-jump
or out-of-order packets before submitting it to the network
stack.

Change-Id: I1078452afce4bc00b2509436295e5bd80000feb4
CRs-Fixed: 2965086
2021-06-30 13:48:31 -07:00
Rakesh Pillai
e4c918b6ca qcacmn: Fix OOR & 2K-jump BAR frame handling
Currently the error_code is not passed as an argument
for BAR frame handling. Due to this, if a BAR frame is
received which is OOR or 2K-jump frame, then the sequence
number from the BAR frame is not programmed to the REO.
This can eventually lead to failure in re-ordering of
the subsequent data frames.

Pass the proper error code for BAR frame handling.

Change-Id: I0ea01a3c9bb9c77923e88a5b742ff2dd974c8483
CRs-Fixed: 2965086
2021-06-30 13:48:25 -07:00
Varsha Mishra
190a0bb171 qcacmn: Handle EAPOL frames in wbm error ring
CVE-2020-26139
With the CCE changes, EAPOL frames now arrive at
the wbm error ring with the push reason as route.
These frames need to be indicated to the stack.
Any other incoming frame with this reason code
needs to dropped.

Change-Id: I66df0b53a36d99b3e9d9000e0bd93bf7677c221d
2021-06-25 08:03:31 -07:00
Jinwei Chen
4083155141 qcacmn: Add support for HW cookie conversion
Support HW cookie conversion for BE platform.

Change-Id: I39058fbf256266557f5e734ba376db4db0731b24
CRs-Fixed: 2929533
2021-06-23 23:32:49 -07:00
Varsha Mishra
b0d37772c7 qcacmn: Drop non-eapol packets for unauthorized peer
Until peer is authorized, drop non-eapol frames in
rx error path.

Change-Id: I339b9248b8ae63e4b6ab0268c4ed28130404ba33
2021-06-22 18:28:43 -07:00
Varsha Mishra
91662e68f5 qcacmn: Drop packets in wbm release ring on cce match
When cce rule gets matched, drop packets in wbm error ring.

Change-Id: Ie9ca88492e3f34156a33747a9043e13c6cde66c0
2021-06-21 07:03:36 -07:00
Mohit Khanna
c9bcf7e494 qcacmn: Handle BUF_ADDR ring desc in dp_rx_err
Currently dp_rx_err_process expects ring descriptor to be only
LINK_DESC_TYPE. In certain cases BUF_ADDR_TYPE ring descriptor is
observed in reo_exception ring. Add logic to handle the same.

Change-Id: I5baecc3f8eafc0830672b91bc9d9607b568a6cda
CRs-Fixed: 2954653
2021-06-09 23:38:08 -07:00
Jinwei Chen
12a999bc58 qcacmn: Deliver EAP frames to stack from REO exception path
Revert "qcacmn: drop duplicated EAP frames from REO exception path",
allow all EAP frame delivering to stack including retried ones.

Change-Id: I73733841c1feb21d5b5fd160856a8fe9c21168fc
CRs-Fixed: 2959701
2021-06-08 18:17:28 -07:00
nobelj
25acb759bf qcacmn: Fixes to enable LI & BE in a build
Changes to build Lithium and Beryllium together.
This is needed for WIN

Change-Id: I74c86803ea99fb17d1f73e8b9c4e7cf59751a707
2021-06-07 01:51:15 -07:00
Rakesh Pillai
872da9462b qcacmn: Datapath RX error handler for WCN7850
Add DP rx error handler changes for WCN7850.

Change-Id: I401f1b69eb107818e7aceb0a51279dab7f558b96
CRs-Fixed: 2891021
2021-06-05 15:10:50 -07:00
Rakesh Pillai
34b6af18a4 qcacmn: Init-Deinit changes for WCN7850
Add Init-Deinit changes for WCN7850 support
in datapath

Change-Id: I7f9850ee41f4638c6a28b5313549c67876c5f810
CRs-Fixed: 2888556
2021-06-05 15:10:50 -07:00
Yu Tian
c459923dd6 qcacmn: use correct rx pool id for refill buffer
When handling RXDMA error marked frames that from MAC1,
wrong rx descriptor pool is referenced, so allocated
buffer length is incorrect and lead to skb crash. Make
changes to always uses mac0 rx descriptor pool for MCL
platform.

Change-Id: Ica01c3967d6248a23ea745da63149dae9cd56677
CRs-Fixed: 2945573
2021-06-03 01:37:27 -07:00
Karthik Kantamneni
bbd65e7a59 qcacmn: Fix rx buffer IPA map/unmap for exception cases
IPA unmapping is skipped for WBM internal error case,
do IPA unmapping for rx buffer received in WBM error case.

While reinjecting RX buffer back to REO, software rx desc
unmapped field is not set in sequence which may lead to
map without unmap error in IPA module. So reset the unmapped
filed after IPA mapping is complete.

Change-Id: I42c1eaa1620f975d47ce2938c95b6b89dbbd3eca
CRs-Fixed: 2952671
2021-05-27 13:41:40 -07:00
Karthik Kantamneni
cfbfcf3b21 qcacmn: Fix race condition during IPA map/unmap handling
While Rx buffers are getting umapped from net rx context if IPA
pipes are enabled at same time from MC thread context this is
leading to race condition and IPA map/unmap is going out of sync.

To fix this introducing IPA mapping lock and IPA mapping need to
be handled with lock held.

Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991
CRs-Fixed: 2945063
2021-05-27 13:41:35 -07:00
sandhu
49846e25ef qcacmn: Add start sequence update count to rx stats
add ssn_updates_count to dp_soc_stats rx err stats.
Also add bar fail count on rx tid update during
bar handling.

Change-Id: Ic9a963c8d29ace2087e63cba56bc0d7e40907e1a
CRs-Fixed: 2918806
2021-04-29 21:07:07 -07:00
Nisha Menon
5d7e26e27f qcacmn: Dump the rx reo queue descs in ddr
Add iwpriv option 34 to dump the reo rx h/w descs
in DDR for debugging. This cmd will first send cache
flush cmd to REO for all rx tids and invalidate the h/w
cache. Henceforth ensuring that the reo status tlvs and
the DDR values are in sync.
iwpriv wlan0 txrx_stats 34 0
Add fix to ensure bar frame with 2k jump err code is
processed correctly using the REO error code instead of the
REO push reason.

Change-Id: Ia05be668343f3a5d4b3262b8d6a367a50875add5
CRs-Fixed: 2895965
2021-04-13 14:50:51 -07:00
Karthik Kantamneni
1759c5d6cb qcacmn: Rate limit excessive logs in WBM error path
Rate limit excessive logging prints in WBM error path

Change-Id: Ifb69959b78740bf4a0fca7b7611a2da0ef740413
CRs-Fixed: 2908240
2021-04-06 18:43:06 -07:00
Nandha Kishore Easwaran
bcc7d05422 qcacmn: Record PN and OOR error per peer
Record PN error and OOR error per peer and display the
error count in fc_peer_stats.

Change-Id: I694efbcaa280659f7a62f1343e26a196067cc524
2021-03-24 12:04:29 -07:00
Ananya Gupta
6432642d91 qcacmn: rx desc sanity for reo error entry
Same cookie was provided in REO srng and REO exception
ring. As a result, NULL pointer dereference occurred in
dp_rx_reo_err_entry_process.
To fix this, adding nbuf paddr sanity check in
function dp_rx_reo_err_entry_process.

CRs-Fixed: 2892345
Change-Id: Ie359921d8a270a3428b8286792941e84b0c68425
2021-03-24 04:33:32 -07:00
Nitin Shetty
2c31ece247 qcacmn: adding peer_id check for MEC
adding peer_id check to MEC detection.

Change-Id: I717d65c4ba33feac2ac488548efe3fdf95598ca8
2021-03-24 02:12:26 -07:00
Subrat Dash
ecb559ab6f qcacmn: Add check to discard multicast echo packets
The bridge forwards the multicast packets to all the
interfaces attached the bridge.

When the STA network interface receives such packets
from bridge and send it to the AP, it is echoed back
from the BSS.

These packets are not intended for the bridge as it
will lead to looping.

Add a check to detect and drop such packets when
received back from the BSS.

Refactor dp_rx_mcast_echo_check function to fix
compilation errors from the above change.

CRs-Fixed: 2894272
Change-Id: I3f9e92c3598af11d3ff4e6b9b8afbc4110a926fc
2021-03-18 07:43:13 -07:00
Varsha Mishra
a2ac29d45c Revert "qcacmn: Handle EAPOL frames in wbm error ring"
This reverts commit I66df0b53a36d99b3e9d9000e0bd93bf7677c221d.

Change-Id: I42d01f330f45e07f95f7b45fe1aaf22fba19fbd9
2021-03-11 18:46:49 -08:00
Pavankumar Nandeshwar
cc26b39f01 qcacmn: skip current rx_desc when in_use bit is not set
As a software WAR for hardware issue where we are
getting wrong cookie value for a buffer which is already
mapped to another rx_desc with different cookie id and
is already has in_use bit set, we will skip the
processing for the current rx_desc when in_use bit
is not set.

Change-Id: I9f469bf1f4b03e0fb9a6694d9445a0c690224ccb
2021-02-28 23:52:12 -08:00
Karthik Kantamneni
143de06652 qcacmn: Add support to handle OOR error on WBM ring
Add support to handle regular OOR frame error received on WBM ring

Change-Id: Ib290c4911e969debbf482f9495cab83a744f69d7
CRs-Fixed: 2876270
2021-02-15 06:21:32 -08:00
Nitin Shetty
71e3244d46 qcacmn: skip MEC ast entry creation in wlan fw
MEC ast entry will be created only in software
and adding MEC entry to wlan fw is skipped.

Change-Id: I6991f9f12ceb22a7c599cdf3cc2a13c996d93671
2021-02-09 15:35:27 -08:00
Varsha Mishra
d5984dded1 qcacmn: Handle EAPOL frames in wbm error ring
CVE-2020-26139
With the CCE changes, EAPOL frames will now come in
wbm error ring as push reason route. These frames need to
be indicated to stack. Any other frame coming with this
reason code needs to dropped.

Change-Id: I66df0b53a36d99b3e9d9000e0bd93bf7677c221d
2021-02-05 05:03:38 -08:00
Shikha Bakshi
795eb11c9b qcacmn: Modify logs for QDF_MODULE_ID_DP_RX_ERROR
Add macros dp_rx_err_info, dp_rx_err_debug, dp_rx_err_err,etc.
to define logs

Change-Id: I0dc4810412f9ed238708850de12b5d5730e9fa4b
CRs-Fixed: 2830612
2020-12-22 04:43:55 -08:00
Saket Jha
566de9aa04 qcacmn: Rate limit REO error logs
Rate limit per packet reo error code logs in reo exception path.

Change-Id: Ic025531a122a1ae972cddd9d7241c0504d363055
CRs-Fixed: 2838071
2020-12-16 06:44:30 -08:00
phadiman
d1bb528ae7 qcacmn: Host Static Memory Optimization (in NSS offload mode)
Low memory profiles like 256M and 16M profiles support
only NSS Wi-Fi offload mode and HOST data path APIs are
not used in NSS offload mode

Disable HOST data path APIs which are not used in both
NSS Wi-Fi offload mode and in HOST mode (in NSS offload mode)

CRs-Fixed: 2831478
Change-Id: I6895054a6c96bd446c2df7761ce65feef662a3cc
2020-12-15 13:34:26 -08:00
Manikanta Pubbisetty
47b6698b2d qcacmn: add drop count for OOR eapol frames
Add drop statistics for duplicate EAPOL frames received
in the REO exception ring as OOR frames. This will help
understand if EAPOL frames are getting dropped which could
cause connection issues.

Change-Id: Ib9d5a3c04ce6638c65166f02261af5c526cc47eb
CRs-Fixed: 2814633
2020-12-09 19:35:45 -08:00