Grafico dei commit

368 Commit

Autore SHA1 Messaggio Data
Mohit Khanna
211fb195c9 qcacmn: Support for MIN rates for criticial frames
Add support in BE to send special frames(EAPOL, ARP, DHCP) at minimum
rates.

Change-Id: I2c141cd8ef16d93fb9e99d7c48dd921913627b0b
CRs-Fixed: 3114311
2022-02-24 01:00:12 -08:00
Pavankumar Nandeshwar
e157e0df4e qcacmn: Flush dp cached frames only for mld peer
Flush dp cached frames only for mld peers and legacy peers, as
link peers don't need it.

Change-Id: I19a27c5810a1fec6a62bfe5a6377073dc382fb4c
CRs-Fixed: 3131405
2022-02-17 09:40:38 -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
9c6800383c qcacmn: Move per packet params to txrx_peer
Move the parameters from the dp_peer which are used
in per packet path to txrx_peer and params related
to monitor path to monitor peer.

Initialize txrx_peer and monitor peers.

Change-Id: I0449c67c1cd47deb76bc89b5ddc64174f6694eb0
CRs-Fixed: 3095637
2022-02-09 11:53:37 -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
Pavankumar Nandeshwar
d9e6722ff0 qcacmn: Fix QUIC Copyright Markings
Fix QUIC Copyright Markings

Change-Id: Id0cea92c1e6b64f82601c08a81b6246ee6d49a62
2022-01-27 12:53:33 -08:00
Tallapragada Kalyan
9639c91317 qcacmn: buffer replenish and reap without map and unmap
use dma_inv_range call instead of dma map and unmap
APIs during replenish and reap. This complete code is
under a compile time macro.
before change: 4160Mbps @ 96.5% (core 3)
after change: 4160Mbps @ 90.5% (core 3)

Change-Id: I61bca349a369ace06cd86f353880108cee013cb1
2022-01-20 10:01:09 -08:00
Chaithanya Garrepalli
2c1ccc9baf qcacmn: Fix NAWDS mcast loopback issue in intraBSS
For NAWDS intraBSS mcast traffic add check for SA
and DA peer to avoid loopback

Change-Id: Ifb987dbfe6d6f427cd8873315d4ffd67390b4e6f
2022-01-03 01:03:59 -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
Manoj Ekbote
80e882aa2a qcacmn: Intra-BSS changes for MLO
Use chip ID and destination peer to determine the target soc
and partner vdev for Intra-BSS in MLO case.

Change-Id: I709c52e74426c5e81b50c8063cad7669c0e7002d
2021-12-14 18:13:29 -08:00
Chaithanya Garrepalli
97a1c8bff1 qcacmn: Changes to caluclate soc max peer id
Changes to caluclate max peer id in case
of MLO

Change-Id: Ib52cfb4f92eafb88689774e8e6c406751d30372a
2021-12-02 06:06:47 -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
Jinwei Chen
7e267e17b1 qcacmn: support MLO intra-bss forwarding
Support MLO intra-bss forwarding

Change-Id: I7ffd54bbead3e56c7811e88aef935867b0ee4fd6
CRs-Fixed: 3066899
2021-11-10 03:56:09 -08:00
Mohit Khanna
9d2cde1128 qcacmn: Add last TX/RX timestamp in DP peer stats
Add timestamps for last TX/RX in peer stats. This stat is needed to be
passed on to upper layers on demand.

CRs-Fixed: 3059712
Change-Id: If0d8b7dc3c139e4d1b670bf98f3f574f02ea9715
2021-11-08 05:19:46 -08:00
Pavankumar Nandeshwar
146d67af95 qcacmn: Avoid using ast_entry in intra_bss handling
Avoid using ast_entry in intra_bss handling, instead use
da_peer_id directly from the msdu_metadata

Change-Id: Ic586f297e8e393504d7d399cff7a67c3035aa11f
2021-10-29 07:25:10 -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
26c6cd1397 qcacmn: Enable intra-bss in Waikiki
In Beryllium the HW does the ast lookup and match
and sets the intra-bss bit in the msdu_desc_info
structure of reo_destination ring and WBM Rx release ring.

So, change the Beryllium code to make use of this
hardware assistance for intra-bss.

Change-Id: Ic7c89efc741fefe35603082309204fbe3c9a97c7
2021-09-24 18:28:07 -07:00
Yu Tian
9fa8dd3bc3 qcacmn: Correct pkt length check for scatter frame rx
When a scattered frame is received, msdu length caclulation
is incorrect, this leads to while loop can't break. At last
skb, null pointer dereference happned. Change is aimed to
correct the length caclulation.

