diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 6223e64fe4..a111aa6a14 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -355,6 +355,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc, gen->disable_4way_hs_offload = cfg_get(psoc, CFG_DISABLE_4WAY_HS_OFFLOAD); gen->mgmt_retry_max = cfg_get(psoc, CFG_MGMT_RETRY_MAX); + gen->bmiss_skip_full_scan = cfg_get(psoc, CFG_BMISS_SKIP_FULL_SCAN); } static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params) diff --git a/components/mlme/dispatcher/inc/cfg_mlme_generic.h b/components/mlme/dispatcher/inc/cfg_mlme_generic.h index 3f16ba695a..5312cd54a3 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_generic.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_generic.h @@ -640,6 +640,31 @@ CFG_VALUE_OR_DEFAULT, \ "Max retries for mgmt frames") +/* + * + * bmiss_skip_full_scan - To decide whether firmware does channel map based + * partial scan or partial scan followed by full scan in case no candidate is + * found in partial scan. + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * 0 : Based on the channel map , firmware does scan to find new AP. if AP is + * not found then it does a full scan on all valid channels. + * 1 : Firmware does channel map based partial scan only. + * + * Related: None + * + * Supported Feature: STA Roaming + * + * Usage: External + * + * + */ +#define CFG_BMISS_SKIP_FULL_SCAN CFG_INI_BOOL("bmiss_skip_full_scan", \ + 0, \ + "To decide partial/partial scan followed by full scan") + #define CFG_GENERIC_ALL \ CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \ CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \ @@ -668,5 +693,5 @@ CFG(CFG_ENABLE_BEACON_RECEPTION_STATS) \ CFG(CFG_REMOVE_TIME_STAMP_SYNC_CMD) \ CFG(CFG_MGMT_RETRY_MAX) \ - + CFG(CFG_BMISS_SKIP_FULL_SCAN) #endif /* __CFG_MLME_GENERIC_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index d23244d5ca..bd4785a217 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -2117,7 +2117,7 @@ wlan_mlme_get_mcc_feature(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc, bool *value); -/* +/** * wlan_mlme_get_dtim_selection_diversity() - get dtim selection diversity * bitmap * @psoc: pointer to psoc object @@ -2193,7 +2193,7 @@ QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc); QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc, bool *value); -/* +/** * wlan_mlme_get_wps_uuid() - get the wps uuid string * @wps_params: pointer to mlme wps parameters structure * @data: data to which the parameter is to be copied @@ -2204,7 +2204,7 @@ QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc, void wlan_mlme_get_wps_uuid(struct wlan_mlme_wps_params *wps_params, uint8_t *data); -/* +/** * wlan_mlme_get_self_gen_frm_pwr() - get self gen frm pwr * @psoc: pointer to psoc object * @val: Pointer to the value which will be filled for the caller @@ -2215,7 +2215,7 @@ QDF_STATUS wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc, uint32_t *value); -/* +/** * wlan_mlme_get_4way_hs_offload() - get 4-way hs offload to fw cfg * @psoc: pointer to psoc object * @val: Pointer to the value which will be filled for the caller @@ -2225,6 +2225,18 @@ wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_4way_hs_offload(struct wlan_objmgr_psoc *psoc, bool *value); +/** + * wlan_mlme_get_bmiss_skip_full_scan_value() - To get value of + * bmiss_skip_full_scan ini + * @psoc: pointer to psoc object + * @val: Pointer to the value which will be filled for the caller + * + * Return: QDF Status + */ +QDF_STATUS +wlan_mlme_get_bmiss_skip_full_scan_value(struct wlan_objmgr_psoc *psoc, + bool *value); + /** * mlme_get_peer_phymode() - get phymode of peer * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 698ecadc06..fd96906d14 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1121,6 +1121,8 @@ struct wlan_mlme_chainmask { * @disable_4way_hs_offload: enable/disable 4 way handshake offload to firmware * @as_enabled: antenna sharing enabled or not (FW capability) * @mgmt_retry_max: maximum retries for management frame + * @bmiss_skip_full_scan: Decide if full scan can be skipped in firmware if no + * candidate is found in partial scan based on channel map */ struct wlan_mlme_generic { enum band_info band_capability; @@ -1153,6 +1155,7 @@ struct wlan_mlme_generic { bool disable_4way_hs_offload; bool as_enabled; uint8_t mgmt_retry_max; + bool bmiss_skip_full_scan; }; /* diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index af725ae5c4..d459073cd6 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -3500,6 +3500,24 @@ wlan_mlme_get_4way_hs_offload(struct wlan_objmgr_psoc *psoc, bool *value) return QDF_STATUS_SUCCESS; } +QDF_STATUS +wlan_mlme_get_bmiss_skip_full_scan_value(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) { + *value = cfg_default(CFG_BMISS_SKIP_FULL_SCAN); + mlme_legacy_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.gen.bmiss_skip_full_scan; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS mlme_get_peer_phymode(struct wlan_objmgr_psoc *psoc, uint8_t *mac, enum wlan_phymode *peer_phymode) { diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 2e8719416b..76e9b573f0 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -3851,6 +3851,7 @@ static void wma_set_roam_offload_flag(tp_wma_handle wma, uint8_t vdev_id, QDF_STATUS status; uint32_t flag = 0; bool disable_4way_hs_offload; + bool bmiss_skip_full_scan; if (is_set) { flag = WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG | @@ -3864,6 +3865,17 @@ static void wma_set_roam_offload_flag(tp_wma_handle wma, uint8_t vdev_id, */ if (disable_4way_hs_offload) flag |= WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE; + + wlan_mlme_get_bmiss_skip_full_scan_value(wma->psoc, + &bmiss_skip_full_scan); + /* + * If WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set, then + * WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG decides whether firmware + * does channel map based partial scan or partial scan followed + * by full scan in case no candidate is found in partial scan. + */ + if (bmiss_skip_full_scan) + flag |= WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG; } WMA_LOGD("%s: vdev_id:%d, is_set:%d, flag:%d",