Commit Graph

88 Commits

Author SHA1 Message Date
Yu Tian
fa5001a4b5 qcacld-3.0: Give correct initial value of dp_link
When dp_link is allocated, the member variable is
not initialized correctly. Change is to give initial
value to avoid of crash.

Change-Id: I0d032b4a25f31768f2aa5e7161cc625abe867df5
CRs-Fixed: 3797243
2024-05-22 22:19:44 -07:00
Ananya Gupta
25b2dea7fd qcacld-3.0: Issue disconnect for STA if new interface is Mon intf
Currently, when Rx monitor mode interface is coming up, STA is
not disconnected causing RXDMA ring to be used as both error ring
and destination ring. This is causing backpressure in RXDMA ring.
To fix this, issue disconnect for STA when Rx monitor mode is
being added.

Change-Id: I95e73edd80472a8aae9092ebdbce5e514b1cd531
CRs-Fixed: 3799325
2024-05-21 09:29:59 -07:00
Rahul Gusain
20f383d502 qcacld-3.0: Fix NULL pointer dereference issue in DP
Pointer 'dp_ctx' returned from call to function 'dp_psoc_get_priv'
may be NULL in below APIs:
1. dp_reset_tcp_delack
2. dp_bus_bandwidth_init
3. dp_bus_bandwidth_deinit
4. dp_bus_bw_compute_timer_try_start
5. dp_bus_bw_compute_timer_try_stop
6. ucfg_dp_set_cmn_dp_handle
7. __dp_bus_bw_compute_timer_start

Fix is to add NULL check for dp_ctx before use.

Change-Id: I5f9ea6ae8ce3bb13631ad9a2dfe25d9c3686a33b
CRs-Fixed: 3767091
2024-04-12 06:39:24 -07:00
Abhinav Kumar
0ac3ad4233 qcacld-3.0: Fix NULL pointer dereference issue in DP
Pointer 'dp_ctx' returned from call to function 'dp_psoc_get_priv'
may be NULL in below APIs:
ucfg_dp_set_hif_handle
ucfg_dp_update_config
ucfg_dp_get_rx_softirq_yield_duration
ucfg_dp_register_rx_mic_error_ind_handler
ucfg_dp_is_roam_after_nud_enabled

Fix is to add NULL check for dp_ctx before use.

Change-Id: I040f1a6ed92ad572e625663eee9ea1dd0c5e8530
CRs-Fixed: 3770367
2024-03-29 15:50:10 -07:00
Amit Mehta
4e253feb66 qcacld-3.0: Export API to store monitor interface flags
Currently STA+Mon mode is not supported in LPC case
as both mode uses monitor interface to capture
packets. So to distinguish between two different
monitor modes export new API to store monitor interface flags

Change-Id: I463353a1a01f53d48e004f60c52c24f1d8084154
CRs-Fixed: 3739289
2024-03-18 01:55:48 -07:00
Amit Mehta
1d0a7af857 qcacld-3.0: Export new API to update default link
Currently default link update is only done in link switch
or dynamic mac address update case.
There is other scenario also where default link case become
inactive and update to DP will not happen.

So, to handle those scenarios, expert new API to update
DP default link.

CRs-Fixed: 3733584
Change-Id: Iab24c38c454cc5cb9f568de680531b38e4d3da45
2024-03-11 09:07:47 -07:00
Rakesh Pillai
c3b0114600 qcacld-3.0: Delete dp_link only after dp_vdev is freed
Currently the dp_link address is provided to CDP vdev
as a part of vdev register. Also, as per the vdev deletion
sequence, it is possible that dp_link can be destroyed
before CDP vdev is detached. This can lead to use-after-free
scenario when CDP vdev uses the osif_vdev handle (which is
the dp_link handle).

In order to fix this, do not free the dp_link till the CDP
vdev has been detached.

Change-Id: Ie5a1140a0d256b6115fa62e30e6bfd61d1dfc898
CRs-Fixed: 3696641
2024-01-17 03:09:56 -08:00
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
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
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
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
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
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
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
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
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
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
Srinivas Girigowda
12352b5a73 qcacld-3.0: Introduce ucfg_dp_is_local_pkt_capture_enabled()
Introduce ucfg_dp_is_local_pkt_capture_enabled()

