diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 4fd55c786080..208d9a200bcf 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1321,6 +1321,7 @@ mlme_init_bss_load_trigger_params(struct wlan_objmgr_psoc *psoc, bss_load_trig->enabled = cfg_get(psoc, CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM); bss_load_trig->threshold = cfg_get(psoc, CFG_BSS_LOAD_THRESHOLD); + bss_load_trig->sample_time = cfg_get(psoc, CFG_BSS_LOAD_SAMPLE_TIME); } static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h index 71082bf8acd7..408679ac7f5d 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h @@ -1851,7 +1851,7 @@ * enable_bss_load_roam_trigger - enable/disable bss load based roam trigger * @Min: 0 * @Max: 1 - * @Default: 1 + * @Default: 0 * * This ini when enabled, allows the firmware to roam when bss load outpaces * the configured bss load threshold. When this ini is disabled, firmware @@ -1867,7 +1867,7 @@ */ #define CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM CFG_INI_BOOL( \ "enable_bss_load_roam_trigger", \ - 1, \ + 0, \ "enable bss load triggered roaming") /* @@ -1896,6 +1896,29 @@ CFG_VALUE_OR_DEFAULT, \ "bss load threshold") +/* + * + * bss_load_sample_time - Time in milliseconds for which the bss load values + * obtained from the beacons is sampled. + * @Min: 0 + * @Max: 0xffffffff + * @Default: 10000 + * + * Related: None + * + * Supported Feature: Roaming + * + * Usage: External + * + * + */ +#define CFG_BSS_LOAD_SAMPLE_TIME CFG_INI_UINT( \ + "bss_load_sample_time", \ + 0, \ + 0xffffffff, \ + 10000, \ + CFG_VALUE_OR_DEFAULT, \ + "bss load sampling time") #ifdef WLAN_FEATURE_ROAM_OFFLOAD /* @@ -2024,6 +2047,7 @@ CFG(CFG_LFR_DELAY_BEFORE_VDEV_STOP) \ CFG(CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM) \ CFG(CFG_BSS_LOAD_THRESHOLD) \ + CFG(CFG_BSS_LOAD_SAMPLE_TIME) \ ROAM_OFFLOAD_ALL \ LFR_ESE_ALL diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 7a887497427e..21e609c2800a 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1166,12 +1166,15 @@ enum roaming_dfs_channel_type { /* * struct bss_load_trigger - parameters related to bss load triggered roam - * @enabled - flag to check if this trigger is enabled/disabled - * @threshold - Bss load threshold value above which roaming should start + * @enabled: flag to check if this trigger is enabled/disabled + * @threshold: Bss load threshold value above which roaming should start + * @sample_time: Time duration in milliseconds for which the bss load value + * should be monitored */ struct bss_load_trigger { bool enabled; uint32_t threshold; + uint32_t sample_time; }; /* diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index f59585006bd5..6c3e37f029b3 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -17208,6 +17208,8 @@ csr_update_roam_scan_offload_request(struct mac_context *mac_ctx, mac_ctx->mlme_cfg->lfr.bss_load_trig.enabled; req_buf->bss_load_config.bss_load_threshold = mac_ctx->mlme_cfg->lfr.bss_load_trig.threshold; + req_buf->bss_load_config.bss_load_sample_time = + mac_ctx->mlme_cfg->lfr.bss_load_trig.sample_time; req_buf->bss_load_config.vdev_id = session->sessionId; req_buf->ReassocFailureTimeout = diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index e3f0ec0c3633..80495811d895 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -1414,7 +1414,6 @@ static QDF_STATUS wma_roam_scan_btm_offload(tp_wma_handle wma_handle, /** * wma_send_roam_bss_load_config() - API to send load bss trigger * related parameters to fw - * * @handle: WMA handle * @roam_req: bss load config parameters from csr to be sent to fw * @@ -1432,8 +1431,9 @@ void wma_send_roam_bss_load_config(WMA_HANDLE handle, return; } - WMA_LOGD("%s: Sending bss load trig params vdev %u bss_load_threshold %u", - __func__, params->vdev_id, params->bss_load_threshold); + WMA_LOGD("%s: Sending bss load trig params vdev %u bss_load_threshold %u bss_load_sample_time: %u", + __func__, params->vdev_id, params->bss_load_threshold, + params->bss_load_sample_time); status = wmi_unified_send_bss_load_config(wma_handle->wmi_handle, params); @@ -1631,7 +1631,8 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, } /* - * Send 11k offload enable to FW as part of RSO Start + * Send 11k offload enable and bss load trigger parameters + * to FW as part of RSO Start */ if (roam_req->reason == REASON_CTX_INIT) { qdf_status = wma_send_offload_11k_params(wma_handle, @@ -1641,11 +1642,12 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, qdf_status); break; } - } - if (roam_req->bss_load_trig_enabled) { - bss_load_cfg = &roam_req->bss_load_config; - wma_send_roam_bss_load_config(wma_handle, bss_load_cfg); + if (roam_req->bss_load_trig_enabled) { + bss_load_cfg = &roam_req->bss_load_config; + wma_send_roam_bss_load_config(wma_handle, + bss_load_cfg); + } } break;