Commit Graph

42 Commits

Author SHA1 Message Date
Rajeev Kumar
e59ae1bbe5 qcacld-3.0: Disable SAP/GO D3 WoW features if IPA is enabled
SAP/GO D3 WoW feature is not supported when IPA is enabled and hence
disable SAP/GO D3 WoW features when IPA is enabled.

Change-Id: Ia3da37087a0ca79c81c546f43a0893e46cf08c3c
CRs-Fixed: 3015104
2021-08-27 15:12:30 -07:00
Jianmin Zhu
1d4b529547 qcacld-3.0: Fix Dual AP IPA failed when NAPI enabled
Fix AP+AP IPA offload path failure when NAPI over IPA enabled on mdm
platforms by adding QCA_CONFIG_RPS check.

QCA_CONFIG_RPS is same as CONFIG_RPS, default Y, but depend on CONFIG_SMP
as msm-5.4/net/Kconfig.

For AP+AP mode,
For LA,   CONFIG_SMP on,  then QCA_CONFIG_RPS on,  use IPA exception path.
For mdm,  CONFIG_SMP off, then QCA_CONFIG_RPS off,  use IPA offload path.

For IPA napi enable status check, just use qdf_ipa_get_lan_rx_napi,
don't need MACRO IPA_LAN_RX_NAPI_SUPPORT.

Change-Id: I6b16f2a830d4e7829c9e539896ed2977895d367e
CRs-Fixed: 2992393
2021-08-17 11:01:11 -07:00
Jia Ding
f58c9d0001 qcacld-3.0: Prevent possible use-after-free of ipa_obj
wlan_ipa_uc_loaded_uc_cb is an API that is registered to IPA driver.
Therefore when IPA uC is ready, IPA driver is likely to invoke this CB
into our driver. If it is invoked after a WLAN idle shutdown, ipa_obj
use-after-free will happen because ipa_obj is destroyed as part of
shutdown.

g_ipa_is_ready flag is cleared after ipa_obj is destroyed. Therefore
fix is to add a ipa_cb_is_ready check in wlan_ipa_uc_loaded_uc_cb to
ensure ipa_obj is allocated and not freed.

Change-Id: Id422c0780ab864936d9bc812a6078ea4c20ef2af
CRs-Fixed: 2975057
2021-07-07 09:11:22 -07:00
Huashan Qu
883f3f308c qcacld-3.0: Fix KW issues in ipa files
Fix KW issues in ipa files, add ipa_obj null check before use.

Change-Id: Ie6f69fda7d50b8ece9917db43a838e0f3852393f
CRs-Fixed: 2979119
2021-07-01 13:44:16 -07:00
Tiger Yu
9845857014 qcacld-3.0: Use the global lock instead of the ipa init_deinit_lock
Use the global lock instead of the init_deinit_lock in the ipa_obj to
avoid access the invalid memory with ipa_obj->init_deinit_lock since
the ipa_obj will be freed after driver shutdown.

Change-Id: I98a844456873f60213fae19c237bb08b76b4846c
CRs-Fixed: 2887487
2021-04-27 06:19:06 -07:00
Tiger Yu
fee8629f3e qcacld-3.0: Add is_2g_iface support in WLAN IPA
With IPA TX two pipes support, TX rings for 2G and 5G traffic
are separated. As a result, WLAN needs to let IPA driver
know if the interface registered to IPA is 2G or 5G so that
IPA could differentiate and designate the interface for the
correct IPA TX pipe.

In this change, a new param is_2g_iface is added for the
event interface between protocol and IPA component. And
this new param is applicable only STA_CONNECT and
AP_CONNECT where wlan will register interface details
including is_2g_iface to IPA driver.

For two pipes implementation, is_2g_iface piggy-backs
session_id when passing it to CDP layer. And CDP layer
needs to decode session_id and is_2g_iface.

