qcacld-3.0: Refine mlme lfr configurations

Define mlme lfr configures based on converged cfg component, add
APIs to get and set mlme lfr configurations.

Change-Id: I8aa9b37d1b943fcdc6a84704ede37b19cd7cffb8
CRs-Fixed: 2316490
This commit is contained in:
Wu Gao
2018-09-17 10:57:49 +08:00
committed by nshrivas
parent 2293a1a3bd
commit d871a41612
6 changed files with 1388 additions and 0 deletions

View File

@@ -292,6 +292,89 @@ static void mlme_init_sta_cfg(struct wlan_objmgr_psoc *psoc,
(uint32_t)cfg_default(CFG_CURRENT_RSSI);
}
static void wlan_mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_lfr_cfg *lfr)
{
lfr->mawc_roam_enabled =
cfg_get(psoc, CFG_LFR_MAWC_ROAM_ENABLED);
lfr->enable_fast_roam_in_concurrency =
cfg_get(psoc, CFG_LFR_ENABLE_FAST_ROAM_IN_CONCURRENCY);
lfr->lfr3_roaming_offload =
cfg_get(psoc, CFG_LFR3_ROAMING_OFFLOAD);
lfr->early_stop_scan_enable =
cfg_get(psoc, CFG_LFR_EARLY_STOP_SCAN_ENABLE);
lfr->lfr3_enable_subnet_detection =
cfg_get(psoc, CFG_LFR3_ENABLE_SUBNET_DETECTION);
lfr->enable_5g_band_pref =
cfg_get(psoc, CFG_LFR_ENABLE_5G_BAND_PREF);
lfr->mawc_roam_traffic_threshold =
cfg_get(psoc, CFG_LFR_MAWC_ROAM_TRAFFIC_THRESHOLD);
lfr->mawc_roam_ap_rssi_threshold =
cfg_get(psoc, CFG_LFR_MAWC_ROAM_AP_RSSI_THRESHOLD);
lfr->mawc_roam_rssi_high_adjust =
cfg_get(psoc, CFG_LFR_MAWC_ROAM_RSSI_HIGH_ADJUST);
lfr->mawc_roam_rssi_low_adjust =
cfg_get(psoc, CFG_LFR_MAWC_ROAM_RSSI_LOW_ADJUST);
lfr->roam_rssi_abs_threshold =
cfg_get(psoc, CFG_LFR_ROAM_RSSI_ABS_THRESHOLD);
lfr->rssi_threshold_offset_5g =
cfg_get(psoc, CFG_LFR_5G_RSSI_THRESHOLD_OFFSET);
lfr->early_stop_scan_min_threshold =
cfg_get(psoc, CFG_LFR_EARLY_STOP_SCAN_MIN_THRESHOLD);
lfr->early_stop_scan_max_threshold =
cfg_get(psoc, CFG_LFR_EARLY_STOP_SCAN_MAX_THRESHOLD);
lfr->first_scan_bucket_threshold =
cfg_get(psoc, CFG_LFR_FIRST_SCAN_BUCKET_THRESHOLD);
lfr->roam_dense_traffic_threshold =
cfg_get(psoc, CFG_LFR_ROAM_DENSE_TRAFFIC_THRESHOLD);
lfr->roam_dense_rssi_thre_offset =
cfg_get(psoc, CFG_LFR_ROAM_DENSE_RSSI_THRE_OFFSET);
lfr->roam_dense_min_aps =
cfg_get(psoc, CFG_LFR_ROAM_DENSE_MIN_APS);
lfr->roam_bg_scan_bad_rssi_threshold =
cfg_get(psoc, CFG_LFR_ROAM_BG_SCAN_BAD_RSSI_THRESHOLD);
lfr->roam_bg_scan_client_bitmap =
cfg_get(psoc, CFG_LFR_ROAM_BG_SCAN_CLIENT_BITMAP);
lfr->roam_bg_scan_bad_rssi_offset_2g =
cfg_get(psoc, CFG_LFR_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G);
lfr->adaptive_roamscan_dwell_mode =
cfg_get(psoc, CFG_LFR_ADAPTIVE_ROAMSCAN_DWELL_MODE);
lfr->per_roam_enable =
cfg_get(psoc, CFG_LFR_PER_ROAM_ENABLE);
lfr->per_roam_config_high_rate_th =
cfg_get(psoc, CFG_LFR_PER_ROAM_CONFIG_HIGH_RATE_TH);
lfr->per_roam_config_low_rate_th =
cfg_get(psoc, CFG_LFR_PER_ROAM_CONFIG_LOW_RATE_TH);
lfr->per_roam_config_rate_th_percent =
cfg_get(psoc, CFG_LFR_PER_ROAM_CONFIG_RATE_TH_PERCENT);
lfr->per_roam_rest_time =
cfg_get(psoc, CFG_LFR_PER_ROAM_REST_TIME);
lfr->per_roam_monitor_time =
cfg_get(psoc, CFG_LFR_PER_ROAM_MONITOR_TIME);
lfr->per_roam_min_candidate_rssi =
cfg_get(psoc, CFG_LFR_PER_ROAM_MIN_CANDIDATE_RSSI);
lfr->lfr3_disallow_duration =
cfg_get(psoc, CFG_LFR3_ROAM_DISALLOW_DURATION);
lfr->lfr3_rssi_channel_penalization =
cfg_get(psoc, CFG_LFR3_ROAM_RSSI_CHANNEL_PENALIZATION);
lfr->lfr3_num_disallowed_aps =
cfg_get(psoc, CFG_LFR3_ROAM_NUM_DISALLOWED_APS);
lfr->rssi_boost_threshold_5g =
cfg_get(psoc, CFG_LFR_5G_RSSI_BOOST_THRESHOLD);
lfr->rssi_boost_factor_5g =
cfg_get(psoc, CFG_LFR_5G_RSSI_BOOST_FACTOR);
lfr->max_rssi_boost_5g =
cfg_get(psoc, CFG_LFR_5G_MAX_RSSI_BOOST);
lfr->rssi_penalize_threshold_5g =
cfg_get(psoc, CFG_LFR_5G_RSSI_PENALIZE_THRESHOLD);
lfr->rssi_penalize_factor_5g =
cfg_get(psoc, CFG_LFR_5G_RSSI_PENALIZE_FACTOR);
lfr->max_rssi_penalize_5g =
cfg_get(psoc, CFG_LFR_5G_MAX_RSSI_PENALIZE);
lfr->max_num_pre_auth = (uint32_t)
cfg_default(CFG_LFR_MAX_NUM_PRE_AUTH);
}
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_obj *mlme_obj;
@@ -314,6 +397,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
mlme_update_sap_cfg(psoc, &mlme_cfg->sap_cfg);
mlme_init_obss_ht40_cfg(psoc, &mlme_cfg->obss_ht40);
mlme_init_sta_cfg(psoc, &mlme_cfg->sta);
wlan_mlme_init_lfr_cfg(psoc, &mlme_cfg->lfr);
return status;
}

