Commit Graph

4154 Commits

Author SHA1 Message Date
Amir Patel
8af70480b3 qcacmn: Fix compilation issues
Fix compilation issues when QCA_KMEM_CACHE_SUPPORT
is not defined

CRs-Fixed: 3577327
Change-Id: I0715e6d5702aab793823a0b42c1eea5322eadb74
2023-08-03 13:17:47 -07:00
Jeevan Kukkalli
2e35a8785e qcacmn: Fix lite mon deallocation
Lite monitor deallocation should happen before mon rings deinit.
Call lite monitor dealloc function before mon rings deinit

Change-Id: I9b93945ccc092ff524555e8a4aa9cd2e3877f70f
CRs-Fixed: 3578630
2023-08-03 10:04:02 -07:00
Himanshu Batra
c290e36c21 qcacmn: Setup max BA value for tids for mesh peers during peer add
Setup max BA value for tids for mesh peers during peer add

Change-Id: Ia18f5d65db819d87b81c217e5e11fba3316b8d16
CRs-Fixed: 3536290
2023-08-03 03:41:19 -07:00
Gaurav Saini
a211d644c5 qcacmn: Finding ast entry based on vdev
Currently,  ast entry is not found when VDEV ALL
is there. Change is finding the ast entry when
particular vdev is passed and, also when vdev
all is passed.

Change-Id: Ib71b843c74b9a64cb15f221577ee8e2d30614973
CRs-Fixed: 3575721
2023-08-02 17:59:04 -07:00
Karthik Kantamneni
c88b38afa1 qcacmn: Fix RBM id assignment for Rx buffers in Rhine
Currently RBM id is not assigned properly for RX buffers
in Rhine architecture. Fix this by assigning RBM id during
soc attach in Rhine.

Change-Id: I8f3a781bfaf81366417107f4bd3da61b142ca1e2
CRs-Fixed: 3573342
2023-08-01 20:30:36 -07:00
Jeevan Kukkalli
07824cbd75 qcacmn: Fix indentation
Fix indentation in status tlv processing function

Change-Id: Ie575c71ebdf3def30ec2a914cdca44442a6a9fa3
CRs-Fixed: 3575953
2023-08-01 20:29:53 -07:00
Amir Patel
dae2d5c316 qcacmn: Adjust mon ring fill level based on num_entries
Adjust mon ring fill level based on num_entries in ring

Change-Id: Iaa6fa2f1c3742a60b5980bbf153ddc7b03733168
CRs-Fixed: 3575947
2023-08-01 20:29:33 -07:00
syed touqeer pasha
3041fbd68f qcacmn: Handle HW coookie conversion disable in DS mode
Direct switch support to handle Rx cookie conversion
when HW cookie conversion is disabled.

Change-Id: I861d854fbeecc2c70e87be3f289915b7e915985d
CRs-Fixed: 3547681
2023-08-01 20:29:12 -07:00
Karthik Kantamneni
a671ff2ee1 qcacmn: Modify refill buff pool enqueue to use max_bufq_len
Currently Refill buffer pool enqueue is using POOL_SIZE
macro, but there is possibility of dynamically configuring
max pool size less than that. So use max_bufq_len which will
be configured dynamically during refill pool init instead of
POOL_SIZE macro.

Change-Id: I610b5dff71861254aa8b6d30e2c562bd7316e120
CRs-Fixed: 3575599
2023-08-01 20:29:01 -07:00
Karthik Kantamneni
838ed5edf5 qcacmn: Mark nbuf cb for offloads handled frames in Rhine
Mark nbuf cb if Rx packet is routed via offloads, this gives the
info whether particular packet rx ring routing info is correct or
whether packet has entered offloads layer and rerouted back.

Change-Id: Ib3ad71216c514381d0bce1fb4744550d91880254
CRs-Fixed: 3540537
2023-08-01 09:38:01 -07:00
Sai Rupesh Chevuru
7157add22c qcacmn: Avoid wdi events for bss peer
As the bss peer is closely tied with the vdev creation
and deletion, listeners might be uninitialized and result
race conditions. send an event only to the connected peers.

Change-Id: Ia0ae063c92bba38d2fb67fe4eae84f5562991fa2
CRs-Fixed: 3574176
2023-07-31 02:12:38 -07:00
Mukul Dhiman
59ec56d44f qcacmn: add partner vdev debug prints in TXRX_AST_STATS
add partner vdev debug prints in TXRX_AST_STATS

