From a4dea9069a17e1cb0181f0c28d417522dd8bb52f Mon Sep 17 00:00:00 2001 From: Rakshith Suresh Patkar Date: Mon, 23 Sep 2019 15:33:15 +0530 Subject: [PATCH] qcacld-3.0: Reset vdev_to_iface QDF_IPA_STA_DISCONNECT In __wlan_ipa_wlan_evt, for QDF_IPA_STA_DISCONNECT event, ipa_ctx->vdev_to_iface[session_id] is reset back to WLAN_IPA_MAX_SESSION only when ipa_ctx->sap_num_connected_sta is greater than 0. So, in STA+SAP concurrency case, when no client is connected to SAP, if STA is disconnected, vdev_to_iface is not reset for that particular session id, making it unusable for further events involving IPA iface creation. Fix is to move the code to reset vdev_to_iface outside the check for ipa_ctx->sap_num_connected_sta in QDF_IPA_STA_DISCONNECT scenario, so that vdev_to_iface is reset irrespective of SAP. Change-Id: I06c79b62c540546cf4842f81d235f96b2965661e CRs-Fixed: 2525709 --- components/ipa/core/src/wlan_ipa_core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index b8832800107b..d0afb963aa11 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -2002,13 +2002,12 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode, wlan_ipa_uc_offload_enable_disable(ipa_ctx, SIR_STA_RX_DATA_OFFLOAD, session_id, false); qdf_mutex_acquire(&ipa_ctx->event_lock); - ipa_ctx->vdev_to_iface[session_id] = - WLAN_IPA_MAX_SESSION; - ipa_debug("vdev_to_iface[%u]=%u", - session_id, - ipa_ctx->vdev_to_iface[session_id]); } + ipa_ctx->vdev_to_iface[session_id] = WLAN_IPA_MAX_SESSION; + ipa_debug("vdev_to_iface[%u]=%u", session_id, + ipa_ctx->vdev_to_iface[session_id]); + for (i = 0; i < WLAN_IPA_MAX_IFACE; i++) { iface_ctx = &ipa_ctx->iface_context[i];