Commit Graph

153 Commits

Author SHA1 Message Date
Rakesh Pillai
dd66925398 qcacld-3.0: Register link switch notifier from DP component
Register MLO link switch notifier from DP component.

Change-Id: Ib03ff9b16d3c8cd02acfbf9f1340c77aae9599cc
CRs-Fixed: 3521310
2023-08-02 04:53:48 -07:00
Srinivas Girigowda
be5651b42e qcacld-3.0: Introduce wlan_dp_is_local_pkt_capture_enabled()
Introduce wlan_dp_is_local_pkt_capture_enabled API.

Change-Id: I608c927301bf145bf8fd2e222c047ca20c58a72b
CRs-Fixed: 3576511
2023-08-01 09:37:31 -07:00
Rakesh Pillai
2461d6dc54 qcacld-3.0: Move fisa aggregation control flags to dp_intf
Currently the FISA aggregation control flags, based on GRO
settings, are part of dp_vdev.

Move these FISA aggregation control flags to dp_intf,
since these controls are on an interface level, and not
on a per link level.

Change-Id: I93d0e215f8954376a96967cce6d533bd4be2d3a6
CRs-Fixed: 3574036
2023-07-31 19:37:23 -07:00
Ananya Gupta
354552db23 qcacld-3.0: Vote PCIe link when Direct link server is up
Support only D0 wow when direct link is up when XPAN feature
is up in WHC or P2P modes.

Change-Id: Ifbae57e4e1c8701950e7cecc095830a374603034
CRs-Fixed: 3559061
2023-07-30 19:07:23 -07:00
Rakesh Pillai
d03053c1c7 qcacld-3.0: Handle MLO link switch case for FISA flow flush to stack
When FISA aggregated flow is flushed to n/w stack, there
is a vdev_id comparison between the flow and the head skb.
If this vdev_id check fails, the packets are dropped.

In case of MLO link switch during the FISA flow aggregation,
the packets might be received on different vdev (belonging to
the same MLD). Hence the vdev_id comparison will fail when
there is a MLO link switch in between the flow aggregation.

Since both the vdevs belong to the same MLD, add a MLD addr
validation to mitigate the above mentioned issue.

Change-Id: I0328dccff3f08da87f55758b469d773b9ea1169b
CRs-Fixed: 3568987
2023-07-30 19:07:17 -07:00
Rakesh Pillai
273eee3139 qcacld-3.0: Add support to reset def_link during dynamic mac addr update
Dynamic mac address update is a special case, where the
(sta)connection can change without the vdevs corresponding
to an interface. The tx/rx happens on the def_link of the
dp_intf, which does not get reset in case of dynamic mac
addr update. Due to this, all the tx of packets might be
attempted on an invalid dp_link, leading to drop of all
the packets queued for TX.

Add support to reset the def_link of an interface during
dynamic mac address update.

Change-Id: I1e87c083f39b56525f69c225117bcce538931dbb
CRs-Fixed: 3570440
2023-07-27 04:49:26 -07:00
Rakesh Pillai
f09727ebc7 qcacld-3.0: Fix incorrect arg passing to stats (ol_txrx_ops)
dp_tx_rx_collect_connectivity_stats_info expects dp_link
handle as an argument. Currently many of the direct callers
of this function is passing dp_intf as an argument to this func.

Fix this by passing dp_link as an argument to the function
dp_tx_rx_collect_connectivity_stats_info.

Change-Id: Icfedc1cc721de4ad0b536967dc32a6af53b86e9e
CRs-Fixed: 3571037
2023-07-26 21:24:24 -07:00
Rakesh Pillai
a074f04323 qcacld-3.0: Select tx_dp_link in datapath component
Currently datapath uses the vdev provided by UMAC for
tx of any packet. With the single-netdev-multi-vdev
model, there are chances that the vdev, in MLO case,
selected for packet TX in UMAC may not be the def_link
which datapath expects to use for tx/rx.

Hence, to mitigate, this issue, datapath will not use
the vdev provided by UMAC, but instead select a dp_link,
inside the dp_component, for tx/rx

Change-Id: I5ff4a79365b3426e1bcc6d4cac31a44058ee18db
CRs-Fixed: 3568989
2023-07-25 22:29:19 -07:00
Rakesh Pillai
8f9d742ef5 qcacld-3.0: Cleanup datapath component code
Code cleanup in datapath component.

