From 48a636bc07b4c63218ac51bcf49fd16ef551bbeb Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Thu, 26 Aug 2021 17:25:34 +0530 Subject: [PATCH] qcacld-3.0: Cleanup sta connection info at close adapter Currently driver cleanup sta connection info at stop adapter because of which if query for sta connection info comes after adapter restart, in that case driver is not able to return this info. For example according to new design of Android-S, framework issues stop adapter after every disconnetion to update mac address dynamically, after that it starts adapter again, now if driver gets request for connection info, it is not able to provide the connection info as it is already cleaned up on stop adapter. To address above issue, cleanup sta connection info at close adapter instead of stop adapter. Change-Id: I54247d4577dd7f8cf1c7d7bc657005a09d69d0df CRs-Fixed: 3000842 --- core/hdd/src/wlan_hdd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index b072fab78fed..d856c93e042c 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6994,6 +6994,8 @@ static void __hdd_close_adapter(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter, bool rtnl_held) { + if (adapter->device_mode == QDF_STA_MODE) + hdd_cleanup_conn_info(adapter); qdf_list_destroy(&adapter->blocked_scan_request_q); qdf_mutex_destroy(&adapter->blocked_scan_request_q_lock); policy_mgr_clear_concurrency_mode(hdd_ctx->psoc, adapter->device_mode); @@ -7339,7 +7341,6 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, ucfg_ipa_flush_pending_vdev_events(hdd_ctx->pdev, adapter->vdev_id); } - hdd_cleanup_conn_info(adapter); hdd_vdev_destroy(adapter); break;