Commit Graph

4006 Commits

Author SHA1 Message Date
Chaithanya Garrepalli
4620e06006 qcacmn: Handle race between WDS add vs peer delete
In case where WDS ast entry is added and next hop
peer is deleted even before PEER map for ast entry
is received free the AST entry

Change-Id: Id65a5649665588e98f85fd0f363bc7d114c56828
CRs-Fixed: 3650748
2023-11-14 12:11:31 -08:00
Neha Bisht
1dfef842a7 qcacmn: Remove prefetch of nbuf data and nbuf length
Remove prefetch of nbuf data and nbuf length since impacting KPI

Change-Id: If4dd3259394dfe37294324a6b66ebbae1ce3eeda
CRs-Fixed: 3657800
2023-11-12 15:23:43 -08:00
Jia Ding
813e5ff2ec qcacmn: Ring IPA TX doorbell with HW HP value
Ring IPA TX doorbell with HW HP value to avoid out-of-sync
scenarios between WLAN and IPA after IPA pipes are disabled
and then re-enabled.

CRs-Fixed: 3479426
Change-Id: Ia88c0228759e241722fe31fd1a252e70484684e9
2023-11-12 15:23:31 -08:00
Rakesh Pillai
a7fe389b77 qcacmn: Fix local_link_id assignment for link peers
Currently the local_link_id is assigned to each
link peer, during peer setup, with an incremental
number, based on the number of peer setup being
done for the link peers corresponding to the same MLD.

The above logic does not handle the link switch case,
where any particular link peer can be created and deleted
multiple times, thereby leading to 'n' number of peer
setups, each assigning an incremental number as the
local_link_id to the link peer. Due to this the local_link_id
value will exceed the MAX_MLO_LINKS ceiling value, and
when this local_link_id is used to set the frequency band
it leads to an out-of-bound array access.

In order to fix the above mentioned scenario, maintain
a mapping of link peer mac address to local_link_id inside
the txrx_peer (common for all link peers) and use this mapping
table to get the local_link_id. This will make sure that during
any link re-purpose, the link peer being setup will regain the
local_link_id which it was assigned during the first time it was
setup.

Change-Id: Ia78413efe328c81bab74b3a048214d3807b6c6c4
CRs-Fixed: 3658539
2023-11-10 02:48:05 -08:00
Kenvish Butani
74e7f3c660 qcacmn: Fix 3addr mode Ping failure
Ping fails if the AP VAP is not a  part of
bridge as it missed the DA Peer checks
Fix is to move the check of MLO dev ctx
after DA peer validation

Change-Id: I3386bd6a4c9a3574893bc836278d9fb02254645b
CRs-Fixed: 3653128
2023-11-10 02:47:52 -08:00
Ripan Deuri
4f68328df1 qcacmn: WDS AST entry cleanup in host
Host can disable AST indication from FW for WDS peer.
In that case there will be a mismatch in AST entries deleted
by host and by FW. Add check to print mismatch when AST
indication is enabled.

Change-Id: If0fb6dce58a95403a0d67db8ca8cf94946455002
CRs-Fixed: 3654166
2023-11-10 02:47:40 -08:00
Rakesh Pillai
b9881b700b qcacmn: Fix nbuf sanity failure handling in wbm error path
Currently when processing the WBM error entries, if there
is an nbuf sanity check failure, i.e. paddr in the srng
entry does not match the paddr from the rx_descriptor, then
the rx_desc flag "unmapped" is being set, without the nbuf
being unmapped and the rx_desc is getting added to the freelist.
This results in the rx_descriptor being replenished with a
new buffer, and the existing nbuf is leaked (without being unmapped).

In order to fix this issue, do not modify any fields of the
rx_desc, since it will be moved to err_state, due to the
sanity failure. Also this rx_desc will not be added to the
freelist, since it should not be replenished due to err_state.

Change-Id: I394cbf884488e75423ada2ad69087c5280bc0ab0
CRs-Fixed: 3656509
2023-11-07 19:05:33 -08:00
Amit Mehta
40d1805fce qcacmn: Add changes to update band info in txrx_peer NULL case
Currently if txrx_peer is NULL in Tx completion or rx process
band update will not happen, which will result in invalid band
issue during connectivity logging.

To fix the issue maintain local link id and use link id to
find link peer and update band information in nbuf cb
based on peer frequency.

Change-Id: Ia5a6001fbc167a497660dc7be39a3e641dd28896
CRs-Fixed: 3654696
2023-11-03 10:10:11 -07:00
Pavankumar Nandeshwar
c71f2aaf75 qcacmn: Clean up global desc pool during Umac reset
Make sure that the global dp tx desc pools are cleaned
up only once during MLO umac reset.