Change-Id: I03585bd319e835a28de37ae98fb8edafbc1820ee
CRs-Fixed: 3568991
2023-07-25 15:21:35 -07:00
Rakesh Pillai
cd187812d3 qcacld-3.0: Fix incorrect typecast in txrx_ops handlers
Currently the opaque context passed to txrx_ops handlers
is incorrectly typecasted to dp_intf. The context being passed
is dp_link handle. This leads to unwanted memory access.

Fix this by correctly typecasting the context passed to
all the txrx_ops handlers as dp_link handle.

Change-Id: I587b12056625bb68e86ecb54118bb2f6bfa62bd9
CRs-Fixed: 3569531
2023-07-25 15:21:30 -07:00
Rakesh Pillai
854bd8cafb qcacld-3.0: Fix incorrect arg passed in dp_rx_pkt_thread_enqueue_cbk
Currently dp_rx_pkt_thread_enqueue_cbk passed dp_intf to
dp_rx_packet_cbk, though it expects the caller to pass
dp_link context. This leads to an invalid memory access
due to incorrect typecasting.

Fix this by passing the correct dp_link context to
dp_rx_packet_cbk.

Change-Id: If37fd18d49a6d5464e01c07160a1be612e564ffb
CRs-Fixed: 3568233
2023-07-24 15:50:42 -07:00
Rakesh Pillai
2b1f8b6f81 qcacld-3.0: Avoid dereference of dp_link before NULL check
Fix issue by removing the dereference of dp_link
before NULL check.

Change-Id: I2e5987a2ec5652acabd8402b4c0c65106d37135d
CRs-Fixed: 3566033
2023-07-21 10:23:17 -07:00
Amit Mehta
2a87c33052 qcacld-3.0: Free dp_txrx_handle in dp_rx_refill_thread_init fail case
Currently in dp_txrx_init during dp_rx_refill_thread_init fail case
dp_txrx_handle is not freed which results in memory leak issue.

To fix the issue free dp_txrx_handle in dp_rx_refill_thread_init
fail case

Change-Id: I0804154519707d5d558940cccaa699f639ae6704
CRs-Fixed: 3563740
2023-07-21 01:16:07 -07:00
Rakesh Pillai
315a53eaa9 qcacld-3.0: Add ucfg API to update link mac addr
After moving to the single-netdev-multiple-vdev model,
the dp_link mac address needs to be updated as a part
of dynamic mac address update.

Add an ucfg API to update link mac address.

Change-Id: I96d3230f958c15cb576c881c02e60bd3a4fb0379
CRs-Fixed: 3563523
2023-07-20 13:39:04 -07:00
Rakesh Pillai
ecfe8c6f75 qcacld-3.0: Add API to find next def_link candidate
Add API to find the candidate for next default link.
This is used when the current default link is being
re-purposed or destroyed.

Change-Id: I98afd3ef2ac21d14ee6056f6329fbcf9a612959a
CRs-Fixed: 3519643
2023-07-20 13:38:58 -07:00
Rakesh Pillai
09e724c396 qcacld-3.0: Replace intf_id with link_id
Replace the usage of dp_intf->intf_id with
link_id from dp_link.

Change-Id: I1885ce300a0373172659ae8c38cb2ca54dda1a9c
CRs-Fixed: 3518898
2023-07-20 13:38:52 -07:00
Rakesh Pillai
1e093bec44 qcacld-3.0: Use dp_link in txrx path
Use dp_link in the core TX/RX path instead
of currently used dp_intf.

Change-Id: Id32a4053094fae844d190043d57f85a8e9659339
CRs-Fixed: 3518897
2023-07-20 13:38:46 -07:00
Rakesh Pillai
a3161f8f5b qcacld-3.0: Move vdev and vdev_lock to dp_link
Move the vdev and vdev_lock to dp_link, since
dp_link corresponds to objmgr vdev now.

Change-Id: Id1ef27911c4eaa3434fc2719a8f5951f00d31116
CRs-Fixed: 3518896
2023-07-20 13:38:40 -07:00
Rakesh Pillai
96ff75c0cd qcacld-3.0: Fix dp_get_vdev_priv_obj to return dp_link
Currently objmgr_vdev returns dp_intf, which is
now changed to dp_link.

