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;