Commit Graph

176 Commits

Author SHA1 Message Date
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
Vevek Venkatesan
3ca1f5fff2 qcacld-3.0: reorder error checks in ipa_uc_ol_deinit
Reorder error checks in ipa_uc_ol_deinit, so it can
return immediately if IPA config is not enabled.

Change-Id: Ibf9f30650ce201eea562baf07b6dd9b83fd8dfff
CRs-Fixed: 2977474
2021-06-25 09:40:12 -07:00
Tiger Yu
33c1df645b qcacld-3.0: Enable the wlan IPA events for P2P GO/CLI mode for qca6390
Enable the wlan IPA events for P2P GO/CLI mode for qca6390 to avoid RX
packets get dropped due to IPA interface context is not created.

Change-Id: I1e2c5e4085874280779d8d8d07efdb1f33e6d90b
CRs-Fixed: 2853271
2021-06-22 13:14:06 -07:00
Rakesh Pillai
e86da7276c qcacld-3.0: Changes to enable BE/WCN7850 flags
Changes to enable compilation for beryllium target(chip WCN7850).

CRs-Fixed: 2888534
Change-Id: I7b3d252fc8550883a2d24b6beb2b78f482f5004b
2021-06-04 10:43:23 -07:00
Karthik Kantamneni
6b9945cdb4 qcacld-3.0: Handle ipa pipes setup failure in wlan_ipa_uc_ol_init
When ipa setup pipes fails in wlan_ipa_uc_ol_init API,
tx buff mapping is not done but during deinit path
tx buff unmapping is called without mapping.

Fix this by resetting uc_loaded flag to false when ipa pipes
setup failure is encountered.

Change-Id: Ic34320e56cee9e60381d9203dd95e268d0ef392b
CRs-Fixed: 2957612
2021-05-31 13:30:15 -07:00
Yeshwanth Sriram Guntuka
553ec8e0a4 qcacld-3.0: Handle error cases in ipa_uc_loaded_handler
In the scenario where ipa connect pipes fails in the
wlan_ipa_uc_loaded_handler API, uc_loaded flag is not
reset. As a result of this, in wlan_ipa_uc_ol_deinit,
ipa_tx_buf_smmu_unmap and ipa_wdi_disconn_pipes APIs are
invoked incorrectly.

Fix is to set the uc_loaded flag to true only if connect
pipes and tx_smmu mappings are successful in
wlan_ipa_uc_loaded_handler. Also, initialize the uc_op_work
in wlan_ipa_uc_ol_init prior to the uc_loaded check to
avoid a possible race condition which could also result
in the similar issue as above.

Change-Id: I119170413cb9b5e03ec476c9a69d9effaa460c01
CRs-Fixed: 2940833
2021-05-31 07:47:15 -07:00
Tiger Yu
91d2958518 qcacld-3.0: Reset iface_context to NULL if max IPA interfaces reached
Reset iface_context to NULL if max IPA interfaces reached to avoid to
cleanup the wrong interface context when setup IPA interface failure.

Change-Id: I2f19d62b9f76f826c2275a0d889b5f5a0a48a01f
CRs-Fixed: 2931966
2021-05-17 23:43:36 -07:00
Yeshwanth Sriram Guntuka
7c7aa33389 qcacld-3.0: Do not intrabss fwd EAPOL frames in IPA exc path
Do not intrabss forward EAPOL frames received in IPA
exception path.

Change-Id: I0be68ec2c186a7b64d4d2f1c3de7dbb20e49d860
CRs-Fixed: 2860225
2021-05-12 18:42:18 -07:00
Yeshwanth Sriram Guntuka
60703ed106 qcacld-3.0: Drop non-EAPOL/WAPI frames from unauthorized peer
Drop non-EAPOL/WAPI frames from unauthorized peer received
in the IPA exception path.

