Commit Graph

518 Commits

Author SHA1 Message Date
Manikanta Pubbisetty
b5f74912c1 qcacmn: Add TX completion logic for WCN6450
In the case of WCN6450, WBM HW block is removed in the UMAC.
TX completions come via HTT messages. Add logic to handle
HTT TX completion messages from the firmware.

Changes are specific to WCN6450 and hence implement the logic
in the arch specific code.

Change-Id: I447020354ce26e8948e4b49648c434fb2ed302cd
CRs-Fixed: 3381814
2023-03-29 01:13:21 -07:00
Karthik Kantamneni
0562ed7a5e qcacmn: Code to init/deinit SOFTUMAC based Rhine architecture.
This code helps to initialize and deinitialize new SOFTUMAC
based Rhine architecture.

Change-Id: I374140ccb3b31e9351c6e683c77d81a5a876472a
CRs-Fixed: 3382913
2023-03-28 11:30:30 -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
syed touqeer pasha
c928ef0e59 qcacmn: Add support for extended statistics with DS
Add support to handle the extended Tx completion
statistics during direct switch mode.

Change-Id: If1b6906d5d2b3156ead8ef039524f47e763cb543
CRs-Fixed: 3431840
2023-03-20 04:49:25 -07:00
KARTHIK KUMAR T
a53b5d3e62 qcacmn: avoid mesh vdev check incase of single dev model
avoid mesh vdev check incase of single dev model

Change-Id: I7faac78cb81cb1c152191b01f067d48ad8938d08
CRs-Fixed: 3425905
2023-03-17 07:20:06 -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
Amrit Sahai
24dc3d385c qcacmn: Add Support of TX MLO Link Stats for ML Peer
Add Support to update TX per packet path, MLO Link
statistics for ML Peer.

Change-Id: If8aa5433221ecbb7d84b3f6777784524f43179a3
CRs-Fixed: 3397721
2023-03-08 07:42:28 -08:00
Sai Rupesh Chevuru
10826afad5 qcacmn: Adding NAWDS support along with WDS-EXT
Adding NAWDS support along with WDS-EXT

Change-Id: I19d277fa575750d3194afc9ec9af3180a8c936ad
CRs-Fixed: 3406151
2023-02-24 07:04:50 -08:00
Pavankumar Nandeshwar
0a7d729a98 qcacmn: Reuse the tx descriptors in direct switch
Reuse the tx descriptors released in tx completions
without releasing the associated skbs to reduce
the cpu utilization in direct switch mode.

Change-Id: I4ab3ac58977a626344877b8a818a4dbc4864aaf3
CRs-Fixed: 3393968
2023-02-18 20:50:25 -08:00
Jeff Johnson
88f4d0b0c6 qcacmn: Fix dp/wifi3.0/dp_tx.* documentation
The kernel-doc script identified a large number of documentation
issues in dp/wifi3.0/dp_tx.[ch], so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: I7a09c451f3f4af3dd606778c49cce81677f6fe58
CRs-Fixed: 3373159
2023-02-13 14:01:59 -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
KARTHIK KUMAR T
7ae4979be0 qcacmn: Add mcast enhance flow for single dev
Add mcast enhancement for single dev/bonding feature

Change-Id: I8bc0c3c78e3eb8c6679e00442d607615bab38f96
CRs-Fixed: 3350461
2023-02-05 04:33:10 -08:00
Sai Rupesh Chevuru
9d8b5fa06d qcacmn: Set host inspect in the case of wds_ext
Set host inspect in the case of wds_ext

Change-Id: I5d14aede300694faca6bf81813e4f66752419239
CRs-Fixed: 3377865
2023-01-27 12:56:34 -08:00
Vivek
b7fe763018 qcacmn: Check for enqueue timestamp for Tx delay calculation
The Tx delay computed is very large if the enqueue
timestamp is zero.
Compute Tx delay only when the enqueue timestamp is valid.

Change-Id: Ic4032a6f4a01fc661dc1155a4543cd7fc4216970
CRs-Fixed: 3354639
2023-01-21 02:56:05 -08:00
Jeff Johnson
5b69a94a15 qcacmn: Make dp_tx_tso_cmn_desc_pool_*() functions static
The following functions are currently public functions:
dp_tx_tso_cmn_desc_pool_alloc()
dp_tx_tso_cmn_desc_pool_init()
dp_tx_tso_cmn_desc_pool_deinit()
dp_tx_tso_cmn_desc_pool_free()

However these functions are only called from within the file where
they are defined, so make them static.

Change-Id: If57b36398e0cf6a33be2b85bc00d651fe5ed9a71
CRs-Fixed: 3371860
2023-01-19 09:32:22 -08:00
jinbaoliu
784a94ace9 qcacmn: Code optimization: extract common code snippet to a function
This change extracts several common code snippet and put
them into a new function. This can keep the code clean.

