From fa131feaa0f735ad7ebc75f5883ceb2ec78f798c Mon Sep 17 00:00:00 2001 From: jiad Date: Mon, 6 Aug 2018 13:41:36 +0800 Subject: [PATCH] qcacld-3.0: Fix WLAN IPA duplicate deactivation FW assert is observed when HTT_WDI_IPA_OPCODE_TX_SUSPEND is sent twice in a row. Issue is that CLIENT_DISCONNECT and AP_DISCONNECT could both trigger IPA deactivation when CLIENT_DISCONNECT is poped from pending queue and in another thread AP_DISCONNECT event arrives. Fix is to add check for resource_unloading flag and if resource_unloading is set to true, IPA deactivation is ignored since deactivation is already undergoing. Change-Id: I68a245809e263ce396b910c4cc3d4e6b071812c0 CRs-Fixed: 2288941 --- components/ipa/core/src/wlan_ipa_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index a41a980dd0..8177a3c64d 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -1597,7 +1597,8 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode, /* Disable IPA UC TX PIPE when STA disconnected */ if ((ipa_ctx->num_iface == 1) && wlan_ipa_is_fw_wdi_activated(ipa_ctx) && - !ipa_ctx->ipa_pipes_down) { + !ipa_ctx->ipa_pipes_down && + (ipa_ctx->resource_unloading == false)) { if (cds_is_driver_unloading()) { /* * We disable WDI pipes directly here @@ -1641,7 +1642,8 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode, if ((ipa_ctx->num_iface == 1) && wlan_ipa_is_fw_wdi_activated(ipa_ctx) && - !ipa_ctx->ipa_pipes_down) { + !ipa_ctx->ipa_pipes_down && + (ipa_ctx->resource_unloading == false)) { if (cds_is_driver_unloading()) { /* * We disable WDI pipes directly here since