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
This commit is contained in:
jiad
2018-08-06 13:41:36 +08:00
committed by nshrivas
parent a8700cc8f5
commit fa131feaa0

View File

@@ -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 */ /* Disable IPA UC TX PIPE when STA disconnected */
if ((ipa_ctx->num_iface == 1) && if ((ipa_ctx->num_iface == 1) &&
wlan_ipa_is_fw_wdi_activated(ipa_ctx) && 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()) { if (cds_is_driver_unloading()) {
/* /*
* We disable WDI pipes directly here * 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) && if ((ipa_ctx->num_iface == 1) &&
wlan_ipa_is_fw_wdi_activated(ipa_ctx) && 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()) { if (cds_is_driver_unloading()) {
/* /*
* We disable WDI pipes directly here since * We disable WDI pipes directly here since