Commit Graph

3286 Commits

Author SHA1 Message Date
Surya Prakash Raajen
49ca504dbd qcacmn: Maintain dp_mlo_ctxt per each MLO group
As per current design, dp_mlo_ctxt is allocated during the
initialization of module while the MLO grouping information is
understood after WMI_READY_EVENT. The same is deinitialized while
unregistering the module.
To ensure dp_mlo_ctxt exists per MLO group, bring the dp_handle
a layer below in the hierarchy into the mlo_setup_info and allocate
dp_mlo_ctxt after the WMI_READY_EVENT is received from all the SOCs
for a given group. Deallocate it after the WMI_MLO_TEARDOWN_COMPLETE
event is received.

CRs-Fixed: 3355405
Change-Id: Ic3102a34a8d44877827e2ff1f7da2e414b2b463f
2022-12-21 06:33:27 -08:00
Sreeramya Soratkal
27f8943f9c qcacmn: Update the MLO ops to include attach and detach
To handle dp_mlo_ctxt assignments from the UMAC module,
moving the callers for attach and detach to the list of
MLO operations for multi chip.

CRs-Fixed: 3355400
Change-Id: Id743ec1086cf1b3ba0a3ec42212dc21c5a9ccc6b
2022-12-21 06:33:18 -08:00
Harsh Kumar Bijlani
e94a73784a qcacmn: Add support to drop tx mcast frames in WDS extended mode
Add support to drop tx mcast frames in WDS extended mode

Change-Id: Ia5af3b31c95393eb9c8af6b92ddeced6ac7a8d3d
CRs-Fixed: 3359296
2022-12-20 11:57:01 -08:00
aloksing
336315bdd2 qcacmn: Fix invalid memory access
rx user status pointer is not valid

memzero ppdu_info before ppdu TLV processing and
Assign valid user status pointer from ppdu_info
user status before rtap update.

Change-Id: Ib9f8bf356a8d4710d295716cf88b8cf6a37158cb
CRs-Fixed: 3341380
2022-12-20 11:56:52 -08:00
Rakesh Pillai
d9e0ee2250 qcacmn: Print BW counters for 320 MHz
Currently the datapath stats do not print the
packet count for 320 MHz bandwidth.

Add support to print BW counters for 320 MHz.

Change-Id: Ic9579a1860e6aca442f7bc4a3b92930e8506e9bd
CRs-Fixed: 3359372
2022-12-18 12:13:04 -08:00
Pavankumar Nandeshwar
c811b9d544 qcacmn: PPE-DS feature naming convention update
1. Change the names of parameters and functions related
   to direct switch feature from ppe to ppeds
2. Remove the unused ppe_release_ring

Change-Id: I5a95b1273e338f354903af98158578ac65758a8a
CRs-Fixed: 3345097
2022-12-18 01:11:58 -08:00
Pavankumar Nandeshwar
3548804a60 qcacmn: Add a cdp api to stop the ppe ds
Add a cdp api to stop the ppe direct switch
from control path

Change-Id: Id1c5d5c0e2b80d6fa0fa7b907fac133f815f9627
CRs-Fixed: 3356472
2022-12-18 01:11:49 -08:00
Sai Rupesh Chevuru
cff09264f4 qcacmn: Process the pending rx buffers during soc teardown
Process the pending rx buffers during MLO soc teardown sequence.

Change-Id: Ifbcbf7e2779a8ef740f77b3e9edfc02ca5355269
CRs-Fixed: 3332802
2022-12-16 10:40:09 -08:00
Nanda Krishnan
6cfeaed50f qcacmn: Tput is low when DS is enabled in STA
Issue:
When DS mode is configured for a VAP
in both AP and STA (RDP 433), the tput reduces.
For instance, for an ingress of 7G
in standalone case, the egress rate is
1) 6887 Mbps when DS is enabled only in AP
2) 1900 Mbps when DS is enabled in both AP and STA
RCA:
With the help of debugs & proc/interrupts, identified
that we are not setting up the peer when the
device in STA mode due to AP mode check in
dp_soc_txrx_peer_setup.
Hence, the traffic is not flowing via DS
and so, tput reduces.

Fix:
Added changes to invoke txrx_peer_setup in
STA mode and DS mode will configured in that mode.
With the fix, traffic flows via DS, which
in turn improves the increased

