提交線圖

135 次程式碼提交

作者 SHA1 備註 日期
Gaurav Saini
b64de0cf4a qcacmn: Handle RX exception from IPA on WDS-EXT netdev
When WDS_EXT feature is enable, Host needs to redirect
the data packets to WDS extended netdevice.

Change is added the support for forwarding the RX packets
when received from IPA as an exception by deriving the
correct netdevice interface.

Change-Id: I083a1acc72023f3ebe6ea36ec05a5706f89c16bc
CRs-Fixed: 3597357
2023-09-21 17:57:45 -07:00
Namita Nair
8de279eab8 qcacmn: Handle ipa_mapped flag correctly to prevent race
Currently soc->ipa_mapped flag is set to true only after all
the buffers are SMMU mapped to IPA. This leads to a race
window where Rx buffers routed to WLAN HOST in the replenish
path are not mapped to IPA, as the ipa_mapped flag is still
set to 0. The fix is to set the ipa_mapped flag to 1, right when
the IPA pipes are enabled, before waiting for the complete
buffer pool to be IPA SMMU mapped.
With this fix, RX buffers can be unmapped and mapped to IPA
domain in dp_pdev_rx_buffers_attach() and
dp_pdev_nbuf_alloc_and_map_replenish() in WLAN host RX path when
ipa pipes are enabled.

This change also renames ipa_mapped flag to ipa_map_allowed.

Change-Id: Ibbe50cb211f858a3372e31644df2f5e98f99a292
CRs-Fixed: 3569745
2023-09-15 21:09:22 -07:00
Namita Nair
1f2104b733 Revert "qcacmn: Initialize ipa_mapped to 1 in soc attach"
This reverts Change-Id: Idcb86db99f522959b639865f77178cd47a234277.

Change-Id: I3084631103fa3e1937605af5ed5e14b8348cef57
CRs-Fixed: 3569762
2023-09-15 21:09:12 -07:00
Ruben Columbus
4902c68f4d qcacmn: 4k skb buffer change
add new ini to configure skb size and change it in each place its used
correspondingly

Change-Id: Id00c6351bf6bc1b9df5e19064b2057dadd315e9b
CRs-Fixed: 3584462
2023-09-13 14:19:51 -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
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
Namita Nair
b50ceeee79 qcacmn: Defer IPA SMMU mapping to OPT_DP reserve
Currently, IPA SMMU map/unmap is called as part
of init. This causes every nbuf to be mapped
to IPA in the Rx path, causing throughputs
to drop. This change resolves the problem by
deferring the IPA SMMU map/unmap
call to OPT_DP filter reserve/release, as
nbuf needs to be mapped to IPA only in this scenario.

Change-Id: If198a6c5f22af58fdaf9d9c020c74b1f76002e37
CRs-Fixed: 3496679
2023-07-04 22:36:13 -07:00
Devender Kumar
bb397ae41d qcacmn: Fix IPA meta data mask for EasyMesh
Move the logic for IPA data mask under correct macro.

Change-Id: I3652271d5d152e0e17fce6e05392dd2a1311c1e5
CRs-Fixed: 3534587
2023-06-22 09:10:34 -07:00
Devender Kumar
9d45ad57b0 qcacmn: Fix issue for AP+AP vap where data takes slow path
With EasyMesh disable at runtime data from second vap is taking
slow path, due to wrong metadata mask and session id populated to
IPA driver.

Fix is pass correct metadata and session id based on EasyMesh
status to IPA.

Change-Id: I0735965c0d8bd257492343e3a27f9f1509091b87
CRs-Fixed: 3487546
2023-06-13 15:36:36 -07:00
Srinivas Girigowda
363262cd30 qcacmn: Remove __func__ from the DP logs
Logging macros already takes care of adding function name.
Hence, delete the occurrence of __func__.

Change-Id: I44ef5d7f030eba16decb9611f16001c6e9d42b3b
CRs-Fixed: 3492505
2023-05-18 18:42:18 -07:00
Namita Nair
2613f207e0 Revert "qcacmn: WAR for opt_wifi_dp feature to disable IPA(1)"
This reverts Change-Id: I7aad275f4d86a2ffc239f1fe343de31ec2988fad.