Change-Id: Icf3cc557572519e43e3135e2b22ff457982a8d32
CRs-Fixed: 3571207
2023-07-30 19:08:19 -07:00
Amit Mehta
8a052c3b88 qcacmn: Get correct peer id in htt tx completion
Currently in htt tx completion for MLO connection
host is not converting peer id into ml peer id.

Due to wrong peer_id host is not able to find txrx_peer
due to which stats are not getting updated.

To fix the issue in case of MLO connection convert
received peer_id into MLO peer_id.

Change-Id: I2e90104053d59a319d46a2628c4e9cdcb32832a0
CRs-Fixed: 3574182
2023-07-28 23:43:08 -07:00
Lin Bai
09432f7ace qcacmn: Compute pages required by SPT properly
Compute the required pages properly, when num_descs is not
multiple of DP_CC_SPT_PAGE_MAX_ENTRIES(512).
For example, if num_descs less than DP_CC_SPT_PAGE_MAX_ENTRIES,
then 1 page needed rather than 0.

Change-Id: I1c4b12cfebef6a9b315baf9044355caab1b112de
CRs-Fixed: 3571562
2023-07-28 23:42:57 -07:00
Sai Rupesh Chevuru
227c8c9aaa qcacmn: In peer WDI events use the vdev id instead of osdev
In peer WDI events use the vdev id instead of osdev.

Change-Id: I1dd702acba2721712222a4985b4747050647b4e0
CRs-Fixed: 3571299
2023-07-27 08:32:32 -07:00
Santosh Anbu
22a0b8805b qcacmn: Print mon dst interrupt threshold
Add change to print monitor destination ring interrupt
threshold values.

Change-Id: I5750d7e491e4e8761b4dca61630c2f04355b0b59
CRs-Fixed: 3569507
2023-07-27 04:51:12 -07:00
Santosh Anbu
32d27588db qcacmn: Update mon dst interrupt from INI
Add change to update monitor destination ring interrupt handling
thresholds from INI.

Change-Id: Ibfced2b809ac2101171e8fe9f58e021a5a1f8ccf
CRs-Fixed: 3569507
2023-07-27 04:50:58 -07:00
Jeff Johnson
9ce54cdba4 qcacmn: Fix dp_tx_tso_num_seg_pool_init_by_id() stub
The dp_tx_tso_num_seg_pool_init_by_id() stub implementation has an
incorrect semicolon, so remove it.

Change-Id: Ie70aafdb83116e3e3fb7bd96223b0c770e80eb7f
CRs-Fixed: 3500205
2023-07-26 21:24:51 -07:00
KARTHIK KUMAR T
63bf6f5d07 qcacmn: Added code to include rx packet tlv hdr
Added code to include rx_pkt_hdr_tlv in
rx packet tlvs header

Change-Id: I0609cf94e3b53cf625f7c347d86e42fe815e452e
CRs-Fixed: 3563009
2023-07-26 10:52:45 -07:00
Sushant Butta
8b9b8a9a16 qcacmn: Add check to validate length of packet buffer
Add check to validate length of the packet
buffer before adding to skb.

Change-Id: I78cf436c4bf6a00b1aa08ef82cb790c2b3478733
CRs-Fixed: 3553974
2023-07-25 15:21:59 -07:00
Hariharan Ramanathan
ab649e0622 qcacmn: Featurization of DP_TX_DESC_POOL_OPTIMIZE
1. In lowmem profiles the number of tx_desc in 4th pool is reduced to
quarter for memory optimizations.
Added new API dp_get_updated_tx_desc which will return the desc value
from INI based on the flag DP_TX_DESC_POOL_OPTIMIZE.

2. Changes to introduce new INI to get reduced desc value for 4th tx
desc pool.

This helps optimize 0.75M per SOC in lowmem profiles.

Change-Id: I033fcaeb843019fb03bb77e0d05a3ebf60fa806a
CRs-Fixed: 3557483
2023-07-25 00:19:37 -07:00
Amit Mehta
ca46c1b02d qcacmn: Add changes to get link_id in reo error path
Add changes to get link_id in reo error path.

Change-Id: Ia0ac59318b992be97be5ae15a8e111a730866609
CRs-Fixed: 3566184
2023-07-24 15:51:19 -07:00
Mukul Dhiman
fe14b1901b qcacmn: dp stats aggregate handling for bridge vap in mlo
dp stats aggregate handling for bridge vap in mlo