Change-Id: Ib51e9a27e5078ed99160f213ddffed801c2e4ecf
CRs-Fixed: 3355603
2022-12-15 03:14:34 -08:00
Sushant Butta
0bffc7e7d1 qcacmn: Do length check to avoid memory corruption
Check size of the frag before passing
to trim function, which can lead to memory
corruption.

Change-Id: Icea102f9fef8c7333591337a93d32bc449704202
CRs-Fixed: 3354458
2022-12-14 21:12:31 -08:00
Nitin Shetty
8271e2c71e qcacmn: set service code bypass for PPEDS
Program service code bypass to avoid
L2 new mac address learning exception
when fdb learning is disabled

Change-Id: I588a885aac1755cdf2ded5176b25d5ae9f533091
CRs-Fixed: 3354407
2022-12-13 07:46:21 -08:00
Nanda Krishnan
66fd581109 qcacmn: Printing Tx Desc in use count for DS mode
Requirement:
As part of serviceability for DS, display the number
of Tx descriptors currently in use by DS module
via “cfg80211tool athXX txrx_stats 260” like non-DS.

Snippet of log/code of Non-DS:
DP_PRINT_STATS("Tx Descriptors In Use = %u",
                       soc->stats.tx.desc_in_use);

Fix:
Introduced a new ops (dp_tx_ppe_ds_inuse_desc)
to display the current Tx desc in use.
dp_ppe_ds_inuse_desc API will be registered
to dp_tx_ppe_ds_inuse_desc in initialization
and it will be invoked from dp_print_soc_tx_stats API
to display the in_use desc via 260 command

Change-Id: I18971fc5d4cb5eb5437b012e3b89db7c9c2446b4
CRs-Fixed: 3352686
2022-12-13 05:48:11 -08:00
Manish Verma
b3ec0ca8cb qcacmn: Skip skb data inval for the PPE-DS buffers in rx replenish
In the PPE-DS UL path, the PPE-DS flag is getting set in the buffer
in the EDMA Tx complete path.
This flag is getting checked in the WLAN Rx replenish path and the
data invalidate is being skipped, if the flag is set.

CRs-Fixed: 3344458
Change-Id: I4e10deec5b373ccc93b59432576eb70d49a9304d
2022-12-12 22:35:10 -08:00
Manish Verma
9dd62d04b6 qcacmn: Consume DS WLAN Tx complete packets as list
Batch consume the FAST Flag set buffers

Change-Id: I01c5d3285b6847858703ad5170fd165a2b6d5bb5
CRs-Fixed: 3276981
2022-12-11 21:58:24 -08:00
Rakesh Pillai
2670c2a674 qcacmn: Additional logs in datapath init
Add extra logs during the datapath vdev/peer
init-deinit path.

Change-Id: I406b2925b61e9c06cda623bca5943c400dc391a9
CRs-Fixed: 3352874
2022-12-09 05:05:40 -08:00
Pavankumar Nandeshwar
926eefc710 qcacmn: Set interrupt timer threshold for ppe2tcl ring as 30 us
Change interrupt timer threshold for ppe2tcl ring to 30 us
from existing default timer threshold.

Change-Id: Id6a2625c086af6c4c49188c0abdc8d24fb8bdfe5
CRs-Fixed: 3355208
2022-12-08 11:01:18 -08:00
Kenvish Butani
069ca18f58 qcacmn: MLO Mcast Support for ML-Reconfig
1.Add check in Tx completion path to handle
mcast packets from all ML partner vdevs
2.Handle cases where a ML mcast vdev can be
deleted and started as NON-ML vdev and
viceversa by adding reset ML mcast conf.
3.Optimized Register configurations for Mcast
at Init/Delete and Start/Stop AP

Change-Id: Iab8a5a081e2e0377509574d362754d32c5b83df2
CRs-Fixed: 3350350
2022-12-07 23:45:21 -08:00
Jinwei Chen
1bf08f3566 qcacmn: Add TX completion ring desc sanity check
Suspect HW update WBM2SW ring HP, but the ring entry contents are
not updated accordingly which then host will fetch one stale ring entry,
this makes other TX packet are freed unexpectedlly.

Add change to detect this situation earlier, if HW cookie conversion is
done, then invalidate 2nd dword for upper 32bits of VA, so next time when
reap this ring entry contents to know if this desc is updated by
HW or not. if HW cookie conversion is not done, then compare the PA in
buff_addr_info with PA in current TX desc to check.