Change-Id: Ib13f06903db2efbf0e447436fb5abb1386cdd41d
CRs-Fixed: 3370243
2023-01-17 14:50:01 -08:00
Mukul Dhiman
30f8589d11 qcacmn: remove unused var in dp/wifi3.0/dp_tx.c
remove unused var and declarations in  dp/wifi3.0/dp_tx.c

CRs-Fixed: 3284798
Change-Id: If4f9b46196a254dd51ae1dcf7e9aa45f1265851d
2023-01-08 23:17:34 -08:00
Yeshwanth Sriram Guntuka
b480a61386 qcacmn: Add support for marking to_fw for all tx pkts of a vdev
Add support for marking to_fw bit for all tx packets
for a given vdev.

Change-Id: I7306e22e81303720830cfce4ce19b15d2080d93c
CRs-Fixed: 3369897
2023-01-07 17:59:21 -08:00
Amrit
f5eca8f1a9 qcacmn: Add NULL check for delay stats
Add NULL check for delay stats in txrx_peer

Change-Id: I3852be1b112a9a105af57890d1636d86a747b2ab
CRs-Fixed: 3365940
2022-12-29 07:17:07 -08:00
Neha Bisht
0ec15d3777 qcacmn: Move TDLS feature code under mcc macro
Create a wrapper API and move TDLS feature code under mcc macro

Change-Id: I98a8faf96dc23c6c5486cf30656bcf7facd0ba58
CRs-Fixed: 3360587
2022-12-28 15:33:37 -08:00
jinbaoliu
5a1cd48520 qcacmn: Fix TX stastics failed to take TSO segment into account
Currently, we record TX musdu number and packet length, which falls into
three categories: from stack, from host and successfully transmitted. In
TSO mode, the msdu from stack will be divided into several fragments and
each of the fragment will be transmitted as an individual msdu. This change
will take TSO into account when it comes to the 3 forms of TX statstics.

Change-Id: Ie11cb7541b4e109609bf3104739a5e19f51dcc13
CRs-Fixed: 3361412
2022-12-28 06:15:15 -08:00
Sreeramya Soratkal
d148f093d2 qcacmn: Handle allocation of descriptors to special packets
Special frames like EAPOL should not be dropped as it would cause
failure in connection. To prevent the dropping of higher priority
special frames, reserve a set of descriptors from the tx descriptor
pool.

Check the regular soc or pdev limit for the allocating tx descriptors
for the regular packets and use the reserved set of descriptors
only for the special packets.

CRs-Fixed: 3331359
Change-Id: I15532fb5e325ba6ad997090008bda8c52707a05b
2022-12-27 17:07:26 -08:00
KARTHIK KUMAR T
a2625b18ab qcacmn: Get ast_idx from dp peer structure
Get the ast_idx from dp peer structure to
set search index in HW tx descriptor

Change-Id: Icc7e70d8bb739348403663a1fe647849c57d277a
CRs-Fixed: 3346449
2022-12-27 14:27:45 -08:00
Sreeramya Soratkal
bbfcdad485 qcacmn: Fix double increment of EAPOL drop stats
The stats to indicate the packet drop for EAPOL packets increments twice
in an instance. Fix this double incrementing of stats counter.

CRs-Fixed: 3365584
Change-Id: I524fa1a196452089c94acf50b52db0b00f562317
2022-12-26 03:24:59 -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
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
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
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
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
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
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
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
Venkateswara Naralasetty
26b3d560fe qcacmn: add near full logic for Tx completion ring
Reap mode desc from the Tx completion ring in case the number of
available entries are less than the half of the ring entries.

Change-Id: I3635b88c3e98cc8a5f30fc58cf5e353f6301d4ad
CRs-Fixed: 3325826
2022-11-17 11:45:15 -08:00
Sreeramya Soratkal
97b9620964 qcacmn: Add stats to indicate drop in EAPOL frames
Add the stats to indicate the packet drop for EAPOL packets.
This will be useful for the debug of EAPOL packet drop.

CRs-Fixed: 3329895
Change-Id: I5e0abb4e574116a55de124c0012c17154c7c63da
2022-11-16 13:39:20 -08:00
Amrit Sahai
9313b57907 qcacmn: Add support to get jitter stats on peer level
Add support to get jitter stats on peer level

Change-Id: I5e37a24e93cde5e34e561b26c0834d9cfe42bf9f
CRs-Fixed: 3296380
2022-10-20 01:11:44 -07:00
Pavankumar Nandeshwar
004224830d qcacmn: Allocate dedicated tx desc pool for ppeds
Allocate dedicated tx desc pool for PPE2TCL ring
tx completion handling.

Change-Id: I3d3220b9b38b6f24d98ce73cb5273ae4dc6e7f37
CRs-Fixed: 3300660
2022-10-13 15:09:49 -07:00
Neelansh Mittal
83990186aa qcacmn: Add PPE Tx/RX changes
Add support for:-
   1. PPE VP entry attach and detach.
   2. Per VAP PRI2TID Support
   3. Dump the PPE VP HW entries.
   4. Add tx completion handling for ppeds descriptors

