diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 46c2adde4df9..7b2293c276e0 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7190,6 +7190,7 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, case QDF_SAP_MODE: wlan_hdd_scan_abort(adapter); + hdd_abort_ongoing_sta_connection(hdd_ctx); /* Diassociate with all the peers before stop ap post */ if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) { if (wlan_hdd_del_station(adapter)) @@ -7236,8 +7237,10 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, ACS_COMPLETE_TIMEOUT); } - if (adapter->device_mode == QDF_P2P_GO_MODE) + if (adapter->device_mode == QDF_P2P_GO_MODE) { wlan_hdd_cleanup_remain_on_channel_ctx(adapter); + hdd_abort_ongoing_sta_connection(hdd_ctx); + } hdd_deregister_hl_netdev_fc_timer(adapter); hdd_deregister_tx_flow_control(adapter);