Change-Id: I351eb4f860216fc618ff28736d4832fcec45dcc5
CRs-Fixed: 3345935
2022-12-07 09:47:10 -08:00
Amir Patel
2725ca7035 qcacmn: Adjust low watermark refill for RxMON Source ring
Adjust low watermark refill for RxMON Source ring based on
ring_fill_level.
ring_fill_level varies based on use case of monitor like
enhanced_stats, full monitor.

CRs-Fixed: 3353181
Change-Id: I4e17eecbbd7f74071283d2c5615904310a3d7c77
2022-12-07 05:50:28 -08:00
Amit Mehta
a9e2233d1d qcacmn: Add change to clear per MAC OBSS stats
Add change to pass mac_id for which clear OBSS
request was received.

Change-Id: I715f57018c162c3ba7bfea8d709a888538f8f4ce
CRs-Fixed: 3346387
2022-12-06 00:00:22 -08:00
Venkateswara Naralasetty
cdbbb3ed59 qcacmn: Remove skip HP update logic during tx pause flag is set
Currently HP update can skip for few packets if the system suspend
is happening in parallel with tx. This could lead to SMMU fault if
the skipped HP update goes after tx desc force free.

Remove the tx pause check in HP updates and have the check before
calling dp_tx_send in case of intra-bss forward case. No special
handling is needed for non intra-bss case as we don't expect packets
from network stack after suspend.

Change-Id: Id4f2cefcc0a14e7c16438b9bda5cb1d55eb05050
CRs-Fixed: 3327818
2022-12-05 18:42:35 -08:00
KARTHIK KUMAR T
72332cbe67 qcacmn: Add ast_idx and ast_hash in dp_peer
Add ast_idx and ast_hash values in dp_peer

Change-Id: Ib68a25f6ea6b07cd46f4ec995436625cb3f28a58
CRs-Fixed: 3344867
2022-12-05 14:59:51 -08:00
Ripan Deuri
86a74c11bf qcacmn: Set SAWF Tx metadata based on the queue
Set SAWF Tx metadata based on the host queue id.

Change-Id: I8d759b239fff32da5d84d89468431b54aab63f3c
CRs-Fixed: 3349695
2022-12-05 13:03:56 -08:00
Pavankumar Nandeshwar
1f137636fa qcacmn: Handle mlo case for ppe ds peer setup
Handle mlo case for ppe ds peer setup by
making sure the src_info is always extracted from
primary vdev.

Change-Id: Ie4b0d8f475966e8c4264cea5cf32f0dc95e76c4a
CRs-Fixed: 3346074
2022-12-05 11:12:18 -08:00
Ruben Columbus
e1269c4834 qcacmn: clear memory address before used again
set rx_reo_queue_desc_addr_31_0 and rx_reo_queue_desc_addr_39_32 to 0
in hal_reo_shared_qaddr_write_be

Change-Id: Ib92775e0883b68f49c27e606e762384239bae955
CRs-Fixed: 3339043
2022-12-03 11:33:57 -08:00
Yu Tian
6d7d7fcc42 qcacmn: Optimize RX hw stats flow
Only 8 RX data TIDs are used, so HW stats query only needs to update
these TIDs info to save command executing time.

Change-Id: I04b65d19ddb3a9e43cb96b266708272769f7dcf2
CRs-Fixed: 3348771
2022-12-02 21:56:12 -08:00
Pavankumar Nandeshwar
e5534b1953 qcacmn: Register ppe2tcl and reo2ppe ring interrupts
Enable and register PPE2TCL and REO2PPE ring interrupts
for direct switch
Set interrupt timer threshold for ppe2tcl ring as 30 us.

Change-Id: Ida1ff6c3c2000f16f07960f7eae0d10edc337dc0
CRs-Fixed: 3341790
2022-12-02 21:56:01 -08:00
Kenvish Butani
620ad50e89 qcacmn: MLO Multicast Support for ML Reconfig
Add support for GET MLO Multicast API to check
if the vdev is primary multicast vdev.
Enhanced SET MLO Multicast API to reset primary
multicast flag for all partner vdevs.

Change-Id: Ic88949ce922bb1d0fd34349058d254de0d1f563c
CRs-Fixed: 3322523
2022-12-02 12:29:31 -08:00
Amir Patel
05a6d5283d qcacmn: Enable low watermark interrupt for WKK RxMON
Enable low watermark interrupt for WKK RxMON

