diff --git a/components/blacklist_mgr/dispatcher/inc/wlan_blm_api.h b/components/blacklist_mgr/dispatcher/inc/wlan_blm_api.h index ec50e014d7b8..ff9c1fe049e8 100644 --- a/components/blacklist_mgr/dispatcher/inc/wlan_blm_api.h +++ b/components/blacklist_mgr/dispatcher/inc/wlan_blm_api.h @@ -57,6 +57,28 @@ wlan_blm_add_bssid_to_reject_list(struct wlan_objmgr_pdev *pdev, return blm_add_bssid_to_reject_list(pdev, ap_info); } +/** + * wlan_blm_update_bssid_connect_params() - Inform the BLM about connect or + * disconnect with the current AP. + * @pdev: pdev object + * @bssid: BSSID of the AP + * @con_state: Connection stae (connected/disconnected) + * + * This API will inform the BLM about the state with the AP so that if the AP + * is selected, and the connection went through, and the connection did not + * face any data stall till the bad bssid reset timer, BLM can remove the + * AP from the reject ap list maintained by it. + * + * Return: None + */ +static inline void +wlan_blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev, + struct qdf_mac_addr bssid, + enum blm_connection_state con_state) +{ + return blm_update_bssid_connect_params(pdev, bssid, con_state); +} + /** * wlan_blm_get_bssid_reject_list() - Get the BSSIDs in reject list from BLM * @pdev: pdev object @@ -104,5 +126,12 @@ wlan_blm_get_bssid_reject_list(struct wlan_objmgr_pdev *pdev, return 0; } +static inline void +wlan_blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev, + struct qdf_mac_addr bssid, + enum blm_connection_state con_state) +{ +} + #endif #endif diff --git a/components/blacklist_mgr/dispatcher/src/wlan_blm_ucfg_api.c b/components/blacklist_mgr/dispatcher/src/wlan_blm_ucfg_api.c index d74e27ec7c91..f6204425b5fc 100644 --- a/components/blacklist_mgr/dispatcher/src/wlan_blm_ucfg_api.c +++ b/components/blacklist_mgr/dispatcher/src/wlan_blm_ucfg_api.c @@ -21,6 +21,7 @@ #include #include +#include QDF_STATUS ucfg_blm_init(void) { @@ -136,7 +137,7 @@ ucfg_blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev, struct qdf_mac_addr bssid, enum blm_connection_state con_state) { - blm_update_bssid_connect_params(pdev, bssid, con_state); + wlan_blm_update_bssid_connect_params(pdev, bssid, con_state); } void diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 12556b0c9a67..cc369e0fd649 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -21762,6 +21762,11 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx, ps_global_info->remain_in_power_active_till_dhcp = false; session->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED; + /* Update the BLM that the previous profile has disconnected */ + wlan_blm_update_bssid_connect_params(mac_ctx->pdev, + session->connectedProfile.bssid, + BLM_AP_DISCONNECTED); + /* Remove old BSSID mlme info from scan cache */ csr_update_scan_entry_associnfo(mac_ctx, session, SCAN_ENTRY_CON_STATE_NONE);