Change-Id: Id6e0ac6532b11ffb9ea190b6ab4d481fb486d853
CRs-Fixed: 3647660
2023-11-03 10:09:59 -07:00
Amir Patel
136b01ad6b qcacmn: Introduce monitor 2.0 packet processing flag
QCA_MONITOR_2_0_PKT_SUPPORT is introduced for packet
processing code.

Change-Id: Ib4de57e3e74ca9161d0cb7e3507f9c28d06b8654
CRs-Fixed: 3647037
2023-11-03 10:09:48 -07:00
Rakesh Pillai
ab914e6f3e qcacmn: Handle stale entry in tx completion ring
Currently SW writes a magic number in the tx completion
ring descriptor after reaping from the ring. This magic
number is used to determine, if the HP of the srng has been
updated without the contents of the ring descriptor has been
written.

There were cases of such stale entries observed and as a SW
workaround, add a logic to wait for a specific timeout for
the contents of the ring descriptor to be updated before
moving on to process subsequent ring entries.

Change-Id: I17c0dc0ac55ca81dee3c0825ce934d60ccb1a720
CRs-Fixed: 3648443
2023-11-03 10:09:13 -07:00
Rakesh Pillai
8f913be763 qcacmn: Save paddr of the prev buffer attached to rx descriptor
One instance of an issue was observed, where there's an
SMMU fault due to an access to paddr, which has been unmapped,
but is shown as active/mapped from the rx_desc data.

Save the paddr of the previous buffer attach to the rx
descriptor to aid in debug. This is to confirm if the
paddr has got updated after the last replenish.

Change-Id: Ib8318883b273be8b722cefec16d18b45daf679a7
CRs-Fixed: 3642902
2023-11-03 10:09:01 -07:00
KARTHIK KUMAR T
18f8a249da qcacmn: Flush the reo rings before cache flush
Flush the reo rings before cache flush during primary tqm change

Change-Id: I99e705a42411b14ed2e28d8ae96aa7c8b4d2a3d1
CRs-Fixed: 3592386
2023-11-03 10:08:36 -07:00
Jinwei Chen
ed6975b47a qcacmn: Reset Mon RX PPDU status at the end of Mon status processing
Scenario:
STA connected to AP and another monitor interface is up,
monitor status ring filter will be configured. If TLV TAG
WIFIPHYRX_GENERIC_EHT_SIG_E is reported in monitor status
buffer, each single status buffer processing will add 1 to
ppdu_info->rx_status.num_eht_user_info_valid, but it never be
reset to 0 in this case. once > 4 times this kind of monitor
status buffer is processed, num_eht_user_info_valid will be
OOB of array ppdu_info->rx_status.eht_user_info.

Reset PPDU RX status when finished processing PPDU RX status.

Change-Id: Ie58e45b3a39b7b88b0f72df2ac3076ddf659147b
CRs-Fixed: 3649604
2023-11-03 10:08:25 -07:00
Srinivas Girigowda
a9395459c0 qcacmn: Fix for missing M2/M4 connectivity log
Issue is: During roaming when tx completion status for M2/M4 frames
are received before peer_id mapping is done, opmode is left to its
default value QDF_MAX_NO_OF_MODE. Because of this opmode value
connectivity log is skipped.

Fix is: In tx completion status path, if peer is NULL then derive
the vdev from the tx descriptor vdev_id, extract and set op_mode.

Change-Id: I4a15b01e792bf26276f529e64c67b0ba3ea5c9ac
CRs-Fixed: 3646119
2023-11-03 10:08:13 -07:00
Amit Mehta
92aea0f061 qcacmn: Fix band info update issue in error case
Currently during error process band is updated if txrx_peer is valid.
but in current logic txrx_peer was retrieved later which will always
result in condition failure and will cause band not to be update.

To fix the issue move getting txrx_peer part before band update.

Change-Id: I3ebec6d695e25c2a19304e11ec780215a26dd016
CRs-Fixed: 3648441
2023-11-03 10:07:49 -07:00
Sai Rupesh Chevuru
dbff0444e6 qcacmn: Use wrapper API to fetch the peer in multipass TX
In the case of MLO sta connection existing API won't be able
to find the mld peer resulting a traffic failure.
Use wrapper API to fetch the peer in multipass TX processing
which will search for both legacy and mld peer.