Change-Id: I875e8d15430c3f0a0f4bf10d275b203b24023a64
CRs-Fixed: 3483264
2023-05-12 16:39:36 -07:00
Naveen Gurujala
744590c14b Revert "qcacmn: Add support for enabling TWO tx_pipe"
This reverts Change-Id: I71b414c2ead0c25df6009a21a59b4c0d553ce9fd

Change-Id: I2f0c43e03387811c91a24c61ae622191b1d12347
CRs-Fixed: 3356413
2023-04-25 12:08:36 -07:00
Linux Build Service Account
3d28fd8ee3 Merge "qcacmn: Add support for enabling TWO tx_pipe" 2023-04-21 03:18:19 -07:00
Devender Kumar
dd97356cc5 qcacmn: Fix compilation issue for IPA when vlan is enable
variable is not defined leading to compilation
issue when vlan is enable in SDX.

Fix is to correct the variable name.

Change-Id: I2d3618d9ad3d8a48026cb8c737ce6ede733cb478
CRs-Fixed: 3462236
2023-04-13 07:36:54 -07:00
Devender Kumar
ebebca18a9 qcacmn: Add support for enabling TWO tx_pipe
Enable ALT_TX ring for split phy radio.

Change-Id: I71b414c2ead0c25df6009a21a59b4c0d553ce9fd
CRs-Fixed: 3356413
2023-04-13 02:44:29 -07:00
Devender Kumar
b0e26ae525 qcacmn: Add support for Third WKK radio in IPA context
Currently we only support DBDC with IPA, to support
TBTC we need to provide pipe setup for third WKK
radio to IPA, so that IPA can register the pipes
in wlan2 smmu context bank for third WKK radio.

Change-Id: I941c0ddec4f23406aa5acabbfb80a7499d830d75
CRs-Fixed: 3456002
2023-04-10 01:19:56 -07:00
Devender Kumar
576ea0d8b2 qcacmn: Update the DB address pcie status to IPA
With pcie 1 and pcie slot 2, if ipa updates the 40th bit then
access to pcie memory region is going in pcie_0 memory region.
IPA is not allowed to update 40th bit for any address given
from pcie_1 and pcie_2 memory region.

Fix is do not send the pcie update status as true to IPA for DB address,
so that IPA will take long path of mapping the address in smmu context and
then it will access the pcie region.

Change-Id: Ieeaf1262cef927ca89cded3714c6e37550b8f197
CRs-Fixed: 3448895
2023-04-05 09:04:28 -07:00
Namita Nair
d33baafbe5 qcacmn: WAR for opt_wifi_dp feature to disable IPA(1)
IPA_OFFLOAD will be enabled by  default for MSM.
This is a WAR to disable IPA offload during compile
time, based on the IPA_WDI_OPT_DPATH feature flag from IPA.
If the flag is not defined in the IPA test
module file, IPA offload path will be disabled.
This is a WAR, and will be fixed once a Kernel config is
available to enable or disable the optional wifi datapath
feature.

Change-Id: I7aad275f4d86a2ffc239f1fe343de31ec2988fad
CRs-Fixed: 3431972
2023-04-02 01:23:12 -07:00
Namita Nair
86e2e95fc5 qcacmn: Fix function name for opt_wifi_dp_cleanup
Fix the function name dp_ipa_opt_wifi_dp_cleanup()
for IPA_OPT_WIFI_DP not defined case.

Change-Id: Ie8d7db76add281025fd654d8a3e0017eddd6fbc4
CRs-Fixed: 3446301
2023-04-01 01:20:12 -07:00
Namita Nair
42381bb34d qcacmn: Handle RTPM counter for opt wifi dp
Inorder to keep the PCIe link up during
optional wifi dp transfer the
hif_force_wake_request() is called during
filter addition. This increments the rtpm_get counter.
Now if Wifi is disconnected before releasing the
filters, the corresponding hif_force_wake_release()
call is not made. This causes a mismatch in RTPM GET and
PUT calls and triggers an assert during hdd_wlan_stop_modules().
This change adds a cleanup call to release the force wake
and reduce the rtpm_put counter to prevent the assert.