Change-Id: I5e02ec6969bb2f77d6b40e89d5a9451a7bb0be9d
CRs-Fixed: 2702704
2021-04-20 03:32:15 -07:00
Vevek Venkatesan
42c0970be1 qcacld-3.0: add checks for deinit in ipa_register_ready_cb
Since stop_modules can happen in parallel due to idle shutdown,
add additional checks whether the IPA deinit happened already
or in-progress, in ipa_register_ready_cb.

Change-Id: Icc1973be3e90d4231addcebab55e621d19c5789c
CRs-Fixed: 2903419
2021-04-01 20:34:02 -07:00
Zhaoyang Liu
567e4681be qcacld-3.0: fix build error about function redefinition
Fix the compilation error about redefinition of 'ipa_is_ready'.
This API is defined in <linux/ipa.h>. Rename the function name.

Change-Id: I206a221a5df95494e947483f2d133df6e5053220
CRs-Fixed: 2817997
2020-12-21 04:49:45 -08:00
Chaoli Zhou
221e7e425e qcacld-3.0: Enable/Disable intrabss for Rome IPA
In the Rome IPA case, it need wlanhost side to
enble/disable intrabss by WMI_VDEV_PARAM_INTRA_BSS_FWD.
If set to 1, the ip data transfer between two wlan clients
should be:
wlan client1 -> wlan fw -> wlanhost -> wlan fw-> wlan client2.
If set to 0, the ip data transfer between two wlan cleints
should be:
wlan client1 -> wlan fw -> ipa -> wlan fw -> wlan clients2.

Change-Id: I105ddbdb58f2cd01bdf94521bd7934508889de5d
2020-10-13 04:13:15 -07:00
Ananya Gupta
b7b97c1bc5 qcacld-3.0: Enabling RPS for STA in STA+SAP mode
In STA+SAP mode, RPS is enabled only for SAP interface and
not for STA interface resulting in low throughput as STA RX
will also take the IPA path.
To fix this, enable/disable RPS when SAP is turned on/off
when IPA is enabled

Change-Id: I67c0da2fbbb43bd7b34969bbb05c1127e60d5673
CRs-Fixed: 2783136
2020-10-09 02:14:18 -07:00
Srinivas Girigowda
d36054fbd2 qcacld-3.0: components: Remove logs for qdf_mem_malloc() checks
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.

Getting rid of these unnecessary logs reduces driver memory footprint.

Change-Id: If0b9425f82f9ed793c7639c0ed09eb1f868b6d5c
CRs-Fixed: 2781932
2020-09-25 12:59:42 -07:00
Nisha Menon
417b7e3c6f qcacld-3.0: IPA SMMU enable check to be moved to IPA ready cb
During probe IPA SMMU S1 enable check will pass only if IPA
registration for ready callback is successful and IPA ready
callback is invoked.
This ensures that IPA APIs are not invoked unless IPA ready
callback is invoked and ipa ready flag is set in the host
driver.

Change-Id: Ie157a2f851bb1e914a098b62ede1280aa0243d19
CRs-Fixed: 2778504
2020-09-20 01:05:50 -07:00
Nisha Menon
d5f0559bbb qcacld-3.0: Disable ipa ready registration in FTM mode
In FTM mode do not register callback with IPA driver
to check if IPA is ready.
IPA offload is not supported in FTM mode.

Change-Id: I9d36f3085db72d3ffe9e6080f422618f7a531c01
CRs-Fixed: 2772192
2020-09-15 11:38:32 -07:00
Nisha Menon
60960c90b1 qcacld-3.0: Map IPA tx buffers as part of IPA ready callback
Register IPA ready callback with IPA driver. The callback
sets ipa_is_ready flag in the host driver and kick starts
the ipa init sequence as part of which the Tx buffers are
mapped to IPA.
None of the IPA APIs are invoked until IPA ready registration
is complete.

Change-Id: I4dda8fd083c71400532139174f834b757e05e5a6
CRs-Fixed: 2752235
2020-09-02 13:51:29 -07:00
Sravan Goud
146c50d37f qcacld-3.0: Flush pending ipa pending events
At stop adapter flush vdev's pending wlan ipa events
and also increase the ipa resources load/unload timeout
to 500ms as current timeout of 100ms which is less taking
in to account of suspending IPA pipes, WLAN FW pipes and
also waiting separately for the RX and TX suspend ack from
the FW.