Change-Id: I161502aba224806914e54a3a04a06b75e52d65bb
CRs-Fixed: 3650259
2023-11-01 04:47:13 -07:00
Chaithanya Garrepalli
06d48f99c7 qcacmn: do not allocate TCL credit ring for BE
As BE chipsets already have 4 TCL_DATA rings
do not allocate TCL credit ring to re-purpose as
TCL_DATA ring

Change-Id: Idf3adbd6394c1a07e48418484083a6aa8946f318
CRs-Fixed: 3636230
2023-10-29 19:50:35 -07:00
Amir Patel
768fbdfce9 qcacmn: Fix assert in TxMON reap path
Avoid logic to detect duplicate cookie in TxMON

Change-Id: Ib3296aff72b016adababb9eb2818420ec49fbb79
CRs-Fixed: 3648225
2023-10-29 03:33:31 -07:00
Shivani Soni
8d4e888c77 qcacmn: Update ppe_vp profile during bank update
Update ppe_vp profile during bank update

Change-Id: I2dff11bfa66ddf3c65ff974cb42da87c78ca8bad
CRs-Fixed: 3646206
2023-10-27 07:38:10 -07:00
Jinwei Chen
e8d518c82c qcacmn: fix TX completion ring NULL pointer dereference issue
If IPA is enabled, index 1/2 in array soc->tx_comp_ring[] will
not be initialized, but initialize index 3/4 instead, if access
to index 1/2, NULL pointer dereference issue appeared.

use soc->num_tcl_data_rings as number of TX completion ring
wlan host interested, it differs between IPA enabled/disable case.

Change-Id: I92b4e2c9971f93136a9f4e60ae3de32140aa2477
CRs-Fixed: 3647677
2023-10-25 23:29:34 -07:00
Himanshu Batra
7dbcea96f9 qcacmn: MLO 3 link simultaneous tx transmission
MLO 3 link simultaneous tx transmission.

Change-Id: I1f92e49a5ea634f99e354dd02737c74bae20c483
CRs-Fixed: 3634563
2023-10-25 09:39:58 -07:00
Anirban Sirkhell
b69c6a113c qcacmn: Round-up average utilization of clients
Client utilization is computed as percentage. Round it
up to the closest integer value.

Change-Id: I324370db447fae8a462a146357b6a50510c7e0b7
CRs-Fixed: 3623584
2023-10-23 15:55:13 -07:00
Mukul Dhiman
90b7cc1e6f qcacmn: remove CONSTANT_EXPRESSION_RESULT with the constant value
remove CONSTANT_EXPRESSION_RESULT with the constant value

Change-Id: Iac209ffd93f415fff22383cb25863c73bd3be6a9
CRs-Fixed: 3631794
2023-10-23 05:59:17 -07:00
Aman Mehta
d4bf137aa0 qcacmn: Update optimization flag for rx avg rate
Update the branch prediction compiler optimization flag for
rx avg rate calculation from unlikely to likely.

Change-Id: I0abe10d27070292995e07914e75b9a137c6c91b7
CRs-Fixed: 3628056
2023-10-20 08:00:19 -07:00
Jeevan Kukkalli
959b66b917 qcacmn: Avoid memzero operation in monitor interrupt handling
Avoid ppdu info structure memzero operation while handling
monitor interrupts. ppdu info structure can be memzeroed
from workqueue context

Change-Id: If2436f7448780926f685ed6a00e14efa68cbfc6d
CRs-Fixed: 3619199
2023-10-19 14:43:06 -07:00
Anirban Sirkhell
aa8c23c911 qcacmn: Fix OOB array access
User-ID starts from 0 and can go upto HAL_MAX_UL_MU_USERS-1.

Change-Id: Iedbc48f03d7375496f34f541c1cca25fef9336df
CRs-Fixed: 3629330
2023-10-18 22:47:23 -07:00
Karthik Kantamneni
6f36269b7a qcacmn: Don't return error when mon status ring replenish fails
Don't return error even when host fails to attach single
buffer to monitor status ring, because in ring process path
buffer attach should be taken care if not done in replenish path.

Change-Id: Id032959234a66d3eb4c35819f760d37eb92a08be
CRs-Fixed: 3634756
2023-10-18 00:53:02 -07:00
Aman Mehta
37e5a76c07 qcacmn: Add ini to control rate filter for rx avg
Adds ini field to control the filter for rx avg rate calculation.
	0     : Filter Disabled
	11000 : Max rate filter (in kbps) supported for filter

