Commit Graph

112 Commits

Author SHA1 Message Date
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
Ananya Gupta
92a1a945d3 qcacld-3.0: Mutex lock to set direct link config
There is a race condition where profile for direct link is set but
hif link was not yet voted up to prevent suspend. Parallelly,
direct link config is cleared in different context causing hif link
to vote down without being voted up which resulted in crash.
To fix this, create a mutex lock and move all the config set
operations inside the lock.

Change-Id: I80924d9ed52a9889a178b98469be15af0454b022
CRs-Fixed: 3490442
2023-05-12 16:38:03 -07:00
Yeshwanth Sriram Guntuka
f1620fb98b qcacld-3.0: Add prealloc pools for direct link consistent memory
Add multi page prealloc pools for TX buffers and CE
TX buffers for direct link datapath.

Change-Id: I8c8be42b0530de39293ad8e45f47e16f90ea7767
CRs-Fixed: 3490109
2023-05-10 14:45:25 -07:00
Srinivas Girigowda
69d21b22e9 qcacld-3.0: Add Tx Mon to prealloc
Add Tx Mon to prealloc.

Change-Id: I09d5558d0115ba148469047d03f33a029c43a287
CRs-Fixed: 3415885
2023-05-10 11:47:36 -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
d2d67b1054 qcacld-3.0: Remove wlan_dp_psoc_context::rx_skip_qdisc_chk_conc
The following patch removed all usage of the rx_skip_qdisc_chk_conc
member of struct wlan_dp_psoc_context:
  qcacld-3.0: Move TC based dynamic GRO logic to DP component
  Change-Id I3c6658e8f19a71e548c77ff6fd637148925008d7

Since this is obsolete, remove it.

Change-Id: I13fbc9dd60466800070c968ec6d89ffa16734b5f
CRs-Fixed: 3427563
2023-03-12 22:36:34 -07:00
Rakesh Pillai
2a4c6686af qcacld-3.0: WAR to handle invalid flow_idx from HW
Currently if the pkt tlvs indicate flow_invalid=0,
there is no sanity done on the SW flow table entry
retrieved using the flow_idx from pkt tlvs.

In case of HW incorrectly sending a invalid flow_idx,
within the range of allowed flow_idx, and flow_invalid=0,
there will be an attempt to aggregate an invalid flow.
This can also trigger a RX ring id mismatch.

In order to mitigate the above issue, verify if the
SW flow table has been populated, before attempting
FISA aggregation.

Change-Id: Idb445c0c5b249d747dbce61f31513ba4a75c26b7
CRs-Fixed: 3412721
2023-03-08 16:04:40 -08:00
Venkateswara Naralasetty
2bcf36b06f qcacld-3.0: Skip FISA aggregation if RDI is zero
Skip the FISA aggregation and drop the frame if the reo destination
indication is zero in the packet TLVs.

Change-Id: I9bd02652bf321202f6b59e6da98fc6959ab93413
CRs-Fixed: 3426355
2023-03-08 14:20:51 -08: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
Ananya Gupta
988ceaccd5 qcacld-3.0: Deinit DP TXRX module when rx thread init fails
DP TXRX module is not cleaned when DP Rx thread init failed
To fix this, when DP Rx thread init fails, free DP TXRX module
as part of failure sequence.

Change-Id: I311b84a76036c8dd1e60b9f8c653fc126e031543
CRs-Fixed: 3413933
2023-02-24 17:52:03 -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
Amit Mehta
7297c338d7 qcacld-3.0: Add check to avoid OOB access
Currently while updating EAPOL stats, there is no check
for subtype greater than array size, which can result in OOB access.

To fix the issue add additional check for subtype <= EAPOL M4 to
avoid OOB access.

Change-Id: I906ce9166b7a0202335403c77dc6bcd135dea663
CRs-Fixed: 3387939
2023-01-26 04:09:42 -08:00
Rakesh Pillai
61df77a203 qcacld-3.0: Add pre-alloc entries for datapath cfg event history
Add pre-alloc entries for datapath config events
history, so that the memory for this history is
pre-allocated and not freed on every wifi off.

Change-Id: Iae1013c68a77d7da719400579af43369d9663163
CRs-Fixed: 3379157
2023-01-19 02:54:06 -08:00
Roopavathi Lingampalli
38bf757799 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 NAN, vdev_mgr in DP
component module.

Change-Id: Ia5431c7de7fc944aacf5c8a328072a8ec31e8f3f
CRs-Fixed: 3351496
2023-01-17 21:04:25 -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
Ananya Gupta
9ef4a35d86 qcacld-3.0: Vote link based on config change
Currently, based on config_direct_link variable, link is voted
up or down which can result in same multiple votes.
To fix this, vote link up or down if there is a change in
previous config and incoming config_direct_link argument.
Also, return status success when direct link is not enabled
but dp_config_direct_link is called.

Change-Id: I4f54d74a9d4921f27f247450f89a03d6dabc838e
CRs-Fixed: 3375395
2023-01-09 23:34:57 -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
Amit Mehta
beb9111c0a qcacld-3.0: Add additional logs in dp_nud_filter_netevent
As part of log enhancement add additional logs in dp_nud_filter_netevent.

