diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index b8e9253cd3..6e83bb959f 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -20867,9 +20867,9 @@ fn_end: * wlan_hdd_del_station() - delete station wrapper * @adapter: pointer to the hdd adapter * - * Return: None + * Return: Errno */ -void wlan_hdd_del_station(struct hdd_adapter *adapter) +int wlan_hdd_del_station(struct hdd_adapter *adapter) { struct station_del_parameters del_sta; @@ -20877,13 +20877,14 @@ void wlan_hdd_del_station(struct hdd_adapter *adapter) del_sta.subtype = SIR_MAC_MGMT_DEAUTH >> 4; del_sta.reason_code = eCsrForcedDeauthSta; - wlan_hdd_cfg80211_del_station(adapter->wdev.wiphy, adapter->dev, - &del_sta); + return wlan_hdd_cfg80211_del_station(adapter->wdev.wiphy, + adapter->dev, &del_sta); } #else -void wlan_hdd_del_station(struct hdd_adapter *adapter) +int wlan_hdd_del_station(struct hdd_adapter *adapter) { - wlan_hdd_cfg80211_del_station(adapter->wdev.wiphy, adapter->dev, NULL); + return wlan_hdd_cfg80211_del_station(adapter->wdev.wiphy, + adapter->dev, NULL); } #endif diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index 69899d87c2..696f2e110f 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -437,7 +437,7 @@ void hdd_select_cbmode(struct hdd_adapter *adapter, uint32_t oper_freq, * Return: true or false based on findings */ bool wlan_hdd_is_ap_supports_immediate_power_save(uint8_t *ies, int length); -void wlan_hdd_del_station(struct hdd_adapter *adapter); +int wlan_hdd_del_station(struct hdd_adapter *adapter); #if defined(USE_CFG80211_DEL_STA_V2) int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 891273b74e..8580df4d11 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6420,8 +6420,10 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, case QDF_SAP_MODE: wlan_hdd_scan_abort(adapter); /* Diassociate with all the peers before stop ap post */ - if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) - wlan_hdd_del_station(adapter); + if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) { + if (wlan_hdd_del_station(adapter)) + hdd_sap_indicate_disconnect_for_sta(adapter); + } status = wlan_hdd_flush_pmksa_cache(adapter); if (QDF_IS_STATUS_ERROR(status)) hdd_debug("Cannot flush PMKIDCache");