Change-Id: I6ae88b7af3d4c1fae033101e77b308949e5b3d1e
CRs-Fixed: 3628056
2023-10-18 00:52:30 -07:00
Amit Mehta
1e13671be4 qcacmn: Rate limit error logs in dp_tx_desc_free
Currently in dp_tx_desc_free for default case
error logs are printed. these logs are not rate limited
which can result in excessive logging.

To fix the issue rate limit the error logs and print
additional information.

CRs-Fixed: 3633307
Change-Id: Ia7beaaac970a098c8c76620077e1f21fedf321ef
2023-10-16 08:18:10 -07:00
Jinwei Chen
d047565c37 qcacmn: Support watermark stats for TX completion srng
Support watermark stats for TX completion srng.

Change-Id: Id13bd12ec9c2723f5b5e5afffedcb939cd5e5d74
CRs-Fixed: 3635719
2023-10-15 22:17:35 -07:00
Himanshu Batra
f6c56895c1 qcacmn: Add support for vdev/peer create/delete cfgmgr message support
Add support for vdev/peer create/delete cfgmgr message support

Change-Id: I623b1339fe706ff4204199ff9e8745ebcdc9cae2
CRs-Fixed: 3636364
2023-10-15 12:11:57 -07:00
Sai Rupesh Chevuru
0975d3709e qcacmn: Delete the mld peer only when all link peers are deleted
During the target recovery avoid mld peer peer deletion
before all the link peers gets deleted.

if peers are deleted during the recovery DP will not receive
peer unmap event as FW is asserted, resulting peers will be
deleted form the mld link peer list where as available in
peer id to obj map. if primary soc goes for the recovery
then mld peer is getting deleted forcefully, where as other
link peer in non primary soc is having reference to mld peer
which is already freed

Change-Id: If4dcd822f4c9bc98757952725592eb6a3f64a5db
CRs-Fixed: 3625483
2023-10-14 08:38:56 -07:00
Himanshu Batra
d0faedd65a qcacmn: Add support for cfgmgr interactions
Add support for cfgmgr interactions

Change-Id: I9ac15639c61784e250318f290c47db4e840f8a13
CRs-Fixed: 3633890
2023-10-14 05:39:52 -07:00
Mukul Dhiman
9efe25420e qcacmn: resolve Unchecked return value
resolve Unchecked return value for dp_get_srng_ring_state_from_hal

Change-Id: Idfd3e0c52a9d582a797c96f00306552bbb014ce2
CRs-Fixed: 3627801
2023-10-14 00:01:19 -07:00
Manikanta Pubbisetty
996e50f765 qcacmn: Fix compilation error due to missing break statement
Fix compilation error due to missing break statement in
dp_rx_err_handler_rh().

Change-Id: I774c46996f01b6d961488e22791c4935c49db743
CRs-Fixed: 3635098
2023-10-11 20:52:15 -07:00
Rakesh Pillai
fb93c36d8d qcacmn: Do not call stats_cb after vdev is deleted
Currently before calling the stats_cbk we do not
check if the vdev has been deleted or not. There is
a case where vdev might be deleted (but not freed due
to pending ref-count) and the osif_vdev will be freed
as a part of the delete sequence. In this case, calling
stats_cbk with dangling pointer to osif_vdev will lead
to an access to memory which has been freed.

To mitigate this issue, check if the vdev has been marked
for deletion, before calling the stats_cbk in tx completion
path.

Change-Id: I32ef68f45f172fc903ab597a62bb4b3e3cb0f574
CRs-Fixed: 3635454
2023-10-11 08:22:21 -07:00
Chaithanya Garrepalli
c88f3c2d9a qcacmn: Fix overflow issue with hlos_tid_override set
In dp_tx_fast_send_be() fix issue while updating
hlos_tid_override bit in TX descriptor

Change-Id: I470d5140585ad3abefcb1345b52dc0caa3cf6fe4
CRs-Fixed: 3631006
2023-10-11 02:13:08 -07:00
Namita Nair
552f04acdf qcacmn: Check return value of nbuf_map in tx_ipa_smmu_map
Currently the return status of qdf_nbuf_map_single()
is not checked in dp_tx_ipa_uc_attach(). This change adds
the check to ensure that each nbuf in the TX buff pool,
is successfully mapped before providing the nbuf
to be IPA SMMU mapped.

Change-Id: Ic40479af8f2eaa2ced87b20a25250844e5e146bf
CRs-Fixed: 3629564
2023-10-11 02:12:57 -07:00
Nandha Kishore Easwaran
15654da3ec qcacmn: Revert - Move lithium specific code into 1.0 files
This reverts commit I3504052e7d717bb6e26af1b3980c2bb926df9a9b