Change-Id: Ifb316f004ea5829b1130ce4c0fc9253134e26713
CRs-Fixed: 3025973
2021-09-17 03:40:58 -07:00
Harsh Kumar Bijlani
a7e391e49f qcacmn: Remove WDI event WDI_EVENT_UPDATE_DP_STATS from per pkt path
WDI event WDI_EVENT_UPDATE_DP_STATS is triggered for updation of peer
stats from both per packet and monitor path wherein per packet path is
applicable for MCC and monitor path is applicable for WIN.

Trigger for this event is flag protected under the macros
FEATURE_PERPKT_INFO and WDI_EVENT_ENABLE.

FEATURE_PERPKT_INFO is not defined for MCC.
With this, WDI event in per packet path is not triggered and hence unused.
Make changes to remove the unused code.

Change-Id: Ibcb0948b0ecae313270b6a173e243b2f27f1bbee
2021-09-08 14:55:32 -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
Surabhi Vishnoi
9aaf9e8110 qcacmn: Remove rx packet capture events processing if feature is disabled
Currently, rx packet capture events processing happens even
when feature is disabled by ini. This incurs per packet overhead
in rx path.

The fix is to move all the processing from rx path to packet capture mode
component. Send only wdi event from rx path, when feature is enabled by
ini.

Change-Id: I647256b85117cd3373950c78a5a0ae7d6710e4e2
CRs-Fixed: 2969123
2021-09-03 03:25:02 -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
Subrat Dash
9a6927e4ed 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.

Change-Id: I5a4a2a3e015df2b9c78de405d7d917216baed051
CRs-Fixed: 2997189
2021-08-10 15:39:32 -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
f14c5c6593 qcacmn: Avoid possible double skb_pull in no peer stack delivery
skb_set_len and skb_pull operations are done in both
dp_rx_deliver_to_pkt_capture_no_peer and
dp_rx_deliver_to_stack_no_peer. Due to this, in the
issue scenario, EAPOL frame gets dropped in roaming
scenario since qdf_nbuf_is_ipv4_eapol_pkt returns
false.

Fix is to do a skb_push_head operation in
dp_rx_deliver_to_pkt_capture_no_peer API before
exiting.

Change-Id: I071a5248f9f8577c8a21547f67ec53d707dee0be
CRs-Fixed: 2982188
2021-07-18 04:57:13 -07:00
Rakesh Pillai
5605d45923 qcacmn: Add near-full irq processing handler for RX ring
Add the handler to process the near-full condition
on the rx ring.

Change-Id: I426480386c4716702f8410ed87c70160decaa03f
CRs-Fixed: 2965081
2021-06-30 13:48:07 -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
Amit Mehta
ad4cb6357b qcacmn: Add NULL check for dp_pev
Currently, no NULL check is made for the value of dp_pev.
Adding a NULL check to avoid NULL dereference.

Change-Id: I2712b7e2fd53ba3a346878e73d2eedac161c5935
CRs-Fixed: 2955365
2021-06-10 13:02:39 -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
Mohit Khanna
89270803f3 qcacmn: Refactor fisa packet history for BE
Refactor FISA packet history to not access "struct rx_pkt_tlvs". This is
because this structure may be different for Li and BE chips and should
not be accessed directly and only via hal_soc->ops in common code.

CRs-Fixed: 2888556
Change-Id: I0d9f2785a81c130a2dc506020a02ee5581c0bbd3
2021-06-07 01:51:15 -07:00
Manjunathappa Prakash
477928661c qcacmn: Core DP RX path changes for WCN7850
Implement core DP rx processing to functions in to corresponding
architecture specific be/li rx files. Keep common utility functions
in DP common files.

Change-Id: I40083e10772fd2b6ce2f1fa9e197f2ad92d0522a
CRs-Fixed: 2891021
2021-06-07 01:51:15 -07:00
Rakesh Pillai
27d6b43bfb qcacmn: HAL RX-TLV changes for beryllium
Add HAL rx tlv changes for WCN7850

Change-Id: Ie76c608ed57c6a4f8adac97e1efc7888d2036f52
CRs-Fixed: 2891049
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
Karthik Kantamneni
0a7f7fb6a8 qcacmn: Optimize refill buffer pool feature code
Optimize refill buffer pool feature code to be
light weight on CPU, so that refill thread will
consume less CPU resources and also replenishing
RX buffers will be done faster.

