diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 459d01fd46..38d198a0a1 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1890,6 +1890,8 @@ mlme_init_bss_load_trigger_params(struct wlan_objmgr_psoc *psoc, bss_load_trig->sample_time = cfg_get(psoc, CFG_BSS_LOAD_SAMPLE_TIME); + bss_load_trig->rssi_threshold_6ghz = + cfg_get(psoc, CFG_BSS_LOAD_TRIG_6G_RSSI_THRES); bss_load_trig->rssi_threshold_5ghz = cfg_get(psoc, CFG_BSS_LOAD_TRIG_5G_RSSI_THRES); bss_load_trig->rssi_threshold_24ghz = diff --git a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h index 0fa36ecbf5..7f0c54844c 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h @@ -2094,6 +2094,35 @@ CFG_VALUE_OR_DEFAULT, \ "bss load sampling time") +/* + * + * bss_load_trigger_6g_rssi_threshold/RoamCU_6GRSSIRange - + * Current AP minimum RSSI in dBm below + * which roaming can be triggered if BSS load exceeds bss_load_threshold. + * @Min: -120 + * @Max: 0 + * @Default: -70 + * + * If connected AP is in 6Ghz, then consider bss load roam triggered only if + * load % > bss_load_threshold && connected AP rssi is worse than + * bss_load_trigger_6g_rssi_threshold + * + * Related: "bss_load_threshold" + * + * Supported Feature: Roaming + * + * Usage: Internal/External + * + * + */ +#define CFG_BSS_LOAD_TRIG_6G_RSSI_THRES CFG_INI_INT( \ + "bss_load_trigger_6g_rssi_threshold RoamCU_6GRSSIRange", \ + -120, \ + 0, \ + -70, \ + CFG_VALUE_OR_DEFAULT, \ + "Minimum RSSI of current AP in 6GHz band for BSS load roam trigger") + /* * * bss_load_trigger_5g_rssi_threshold/RoamCU_5GRSSIRange - @@ -3150,6 +3179,7 @@ CFG(CFG_ROAM_INACTIVE_COUNT) \ CFG(CFG_POST_INACTIVITY_ROAM_SCAN_PERIOD) \ CFG(CFG_ROAM_SCAN_INACTIVE_TIMER) \ + CFG(CFG_BSS_LOAD_TRIG_6G_RSSI_THRES) \ CFG(CFG_BSS_LOAD_TRIG_5G_RSSI_THRES) \ CFG(CFG_BSS_LOAD_TRIG_2G_RSSI_THRES) \ CFG(CFG_LFR_FULL_ROAM_SCAN_REFRESH_PERIOD) \ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 061c1974f7..0f58711782 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -3257,6 +3257,18 @@ QDF_STATUS wlan_mlme_get_bss_load_sample_time(struct wlan_objmgr_psoc *psoc, uint32_t *val); +/** + * wlan_mlme_get_bss_load_rssi_threshold_6ghz() - Get bss load RSSI + * threshold on 6G + * @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_bss_load_rssi_threshold_6ghz(struct wlan_objmgr_psoc *psoc, + int32_t *val); + /** * wlan_mlme_get_bss_load_rssi_threshold_5ghz() - Get bss load RSSI * threshold on 5G diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index c24fa60bfa..0851ae508b 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1716,6 +1716,9 @@ enum roaming_dfs_channel_type { * @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 + * @rssi_threshold_6ghz: RSSI threshold of the current connected AP below which + * roam should be triggered if bss load threshold exceeds the configured value. + * This value is applicable only when we are connected in 6GHz band. * @rssi_threshold_5ghz: RSSI threshold of the current connected AP below which * roam should be triggered if bss load threshold exceeds the configured value. * This value is applicable only when we are connected in 5GHz band. @@ -1727,6 +1730,7 @@ struct bss_load_trigger { bool enabled; uint32_t threshold; uint32_t sample_time; + uint32_t rssi_threshold_6ghz; int32_t rssi_threshold_5ghz; int32_t rssi_threshold_24ghz; }; diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index b28608c900..e73cc9ff39 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -5090,6 +5090,23 @@ wlan_mlme_get_bss_load_sample_time(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } +QDF_STATUS +wlan_mlme_get_bss_load_rssi_threshold_6ghz(struct wlan_objmgr_psoc *psoc, + int32_t *val) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) { + *val = cfg_default(CFG_BSS_LOAD_TRIG_6G_RSSI_THRES); + return QDF_STATUS_E_INVAL; + } + + *val = mlme_obj->cfg.lfr.bss_load_trig.rssi_threshold_6ghz; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS wlan_mlme_get_bss_load_rssi_threshold_5ghz(struct wlan_objmgr_psoc *psoc, int32_t *val) diff --git a/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c b/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c index cdcaa81fc6..80140fcc61 100644 --- a/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c +++ b/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c @@ -863,6 +863,9 @@ target_if_cm_roam_bss_load_config(wmi_unified_t wmi_handle, db2dbm_enabled = wmi_service_enabled(wmi_handle, wmi_service_hw_db2dbm_support); if (!db2dbm_enabled) { + req->rssi_threshold_6ghz -= NOISE_FLOOR_DBM_DEFAULT; + req->rssi_threshold_6ghz &= 0x000000ff; + req->rssi_threshold_5ghz -= NOISE_FLOOR_DBM_DEFAULT; req->rssi_threshold_5ghz &= 0x000000ff; diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c index 910c1ed609..c035fec028 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c @@ -308,6 +308,8 @@ cm_roam_bss_load_config(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, params->vdev_id = vdev_id; wlan_mlme_get_bss_load_threshold(psoc, ¶ms->bss_load_threshold); wlan_mlme_get_bss_load_sample_time(psoc, ¶ms->bss_load_sample_time); + wlan_mlme_get_bss_load_rssi_threshold_6ghz( + psoc, ¶ms->rssi_threshold_6ghz); wlan_mlme_get_bss_load_rssi_threshold_5ghz( psoc, ¶ms->rssi_threshold_5ghz); wlan_mlme_get_bss_load_rssi_threshold_24ghz( diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h index b33ee0494a..92f3c278fc 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h @@ -1132,6 +1132,9 @@ struct wlan_roam_11k_offload_params { * @bss_load_threshold: BSS load threshold after which roam scan should trigger * @bss_load_sample_time: Time duration in milliseconds for which the bss load * trigger needs to be enabled + * @rssi_threshold_6ghz: RSSI threshold of the current connected AP below which + * roam should be triggered if bss load threshold exceeds the configured value. + * This value is applicable only when we are connected in 6GHz band. * @rssi_threshold_5ghz: RSSI threshold of the current connected AP below which * roam should be triggered if bss load threshold exceeds the configured value. * This value is applicable only when we are connected in 5GHz band. @@ -1143,6 +1146,7 @@ struct wlan_roam_bss_load_config { uint32_t vdev_id; uint32_t bss_load_threshold; uint32_t bss_load_sample_time; + int32_t rssi_threshold_6ghz; int32_t rssi_threshold_5ghz; int32_t rssi_threshold_24ghz; }; diff --git a/components/wmi/src/wmi_unified_roam_tlv.c b/components/wmi/src/wmi_unified_roam_tlv.c index 3912db6508..08fa97f145 100644 --- a/components/wmi/src/wmi_unified_roam_tlv.c +++ b/components/wmi/src/wmi_unified_roam_tlv.c @@ -5079,11 +5079,12 @@ send_roam_bss_load_config_tlv(wmi_unified_t wmi_handle, cmd->monitor_time_window = params->bss_load_sample_time; cmd->rssi_2g_threshold = params->rssi_threshold_24ghz; cmd->rssi_5g_threshold = params->rssi_threshold_5ghz; + cmd->rssi_6g_threshold = params->rssi_threshold_6ghz; - wmi_debug("RSO_CFG: vdev:%d bss_load_thres:%d monitor_time:%d rssi_2g:%d rssi_5g:%d", + wmi_debug("RSO_CFG: vdev:%d bss_load_thres:%d monitor_time:%d rssi_2g:%d rssi_5g:%d, rssi_6g:%d", cmd->vdev_id, cmd->bss_load_threshold, cmd->monitor_time_window, cmd->rssi_2g_threshold, - cmd->rssi_5g_threshold); + cmd->rssi_5g_threshold, cmd->rssi_6g_threshold); wmi_mtrace(WMI_ROAM_BSS_LOAD_CONFIG_CMDID, cmd->vdev_id, 0); if (wmi_unified_cmd_send(wmi_handle, buf, len,