Change-Id: I0c0bc6e60efa193126ba1e3eca36c5e02f7f76a3
CRs-Fixed: 2860206
2021-05-12 12:30:53 -07:00
Jianmin Zhu
007e9b9449 qcacld-3.0: Avoid intra bss forwarding for adapter in sta mode
During DUT STA Rx over IPA, qdf_spin_unlock_bh is called as following.
__wlan_ipa_w2i_cb
->wlan_ipa_rx_intrabss_fwd
->cdp_ipa_rx_intrabss_fwd
->dp_ipa_rx_intrabss_fwd
->dp_vdev_get_ref_by_id
->qdf_spin_unlock_bh

netif_rx will raise NET_RX_SOFTIRQ in enqueue_to_backlog->
____napi_schedule even NAPI not enabled.
spin_unlock_bh will call do_softirq to execute NET_RX if NET_RX_SOFTIRQ
is raised.

If qdf_spin_unlock_bh is called in wlan_ipa_w2i_cb, once 1 skb received,
netif_rx is called, and NET_RX_SOFTIRQ and APP like iperf is scheduled,
too much context switch happens, CPU and power is wasted, Rx throughput
KPI failed on mdm platform which only has single 1.2G-1.5G CPU.

Fix it by avoiding intra bss forwarding for adapter in sta mode.

Change-Id: I264b14120b9998a56f6c1978f5a890615e6f837c
CRs-Fixed: 2915691
2021-05-11 10:13:39 -07:00
Ananya Gupta
64cfae78e5 qcacld-3.0: Enable IPA when loaded as module
Currently, module 'm' is converted to 'y' in QGKI when
compiling. In Waipio, GKI2 is present in which 'm'
is not being converted and hence IPA_OFFLOAD is not enabled.
To fix this, checking if CONFIG_IPA3 is either set to y or m
and then enabling CONFIG_IPA_OFFLOAD.
From Kernel 5.10, few IPA functions are depreciated for which
putting the depreciated functions under kernel check condition.

Change-Id: Iba3735692267130b76a8eaaaeeb53c263f8f0ddf
CRs-Fixed: 2921600
2021-05-06 06:23:38 -07:00
Nisha Menon
934509d20c qcacld-3.0: Stop BW monitoring before disabling IPA pipes
Stop the BW monitoring and stats collection for IPA before
disabling the pipes. Add this to the the case where WLAN
is in SSR and IPA pipes are being disabled when last client
is disconnecting.

Change-Id: I29e8ec6d73287cf601f829e74ba03aa611564d3a
CRs-Fixed: 2922079
2021-04-28 12:04:53 -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
Vevek Venkatesan
d8a109879b qcacld-3.0: iface connection/disconnection mgmt in IPA
Debug change to crash if there is a mismatch in number of
connections and disconnections

Change-Id: I1bb9cac331c0cb491a0ba761a78969537185e414
CRs-Fixed: 2870628
2021-03-15 16:10:06 -07:00
Vevek Venkatesan
9bbb1117ca qcacld-3.0: send eapol to network even if iface is not ready
Currently the first EAPOL pkt has been received before setup
IPA interface context for STA and getting dropped, so adding
changes to send the EAPOL pkt to network even if IPA iface
for STA is not ready.

Change-Id: I78e8c7ba82dabc73503fb75c39ac794c152303dd
CRs-Fixed: 2874358
2021-03-10 21:14:18 -08:00
Vevek Venkatesan
d01d8ce465 qcacld-3.0: add NULL check before calling rps_enable cb
Add a NULL check before calling rps_enable callback
from ipa_set_rps_per_vdev and also add a check to avoid
disabling rps twice.

Change-Id: Ib63b2cda99aa332905df640ffa2d401c22845ad2
CRs-Fixed: 2876490
2021-02-18 14:14:02 -08:00
Vevek Venkatesan
7ddad6e2cb qcacld-3.0: decouple bw monitor from WDI3_STATS_UPDATE
Decouple BW monitor from WDI3_STATS_UPDATE and add as a
separate feature flag WDI3_STATS_BW_MONITOR.