Change-Id: Idd778275a015922376cf7eb0a7c3d92e75881fe8
CRs-Fixed: 3441186
2023-04-01 01:20:02 -07:00
Devender Kumar
148d0de3e5 qcacmn: Add support for pmac_id in IPA driver
To support splitphy and MLO operation when multiple
TX ring are present under single soc, then to differentiate
the TX lmac, pmac id in per packet is require. As pmac_id in
bank register is always constant for pinnacle case, so need
to pass per packet in TX desc.

Change-Id: I8e5a832700770274e68bf8a04e97675386184545
CRs-Fixed: 3356413
2023-03-17 01:41:35 -07:00
Devender Kumar
f230d96802 qcacmn: Properly set WDI version for WIN chipset
Set WDI version based on SOC architecture, set WDI
version to IPA_WDI_4 for QCA_WIFI_QCN9224 chipset,
else IPA_WDI_3.

Change-Id: Ib80435e5098cfbcb9f90d4ac9cfe81ea183f308a
CRs-Fixed: 3383949
2023-03-15 22:39:08 -07:00
Amrit Sahai
24dc3d385c qcacmn: Add Support of TX MLO Link Stats for ML Peer
Add Support to update TX per packet path, MLO Link
statistics for ML Peer.

Change-Id: If8aa5433221ecbb7d84b3f6777784524f43179a3
CRs-Fixed: 3397721
2023-03-08 07:42:28 -08:00
Namita Nair
aab63b2b96 qcacmn: Add optional wifi datapath feature ipa layer
This change adds the optional wifi datapath feature
to transfer data to and from modem via WLAN.
By using the existing path between WLAN and IPA, this
change registers new interfaces between IPA and WLAN
to reserve, add, delete and release rx filters,
which are required for setting up CCE filter rules.
These filters help to determine which packets need
to be routed to IPA specific REO rings.

Change-Id: I17c2ab77ae343f15d6b79fa02bb70ed62294089c
CRs-Fixed: 3403314
2023-02-28 16:57:22 -08:00
Jia Ding
09186dbaf9 qcacmn: Check mld peer address for IPA intra-bss fwd
In the case of MLO connection, MLD address is used for data
transmissions in the ethernet header. Take MLO-SAP intra-bss
forwarding as an instance, ref1 sends unicast arp-resp to
ref2 who initiates broadcast arp-req. DA and SA in the ethernet
header are both MLD mac addresses of ref1 and ref2.

Currently when WLAN IPA component does the intra-bss forwarding
check, MLO connection is not taken into consideration, where
only legacy hash table is searched. For a MLD peer, it is not
added into the legacy hash table but the MLD specific hash
table.

Hence in this change, use dp_peer_hash_find_wrapper() API with
CDP_WILD_PEER_TYPE to check if peer exists in both legacy
and MLD hash table.

Change-Id: Ifea7cd37373e1575d811bedefb602d0df5c1765b
CRs-Fixed: 3400280
2023-02-23 10:49:33 -08:00
Namita Nair
33189ca042 qcacmn: Fix REO ring routing for opt wifi dp
Set REO dest index 4 to REO2SW4.

Change-Id: Ida169d49ee195e2aaf1c13eeaafbbd487430f846
CRs-Fixed: 3403314
2023-02-23 08:54:09 -08:00
Jeff Johnson
81e6a31400 qcacmn: Fix dp/wifi3.0/dp_ipa.*documentation
The kernel-doc script identified a large number of documentation
issues in dp/wifi3.0/dp_ipa.[ch], so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: I664c657e4e7424db576bf19ca8a26c697b37e46f
CRs-Fixed: 3373165
2023-02-15 03:44:23 -08:00
Amrit
1833aa0e7f qcacmn: Add support for stats in IPA Architecture
Add support for stats in IPA Architecture.

Change-Id: I38706503719f6236fa1081342e9eb1f0bd0ba1c2
CRs-Fixed: 3345292
2022-12-29 18:34:12 -08:00
Amrit
6d1cdea120 qcacmn: Add support to get rx mcast and bcast stats
Add support to get rx multicast and broadcast stats
in IPA Architecture

Change-Id: Id7cf7bb09534833af7fe620cdbd4ed452d9e4613
CRs-Fixed: 3346858
2022-12-26 03:24:51 -08:00
Devender Kumar
051821c54f qcacmn: Fix for Vlan Header initialize
Vlan Header is not initialize before passing it
to IPA driver, due to this some Vlan header fields
are junk and causing issue in IPA driver.