Change-Id: Ia622ab84f15089826c23502f365b11e742277ca8
CRs-Fixed: 2660807
2020-04-16 03:10:40 -07:00
Jia Ding
97b62586f8 qcacld-3.0: Support per AP isolation in WLAN IPA
AP isolation a.k.a intra-bss forwarding is a per AP attribute. Issue in
current IPA implementation is that it does not support per AP control.
In a SAP-SAP configuration, latter SAP configuration will always overwrite
first SAP's isolation configuration.

Fix is to add vdev id parameter from protocol layer so that IPA component
could configure AP isolation on a per AP basis.

Change-Id: I9c96cdcda03eb10b4c2984a757e52d77b5bf6790
CRs-Fixed: 2624757
2020-02-25 21:58:03 -08:00
Vevek Venkatesan
29076ec1d8 qcacld-3.0: cdp: Converge cdp_ipa_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- ipa_get_resource
- ipa_set_doorbell_paddr
- ipa_set_active
- ipa_register_op_cb
- ipa_get_stat
- ipa_tx_data_frame
- ipa_uc_get_share_stats
- ipa_uc_set_quota
- ipa_enable_autonomy
- ipa_disable_autonomy
- ipa_setup
- ipa_enable_pipes
- ipa_disable_pipes
- ipa_rx_intrabss_fwd

Change-Id: I678d7a7de7132417ff6051b0fd6da5d14426d21e
CRs-Fixed: 2540861
2019-11-21 06:12:04 -08:00
Mohit Khanna
5b42d1b969 qcacld-3.0: Wait for IPA TX Completions on IPA disablement
In DBS scenario(SAP + STA) when all SPA clients disconnect, while STA is
still connected, IPA pipes are disabled on the lithium target. At this
time, its possible that some packets TX from IPA over WLAN are still
pending. If these completions come after IPA pipes are disabled, it can
lead to a NOC error, since the GSI doorbell register for WBM2SW2 ring
may be clock gated (after IPA pipes are disabled).

To avoid this situation, wait for some time before disabling IPA pipes.
IPA pipes are disabled after a timeout, when system suspend call tries
to suspend the bus. A driver unload or a softap tear-down will also
disable the pipes.

Change-Id: I542049fa19d0dcf5c31d9b8a2d836388847dd6c1
CRs-Fixed: 2553670
2019-11-08 15:54:58 -08:00
Sravan Kumar Kairam
3bc886df40 qcacld-3.0: Support stats quota for sta + sap ipa offload
Implement metering stats quota to support ipa offload sta plus
sap wifi sharing use cases.

Change-Id: Ic9d5ad817ffb4d671a43f3f3aebb2d8cce293873
CRs-Fixed: 2517696
2019-10-19 17:46:02 -07:00
Alok Kumar
e888e80ef0 qcacld-3.0: During wlan IPA suspend, force the BW voting to high
During wlan IPA suspend, force the bandwidth voting to high
when CFG_DP_IPA_ENABLE_FORCE_VOTING is enabled.

Change-Id: I9b368081f9c0919f5fecfacf318ad1a714cc33cf
CRs-Fixed: 2521815
2019-09-26 22:04:50 -07:00
Vevek Venkatesan
e81bca8057 qcacld-3.0: cleanup IPA STA iface, if STA disconnect failed
If STA disconnect failed for any reason, cleanup IPA STA iface
if not already done.

Change-Id: I27ff33324bc4724e8470af9a0c434fa03e8aa5c3
CRs-Fixed: 2505563
2019-08-22 07:31:12 -07:00
Rakshith Suresh Patkar
96703f64d6 qcacld-3.0: Cleanup sta_id from IPA [PEER_ID_PHASE1]
Local sta_id or peer_id is being cleaned up across DP, HDD
and PS/WMA. So, any references to local peer_id/sta_id will
be replaced by peer mac address and all interactions
between the layers will be based on peer mac address.