Change-Id: I849ca60558c6197003d95e7d54fdb5f837cdc217
CRs-Fixed: 2950166
2021-06-02 13:48:27 -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
Varsha Mishra
6c720adf28 qcacmn: Enable peer authorize by default
Drop non-EAPOL frames from unauthorized peer in security mode.
Enabling this feature by default with this change.

Change-Id: I9878b37088149e34f456a38a9c0f722e4c5ee49a
CRs-Fixed: 2943789
2021-05-13 15:32:16 -07:00
Yeshwanth Sriram Guntuka
8c4c0044cb qcacmn: Do not intrabss forward EAPOL frames
Do not forward EAPOL frames that have DA different
from the SAP vdev mac addr.

Change-Id: I23959e38b5cbd845d369bebd6913150eca4551bf
CRs-Fixed: 2860248
2021-05-12 18:42:31 -07:00
Yeshwanth Sriram Guntuka
35b9bf6c44 qcacmn: Fix possible OOB access of rx_refill_ring_history
In monitor mode, when the channel is set to any 2G band channel
the mac_id passed to dp_mon_process API is 1. As part of
dp_rx_buffers_replenish, refill history is logged and the
mac_id is used to index into the history array. The array is
of size 1 and OOB access would happen when ring_num which
is the mac_id, passed in is 1.

Fix is to pass the pdev->lmac_id instead to
dp_rx_refill_ring_record_entry and add ring_num sanity check.

Change-Id: Id824ec8b01e7923ad74771d5f34a25f5fccb65f3
CRs-Fixed: 2939544
2021-05-11 08:03:31 -07:00
Karthik Kantamneni
3bc4b99247 qcacmn: Add support for Rx refill ring history
Add support for Rx refill ring history, maintain records of refill info
during RXDMA ring replenish.

Change-Id: I034014eacfc510ec6f416fca601fa864326de9c2
CRs-Fixed: 2930005
2021-04-29 04:37:47 -07:00
Yeshwanth Sriram Guntuka
69e696c423 qcacmn: Reset the inv bit in ring desc cookie for jumbo pkts
When a msdu scattered across multiple nbufs is received
in REO2SW ring and the remaining nbufs are not yet
available in the ring, loop in dp_rx_process is exited
without resetting the invalid bit in the ring desc cookie.
This will result in an incorrect assertion failure when
the same entry is processed the next time.

Fix is to reset the invalid bit in ring desc cookie
when the loop is exited in the above msdu scattered
scenario.

Change-Id: Ie5cfa1fb8ea1db4b7a0a4837545ecbfdfbb8719a
CRs-Fixed: 2916296
2021-04-08 02:50:56 -07:00
Yeshwanth Sriram Guntuka
a5e6565dd6 qcacmn: Check for equal case in nbuf len sanity
MSDU with len 1654 is received in the REO2SW ring and
the total len of the pkt would be 1654 + 392 (pkt tlvs)
+ 2 (l2 hdr padding) = 2048bytes. The nbuf len sanity
checks for strictly less than 2048 bytes which results
in the assertion failure.

Fix is to add the equal case when validating the
nbuf len.

Change-Id: I7e5d1df10339c8d7908a12001c2322028965a8fe
CRs-Fixed: 2916351
2021-04-07 14:32:52 -07:00
Yeshwanth Sriram Guntuka
6512d66c27 qcacmn: Create IPA SMMU maps for host replenished bufs
Buffers replenished post processing entries in the
REO2TCL ring do not have ipa smmu mappings created
when RX_PREALLOC_BUFFER_POOL feature is disabled.
This will result in SMMU fault when IPA HW accesses
such replenished buffers.

Fix is to create IPA SMMU mapping for replenished buffers
when RX_PREALLOC_BUFFER_POOL feature is disabled as well.

Change-Id: I0fe611a1279b91a3e45bc269348e05de9015d596
CRs-Fixed: 2915686
2021-04-07 08:16:35 -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
Manikanta Pubbisetty
86e32fb122 qcacmn: assert on processing invalid RX ring descriptors
Currently, we break the dp_rx_process() reap loop when we encounter
a ring descriptor with invalid bit set in SW cookie. If the HW
has copied old/stale entries in the ring, then we will end up
processing the same entry every time we try to reap the ring.
Instead, assert on processing such invalid entries so that
we can obtain useful debug information.

CRs-Fixed: 2904509
Change-Id: Iddde959a573ddf4ca364e1fb7a54ed0eaf4dc169
2021-03-24 06:44:23 -07:00