Change-Id: I0350452ff36b212bbee94da4cbe5adee37c50de2
CRs-Fixed: 3415854
2023-05-10 11:46:37 -07:00
Amit Mehta
434b0fbabe qcacld-3.0: Add UCFG API to get per link peer stats
Add new UCFG API to get per link peer stats.

Change-Id: I343b9a96610f64df33f8cc56e7a08c3282043fac
CRs-Fixed: 3442905
2023-05-08 09:56:14 -07:00
Yeshwanth Sriram Guntuka
7b19419ddd qcacld-3.0: Add support for sending QMI misc msg on DL deinit
Add support for sending QMI WFDS misc request to QMI
server on Direct link deinit.

Change-Id: I611625d83719c0f8a7dfbef1d3c8328cb618ef7f
CRs-Fixed: 3454630
2023-04-06 08:55:23 -07:00
Amit Mehta
881fb8bb91 qcacld-3.0: Add change to update peer map unmap version
Add change to update peer map unmap version.
Change to get peer map event v3 and peer unmap
event v2 for 11BE target.

Change-Id: I77fa354807ef66effaeb37a845ccebccd5f66ff4
CRs-Fixed: 3442448
2023-03-30 20:19:02 -07:00
Vinod Kumar Pirla
812d01784f qcacld-3.0: Remove INIT_TX_RX_SUCCESS adapter flag
Remove the INIT_TX_RX_SUCCESS adapter flag as its
functionality is insignificant after DP componentization.

Change-Id: Ief86ab81c42b767113bde46252246fa8677588ce
CRs-Fixed: 3399329
2023-03-27 21:07:49 -07:00
Jeff Johnson
7c73be1d9d qcacld-3.0: Fix ucfg_dp_config_direct_link() stub
One of the parameters to the ucfg_dp_config_direct_link() stub
implementation does not match the associated parameter in the
prototype.  The stub and the prototype should match, so modify the
stub to align with the prototype, which matches the non-stub
implementation.

Change-Id: If9dda7db2bfbbce94c0356a73b33ae7569337955
CRs-Fixed: 3424788
2023-03-07 06:27:50 -08:00
Paul Zhang
afd194fb4e qcacld-3.0: Correct logic for roam fails in NUD case
If roaming is triggered by source CM_ROAMING_NUD_FAILURE,
then per the INI gEnableNUDTracking to check whether
disconnect current connection or not.
gEnableNUDTracking=2, keeping the connection
gEnableNUDTracking=3, disconnect the connection

Change-Id: I0f321dcf5f3fc1bf7d0c93fa0d70bf4770ccaf35
CRs-Fixed: 3412213
2023-02-24 13:50:44 -08:00
Roopavathi Lingampalli
ed0007c0c9 qcacld-3.0: Clean up SAP DP TX/RX init and deinit APIs in DP component
Remove SAP DP TX/RX init, deinit APIs dependency from
HDD module.

Change-Id: I5bf248dfd4e19fea784595c8c05e1a51610f3338
CRs-Fixed: 3402662
2023-02-14 04:44:09 -08:00
Ananya Gupta
b576218751 qcacld-3.0: Update SNOC freq to 200 MHz for SAP, P2P HE case
Previously, IPA had its default vote which will bump up the SNOC
frequency to 200 MHz. Now IPA has removed its vote which is
causing throughput drop in HE cases for SAP and P2P GO mode.
To fix this, add new throughput level TPUT_LEVEL_HIGH_HE_CASE and
provide ini to set its threshold to increase SNOC frequency to
200 MHz. To enable, set ini BandwidthMidHighThreshold to 7000.

Change-Id: Ica8c640597c37602aea2f5e4ff6b0646c49ff548
CRs-Fixed: 3297833
2023-01-28 04:02:23 -08:00
Ananya Gupta
ec471e92f2 qcacld-3.0: Create sysfs file and ini for direct link unit test
Create sysfs file for direct link unit test command to
generate traffic from LPASS.
Add ini to enable direct link unit testing.