Change-Id: I2a6d0be5bb556663a39a24d17b703877f3b5ad00
CRs-Fixed: 3276981
2022-10-13 15:09:43 -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
Prakash Manjunathappa
44ece0c600 qcacmn: Do not free Tx flow pool in case of MLO link switch
In case of MLO same adapter maps to both vdevs. Tx is done with
primary link vdev pool. In link switch case vdev0 flow pool is
deleted and traffic will continue to flow with same vdev0 flow_id
This is resulting in packets drops within the driver due non-availibilty
of flow pool.
Fix this by skipping flow pool deletion in case of STA MLO connection.

Change-Id: Ie56ea221f7f254484bd31ec4880f2155779fb513
CRs-Fixed: 3292979
2022-09-30 04:26:21 -07:00
Srinivas Girigowda
7cb3b7dd47 qcacmn: Fix issues reported by static analysis tool
Add changes to fix issues:
1. Array out of bound access
2. Arithmatic expression overrun

Change-Id: Idf9bdea33422015e0310e57d005f7d6941f8151e
CRs-Fixed: 3298301
2022-09-26 17:43:48 -07:00
Ananya Gupta
a4b2a03200 qcacmn: Pause Tx HW enqueue when bus suspend in progress
In SAP due to intrabss forwarding, Tx ring update is going through
when WOW enable command has been sent to FW. This results in crash.
To fix this, do not update HP when apps suspend is in progress.

Change-Id: Id4176224563bdd759828397fa1cd23de1598192e
CRs-Fixed: 3294407
2022-09-21 20:02:51 -07:00
Sai Rupesh Chevuru
c16d4c0cd9 qcacmn: Check for valid peer_id in exception path
Sometime DP might receive a exception packet with
already deleted peer id. Added a check to avoid sending
such packets.

Change-Id: Ib43d55c7930e4ddc7550d486505a56cb48e85afe
CRs-Fixed: 3285034
2022-09-19 03:16:20 -07:00
Vivek
d1f06c6992 qcacmn: Add call to API to update delay average
Add call to API to calculate the moving average fo delay for
the following
	NW Delay
	Wifi SW Delay
	Wifi HW Delay

Change-Id: I35afa4d83e474b0173cc1f4b9b6456b9fe2c963c
CRs-Fixed: 3286176
2022-09-17 04:32:29 -07:00
Ripan Deuri
94c2c62746 qcacmn: Calculate Tx delay stat in microsecond
Add changes for computing wifi host and hardware Tx delay
in microsecond.

Change-Id: I7a54e9ee9785d878660f9e5226c315cf96064572
CRs-Fixed: 3254259
2022-09-13 19:59:00 -07:00
nobelj
3e3726cc7a qcacmn: Add fix double free in reinject handler
Add fix for double free in Reinject handler. Issue is seen when mesh vap
is present.

Change-Id: I288b1131974c8a3edb83c1b3b2a7a856c4ccbcbf
CRs-Fixed: 3276670
2022-09-12 13:58:43 -07:00
Rakesh Pillai
d706698dd1 qcacmn: Add support for fragmented history recording
Currently the history recording for any debug purpose
is done using a contiguous memory chunk. For certain
history like tx_hw_ring, tx desc or tx completion desc
history, the amount of contiguous memory required is
very huge (order 7 or 8 allocation), which have a
higher probability of failing.

In order to mitigate the above scenario, introduce the
support for recording debug history into fragmented
chunks of memory, thereby reducing the requirement of
contiguous memory.

Change-Id: Iac4fb38b6d4b095766520899853e68b4c2b83afc
CRs-Fixed: 3282269
2022-09-08 04:38:02 -07:00
Harsh Kumar Bijlani
d12768c4c4 qcacmn: Change order of conditions for peer stats update
Change order of conditions for peer stats update for KPI optimization.

Change-Id: If764ecaf575f9fc60f5c6d3332a7716b6a50be65
CRs-Fixed: 3281386
2022-09-03 00:14:19 -07:00
aloksing
c31daef130 qcacmn: fix compilation issue without monitor support
Compilation is failing when Monitor support is disabled
Moved monitor related API and structure to monitor header files.

CRs-Fixed: 3257872
Change-Id: Ie1b3dc16b38c88bfd73fc89aaa395d4b57a61e5c
2022-08-31 16:04:27 -07:00
Tallapragada Kalyan
3203b7bf92 qcacmn: pipeline prefetch of tx comp ring for BE
pipeline prefetch of tx comp ring for BE

CRs-Fixed: 3272534
Change-Id: Ib1091b5163e75b56be08fbbf87c26b1c77638b76
2022-08-22 03:25:41 -07:00