Change-Id: I4bb934776a35f76b091694de024b173c744ac087
CRs-Fixed: 3557225
2023-07-24 05:10:18 -07:00
Hariharan Ramanathan
5ec64fb74d qcacmn: Featurization of DP_TX_EXT_DESC_POOL_OPTIMIZE
This flag DP_TX_EXT_DESC_POOL_OPTIMIZE if enabled will reduce the number
of ext tx desc pool to 1.

1. Changes done to split the tx_desc and ext_tx_desc pool number
variables in alloc and free path. Based on this flag the reduced
ext_desc_pool count will be returned.

2. In Tx path, since the pool id is selected based on the CPU, changes done
to override the desc_pool_id of ext_desc_pool via new API
dp_tx_ext_desc_pool_override to 0 with which from whatever core the packets
comes from, pool 0 will be chosen for ext_desc.

Change-Id: Iae8bf9952a136ba2c55256d8f305b6d5fbde5d83
CRs-Fixed: 3552532
2023-07-21 16:50:14 -07:00
Gaurav Saini
552bef7535 qcacmn: Moving peer find function in common path
peer find by mac function is getting used by
many components. so, Movng that to common path.

Change-Id: I390b86af73618661857ed80d478fe4f48bee9fe1
CRs-Fixed: 3563204
2023-07-21 10:23:45 -07:00
Jia Ding
f3fcb9b56e qcacmn: Initialize ipa_mapped to 1 in soc attach
Two SMMU issues are seen on IPA domain with regard to RX.
1. map without unmap
2. Buffers not mapped into IPA.

With If198a6c5f22af58fdaf9d9c020c74b1f76002e37, mapping
RX buffers to IPA domain are deferred to IPA enable pipes
phase with soc->ipa_mapped flag check added. This leads
to a race window where RX packets are routed to WLAN Host
first with soc->ipa_mapped still being 0. In such case, RX
buffers handled by WLAN driver will neither unmap from IPA
domain nor map into IPA domain.

For !ipa_config_is_opt_wifi_dp_enabled(), fix is to set
soc->ipa_mapped to 1 earlier in soc attach phase instead of
IPA enable pipes phase. With this fix, RX buffers can be unmapped
from IPA domain and mapped to IPA domain in dp_pdev_rx_buffers_attach()
and dp_pdev_nbuf_alloc_and_map_replenish() in WLAN host RX path so
as to avoid above two SMMU issues.

Change-Id: Idcb86db99f522959b639865f77178cd47a234277
CRs-Fixed: 3560191
2023-07-20 19:19:34 -07:00
Srinivas Girigowda
afd51dc121 qcacmn: Add local packet capture type based filtering
For the control frames regenerated by the host driver based on the
TxMon TLV, add the local packet capture type based filtering.

Change-Id: If6b47368ce36524e1c84c51c298278ced671b915
CRs-Fixed: 3531895
2023-07-18 22:55:44 -07:00
Manikanta Pubbisetty
cbe8170798 qcacmn: Add HIF CE RX support to WBUFF
Currently, WBUFF is being used only for WMI TX buffers.
Add HIF CE RX buffers support to WBUFF in an effort to re-use
the copy engine RX buffers instead of freeing/allocating buffers
for every CE RX transaction. This fixes the problem of CE RX
memory fragmentation.

Change-Id: Id9c043a5c5d0882a7994fa03cd8c335555d46b8d
CRs-Fixed: 3534539
2023-07-18 09:51:03 -07:00
Mukul Dhiman
8c4f4c721c qcacmn: Add cdp api to fetch mldev mode
Add cdp api to fetch mldev mode

Change-Id: I06ed37ddbce96249e957f1664082bffe5afb2fc5
CRs-Fixed: 3501087
2023-07-18 04:13:04 -07:00
Aditya Kodukula
22eb121fe7 qcacmn: Fix improper arguments for QDF_MAC_ADDR_REF
Currently in driver while using QDF_MAC_ADDR_FMT to print mac
address, the mac address reference provided to QDF_MAC_ADDR_REF is
incorrect in some cases. Fix all such instances.

Change-Id: I324581691dfe683e0d5b046e19b444928657ce05
CRs-Fixed: 3556423
2023-07-17 22:37:45 -07:00
aloksing
754c291a51 qcacmn: Do not update tx rate stats for fixed rate
Update rounded avg rate only for qos tid and if TX is
not at fixed rate.

CRs-Fixed: 3531181
Change-Id: I03a9a2b88b7859bd230672e6ac321d31a71defef
2023-07-17 22:37:23 -07:00
Karthik Kantamneni
9b0e01604d qcacmn: Add support to configure MSDU max aggregation limit
Currently FISA max msdu aggregation limit is fixed and always
programmed as 0xf, but there are platforms which support different
aggregation limit. So add support to configure different aggregation
limits while sending HTT FISA config message to F.W.