CRs-Fixed: 3347545
Change-Id: Ia78878aab1ded951a2ecd4a276696ac150910c43
2022-12-02 03:31:07 -08:00
Devender Kumar
051821c54f qcacmn: Fix for Vlan Header initialize
Vlan Header is not initialize before passing it
to IPA driver, due to this some Vlan header fields
are junk and causing issue in IPA driver.

Fix is to initialize the header with 0

CRs-Fixed: 3342771
Change-Id: Ic29e0822f32bec5ea71702ceea75b7354caeda65
2022-11-29 03:25:34 -08:00
Himanshu Batra
993c0b242f qcacmn: Add API to check whether a given peer is sla or not
Add API to check whether a given peer is sla or not

Change-Id: I4d40aeb11fac1dc3620abca4958e4484635e42dc
CRs-Fixed: 3344429
2022-11-28 19:20:44 -08:00
Jeevan Kukkalli
ce1eb44128 qcacmn: Add appropriate comments
Add appropriate comments to describe actions
performed.

Change-Id: I16ba2ef3f8baae3e5a5e8add1668a49acc858495
CRs-Fixed: 3346270
2022-11-28 08:37:59 -08:00
Nandha Kishore Easwaran
7432a2e275 qcacmn: Add field to indicate sw peer filtering
Add a field to indicate if SW peer filtering is needed in
Tx monitor

Change-Id: Id0ed1655dfe51632f0437c4e3e3c2ccd067f75fe
CRs-Fixed: 3333191
2022-11-28 04:58:30 -08:00
Hariharan Ramanathan
b673b97a2d qcacmn: Interrupt Changes for QCA5332
Added interrupt registering code for tx monitor and umac_reset

Change-Id: Id76329a908859a512cef23d68a4afbff794af09a
CRs-Fixed: 3340347
2022-11-27 01:50:43 -08:00
Chaoli Zhou
976fcbba3a qcacmn: Correct system time usage for tx complete dealy check
In the dp_tx_desc_set_ktimestamp() return false case,
tx_desc->timestamp will not be updated, instead,
tx_desc->timestamp_tick used. So it will cause
dp_tx_comp_delay_check() always return false when
timestamp equal zero. Need to move the tx desc
timestamp check to correct place.

Change-Id: Ic1d5f1035784dcc3f240d832ac1e8820bc24f782
CRs-Fixed: 3331251
2022-11-26 17:40:29 -08:00
Jeevan Kukkalli
b0b3b2a793 qcacmn: Validate nbuf while processing MPDU/MSDU level TLVs
nbuf could be freed when some error conditions are hit so
always validate nbuf while processing MPDU/MSDU level TLVs.

Change-Id: I5e0756bc8ba0a8c68c6ce8d2886b5b63068626a0
CRs-Fixed: 3318966
2022-11-26 17:40:21 -08:00
Jia Ding
0ffd9de547 qcacmn: Properly handle IPA TX alt ring
If IPA tx alt doorbell address is not returned from IPA, wlan
should not touch the tx alt paddr and vaddr either. Therefore
add the NULL check before handling the tx alt ring resources.

Change-Id: I6b98fe5c003f3e796441513515190ea592d14d01
CRs-Fixed: 3339322
2022-11-26 04:53:10 -08:00
Amir Patel
88194f389a qcacmn: Update Calibrated noise floor from HALPHY
Update Calibrated noise floor from HALPHY into monitor packets

Change-Id: I73d879ad7d1b22a52b447f3197989e2beb52a404
CRs-Fixed: 3345567
2022-11-26 02:37:31 -08:00
Jinwei Chen
a96968138e qcacmn: Fix UL delay value > 0x80000000 issue
buffer_timestamp in wbm2sw ring descriptor is 19 bits only with
unit 1024 us, so it can only accommodate 0x7FFF * 1024 us same as
29 bits value with unit us. but if the timestamp value is >
0x7FFF * 1024 us, then the value stored in buffer_timestamp is not
right as other higher bits bit29 ~ bit31 is lost.

restore bit29 ~bit31 value for buffer_timestamp to fix current issue.