Change-Id: I78230bf1e1ec090e83245bff04953fa2e03b91cd
CRs-Fixed: 2504013
2019-08-09 07:37:21 -07:00
Vevek Venkatesan
3b6be82e9b qcacld-3.0: abstract Linux identifiers from IPA component
Abstract Linux based OS identifiers from IPA component in
HDD/OSIF layer.

Change-Id: I82a5db8c796d47d552757b1a450df10c72061177
2019-05-31 02:29:49 -07:00
Vevek Venkatesan
78f7f09a57 qcacld-3.0: fix CFI failure by abstracting the callback
Abstract the callback hdd_softap_ipa_start_xmit by
hdd_softap_ipa_start_xmit, to match the return type of
wlan_ipa_softap_xmit pointer, to fix a CFI failure.

Change-Id: If1cb1a80801558d5c7831ec89ad5281b0bbe36f3
2019-05-28 08:19:59 -07:00
Wu Gao
814ce703b4 qcacld-3.0: Format ini descriptions
Some ini descriptions are different to common, and some of them
include wrong information, so correct them and use unified form.

Change-Id: I36348fb26a03cab254fd309d792125b8a21ad02f
CRs-Fixed: 2402446
2019-02-24 21:34:47 -08:00
Jianmin Zhu
8647c72757 qcacld-3.0: Fix asymmetry of ipa pdev create and destroy handler
Fix asymmetry of ipa create and destroy handler

Change-Id: I89f5ca112ef3cc6b46fef8273800c668936f9c2f
CRs-Fixed: 2353796
2018-11-22 04:18:12 -08:00
jitiphil
4c256a34d6 qcacld-3.0: Add IPA CFG items and APIs
Add IPA related INI config to IPA component.

Change-Id: I5bea63b83ddac62504ef38019aa4034c4e18bca7
CRs-Fixed: 2320921
2018-10-05 19:58:00 -07:00
jitiphil
0e3b592aed qcacld-3.0: Handle FW rejuvenate scenario
Upon driver reinitialize after a FW rejuvenate,
data packets are not going through IPA path.

Check for FW rejuvenate scenario during driver
recovery and send appropriate message to IPA
driver.

Change-Id: I8c1d7ba78227684cd5653a5927aa4d4c2ce5d354
Crs-Fixed: 2287293
2018-10-04 08:13:09 -07:00
Sravan Kumar Kairam
657f89e1e5 qcacld-3.0: Send IPA UC disconnect events during SSR
Currently during SSR IPA events such as AP DISCONNECT/
STA DISCONNECT are not sent and also wlan ipa interafces
are not deregistered. After SSR when host sends AP CONNECT/
STA CONNECT and register interafce IPACM will reject as for
previous events before SSR there are no disconnect events.
This leads to data come via exception path instead taking
IPA HW route as interface headers are not registered.

In this fix send IPA UC disconnect events and deregister
interafces during SSR.

Change-Id: I6e617261ec53b7d572023613d212eae057b13b03
CRs-Fixed: 2315828
2018-09-20 14:54:40 -07:00
Dustin Brown
7e761c71eb qcacld-3.0: Reduce hdd/ipa info logs
A number of HDD and IPA logs are generally unnecessary and have been
identified as contributing to log spam. Reduce these log messages to the
debug level.

Change-Id: I2f92bb4caec5adc65fdad0146298aa5f88b43def
CRs-Fixed: 2288430
2018-07-31 19:01:18 -07:00
Sravan Kumar Kairam
ce792eb7f6 qcacld-3.0: Clean up IPA interface when SAP stop bss fails
In case of rmmod if stop bss fails SAP IPA interface is not
deleted. So again at next driver load IPA will be holding the
stale IPA header and new IPA header will not be added at IPA
interface creation. In this change clean IPA interface when SAP
stop bss fails.