Change-Id: I77fb5658d995daceaada6a7d64f669da706ead9c
CRs-Fixed: 2868582
2021-02-02 13:08:13 -08:00
Jianmin Zhu
cd6a5aa828 qcacld-3.0: Fix assert for sta ipa interface leaked
Once 1 roaming happened, ipa_ctx->sta_connected increased 1, and its
type was uint8_t, once increased to 256, overflow happened.
ipa_ctx->sta_connected became 0. then wlan_ipa_cleanup_iface couldn’t be
called to free old iface, but wlan_ipa_setup_iface was called to add new
iface, then there were 2 sta ipa interfaces with same session id 2.

When sta disconnected, only 1 ipa interface was freed, the other ipa
interface with session id 2 was left, but vdev 2 was deleted.

If 1st client connected DUT SAP, sta vdev 2 was found by mistake,
WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID was sent to F/W to enable IPA path
for vdev 2, but vdev 2 wasn't existed, assert happened.

To fix it, when LFR3 roaming happens, when wlan_ipa_cleanup_iface is
called to free old iface, ipa_ctx->sta_connected is decreased by 1
first, when wlan_ipa_setup_iface is called to add new iface,
ipa_ctx->sta_connected is increased by 1, then
ipa_ctx->sta_connected reflects real STA number on DUT.

Change-Id: I5c91b3402dcfe8b1828d8d1f0701f66ca3c15d50
CRs-Fixed: 2859438
2021-01-22 12:07:25 -08: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
sandhu
bccde19f93 qcacld-3.0: Remove unused IPA related memory in lahaina
Remove IPA related TX completion memory not used in lithium
and helium platforms.

Change-Id: Ibdce6169a1b5b95289fee80a36e2041cf785ad86
CRs-Fixed: 2808513
2020-12-17 23:45:51 -08:00
Karthik Kantamneni
446ec416cd qcacld-3.0: Fix uninitialized IPA MCC work cancellation
IPA MCC work is initialiazed only when uc code loaded successfully,
before canceling MCC work check for uc load success state.

Change-Id: I9af501d1b974d0da21891634bde2beafd69701b2
CRs-Fixed: 2822382
2020-11-23 13:19:23 -08:00
Yeshwanth Sriram Guntuka
fd1b019165 qcacld-3.0: Do not sched IPA UC op work when de-init is in progress
In the scenario where IPA UC ready work is processed after
wlan_ipa_uc_ol_deinit, triggered as part of idle shutdown,
there is a possibility for NULL wbm srng pointer derefernce
when setting the tx doorbell address.

Fix is to avoid scheduling UC op work when deinit is in
progress.

Change-Id: Ifa0908912b77f45b7d93c5f9c2f5aaf9e17685c5
CRs-Fixed: 2807218
2020-10-29 11:01:45 -07:00
Ananya Gupta
a43193f48b qcacld-3.0: handle multiple sap if NAPI is enabled for IPA
Disable IPA when second SAP is turned on only if NAPI support
is enabled for IPA path.

Change-Id: Id30714156a959ed940d0480cb0e0d8db467c821f
CRs-Fixed: 2807158
2020-10-29 09:00:07 -07:00
Ananya Gupta
bbe449f218 qcacld-3.0: Call cdp function to deregister IPA handler from pdev
A htt message arrived after ipa context is freed as part of
deinitialization which was dereferenced by event handler
assigned to pdev->ipa_uc_op_cb, resulting in crash.
To fix this, cdp function is called during deinit to
deregister pdev->ipa_uc_op_cb and assign it NULL. Also, adding
NULL check in wlan_ipa_uc_op_cb. Also, registering ipa_uc_op_cb
after work is created so as to not hit condition where work is
scheduled before creation.