Change-Id: Icbf9b7a48a88dcbfb812e92c8f4032753fc07dc4
CRs-Fixed: 3542497
2023-07-16 10:23:54 -07:00
Azmath Mohammed
2baa26c9b4 qcacmn: Added a check in "dp_hw_cookie_conversion_detach"
When the mem_alloc fails and fails to create spinlock
checks the mem allocation before destroying spinlock.

Change-Id: Id4c1a509cd0bb534040040f6948d3307181dc909
CRs-Fixed: 3552551
2023-07-14 15:41:57 -07:00
Sai Rupesh Chevuru
a7af205870 qcacmn: populate the bridge vap in partner list
populate the bridge vap in partner list

Change-Id: Ie7c0ebc3b796f2b57e7837577079dcd1d4faac45
CRs-Fixed: 3550201
2023-07-14 10:07:31 -07:00
Venkateswara Naralasetty
51ddb93d21 qcacmn: add periodic and host Tx/Rx stats support for WCN6450
Changes required to support periodic and host Tx/Rx stats for WCN6450.

Command to request and dump the host Tx/Rx stats,
iwpriv wlan0 txrx_stats <stats no> <mac_id>
mac_id: 0 - mac0(5 GHz), 1 - mac1(2 GHz)
        0 for single mac
stats no: 20 - TXRX_CLEAR_STATS
	  21 - TXRX_RX_RATE_STATS
	  22 - TXRX_TX_RATE_STATS
	  23 - TXRX_TX_HOST_STATS
	  24 - TXRX_RX_HOST_STATS
	  25 - TXRX_AST_STATS
	  26 - TXRX_SRNG_PTR_STATS
	  27 - TXRX_RX_MON_STATS
	  29 - TXRX_SOC_CFG_PARAMS
	  30 - TXRX_PDEV_CFG_PARAMS
	  31 - TXRX_NAPI_STATS
	  32 - TXRX_SOC_INTERRUPT_STATS
	  33 - TXRX_SOC_FSE_STATS

Change-Id: Ibda4d531c9074a24f8c39916b44d9e3c38f189ee
CRs-Fixed: 3485279
2023-07-13 00:42:11 -07:00
nobelj
6f8e9cffb0 qcacmn: Add support to configure rbm id through ini
For legacy tx monitor, we need msdu completion in sequence.
Modifying the return buffer manager id during enqueue will serialize
the msdu completion.

Return buffer manager will be over ride only when tx_monitor
is turned enabled.

Change-Id: I500065077b59b3ea3561ec8fc49af8cbe58c1dfe
CRs-Fixed: 3539636
2023-07-12 19:03:57 -07:00
Shashikala Prabhu
5c5c9a57a7 qcacmn: Correct the data type of the pending_action enum
The data type of pending_action in 'struct dp_soc_umac_reset_ctx' is
'enum umac_reset_rx_event'. We assign the value of 'enum umac_reset_action'
to pending_action.
Hence, replace 'enum umac_reset_rx_event' with 'enum umac_reset_action' for
pending_action.

Change-Id: I3505648827ac6de5ce1c93a21b76c58942fc1f50
CRs-Fixed: 3550309
2023-07-12 02:27:29 -07:00
Gaurav Saini
1630288f30 qcacmn: Remove AST dependency for sawf
To eliminate the use of AST, using net dev to
find the peer related information, which helps
in avoiding the iterations of psoc list.
Passing the peer id as addition parameter to DP

Change-Id: I68e4ad8d5d62b2350ed0c2df66279de3fa9c0d83
CRs-Fixed: 3526799
2023-07-11 18:16:20 -07:00
Ripan Deuri
8c9b52f61d qcacmn: Add INI to disable AST indication
Add INI to disable AST indication. AST disable flag will be
sent to the target in resource config.

Change-Id: If30cac010681faf06bbcaa2d492d6843e3e675d0
CRs-Fixed: 3544223
2023-07-11 15:38:37 -07:00
Neha Bisht
ddd144bfd6 qcacmn: Fetch current primary soc from mld peer
Fetch current primary soc from mld peer instead of current link peer.

Change-Id: I6c9fc7712b16d938d47b1cd1b5e8bf75eaf352d0
CRs-Fixed: 3547555
2023-07-11 12:49:53 -07:00
Prakash Manjunathappa
fab64e0adc qcacmn: Allocate pdev attach bufs from page frag
Use page frag init time rx buffer allocation for efficient usage of memory.
Add ini dp_bufs_page_frag_allocs to disable and revert to original slab
nbuf allocations.