Change-Id: Ie929f560365cc822883711133541772348775357
CRs-Fixed: 3336241
2022-11-25 20:30:36 -08:00
Rakesh Pillai
95dad4fa46 qcacmn: Add support to drop monitor destination ring entries
Currently, in case of station+monitor mode on KIWI target,
we are not attempting to drop the entries received in the
monitor destination ring, when no channel has been
configured for the monitor interface. This leads to the
monitor destination ring full condition and an eventual
backpressure on the ring.

Fix this issue, by dropping the entries in the monitor
destination ring, which have been received before the
monitor channel has been configured.

Change-Id: Ic9c432b438d0a5dce2d2bb38053c31ce508c27f5
CRs-Fixed: 3332327
2022-11-25 14:33:09 -08:00
Yu Tian
5a6d2c2374 qcacmn: Optimize RX hw stats flow
Only 8 RX data TIDs are used, so HW stats query only needs to update
these TIDs info to save command executing time. Change is aimed to
reduce the TID number and use only one REO flush command for overall
REO cache flush.

Change-Id: Ib642451b9f07f62198126c45644742e1908280cd
CRs-Fixed: 3325964
2022-11-25 12:35:53 -08:00
Neha Bisht
5d0b7ea33f qcacmn: Create a list of skbs to be freed at once
Create a list of skbs to be freed at once in dp tx completion path

Change-Id: I42129b4306206f7224ceabc87d07e2a87b8fcab6
CRs-Fixed: 3274945
2022-11-25 12:35:45 -08:00
Harsh Kumar Bijlani
801226f363 qcacmn: Change module id for hexdump printing of hw vdev stats
Change module id to QDF_MODULE_ID_DP_HTT for hexdump printing
of hw vdev stats.

Change-Id: Ie9db76aa04241680236aa6b23a4ee65b5fd89d23
CRs-Fixed: 3343177
2022-11-25 10:25:42 -08:00
Sushant Butta
31eb482274 qcacmn: Fix for u8 overflow
When high throughput is running between AP and STA,
due to u8 variable overflow, host is not replenishing
required buffers.

More than 255 buffers can be requested for replenish,
so fixed size of the variable.

Change-Id: Ia810fed29058ec527cd8e6f77e6f9c333c5c6f88
CRs-Fixed: 3306616
2022-11-25 10:25:33 -08:00
Pavankumar Nandeshwar
a2ddd8956b qcacmn: Retain ds ring indices across wifi restart
Retain ds ring indices across wifi restart to avoid
edma hang. Fetch the indices from ds module and set
the corresponding ds ring indices.

Change-Id: Ia299a7006166aef096c7d2c1f65f6bef65415a37
CRs-Fixed: 3332152
2022-11-25 00:08:26 -08:00
Amir Patel
af0472aa08 qcacmn: Update PPDU drop counter
Update PPDU drop counter from monitor ring

CRs-Fixed: 3341905
Change-Id: I63f5b4d6a3e1e0155cf0558bea18704df073e2a9
2022-11-23 21:52:03 -08:00
Adwait Nayak
8775c73843 qcacmn: Enable hybrid mode for QCN9224
Enable hybrid mode specific handlers

Change-Id: I764c56c217b951424d699d6861ef8771496dd592
CRs-Fixed: 3339154
2022-11-23 04:42:49 -08:00
Pavankumar Nandeshwar
ab2bd061c2 qcacmn: Enable wbm2sw_release ring for ppe2tcl ring
Enable wbm2sw_release ring for ppe2tcl ring to
handle tx completions

Change-Id: I38e81bb46e376e3f059f321454aa4d241e6aadb7
CRs-Fixed: 3309444
2022-11-23 02:15:55 -08:00
Ripan Deuri
85e7faff70 qcacmn: Add function to check WDS ext peer
Add function to check WDS ext peer.

Change-Id: Ic29cb04fc2830240854921fe3eeadd03e8171979
CRs-Fixed: 3340244
2022-11-21 00:03:45 -08:00
Tallapragada Kalyan
075b483358 qcacmn: wifi DP TX optimization for RMNET pkts
pkts from rmnet device are sent as SG, we see poor
throughput when transmitting these SG frames using
an MSDU extension descriptor. to resolve this issue
we identify if the frame is from RMNET device and if so
copy the headers from skb linear address to the frag
address and provide the frag address to HW for transmission

CRs-Fixed: 3337822
Change-Id: Ic1b7d9f861dcd4f838509772c45e47d3917fc59f
2022-11-21 00:03:36 -08:00