diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 17c595c90c..95068ab199 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -804,6 +804,15 @@ QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_bigtk_support(struct wlan_objmgr_psoc *psoc, bool *value); +/** + * wlan_mlme_get_host_scan_abort_support() - Get support for stop all host + * scans service capability. + * @psoc: PSOC object pointer + * + * Return: True if capability is supported, else False + */ +bool wlan_mlme_get_host_scan_abort_support(struct wlan_objmgr_psoc *psoc); + /** * wlan_mlme_get_oce_sap_enabled_info() - Get the OCE feature enable * info for SAP diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index a62c1401a2..7ffb27b814 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -952,6 +952,8 @@ struct wlan_mlme_chain_cfg { * struct mlme_tgt_caps - mlme related capability coming from target (FW) * @data_stall_recovery_fw_support: does target supports data stall recovery. * @bigtk_support: does the target support bigtk capability or not. + * @stop_all_host_scan_support: Target capability that indicates if the target + * supports stop all host scan request type. * * Add all the mlme-tgt related capablities here, and the public API would fill * the related capability in the required mlme cfg structure. @@ -959,6 +961,7 @@ struct wlan_mlme_chain_cfg { struct mlme_tgt_caps { bool data_stall_recovery_fw_support; bool bigtk_support; + bool stop_all_host_scan_support; }; /** @@ -1137,6 +1140,8 @@ struct wlan_mlme_chainmask { * @enable_peer_unmap_conf_support: Indicate whether to send conf for peer unmap * @dfs_chan_ageout_time: Set DFS Channel ageout time * @bigtk_support: Whether BIGTK is supported or not + * @stop_all_host_scan_support: Target capability that indicates if the target + * supports stop all host scan request type. */ struct wlan_mlme_generic { enum band_info band_capability; @@ -1174,6 +1179,7 @@ struct wlan_mlme_generic { bool enable_peer_unmap_conf_support; uint8_t dfs_chan_ageout_time; bool bigtk_support; + bool stop_all_host_scan_support; }; /* diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 1835d2ca65..b7cfc206cd 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -457,6 +457,8 @@ wlan_mlme_update_cfg_with_tgt_caps(struct wlan_objmgr_psoc *psoc, tgt_caps->data_stall_recovery_fw_support; mlme_obj->cfg.gen.bigtk_support = tgt_caps->bigtk_support; + mlme_obj->cfg.gen.stop_all_host_scan_support = + tgt_caps->stop_all_host_scan_support; } #ifdef WLAN_FEATURE_11AX @@ -2037,6 +2039,16 @@ QDF_STATUS wlan_mlme_get_bigtk_support(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } +bool wlan_mlme_get_host_scan_abort_support(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc); + + if (!mlme_obj) + return false; + + return mlme_obj->cfg.gen.stop_all_host_scan_support; +} + QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc, bool *value) { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index b4db504445..77b376b89b 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -21566,6 +21566,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx, #endif struct wlan_objmgr_vdev *vdev; struct mlme_roam_after_data_stall *vdev_roam_params; + bool abort_host_scan_cap = false; + wlan_scan_id scan_id; vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, session_id, WLAN_LEGACY_SME_ID); @@ -21619,8 +21621,31 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx, ROAMING_OFFLOAD_TIMER_START); csr_roam_call_callback(mac_ctx, session_id, NULL, 0, eCSR_ROAM_START, eCSR_ROAM_RESULT_SUCCESS); + + /* + * For emergency deauth roaming, firmware sends ROAM start + * instead of ROAM scan start notification as data path queues + * will be stopped only during roam start notification. + * This is because, for deauth/disassoc triggered roam, the + * AP has sent deauth, and packets shouldn't be sent to AP + * after that. Since firmware is sending roam start directly + * host sends scan abort during roam scan, but in other + * triggers, the host receives roam start after candidate + * selection and roam scan is complete. So when host sends + * roam abort for emergency deauth roam trigger, the firmware + * roam scan is also aborted. This results in roaming failure. + * So send scan_id as CANCEL_HOST_SCAN_ID to scan module to + * abort only host triggered scans. + */ + abort_host_scan_cap = + wlan_mlme_get_host_scan_abort_support(mac_ctx->psoc); + if (abort_host_scan_cap) + scan_id = CANCEL_HOST_SCAN_ID; + else + scan_id = INVAL_SCAN_ID; + wlan_abort_scan(mac_ctx->pdev, INVAL_PDEV_ID, - session_id, INVAL_SCAN_ID, false); + session_id, scan_id, false); goto end; case SIR_ROAMING_ABORT: csr_roam_roaming_offload_timer_action(mac_ctx, diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 4fe4a888c1..e9a86ea3df 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -5395,6 +5395,10 @@ static void wma_update_mlme_related_tgt_caps(struct wlan_objmgr_psoc *psoc, mlme_tgt_cfg.bigtk_support = wmi_service_enabled(wmi_handle, wmi_beacon_protection_support); + mlme_tgt_cfg.stop_all_host_scan_support = + wmi_service_enabled(wmi_handle, + wmi_service_host_scan_stop_vdev_all); + wma_debug("beacon protection support %d", mlme_tgt_cfg.bigtk_support); /* Call this at last only after filling all the tgt caps */