diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index bebcc758e7..1ac92c09e1 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -2046,6 +2046,8 @@ static void mlme_init_roam_offload_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_LFR_ENABLE_IDLE_ROAM); lfr->idle_roam_rssi_delta = cfg_get(psoc, CFG_LFR_IDLE_ROAM_RSSI_DELTA); + lfr->roam_info_stats_num = + cfg_get(psoc, CFG_LFR3_ROAM_INFO_STATS_NUM); ucfg_mlme_get_connection_roaming_ini_present(psoc, &val); if (val) { diff --git a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h index 9e1bb18c78..f98a7a855a 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h @@ -3306,6 +3306,32 @@ #define ROAM_REASON_VSIE_ALL #endif +/* + * + * groam_info_stats_num - number of wlan driver cache roam information + * @Min: 0 + * @Max: 32 + * @Default: 5 + * + * This ini is used to set the cache number of enhanced roam + * information, including roam trigger, scan information and + * roam frame information. + * If ini set to 0, enhanced roam feature not support + * + * Related: LFR + * + * Usage: External + * + * + */ +#define CFG_LFR3_ROAM_INFO_STATS_NUM CFG_INI_UINT( \ + "groam_info_stats_num", \ + 0, \ + 32, \ + 5, \ + CFG_VALUE_OR_DEFAULT, \ + "Roam information cache number in wlan driver") + #define CFG_LFR_ALL \ CFG(CFG_LFR_MAWC_ROAM_ENABLED) \ CFG(CFG_LFR_MAWC_ROAM_TRAFFIC_THRESHOLD) \ @@ -3407,6 +3433,7 @@ SAE_SINGLE_PMK_ALL \ ROAM_REASON_VSIE_ALL \ CFG(CFG_LFR_BEACONLOSS_TIMEOUT_ON_WAKEUP) \ - CFG(CFG_LFR_BEACONLOSS_TIMEOUT_ON_SLEEP) + CFG(CFG_LFR_BEACONLOSS_TIMEOUT_ON_SLEEP) \ + CFG(CFG_LFR3_ROAM_INFO_STATS_NUM) #endif /* CFG_MLME_LFR_H__ */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index fe404468e6..10e7640fc4 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -3135,6 +3135,16 @@ QDF_STATUS wlan_mlme_get_idle_roam_rssi_delta(struct wlan_objmgr_psoc *psoc, uint32_t *val); +/** + * wlan_mlme_get_roam_info_stats_num() - Get roam information statistics number + * @psoc: pointer to psoc object + * @val: Pointer to roam_info_stats_num + * + * Return: QDF Status + */ +QDF_STATUS +wlan_mlme_get_roam_info_stats_num(struct wlan_objmgr_psoc *psoc, uint32_t *val); + /** * wlan_mlme_get_idle_roam_inactive_time() - Get idle roam inactive time * @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 957a97591b..2c385d859b 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1856,6 +1856,7 @@ struct fw_scan_channels { * vsie in Re(assoc) frame * @roam_trigger_bitmap: Bitmap of roaming triggers. * @sta_roam_disable: STA roaming disabled by interfaces + * @roam_info_stats_num: STA roaming information cache number * @early_stop_scan_enable: Set early stop scan * @enable_5g_band_pref: Enable preference for 5G from INI * @ese_enabled: Enable ESE feature @@ -1984,6 +1985,7 @@ struct wlan_mlme_lfr_cfg { bool enable_roam_reason_vsie; uint32_t roam_trigger_bitmap; uint32_t sta_roam_disable; + uint32_t roam_info_stats_num; #endif bool early_stop_scan_enable; bool enable_5g_band_pref; diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index c7d0c7d2d0..b4b9d8dcdc 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -4975,6 +4975,22 @@ wlan_mlme_get_idle_roam_rssi_delta(struct wlan_objmgr_psoc *psoc, uint32_t *val) return QDF_STATUS_SUCCESS; } +QDF_STATUS +wlan_mlme_get_roam_info_stats_num(struct wlan_objmgr_psoc *psoc, uint32_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_LFR3_ROAM_INFO_STATS_NUM); + return QDF_STATUS_E_INVAL; + } + + *val = mlme_obj->cfg.lfr.roam_info_stats_num; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS wlan_mlme_get_idle_roam_inactive_time(struct wlan_objmgr_psoc *psoc, uint32_t *val)