Change-Id: Ib2be45cb821fb2d9ab9e32bcf485a74509e4040e
CRs-Fixed: 3518895
2023-07-20 13:38:34 -07:00
Rakesh Pillai
21052cf452 qcacld-3.0: Add dp_link data structure
Currently dp_intf is create on adapter level,
but corresponds to vdev. ML connection can have
multiple links for same adapter.

Hence introduce a new data structure dp_link,
which corresponds to the vdev, whereas dp_intf
now corresponds only to adapter/netdev.

Change-Id: Ia2bba89f425b64b4e404f6866a54fe0f6e05ad6d
CRs-Fixed: 3518894
2023-07-20 13:38:28 -07:00
Karthik Kantamneni
638da26c32 qcacld-3.0: Add support to program dynamic FISA aggregation size
Currently FISA max aggregation count is fixed 16, but some
platforms can support different max aggregation count.

So while sending HTT FISA config if F.W is capable of programming
dynamic msdu aggregation sizes, then select max aggregation count
based on target type and send it to F.W.

Change-Id: Ic5212536024a3ceb0b2c4ad111172870f1825969
CRs-Fixed: 3542509
2023-07-19 12:11:02 -07:00
Amit Mehta
fe6f4d208b qcacld-3.0: Add UCFG API to get DP vdev stats
Add UCFG API to get DP vdev stats.

Change-Id: Icc0eab717ed02c544240379b8f5fcfa9d98a251a
CRs-Fixed: 3554687
2023-07-11 03:16:47 -07:00
Venkateswara Naralasetty
0246a1ba30 qcacld-3.0: add SWLM support for wcn6450
Changes required for SWLM support on wcn6450

Change-Id: I50e32d91fe45e31688cd1a11e5055a87a2fd7a4d
CRs-Fixed: 3540274
2023-07-10 18:03:26 -07:00
Jinwei Chen
fa01c6ee67 qcacld-3.0: Support pre-allocated memory for DP TX Mon Desc pool
Support pre-allocated memory for DP TX Mon Desc pool.

Change-Id: Ic4125c7e96ef7dfd5e24bc8b5e347ca0b307f5d8
CRs-Fixed: 3549444
2023-07-08 01:25:41 -07:00
Rakesh Pillai
466b34b3c2 qcacld-3.0: Change FISA cfg check APIs to static inline
Change the cfg enablement check APIs (currently FISA),
to static inline, in order to avoid function call
every time to check if the feature is enabled or not.

Change-Id: Ie541313c1b0a7512f71a6189a706871e57b3145e
CRs-Fixed: 3540739
2023-06-28 01:22:36 -07:00
Rakesh Pillai
cd12cecff9 qcacld-3.0: Remove dp_soc usage (all but one) from FISA
Currently FISA accesses the dp_soc (converged DP soc handle)
for various misc info (like hal_soc handle etc). Since these
information are now stored in the non-converged DP component,
there is no need to access dp_soc.

Cleanup the access to dp_soc (converged DP soc handle) in
the FISA path.

Change-Id: I6f373eb1ee57933d631237f7281c99bfceb100c3
CRs-Fixed: 3512048
2023-06-24 13:31:05 -07:00
Rakesh Pillai
c96c1a88d9 qcacld-3.0: Fetch rx_pkt_tlv size via CDP API
Add support to fetch rx_pkt_tlv size from the
converged DP using CDP APIs.

Change-Id: Ibd992d776e8e5e3ff87acb0e9b80d147064747e4
CRs-Fixed: 3512046
2023-06-24 13:30:59 -07:00
Rakesh Pillai
4c897fe85d qcacld-3.0: Add support to send FISA HTT msg using CDP
Add CDP APIs to send FISA related HTT msgs from the
non-converged DP component.

Change-Id: Ie8dcb5d68497ac0de4c0781c981ede2239df0a78
CRs-Fixed: 3512045
2023-06-24 13:30:54 -07:00
Rakesh Pillai
5c54710c38 qcacld-3.0: FISA move data structure
Move the FISA related non-converged data structures
to DP component.

Change-Id: I86b08bd85fa97424046e1187cc5189d0f1354e93
CRs-Fixed: 3512044
2023-06-24 13:30:49 -07:00
Rakesh Pillai
87a3b842c6 qcacld-3.0: FISA ini movement
Move the non-converged FISA related INIs to the
DP component.

