qcacld-3.0: Add new ini to set min delay btw scan and reason bit-mask
Currently there is no provision to decide delay between two roam scans in firmware. With these new ini's, driver wants to expose control to decide delay between roam scans: Add ini "min_delay_btw_scans" to set minimum duration allowed between two consecutive roam scans. Fw should not allow roam scan if duration between two consecutive roam scan is less than min_delay_btw_scan. Add ini "roam_trigger_reason_bitmask" to set default value of bit-mask containing roam_trigger_reasons for which min_delay_btw_scans constraints should be apply. Change-Id: I2af9d5dc8e6919eeb90251d3d744e3f07705e776 CRs-Fixed: 2221779
This commit is contained in:
parent
9832247b07
commit
a95af7cbac
@ -2147,6 +2147,69 @@ enum hdd_dot11_mode {
|
||||
#define CFG_ROAM_BG_SCAN_CLIENT_BITMAP_MAX (0x7FF)
|
||||
#define CFG_ROAM_BG_SCAN_CLIENT_BITMAP_DEFAULT (0x424)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* min_delay_btw_roam_scans - Min duration (in sec) allowed btw two
|
||||
* consecutive roam scans
|
||||
* @Min: 0
|
||||
* @Max: 60
|
||||
* @Default: 10
|
||||
*
|
||||
* Roam scan is not allowed if duration between two consecutive
|
||||
* roam scans is less than this time.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: Roaming
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME "min_delay_btw_roam_scans"
|
||||
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_MIN (0)
|
||||
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_MAX (60)
|
||||
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_DEFAULT (10)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* roam_trigger_reason_bitmask - Contains roam_trigger_reasons
|
||||
* @Min: 0
|
||||
* @Max: 0xFFFFFFFF
|
||||
* @Default: 0xDA
|
||||
*
|
||||
* Bitmask containing roam_trigger_reasons for which
|
||||
* min_delay_btw_roam_scans constraint should be applied.
|
||||
* Currently supported bit positions are as follows:
|
||||
* Bit 0 is reserved in the firmware.
|
||||
* WMI_ROAM_TRIGGER_REASON_PER - 1
|
||||
* WMI_ROAM_TRIGGER_REASON_BMISS - 2
|
||||
* WMI_ROAM_TRIGGER_REASON_LOW_RSSI - 3
|
||||
* WMI_ROAM_TRIGGER_REASON_HIGH_RSSI - 4
|
||||
* WMI_ROAM_TRIGGER_REASON_PERIODIC - 5
|
||||
* WMI_ROAM_TRIGGER_REASON_MAWC - 6
|
||||
* WMI_ROAM_TRIGGER_REASON_DENSE - 7
|
||||
* WMI_ROAM_TRIGGER_REASON_BACKGROUND - 8
|
||||
* WMI_ROAM_TRIGGER_REASON_FORCED - 9
|
||||
* WMI_ROAM_TRIGGER_REASON_BTM - 10
|
||||
* WMI_ROAM_TRIGGER_REASON_UNIT_TEST - 11
|
||||
* WMI_ROAM_TRIGGER_REASON_MAX - 12
|
||||
*
|
||||
* For Ex: 0xDA (PER, LOW_RSSI, HIGH_RSSI, MAWC, DENSE)
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: Roaming
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME "roam_trigger_reason_bitmask"
|
||||
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MIN (0)
|
||||
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MAX (0xFFFFFFFF)
|
||||
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_DEFAULT (0xDA)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* roam_bad_rssi_thresh_offset_2g - RSSI threshold offset for 2G to 5G roam
|
||||
@ -14541,6 +14604,8 @@ struct hdd_config {
|
||||
int8_t roam_bg_scan_bad_rssi_thresh;
|
||||
uint8_t roam_bad_rssi_thresh_offset_2g;
|
||||
uint32_t ho_delay_for_rx;
|
||||
uint32_t min_delay_btw_roam_scans;
|
||||
uint32_t roam_trigger_reason_bitmask;
|
||||
uint32_t roam_bg_scan_client_bitmap;
|
||||
bool enable_edca_params;
|
||||
uint32_t edca_vo_cwmin;
|
||||
|
@ -3859,6 +3859,22 @@ struct reg_table_entry g_registry_table[] = {
|
||||
CFG_ROAM_HO_DELAY_FOR_RX_MIN,
|
||||
CFG_ROAM_HO_DELAY_FOR_RX_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME,
|
||||
WLAN_PARAM_Integer, struct hdd_config,
|
||||
min_delay_btw_roam_scans,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_MIN_DELAY_BTW_ROAM_SCAN_DEFAULT,
|
||||
CFG_MIN_DELAY_BTW_ROAM_SCAN_MIN,
|
||||
CFG_MIN_DELAY_BTW_ROAM_SCAN_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME,
|
||||
WLAN_PARAM_HexInteger, struct hdd_config,
|
||||
roam_trigger_reason_bitmask,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_DEFAULT,
|
||||
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MIN,
|
||||
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ENABLE_FATAL_EVENT_TRIGGER, WLAN_PARAM_Integer,
|
||||
struct hdd_config, enable_fatal_event,
|
||||
VAR_FLAGS_OPTIONAL |
|
||||
@ -6851,6 +6867,12 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
|
||||
hdd_debug("Name = [%s] Value = [%u]",
|
||||
CFG_ROAM_HO_DELAY_FOR_RX_NAME,
|
||||
hdd_ctx->config->ho_delay_for_rx);
|
||||
hdd_debug("Name = [%s] Value = [%u]",
|
||||
CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME,
|
||||
hdd_ctx->config->min_delay_btw_roam_scans);
|
||||
hdd_debug("Name = [%s] Value = [%u]",
|
||||
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME,
|
||||
hdd_ctx->config->roam_trigger_reason_bitmask);
|
||||
hdd_debug("Name = [%s] Value = [%u]",
|
||||
CFG_MIN_REST_TIME_NAME,
|
||||
hdd_ctx->config->min_rest_time_conc);
|
||||
@ -8793,6 +8815,10 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
|
||||
hdd_ctx->config->roam_bad_rssi_thresh_offset_2g;
|
||||
smeConfig->csrConfig.ho_delay_for_rx =
|
||||
hdd_ctx->config->ho_delay_for_rx;
|
||||
smeConfig->csrConfig.min_delay_btw_roam_scans =
|
||||
hdd_ctx->config->min_delay_btw_roam_scans;
|
||||
smeConfig->csrConfig.roam_trigger_reason_bitmask =
|
||||
hdd_ctx->config->roam_trigger_reason_bitmask;
|
||||
smeConfig->csrConfig.obss_width_interval =
|
||||
hdd_ctx->config->obss_width_trigger_interval;
|
||||
smeConfig->csrConfig.obss_active_dwelltime =
|
||||
|
@ -2943,6 +2943,8 @@ typedef struct sSirRoamOffloadScanReq {
|
||||
uint32_t btm_sticky_time;
|
||||
struct wmi_11k_offload_params offload_11k_params;
|
||||
uint32_t ho_delay_for_rx;
|
||||
uint32_t min_delay_btw_roam_scans;
|
||||
uint32_t roam_trigger_reason_bitmask;
|
||||
} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
|
||||
|
||||
typedef struct sSirRoamOffloadScanRsp {
|
||||
|
@ -1212,6 +1212,8 @@ typedef struct tagCsrConfigParam {
|
||||
uint8_t max_amsdu_num;
|
||||
uint8_t nSelect5GHzMargin;
|
||||
uint32_t ho_delay_for_rx;
|
||||
uint32_t min_delay_btw_roam_scans;
|
||||
uint32_t roam_trigger_reason_bitmask;
|
||||
uint8_t isCoalesingInIBSSAllowed;
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
uint8_t cc_switch_mode;
|
||||
|
@ -538,6 +538,8 @@ struct csr_config {
|
||||
uint8_t max_amsdu_num;
|
||||
uint8_t nSelect5GHzMargin;
|
||||
uint32_t ho_delay_for_rx;
|
||||
uint32_t min_delay_btw_roam_scans;
|
||||
uint32_t roam_trigger_reason_bitmask;
|
||||
uint8_t isCoalesingInIBSSAllowed;
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
uint8_t cc_switch_mode;
|
||||
|
@ -2941,6 +2941,10 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
|
||||
pParam->nSelect5GHzMargin;
|
||||
pMac->roam.configParam.ho_delay_for_rx =
|
||||
pParam->ho_delay_for_rx;
|
||||
pMac->roam.configParam.min_delay_btw_roam_scans =
|
||||
pParam->min_delay_btw_roam_scans;
|
||||
pMac->roam.configParam.roam_trigger_reason_bitmask =
|
||||
pParam->roam_trigger_reason_bitmask;
|
||||
pMac->roam.configParam.isCoalesingInIBSSAllowed =
|
||||
pParam->isCoalesingInIBSSAllowed;
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
@ -3285,6 +3289,9 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
|
||||
pParam->max_amsdu_num = cfg_params->max_amsdu_num;
|
||||
pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin;
|
||||
pParam->ho_delay_for_rx = cfg_params->ho_delay_for_rx;
|
||||
pParam->min_delay_btw_roam_scans = cfg_params->min_delay_btw_roam_scans;
|
||||
pParam->roam_trigger_reason_bitmask =
|
||||
cfg_params->roam_trigger_reason_bitmask;
|
||||
pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed;
|
||||
pParam->allowDFSChannelRoam = cfg_params->allowDFSChannelRoam;
|
||||
pParam->nInitialDwellTime = cfg_params->nInitialDwellTime;
|
||||
@ -17800,6 +17807,10 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
|
||||
req_buf->RoamRssiCatGap = mac_ctx->roam.configParam.bCatRssiOffset;
|
||||
req_buf->Select5GHzMargin = mac_ctx->roam.configParam.nSelect5GHzMargin;
|
||||
req_buf->ho_delay_for_rx = mac_ctx->roam.configParam.ho_delay_for_rx;
|
||||
req_buf->min_delay_btw_roam_scans =
|
||||
mac_ctx->roam.configParam.min_delay_btw_roam_scans;
|
||||
req_buf->roam_trigger_reason_bitmask =
|
||||
mac_ctx->roam.configParam.roam_trigger_reason_bitmask;
|
||||
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT,
|
||||
(uint32_t *) &req_buf->ReassocFailureTimeout)
|
||||
!= eSIR_SUCCESS) {
|
||||
|
@ -359,6 +359,10 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
|
||||
params->fw_okc = roam_req->pmkid_modes.fw_okc;
|
||||
params->fw_pmksa_cache = roam_req->pmkid_modes.fw_pmksa_cache;
|
||||
#endif
|
||||
params->min_delay_btw_roam_scans =
|
||||
roam_req->min_delay_btw_roam_scans;
|
||||
params->roam_trigger_reason_bitmask =
|
||||
roam_req->roam_trigger_reason_bitmask;
|
||||
params->is_ese_assoc = roam_req->IsESEAssoc;
|
||||
params->is_11r_assoc = roam_req->is_11r_assoc;
|
||||
params->mdid.mdie_present = roam_req->MDID.mdiePresent;
|
||||
|
Loading…
Reference in New Issue
Block a user