Change-Id: Ib79136b1122625079d8173a401dba5516126c621
CRs-Fixed: 2794663
2020-10-13 15:28:18 -07: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
Guisen Yang
7608656e86 qcacld-3.0: Change ROME IPA pipe names
With IPA team's request, in order to match
the pipe setting in the ipa driver of linux
kernel 4.14, we need to change ROME IPA
pipes from IPA_CLIENT_WLAN1_CONS and
IPA_CLIENT_WLAN1_PROD to IPA_CLIENT_WLAN3_CONS and
IPA_CLIENT_WLAN3_PROD. Meanwhile change MCC pipe
to IPA_CLIENT_WLAN2_CONS. Also add one feature
flag to avoid affecting other SPs

Change-Id: I99dd442801b1278742c19e4565da2201e1303607
2020-10-07 15:16:18 -07:00
Vevek Venkatesan
bbcf12c70d qcacld-3.0: add cdp ops for IPA Tx buf smmu_unmapping
Add cdp ops for IPA Tx buf SMMU-S1 unmapping and
call unmap from ipa_uc_ol_deinit if IPA uc_loaded,
also assert if mapping/unmapping failed.

Change-Id: I79f293fcf5d6f02e3a01d6c8ff829f4ca87e76e8
CRs-Fixed: 2788811
2020-10-05 17:50:08 -07:00
Ananya Gupta
9423436d12 qcacld-3.0: Disable IPA when 2nd SAP is turned on
When 2nd SAP is turned on throughput is dropping as
rps is not getting enabled on wifi bridge interface.
A bridge interface is a virtual interface created,
when 2 SAP are turned on else, there is no bridge
interface.
To fix this, Disable IPA when 2nd SAP is turned
on, so that packets are not re-routed through IPA
which is reducing throughput.

Change-Id: I250056338cec0924e97ff79d2d9e6ac513f50d66
CRs-Fixed: 2769539
2020-09-28 00:02:57 -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
Ananya Gupta
ed8fecee78 qcacld-3.0: Cleanup iface if net_dev changed for same vdev
If adapter is changed for a particular vdev and
QDF_IPA_AP_DISCONNECT event was not sent to IPA event
handler when the earlier adapter went down, iface is not
cleaned up.
To fix this, cleaning up the interface when new interface
is being setup for the same vdev and net_dev is not matching.

Change-Id: Icb227df8ef31e9c2c904873559e3b33f05fc03b5
CRs-Fixed: 2777672
2020-09-25 01:29:34 -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
Yeshwanth Sriram Guntuka
843e288336 qcacld-3.0: Fix possible NULL pointer dereference
Pointers returned by wlan_ipa_get_iface API and
cds_get_context API are not NULL validated at few
places. Add NULL checks for these pointers to avoid
possible NULL pointer dereference.

Change-Id: I44f226c2ce97afd6ad2ff9cde5cd70d9d12bc3d2
CRs-Fixed: 2775197
2020-09-15 09:28:43 -07:00
Jia Ding
0358fd452a qcacld-3.0: Provide soc handle and pdev id for IPA cleanup
To do SMMU unmap for IPA TX and RX doorbell registers, provide
soc handle and pdev id to CDP layer.

Change-Id: I6e4fcc7d96d3dabe9dcbb85b9d7193e898d9a73e
CRs-Fixed: 2768306
2020-09-15 09:28:40 -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
Srinivas Girigowda
f375188704 qcacld-3.0: components: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2752355
Change-Id: I2d776be789df3e83e0c13211844b66d595498829
2020-08-22 16:00:40 -07:00
Mohit Khanna
79d25ce510 qcacld-3.0: Send DISCONNECT event to IPA in roaming
Send STA_DISCONNECT event to IPA before sending STA_CONNECT in roaming
scenario. This is needed by IPA to cleanup in roaming scenario. Without
the event, IPA may not be able to setup routing tables in IPA hardware
properly.

Change-Id: I694736654a137718cd250c28d3c4681a1007ce9a
CRs-Fixed: 2739550
2020-08-21 02:28:35 -07:00
Vevek Venkatesan
fedc5e32b8 qcacld-3.0: fix IPA stats set_quota failure
Fixing the failure of set_quota feature for IPA stats,
currently calling set_quota during resource_loading, but
it is supposed to be called if resource_loading is false.
This is causing IPA stats set_quota feature is getting
failed for Adrestea targets and fixing the same.