Change-Id: Ifaea7a6652d556168b3f232ecfe9b3579c31ed4f
CRs-Fixed: 3512043
2023-06-24 13:30:44 -07:00
Rakesh Pillai
7dde156e8d qcacld-3.0: FISA suspend/resume code movement
Move the suspend/resume related handlers for FISA
in the DP component.

Change-Id: Iba2bcf313f0a6f94a8bd8ff3c6cb29e8ef58f225
CRs-Fixed: 3512042
2023-06-24 13:30:39 -07:00
Rakesh Pillai
1fe1ac7688 qcacld-3.0: FISA init code movement
Move the FISA initialization code to DP
component.

Change-Id: Idaf0d195ea3f24f8d4294eba19d71d5cc9dbc528
CRs-Fixed: 3512041
2023-06-24 13:30:34 -07:00
Karthik Kantamneni
e5110fabef qcacld-3.0: Avoid dp_ops access during FTM mode on failure
During FTM mode start modules there is possibility  from recovery path
bus bw timer stop is being called before dp_ops gets initialized.
This will lead to accessing uninitialized dp_ops access, to avoid this
check for conn mode before accessing the dp_ops and skip timer stop.

Change-Id: I3aef52f70bc0ea6294c87e7cd889ec63a4a6e3a4
CRs-Fixed: 3531437
2023-06-22 12:49:06 -07:00
Amit Mehta
e5679f29ad qcacld-3.0: Only allow connectivity logging for STA mode
Currently connectivity logging is done for all opmode
but logging should be done only for STA mode.

So to fix the issue add check for opmode and skip
connectivity logging if opmode is not STA

Change-Id: Iae225faa0fb7f141a46979c90ac4c2374f8a8832
CRs-Fixed: 3515363
2023-06-05 08:33:38 -07:00
Karthik Kantamneni
b3c3861f64 qcacld-3.0: Add changes to support DP memory profile
Introduce DP memory profile selection based on H.W
capabilities supported. Based on H.W capabilities
decide kind of memory profile required for DP operations
and select that profile for resource allocation, so that
resource/memory allocation will be done effectively.

Change-Id: Iffbea0cfd9e6b79f0c1ad9526217ba6922f6cdb6
CRs-Fixed: 3504128
2023-06-02 16:48:10 -07:00
Yeshwanth Sriram Guntuka
ad66c99ef1 qcacld-3.0: Add multi pages prealloc support for HIF layer
The IOVA for the buffers that are attached to the direct
link receive copy engine need to be contiguous for optimal
memory mapping on ADSP.

Fix is to add multi pages prealloc support for HIF layer
and add a pool entry to multi pages prealloc for direct
link receive copy engine.

Change-Id: Ieb253bd3c1b6550e4c1c63cd587993891ac817f2
CRs-Fixed: 3497689
2023-05-30 08:18:59 -07:00
Amit Mehta
9378092308 qcacld-3.0: Add changes to affine away CPUs
Add changes to affine away CPUs from IRQ

Change-Id: I76e31109f350fea6506f7e781fba9e5b4d8b6ded
CRs-Fixed: 3502680
2023-05-27 01:40:06 -07:00
Rakesh Pillai
51d63bdc63 qcacld-3.0: Add CDP handles in DP component context
Currently the CDP handles like soc/hif/hal_soc are not
available in any of the the DP component contexts.
Modules like FISA etc need these handles.

Store the CDP handles like soc/hif_handle/hal_soc in
the DP component context.

Change-Id: Iaee4d0e15cbaa7d871dc9e246d177ad310b4c6ba
CRs-Fixed: 3505720
2023-05-26 18:16:25 -07:00
Karthik Kantamneni
98017681fe qcacld-3.0: Add INI item for applying DP memory profile
Add new INI item for enabling/disabling DP
memory profile configuration.

Change-Id: I3aad5e3aef7081a5dc9ef68c009a0ffdd5856867
CRs-Fixed: 3502597
2023-05-26 16:06:02 -07:00
Yeshwanth Sriram Guntuka
c740957390 qcacld-3.0: Update the prealloc DP descriptor types
Update the prealloc DP descriptor types.

Change-Id: I3de60876735e5aa37d80e9e698a86503b18574c1
CRs-Fixed: 3502612
2023-05-26 16:05:57 -07:00
Rakesh Pillai
296c68c255 qcacld-3.0: Store all the txrx ops in dp_intf
Currently the txrx_ops are not saved in the
non-converged datapath.