Fix is to initialize the header with 0

CRs-Fixed: 3342771
Change-Id: Ic29e0822f32bec5ea71702ceea75b7354caeda65
2022-11-29 03:25:34 -08:00
Jia Ding
0ffd9de547 qcacmn: Properly handle IPA TX alt ring
If IPA tx alt doorbell address is not returned from IPA, wlan
should not touch the tx alt paddr and vaddr either. Therefore
add the NULL check before handling the tx alt ring resources.

Change-Id: I6b98fe5c003f3e796441513515190ea592d14d01
CRs-Fixed: 3339322
2022-11-26 04:53:10 -08:00
Devender Kumar
8c9cc20350 qcacmn: Fix for peer unref
Reference taken on peer with wrong MODULE_ID, hence
while unref on peer is failing.

Change-Id: Ifd4360ad8db877cfbf67fb6d80fdfb41aee4ff56
CRs-Fixed: 3317145
2022-10-27 08:01:16 -07:00
Jeff Johnson
ebfbc0d927 qcacmn: dp: Fix misspellings
Fix misspellings in dp/...

Change-Id: I6ef7a19ee03104ae38a8a77e229b90aa80329592
CRs-Fixed: 3304682
2022-10-07 22:42:22 -07:00
Jia Ding
b6c2183b7a qcacmn: Setup bank id for IPA TX pipe
Get bank id initialized for IPA usage from DP layer and pass it up
to IPA driver.

IPA is not able to handle bank id on a per-interface basis, and
hence set up same bank id for both TX pipes.

Change-Id: I69632a5e4e2ae115ef9131d5579822b82c001fca
CRs-Fixed: 3289537
2022-09-21 21:38:36 -07:00
Devender Kumar
a85ce1152c qcacmn: Debug framework for SMMU buffer tracker for IPA offload
Debug framework for tracking the SMMU mapping and unmapping of
skb buffer when IPA offload is enable and IPA_SMMU_NBUF_TRACKER
is define.

CRs-Fixed: 3255423
change-Id: I8966097945b33cb866f4642b98b3d1a4beabfad7
2022-09-13 03:24:34 -07:00
Devender Kumar
78b844e995 qcacmn: Fix for calling cdp api from dp layer
cdp api is getting call from dp layer.

Fix is to call correct dp api from datapath file.

CRs-Fixed: 3279426
Change-Id: I142910276d76c600e5d79289270bbfe156bfab1c
2022-09-05 21:33:12 -07:00
Devender Kumar
13c6048f72 qcacmn: Fix for Unicast packet flow from WDS node in Intrabss
When EasyMesh feature is enabled, ARP replies from WDS node are
getting dropped by the AP, as there is no proper way to find the
DA_PEER with given WDS mac address.
Fix is to get the peer mac address for wds node based on ast entry.

CRs-Fixed: 3265158
Change-Id: I5ea890ce37dfde89d067b471417ba7aeb8c5d6f5
2022-08-24 17:22:30 -07:00
Himanshu Batra
7c5f36a9de qcacmn: Move vlan related enum usage under feature macro
Move vlan related enum usage under vlan feature macro for IPA offload

Change-Id: If2af8ca5db9b31a161c20c3d82130ffea26cacb6
CRs-Fixed: 3258130
2022-08-02 08:54:55 -07:00
Himanshu Batra
3d142e75de qcacmn: Fix compilation error by using correct variable
Fix compilation error by using correct variable

Change-Id: I97cb4222e7cc25e320757708432b66d660a94ddf
CRs-Fixed: 3252847
2022-07-27 13:26:17 -07:00
Devender Kumar
6e12b33067 qcacmn: Create a new API to update wdi hdr type for IPA
Create a new API to update wdi hdr type for IPA and Fix
the return type for cdp call.

CRs-Fixed: 3246990
Change-Id: Ic8adb1f46bfeda6598a01ffdda27339cfa04ee9d
2022-07-25 14:02:17 -07:00
Himanshu Batra
a2f709fa4f qcacmn: Change macro IPA_WDI3_RX_TWO_PIPES to IPA_WDI3_VLAN_SUPPORT
Change macro IPA_WDI3_RX_TWO_PIPES to IPA_WDI3_VLAN_SUPPORT to represent
the feature supported under this macro