Change-Id: I95ad60a8e15f4faaea34093785422ad494ee1fb4
CRs-Fixed: 2730655
2020-08-13 06:13:23 -07:00
Alok Kumar
2b43ad3c11 qcacld-3.0: Avoid NULL pointer derefence for PDEV
Currently, NULL pointer dereferencing of objmgr PDEV
is observed in wlan_objmgr_pdev_get_comp_private_obj.

Add NULL check for pdev inside ipa_uc_force_pipe_shutdown
and ipa_fw_rejuvenate_send_msg before pass PDEV to
wlan_objmgr_pdev_get_comp_private_obj.

Change-Id: I4e19cc9c254febabad551aa62f72d2ce4897b852
CRs-Fixed: 2719149
2020-06-30 14:58:16 -07:00
Manikanta Pubbisetty
4b9a9fa22f qcacld-3.0: move log out of the lock region
Currently, if the time spent in a spin_lock region exceeds
a certain threshold, a system crash will be triggered.

There are chances that a log within a spin_lock region would
result in a crash if the time taken to log the buffer exceeds
the threshold which triggers the crash.

Avoid this by moving the log out of the lock region.

Change-Id: Ic51556723033e9553443250b9cb4cfee2b402309
CRs-Fixed: 2713234
2020-06-18 21:19:14 -07:00
Jia Ding
51a9fa1c4a qcacld-3.0: Properly set WLAN_IPA_MAX_STA_COUNT
Set WLAN_IPA_MAX_STA_COUNT to WLAN_MAX_CLIENTS_ALLOWED
if WLAN_MAX_CLIENTS_ALLOWED is defined.

Change-Id: Ic7b3706897cec8ee149bab12cd91c94ae04f75ef
CRs-Fixed: 2658585
2020-05-29 03:13:43 -07:00
Jianmin Zhu
25800f4de6 qcacld-3.0: Tx dropped for osif_vdev_sync_op_start failed
osif_psoc_sync_trans_start_wait is wrongly used in
Idceff767d62c1e81046a696cb58f70a897cbd074, which will block any
vdev operation which results in tethering failure and Tx packets
also won't be transmitted whenever ipa event is processed as
we have vdev check in hard transmit too.
Fix:
Don't call osif_psoc_sync_trans_start_wait when handle IPA
event, just check recoverying state.

Change-Id: Ibb5d94e0e22413fdd9dad294fc8da58eba8a700b
CRs-Fixed: 2680423
2020-05-07 13:03:39 -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
Jianmin Zhu
db3f428eb9 qcacld-3.0: IPA uc not ready for race condition
Race condition between ifconfig and ipa uc event handler thread.
While ifconfig thread creating vdev1, the vdev is locked, ipa uc
event handler thread tries to lock psoc, becomes failed for 1
dev locked, gets error EAGAIN but doesn't try again. IPA uc
event is abandoned without handling.

Fix:
IPA uc event handling can't be abandoned but can be blocked
since it is called in separated work thread, block DSC API
should be used here.
Blocked Operation and Transition have no much difference in DSC,
and they need block each other too, should share same
completion and queue, can share same API.

With WDI 3.0 over GSI, WDI control event is not needed. Therefore
provide a wrapper API for wlan_ipa_uc_send_wdi_control_msg().

Change-Id: Idceff767d62c1e81046a696cb58f70a897cbd074
CRs-Fixed: 2618490
2020-03-09 22:45:28 -07:00
Sravan Goud
1945c9fc0b qcacld-3.0: Fix passing invalid ipa iface
Currently in net dev cleanup of ipa host interface if the
ipa interface does not exist for that particular net dev,
last ipa iface reference is passed. This may lead to invalid
access. So fix by validating the iface context before clean
up of host ipa interface.

Change-Id: I753c922b5c82c676a318df87552051fdd74c983c
CRs-Fixed: 2632382
2020-03-03 18:52:37 -08:00