From 8c151e20cc417bbee5de0401171b5f9e190d2708 Mon Sep 17 00:00:00 2001 From: Sravan Kumar Kairam Date: Fri, 15 Jun 2018 16:35:39 +0530 Subject: [PATCH] qcacld-3.0: Validate session while processing IPA pending events Some times HTT response for suspend IPA pipes from FW host arrives after vdev has been cleaned up at FW. After receiving FW HTT IPA pipe suspend response HOST processes pending events. For event AP DISCONNECT HOST sends IPA offload disable command to FW with vdev id that has been deleted at FW. As a result FW asserts. In this change before processing IPA WLAN pending events validate the session. If session exists then only process the events. Change-Id: I464a91c3a85e6002297d9ade2fbd45b45a2a4d51 CRs-Fixed: 2261111 --- components/ipa/core/src/wlan_ipa_core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index 000629d242c4..33be842cdd30 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -1903,7 +1903,13 @@ wlan_ipa_uc_proc_pending_event(struct wlan_ipa_priv *ipa_ctx, bool is_loading) qdf_list_remove_front(&ipa_ctx->pending_event, (qdf_list_node_t **)&pending_event); while (pending_event != NULL) { - if (pending_event->is_loading == is_loading) { + struct wlan_objmgr_pdev *pdev = ipa_ctx->pdev; + struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev); + struct wlan_objmgr_vdev *vdev = + wlan_objmgr_get_vdev_by_id_from_psoc(psoc, + pending_event->session_id, + WLAN_IPA_ID); + if (pending_event->is_loading == is_loading && vdev) { __wlan_ipa_wlan_evt(pending_event->net_dev, pending_event->device_mode, pending_event->sta_id, @@ -1911,6 +1917,9 @@ wlan_ipa_uc_proc_pending_event(struct wlan_ipa_priv *ipa_ctx, bool is_loading) pending_event->type, pending_event->mac_addr); } + + if (vdev) + wlan_objmgr_vdev_release_ref(vdev, WLAN_IPA_ID); qdf_mem_free(pending_event); pending_event = NULL; qdf_list_remove_front(&ipa_ctx->pending_event,