Change-Id: Ie1e387d641052cd5690c63f0c1216f4852544605
CRs-Fixed: 3250264
2022-07-25 05:13:47 -07:00
Himanshu Batra
7be2cf3775 qcacmn: Add support for vlan tagged traffic in IPA offload
In IPA offload, both tagged and untagged traffic cannot be handled with
a single rx pipe. Hence, add support for 2nd RX pipe for tagged and
untagged traffic respectively.

Change-Id: I77ff633327696f66df42fb592492321c1591646b
CRs-Fixed: 3226021
2022-07-21 11:02:34 -07:00
Jia Ding
c78b55df2c qcacmn: Define IPA TX ring indexes for WCN7850
As part of IPA offload support for WCN7850 chipset, properly define
TX ring indexes into soc->tcl_data_ring[] and soc->tx_comp_ring[]
used by IPA.

In the change, use wlan_cfg_get_rbm_id_for_index() to get correct
rbm values for WBM2SW ring used by IPA.

Change-Id: Ie5b6743c1cb2adfa156735fc84dc1429a67f833a
CRs-Fixed: 3246038
2022-07-19 07:06:51 -07:00
Devender Kumar
277054124d qcacmn: AST entry create and update support for IPA
To support WDS feature in IPA driver, WLAN needs
to update the ast entry for any new rx packet, and for
end-nodes connected via repeater to root.

CRs-Fixed: 3226348
Change-Id: I7383b12f18e7c70ec06499d66130667eca033131
2022-07-13 02:37:22 -07:00
Jia Ding
831f2db53b qcacmn: Clean up unused IPA desc_format_template
With IPA WDI version 3.0 including HST, HSP and even HMT,
GSI is the implementation instead of IPA uC. As a result,
desc_format_template filed in pipe setup info is not used.
Hence clean up the unnecesssary setup for desc_format_template.

Change-Id: I51f87d9e22951c6a621c11984ed5e7084990c5c0
CRs-Fixed: 3231623
2022-07-07 21:43:25 -07:00
Devender Kumar
411e8fc3e0 qcacmn: Fix for IPA init path
After enable and disable of both radio, If second radio is enabled
then the instance_id from wlan driver is passed wrongly to IPA driver
which is in leading to initializion of first radio on IPA driver side.
Fix is to take the instace id based on psoc id and set the prod and cons
pipes based on instance_id instead of IPA given handle.

Change-Id: I26f4f3fbd23284e79a380d212ad07aceac50f053
CRs-Fixed: 3179306
2022-05-05 01:20:56 -07:00
Amit Mehta
d2199b7a99 qcacmn: Set default value for REO dest ctrl register
Currently in some case we are receiving non error packets on REO2TCL
ring, which is causing issue.

Fix is to set DEST_RING_MAPPING_0 to SW1 for REO dest ctrl
register, So that non error packets with reo_destination_indication
with 0x0 in the reo entrance ring will be routed to SW1 ring.

Change-Id: I67f78f35e7dba899943307902d99d0325a60498f
CRs-Fixed: 3150186
2022-03-17 07:25:12 -07:00
Devender kumar
95ced9577d qcacmn: Add support in IPA datapath for 2X_PDEV
2x_pdev changes are include for support new IPA API's
and change the existing API's argument to support new
parameter which is ipa handle, create a new API to get
the IPA hdl from IPA component in DP

Change-Id: I3d2b378620dbd1e64d295623534126e0eebc2d28
2022-02-16 16:56:50 -08:00
Harsh Kumar Bijlani
93cd9e0af8 qcacmn: Update stats in dp_txrx_peer in per packet path
Update stats in dp_txrx_peer in per packet Tx completion and
Rx path.

Change-Id: I807cb5ca9fe2aeeabdd4cb95d6e30cb9781560f4
CRs-Fixed: 3092123
2022-02-09 11:54:46 -08:00
Himanshu Batra
6c9b3cb72c qcacmn: Add API to check target state while enabling IPA autonomy
Add API to check target state while enabling IPA autonomy

Change-Id: I2d04b2989e129a8ab70fec908c06e509545c7a8c
2022-01-19 15:30:44 -08:00