Change-Id: Iac78895addfe9da0118bc071c691a26216d6fda1
CRs-Fixed: 3553800
2023-07-11 12:49:43 -07:00
Amit Mehta
725454258b qcacmn: Add additional stats to dp_dev
Add additional stats to dp_vdev:
	1. tx. fragment_count
	2. rx.duplicate_count
	3. rx.fragment_count

Change-Id: Ib9fec3b5e7733bbdda09ae5598a092072ebaaee4
CRs-Fixed: 3554690
2023-07-11 12:49:22 -07:00
Sijun Wu
27f8cfff08 qcacmn: Add a set of nbuf fragment allocation APIs
It adds a set of frag way allocation APIs explicitly.
IPA Tx nbufs change to frag way allocation API, which saves memory.

Current __qdf_nbuf_alloc changes to non-frag way allocation by
default if SKB RECYLCER not defined.

Change-Id: I5f87ffac54c49f9af920775c13b6dfdd147476dd
CRs-Fixed: 3534452
2023-07-10 21:22:46 -07:00
Venkateswara Naralasetty
fc93f83a78 qcacmn: Add SWLM support for WCN6450
Changes required to support SWLM feature on wcn6450.

Change-Id: I306cba8dcefa8f34a9546285b33b974987aec625
CRs-Fixed: 3540269
2023-07-10 18:03:57 -07:00
Venkateswara Naralasetty
a3a5a72bbd qcacmn: Add delayed reg write support for wcn6450
Current HAL delayed reg write is tied to SRNG notions, hence
implement delayed reg write logic in HIF since WCN6450 does
not use SRNG interface.

New feature flag FEATURE_HIF_DELAYED_REG_WRITE is introduced
to disable/enable this support.

Change-Id: Id7087ad53cd5879cf49ee0e84dd727de61137541
CRs-Fixed: 3519702
2023-07-10 12:14:13 -07:00
Harsh Kumar Bijlani
aac3c82e06 qcacmn: Update Tx ingress received per core stats in exception path
Update Tx ingress receeived per core stats in exception path

Change-Id: Iebfbc0305b5032ca65135ffd1d3a80647c44f733
CRs-Fixed: 3552494
2023-07-10 02:34:11 -07:00
Jinwei Chen
6081fb19d6 qcacmn: Support dp monitor desc pool memory pre-allocation
Support dp monitor desc pool memory pre-allocation.

Change-Id: I7edd766a3f02be76c1e7342ac6a55c02b43474fa
CRs-Fixed: 3544435
2023-07-08 01:26:16 -07:00
Shashikala Prabhu
7f898dfcc2 qcacmn: Add buffer window for umac reset in progress
When the peer delete timer/vdev manager response timer expires, host checks
if the umac reset is in progress. If so, host will retrigger the timer.
It is possible that the umac reset is just completed and either of these
two timers got expired. In this case, host will assert saying that the peer
delete response/vdev manager response is not received from FW. FW may take
a few milliseconds to send the peer delete/vdev manager response to the
host after the umac recovery completes.

Hence, to avoid the crash, check if the umac reset was in progress during
the umac reset buffer window.

Add the below changes as well,
1) INI support to get the umac reset buffer window value.
2) Renamed the API dp_umac_reset_is_inprogress as
   dp_get_umac_reset_in_progress_state to return either
   CDP_UMAC_RESET_IN_PROGRESS or
   CDP_UMAC_RESET_IN_PROGRESS_DURING_BUFFER_WINDOW.

Change-Id: Ie15ef0731bad4b0ed955a479f00e297b7ba10729
CRs-Fixed: 3522665
2023-07-05 17:19:13 -07:00
Varsha Mishra
eadb65cdde qcacmn: Update vlan tag in multipass received frames
All packets except TID 0 first come to REO error NULL queue.
This happens because only TID 0 queue is setup initially.
Added multipass specific code in NULL queue path.

Change-Id: I8103215ad3e28796c868caa3eec816b9d118da9d
CRs-Fixed: 3482796
2023-07-05 08:36:38 -07:00
Neha Bisht
092276d49f qcacmn: Change num of packets to unsigned 64bit
Change number of packets datatype to unsigned 64bit and handle
respective print message changes.

Change-Id: I65e1ae90985b7d2fb29ea57f8034f5858491dae1
CRs-Fixed: 3534513
2023-07-05 08:36:10 -07:00