Change-Id: I3a1bf891752308ba1a29d6768f24880d8514d5bf
CRs-Fixed: 2224307
2018-06-20 04:05:36 -07:00
Yun Park
a29974a3ae qcacld-3.0: Remove IPA uC stat log when IPA pipe is suspended
There's an excessive log for IPA uC stat request reason even when
WDI pipe is suspended.
Enable IPA uC stat request reason log only when IPA pipe is resumed.

Change-Id: I35d98e02a9180738bc9cdb25f59e31d572df9e0e
CRs-Fixed: 2181952
2018-04-25 07:36:19 -07:00
Sravan Kumar Kairam
cad3847747 qcacld-3.0: Check for IPA ini config enable
Check if IPA is enabled in ini configuration before doing
IPA operations from northbound interface calls.

Change-Id: Ic075562c1afe52d26ebefaff058fde7c90d4f7d1
CRs-Fixed: 2215269
2018-03-29 21:14:40 -07:00
Sravan Kumar Kairam
983a445b37 qcacld-3.0: Move IPA SMMU functions to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy HDD IPA SMMU functions to the
IPA component.

Change-Id: I3ac5ebe87cc48913f3e8e075e60737e78664f861
CRs-Fixed: 2177925
2018-03-21 18:57:34 -07:00
Sravan Kumar Kairam
5214f65bf9 qcacld-3.0: Move IPA WLAN event handler to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy HDD IPA WLAN event handler to
the IPA component.

Change-Id: Ia53adce7ef29eea747f288fa074f96a84e47925d
CRs-Fixed: 2177925
2018-03-21 18:57:30 -07:00
Sravan Kumar Kairam
7d931ff37d qcacld-3.0: Move IPA FW OP event handler to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy HDD IPA FW OP event handler to
the IPA component.

Change-Id: Idecf12c33a5b4ab80de50626029ff43b5f9336a2
CRs-Fixed: 2177925
2018-03-21 18:57:27 -07:00
Sravan Kumar Kairam
1309e7eaf5 qcacld-3.0: Move IPA UC offload initialization to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA UC offload initialization to
the IPA component.

Change-Id: I221a11e7f8aa2459918f87c6b043d4682e05cb04
CRs-Fixed: 2177925
2018-03-21 18:57:23 -07:00
Sravan Kumar Kairam
858073b1f9 qcacld-3.0: Remove legacy IPA code from HDD
As part of converged driver model remove IPA from
HDD and create a new IPA CLD component. Remove the
legacy code from the HDD.

Change-Id: Id4691e0f490c2f9bd9ccc8d5225be32002a5df9e
CRs-Fixed: 2177925
2018-03-21 18:57:20 -07:00
Sravan Kumar Kairam
271fab287a qcacld-3.0: Move IPA stats and debug info API to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA stats and debug info  APIs to
the IPA component.

Change-Id: Ieb68a1579986c835f66c84e5e3b7aa2a4004383d
CRs-Fixed: 2177925
2018-03-21 18:57:17 -07:00
Sravan Kumar Kairam
9e99e9a9f9 qcacld-3.0: Move IPA set perf level API to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA set perf level APIs to the IPA
component.

Change-Id: Idbbab9cc6885b6acf1cd40d432a236f0629c8dff
CRs-Fixed: 2177925
2018-03-21 18:57:14 -07:00
Sravan Kumar Kairam
d01b445db4 qcacld-3.0: Move IPA setup and initialization to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA setup and initialization code
to the IPA component.

Change-Id: I63717eb2601c569131c6642f7330e4182e604424
CRs-Fixed: 2177925
2018-03-21 18:57:08 -07:00
Sravan Kumar Kairam
4af61cf612 qcacld-3.0: Create IPA CLD component
As part of converged driver model remove IPA from
HDD and create a new IPA CLD component. Add files for
IPA core, dispatcher and target_if. Define IPA related
public and private structures.

Change-Id: I8848331edc7dd878f9fc51ef9f5e311ad91ed70b
CRs-Fixed: 2177925
2018-03-21 18:57:03 -07:00