View File

@@ -25,6 +25,7 @@
#include "cfg_mlme_chainmask.h"
#include "cfg_mlme_ht_caps.h"
#include "cfg_mlme_lfr.h"
#include "cfg_mlme_obss_ht40.h"
#include "cfg_mlme_mbo.h"
#include "cfg_mlme_vht_caps.h"
@@ -37,6 +38,7 @@
#define CFG_MLME_ALL \
CFG_CHAINMASK_ALL \
CFG_HT_CAPS_ALL \
CFG_LFR_ALL \
CFG_OBSS_HT40_ALL \
CFG_MBO_ALL \
CFG_VHT_CAPS_ALL \

File diff suppressed because it is too large Load Diff

View File

@@ -293,9 +293,93 @@ struct wlan_mlme_sta_cfg {
bool single_tid;
};
/*
* @mawc_roam_enabled: Enable/Disable MAWC during roaming
* @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
* @lfr3_roaming_offload: Enable/disable roam offload feature
* @early_stop_scan_enable: Set early stop scan
* @lfr3_enable_subnet_detection: Enable LFR3 subnet detection
* @enable_5g_band_pref: Enable preference for 5G from INI
* @mawc_roam_traffic_threshold: Configure traffic threshold
* @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
* @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
* @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
* @roam_rssi_abs_threshold: The min RSSI of the candidate AP
* @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
* @early_stop_scan_min_threshold: Set early stop scan min
* @early_stop_scan_max_threshold: Set early stop scan max
* @first_scan_bucket_threshold: Set first scan bucket
* @roam_dense_traffic_threshold: Dense traffic threshold
* @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
* @roam_dense_min_aps: Sets minimum number of AP for dense roam
* @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
* @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
* @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
* @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
* @per_roam_enable: To enabled/disable PER based roaming in FW
* @per_roam_config_high_rate_th: Rate at which PER based roam will stop
* @per_roam_config_low_rate_th: Rate at which PER based roam will start
* @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
* @per_roam_rest_time: FW will wait once it issues a roam scan.
* @per_roam_monitor_time: Min time to be considered as valid scenario
* @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
* @lfr3_disallow_duration: Disallow duration before roaming
* @lfr3_rssi_channel_penalization: RSSI penalization
* @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
* @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
* @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
* @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
* @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
* @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
* @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
* @max_num_pre_auth: Configure max number of pre-auth
*/
struct wlan_mlme_lfr_cfg {
bool mawc_roam_enabled;
bool enable_fast_roam_in_concurrency;
bool lfr3_roaming_offload;
bool early_stop_scan_enable;
bool lfr3_enable_subnet_detection;
bool enable_5g_band_pref;
uint32_t mawc_roam_traffic_threshold;
uint32_t mawc_roam_ap_rssi_threshold;
uint32_t mawc_roam_rssi_high_adjust;
uint32_t mawc_roam_rssi_low_adjust;
uint32_t roam_rssi_abs_threshold;
uint8_t rssi_threshold_offset_5g;
uint8_t early_stop_scan_min_threshold;
uint8_t early_stop_scan_max_threshold;
uint8_t first_scan_bucket_threshold;
uint32_t roam_dense_traffic_threshold;
uint32_t roam_dense_rssi_thre_offset;
uint32_t roam_dense_min_aps;
uint32_t roam_bg_scan_bad_rssi_threshold;
uint32_t roam_bg_scan_client_bitmap;
uint32_t roam_bg_scan_bad_rssi_offset_2g;
uint32_t adaptive_roamscan_dwell_mode;
uint32_t per_roam_enable;
uint32_t per_roam_config_high_rate_th;
uint32_t per_roam_config_low_rate_th;
uint32_t per_roam_config_rate_th_percent;
uint32_t per_roam_rest_time;
uint32_t per_roam_monitor_time;
uint32_t per_roam_min_candidate_rssi;
uint32_t lfr3_disallow_duration;
uint32_t lfr3_rssi_channel_penalization;
uint32_t lfr3_num_disallowed_aps;
uint32_t rssi_boost_threshold_5g;
uint32_t rssi_boost_factor_5g;
uint32_t max_rssi_boost_5g;
uint32_t rssi_penalize_threshold_5g;
uint32_t rssi_penalize_factor_5g;
uint32_t max_rssi_penalize_5g;
uint32_t max_num_pre_auth;
};
/**
* struct wlan_mlme_cfg - MLME config items
* @ht_cfg: HT related CFG Items
* @lfr: LFR related CFG Items
* @obss_ht40:obss ht40 CFG Items
* @vht_cfg: VHT related CFG Items
* @rates: Rates related cfg items
@@ -304,6 +388,7 @@ struct wlan_mlme_sta_cfg {
*/
struct wlan_mlme_cfg {
struct wlan_mlme_ht_caps ht_caps;
struct wlan_mlme_lfr_cfg lfr;
struct wlan_mlme_obss_ht40 obss_ht40;
struct wlan_mlme_mbo mbo_cfg;
struct wlan_mlme_vht_caps vht_caps;

View File

@@ -333,4 +333,37 @@ ucfg_mlme_get_qcn_ie_support(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
ucfg_mlme_get_tgt_gtx_usr_cfg(struct wlan_objmgr_psoc *psoc,
uint32_t *val);
/**
* ucfg_mlme_get_roaming_offload() - Get roaming offload setting
* @psoc: pointer to psoc object
* @val: Pointer to enable/disable roaming offload
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_mlme_set_roaming_offload() - Enable/disable roaming offload
* @psoc: pointer to psoc object
* @val: enable/disable roaming offload
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_roaming_offload(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* ucfg_mlme_get_first_scan_bucket_threshold() - Get first scan bucket thre
* @psoc: pointer to psoc object
* @val: first scan bucket threshold
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_first_scan_bucket_threshold(struct wlan_objmgr_psoc *psoc,
uint8_t *val);
#endif /* _WLAN_MLME_UCFG_API_H_ */

View File

@@ -245,3 +245,57 @@ ucfg_mlme_get_tgt_gtx_usr_cfg(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
bool *val)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*val = cfg_default(CFG_LFR3_ROAMING_OFFLOAD);
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
*val = mlme_obj->cfg.lfr.lfr3_roaming_offload;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_roaming_offload(struct wlan_objmgr_psoc *psoc,
bool val)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
mlme_obj->cfg.lfr.lfr3_roaming_offload = val;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_first_scan_bucket_threshold(struct wlan_objmgr_psoc *psoc,
uint8_t *val)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*val = cfg_default(CFG_LFR_FIRST_SCAN_BUCKET_THRESHOLD);
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
*val = mlme_obj->cfg.lfr.first_scan_bucket_threshold;
return QDF_STATUS_SUCCESS;
}