Change-Id: I6c3496ed2822d3fa82966548e8ff7ae5c07f4317
CRs-Fixed: 3369870
2023-01-03 16:30:29 -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
Yeshwanth Sriram Guntuka
46fdb5e45b qcacld-3.0: IOMMU map and unmap direct link mem regions
IOMMU map and unmap memory regions related to direct link
into LPASS SMMU context bank for LPASS to access that memory
in direct link use cases.

Change-Id: I4414ad1f480a639ee2d8a0677326624cd959b2b4
CRs-Fixed: 3356587
2022-12-12 09:54:38 -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
Jeff Johnson
7c1e0f0759 qcacld-3.0: Fix wlan_dp_priv.h documentation
The kernel-doc script identified some documentation issues in
wlan_dp_priv.h, so fix them.

Change-Id: I38bc7293d4ef7b34bbc40930b2c1e4daaff4a13b
CRs-Fixed: 3352263
2022-12-09 05:05:26 -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
Chaoli Zhou
2c3110a123 qcacld-3.0: Fix no previous prototype for 'dp_set_rps'
Fix no prototype for 'dp_set_rps' if QCA_CONFIG_RPS
not defined.

Change-Id: I368ef21c29a2cd37073b193ba3102db466b45aff
CRs-Fixed: 3339014
2022-11-22 07:49:26 -08:00
Karthik Kantamneni
f298317281 qcacld-3.0: Display Runtime PM stats periodically
Display Runtime PM last busy stats periodically, this helps
to debug runtimepm issues even without dump availability.

Change-Id: Iae9b70ed49b94a4e098d87a0a00e539178f3c35d
CRs-Fixed: 3337901
2022-11-20 22:03:01 -08:00
Yeshwanth Sriram Guntuka
51c1c5669c qcacld-3.0: Initialize Direct Link DP only if FW supports
Initialize direct link datapath based on the capability
bit from FW.

Change-Id: I054ae693762bafcd9461cf2505b0c4446c3c6c2f
CRs-Fixed: 3335329
2022-11-13 01:42:10 +05:30
Yeshwanth Sriram Guntuka
e8b18e43b9 qcacld-3.0: Use a dedicated rx refill ring for Direct Link
Allocate a dedicated rx refill ring for use by LPASS
WiFi driver to provide buffers back to FW in the
Direct Link datapath.

Change-Id: I3b59e2fd3973f37fc2cc77898c4dcf09fc5def57
CRs-Fixed: 3317972
2022-11-12 01:23:06 -08:00
Jinwei Chen
a1adfe5630 qcacld-3.0: add minimal UDP data length check for FISA
current observation is as following,
(1) RX UDP data length less then 12 bytes and they are aggregated
by FISA.
(2) aggregated UDP data might not be supported by user APP or they
are forwarded to other netdev.
if above two is met, kernel panic appears.

no solid conclusion from kernel network currently,
as a SW WAR from wlan driver side, check if current UDP data
length < 16 bytes, skip FISA aggregation.

Change-Id: Ia9e46705c7ace6a6e5580494231056adf214d7b2
CRs-Fixed: 3330035
2022-11-10 21:57:04 -08:00
Yeshwanth Sriram Guntuka
a80f659fbf qcacld-3.0: Register for LPASS data msg service for Direct Link
Add support to register for LPASS data message htc service
for Direct Link datapath.

Change-Id: Iff9be53841088abe884d8e282bf13509a99ddeb2
CRs-Fixed: 3317634
2022-11-09 20:09:46 -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 Tian
4e94e6a592 qcacld-3.0: Disable FISA update in suspend state
FISA update may come when target in suspend state, then
UMAC force wake may return failure and lead to system timeout
crash. Change is used to defer the update when resume happens.

Change-Id: I8d3082355f780d11fd5047d67f916f0a7dd0c6e8
CRs-Fixed: 3325498
2022-11-09 11:16:37 -08:00
Jeff Johnson
a9db6a8521 qcacld-3.0: Fix misspellings of "detach"
Two misspellings of "detach" were detected in the driver, so fix them.

Change-Id: If3bf51f9c34c25e8519a229492bbab11946754dd
CRs-Fixed: 3324001
2022-11-01 17:54:12 -07:00
Jinwei Chen
71d2520f79 qcacld-3.0: fix dp memory pre-allocation failure
fix dp memory pre-allocation failure as below,
(1) add pre-allocated memory for extra contexts of
DP_RX_RING_HIST_TYPE on beryllium.
(2) add extra RXDMA_BUF type's memory for SW2RXDMA ring and size same
as RX refill ring size for now.
(3) add pre-allocated memory for REO_STATUS & RXDMA_MONITOR_STATUS ring.
(4) add pre-allocated memory for DP_MON_PDEV_TYPE.

Change-Id: I038d946cf1b8c9dc67c1539ea972bda8239def4d
CRs-Fixed: 3314198
2022-10-18 05:22:10 -07:00