Reason for revert: 2.0 tx ops registration failure

Change-Id: I1c27fb337e33b6533185a52a809f2b13b09edf45
CRs-Fixed: 3636070
2023-10-10 19:37:47 -07:00
Ruben Columbus
70b5c653d0 qcacmn: set customizable rx_buffer_size
introduce custom rx_buffer_size from INI within the bounds of
2048-4096

Change-Id: I17ad727cea74fc559d6407d3c8662cb6a4cd6b0a
CRs-Fixed: 3631271
2023-10-10 19:37:37 -07:00
Varsha Mishra
a4a989e5b7 qcacmn: Fix nbuf leak in tx datapath
Free nbuf_clone before returning from dp_tx_mlo_mcast_multipass_send.
Since this API is allocating nbuf_clone, it has the responsibility
of freeing it.

Change-Id: I7a1334a1d941ec352533e788a65596a1b12ae08a
CRs-Fixed: 3628989
2023-10-10 19:37:26 -07:00
Chaithanya Garrepalli
47296136e3 qcacmn: replenish complete rx_refill ring in UMAC reset
In case of UMAC reset if in_use buffers are sufficient
to fill complete RX refill ring we are replenishing
only 1/3rd ring at pre-reset.

In case of low threshold interrupts disabled ring might
be never refilled. At post reset refill complete ring.

Change-Id: I0e4ed942120619ef357bc91f8cbbab8c1fd1b06e
CRs-Fixed: 3628996
2023-10-10 07:08:30 -07:00
Nandha Kishore Easwaran
c779207718 qcacmn: Move lithium specific code into 1.0 files
Move lithium specific monitor code into monitor 1.0 files.
Donot include 1.0 specific files when CONFIG_LITHIUM is not defined.

Change-Id: I3504052e7d717bb6e26af1b3980c2bb926df9a9b
CRs-Fixed: 3615746
2023-10-09 02:13:18 -07:00
Venkateswara Naralasetty
55527a7c79 qcacmn: Changes required to enable monitor mode for Rhine architecture
Changes required to enable monitor for Rhine architecture.

Change-Id: Ib2558c9e61a3e55a68c0f612aed7a153feeb3f17
CRs-Fixed: 3631592
2023-10-07 00:01:33 -07:00
Ruben Columbus
ab8c55ec38 qcacmn: correct casting and array write index
- correct uint32_t* casting to uint16_t* given that it can overwrite values
after is dereferenced
- correct check for "for loop" max iteration as it could pass and
overwrite max array size.

Change-Id: Id2b02d1eea8c4ce4d962160bea99358fe3ab5cf7
CRs-Fixed: 3622399
2023-10-06 18:25:57 -07:00
Amir Patel
ce99e4ef10 qcacmn: Add debug to catch non-consecutive duplicate descriptor
Add debug to catch non-consecutive duplicate descriptor in monitor

Change-Id: I253cecf472d5d75154f5791f85761da2f6d9076e
CRs-Fixed: 3628868
2023-10-06 15:30:22 -07:00
Amir Patel
a7be27e5de qcacmn: Fine tune monitor dup desc WAR
In existing host WAR, we set pre_desc to NULL. Due to this
duplicacy across PPDUs is not caught. remove setting prev_desc to
NULL.

Change-Id: Ib2c903eb768fa399c37e9b1d17b661b9ae1c1d2a
CRs-Fixed: 3629867
2023-10-06 03:04:45 -07:00
Amit Mehta
70b27b1e08 qcacmn: Add changes to account for encryption header size
This reverts Change-Id: I521b0990fe9e5746a8c8cfb29de7064cf51d0687
(qcacmn: Add fix for encryption fragment ping)

Original change has removed logic to Account for encryption
header size during 802.11 header decapsulation. Which is resulting
in DHCP failure in fragmented DHCP frames, as N/W stack is dropping DHCP
offer due to invalid payload.

Revert back to account for encryption header size during
802.11 header decapsulation

Change-Id: I246e19bf7637d3b66b5d0b3648c76d8765502ac6
CRs-Fixed: 3627678
2023-10-06 00:12:35 -07:00
Neha Bisht
f0e5c491a8 qcacmn: Use FAST_FLAG for simplified nbuf map operation
Use FAST flag instead of SIMPLE flag for simplified nbuf map operation

Change-Id: Ie4f0e6b691876eb04351efe9da94578b98c4258c
CRs-Fixed: 3629314
2023-10-06 00:12:23 -07:00