Store all the txrx_ops in DP component, when
they are registered with the vdev. This can be
used in the DP component to get and use these
ops.

Change-Id: I30bfc69a32e0a9f0ab16f902a94a8c28ef4af8a6
CRs-Fixed: 3505719
2023-05-25 22:07:35 -07:00
Amit Mehta
5bc13c99ec qcacld-3.0: Check if tlv reo_dest_indication is valid
Currently if hash-based routing fails, packets will be sent
with default routing which will result in packet being queued
to REO2SW1 with tlv reo_dest_indication = 1. Host will create fisa
flow with napi = 0 for REO2SW1.

When next packet received with correct tlv reo_dest_indication value
on different REO with flow_index_invalid = 1 and if tuple matches
with earlier created flow, it can result in REO mismatch issue.

To fix the issue if rx_hash is enabled add check for
tlv reo_dest_indication value.

Change-Id: Ib0895ce666cc788a6df8ae3483e0777e84937ef8
CRs-Fixed: 3500655
2023-05-23 05:16:20 -07:00
Rakesh Pillai
ba1fbb8b3f qcacld-3.0: Move DP suspend/resume code to DP component
Currently OSIF calls the CDP API for DP suspend/resume
handler directly.

Move these calls to DP component so that DP component
can handle the suspend/resume related operations for
internal DP sub-modules (which are outside CDP).

Change-Id: I080809904f619260c707cacbcdbf158250320081
CRs-Fixed: 3502507
2023-05-23 01:19:26 -07:00
Rakesh Pillai
b8f4110c6e qcacld-3.0: Move DP init code in CDS layer to DP component
Currently the CDS layer calls the cdp functions
directly to initialize common DP.

Move these calls to DP component, so that DP
component can handle other DP related initialization
inside the DP component itself.

Change-Id: Ib257ac4f41d468706078cd34a8cbec004a9a622e
CRs-Fixed: 3499726
2023-05-20 12:54:07 -07:00
Rakesh Pillai
ba10198e0b qcacld-3.0: Fix perf cluster interrupt affinity
The number of perf CPU clusters can vary across
different targets. Currently only the second CPU
cluster is considered as the perf cluster, whereas
there can be more than 1 perf clusters.

Fix this perf cluster derivation for interrupt affinity.

Change-Id: Idecc98701e38bd2315846d6500068dcdd8f1309e
CRs-Fixed: 3498023
2023-05-20 10:48:53 -07:00
Srinivas Girigowda
1163fd27bd qcacld-3.0: Change logs to appropriate log levels
Change logs to appropriate log levels.

Change-Id: I8f74260a0293d0d8147e4b4df355aeb2914ca80b
CRs-Fixed: 3494143
2023-05-18 16:28:19 -07:00
Srinivas Girigowda
2f097e5014 qcacld-3.0: Make log strings consistent
Make log strings consistent.

Change-Id: Ic80d7d041211c0def34d0bb8f185c7154e981d28
CRs-Fixed: 3492715
2023-05-18 16:28:14 -07:00
Srinivas Girigowda
3acf9cdec0 qcacld-3.0: Add context to the logs
Logs without meaningful message or values serves no purpose in debugging.
Hence, add more context to the logs.

Change-Id: Ie913f7460356a1550b5252fd72ed5b454c67b3cf
CRs-Fixed: 3492709
2023-05-18 16:28:10 -07:00
Srinivas Girigowda
9325f4c7b8 qcacld-3.0: Remove trailing newline from the DP Logs
Remove trailing newline from the DP Logs.

Change-Id: I0a0f0952539443f9937591ebee1d8432b12ed506
CRs-Fixed: 3492704
2023-05-18 16:27:55 -07:00
Ananya Gupta
a5d6751209 qcacld-3.0: Clear direct link config in stop modules
Currently, as part of wlan_hdd_stop_modules, direct link config
is not being cleared but hif link state vote is cleared, as a
result when hdd_close_adpater() is called, link state is already
cleared, resulting in crash, as config is still enabled.
To fix this, clearing config as part of direct link context
de-initialization.

Change-Id: I1a5de6f427b5bc4dc4fe4346e53354645ad53529
CRs-Fixed: 3495027
2023-05-15 19:39:13 -07:00