Change-Id: I5b143bc6751eedb1a65cd836ea738744b72cc2cc
CRs-Fixed: 3365576
2023-01-11 03:46:53 -08:00
Yeshwanth Sriram Guntuka
9972a80234 qcacld-3.0: Set to_fw bit in DP vdev for Direct link use case
Set to_fw bit in DP vdev for direct link use case
and also set it when the use case is unspecified as
well.

Change-Id: I7306e22e81303720830cfce4ce19b15d2080d93c
CRs-Fixed: 3369891
2023-01-07 17:58:59 -08:00
Jeff Johnson
f019813875 qcacld-3.0: Fix Datapath Component Documentation
The kernel-doc script identified some documentation issues in
components/dp, so fix them.

Change-Id: Ic6297d80cda845287e7a472add244c489afd253b
CRs-Fixed: 3362039
2022-12-21 17:59:52 -08:00
Roopavathi Lingampalli
fcb513f88f qcacld-3.0: Add Component APIs for required ucfg APIs in DP component
When component dependent functions calling from higher
modules or any other components, it uses ucfg APIs pattern.
Calling ucfg dependent APIs is acceptable for higher modules
like HDD, OSIF but for another components like DP to avoid
using ucfg APIs here, implementing component APIs for existing
ucfg APIs to other components like MLME, TDLS, Pkt capture in
DP component module.

Change-Id: Ib8857eeca6a88810d7875312ff6dc14ffb60bc70
CRs-Fixed: 3351486
2022-12-13 14:06:07 -08:00
Roopavathi Lingampalli
fe456edd03 qcacld-3.0: Fix Rx thread suspend error in DP component
Rx thread suspend fail error not handled properly, fix this
by adding proper error case.

Change-Id: Ia46eda8736c47f3015c36a6fa915fbc73a802062
CRs-Fixed: 3356655
2022-12-09 11:51:36 -08:00
Roopavathi Lingampalli
b81f52931c qcacld-3.0: Add Rx thread feature support for Dp component
Add Rx thread and Rx refill thread support for
DP componentization.

Change-Id: I2c0a0f7780280a0c2304f026d2580a81123de312
CRs-Fixed: 3316814
2022-12-06 07:35:08 -08:00
Ananya Gupta
a3e72a6e91 qcacld-3.0: Set direct link when its vdev is up
When Vdev for direct link is up, set packets for this vdev to
route to firmware and only enter d0 WOW.
If the AP profile is HOST_CONCURRENT_AP_POLICY_GAMING_AUDIO,
prevent link to go to low power states to reduce latency.

Change-Id: I9fa2ab06983db8767d8b48b74e30602e07294fe2
CRs-Fixed: 3330207
2022-11-23 13:54:39 -08:00
Yeshwanth Sriram Guntuka
bff1e3aa36 qcacld-3.0: Add support for DP QMI WFDS client
Add support for QMI client for WiFi Driver
Service (WFDS) in DP component.

Change-Id: Id0a8a51c32aa9f058e57e622b3ad65d405806148
CRs-Fixed: 3328386
2022-11-23 13:54:33 -08:00
Yeshwanth Sriram Guntuka
f263f50933 qcacld-3.0: Add skeleton code for direct link datapath
Add skeleton code for direct link datapath in DP
component.

Change-Id: I1279abfe573017258b13043d779d0ddc41ee8dd2
CRs-Fixed: 3295346
2022-11-09 18:18:58 -08:00
Yu Wang
0e8ac06ee6 qcacld-3.0: fix build failures caused by QDF_MAC_ADDR_REF
Build failed once WLAN_TRACE_HIDE_MAC_ADDR is enabled,
due to 'error: type mismatch in conditional expression'.

To fix it, correct the parameter for QDF_MAC_ADDR_REF.

Change-Id: Ifd89b02ab5fb2e3b59291c303ad93b691616dc57
CRs-Fixed: 3308193
2022-10-11 22:21:19 -07:00
Jeff Johnson
5daf948dfe qcacld-3.0: components: dp: Fix Misspellings
Fix misspellings in components/dp/...

Change-Id: I7c2edc87e8c2efd9dbdaa4a93297f35c2cb972b8
CRs-Fixed: 3303645
2022-10-03 11:27:02 -07:00