diff options
| author | Vignesh Viswanathan <viswanat@codeaurora.org> | 2017-09-07 18:49:19 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-09-15 07:41:18 -0700 |
| commit | 7eed5866ed6f4e4f38a988a28c02ebccd1ae736c (patch) | |
| tree | febae6ca3d0e0b6bac33890726904c58d2f31d73 | |
| parent | fdb15aae630518b311bc9d01bf64284353902d72 (diff) | |
qcacld-3.0: Add new ini for bad RSSI 2G to 5G roam offset
Add new WCNSS_qcom_cfg.ini item to configure offset from bad RSSI
threshold ini for 2G to 5G band roam. This offset is used to
calculate the RSSI to be used as trigger for device to roam from
2G to 5G band when it is connected to a bad RSSI 2G AP and a 5G AP
is available in the environment.
New ini added : roam_bad_rssi_thresh_offset_2g
Change-Id: If2285317d1d01bb2faae2cf1928ad7adae8204d4
CRs-Fixed: 2105894
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 31 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 13 | ||||
| -rw-r--r-- | core/mac/inc/sir_api.h | 2 | ||||
| -rw-r--r-- | core/sme/inc/csr_api.h | 1 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 15 | ||||
| -rw-r--r-- | core/wma/src/wma_scan_roam.c | 9 |
6 files changed, 62 insertions, 9 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 5e88512d763a..2f426ebaaa22 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -2093,6 +2093,36 @@ enum hdd_dot11_mode { /* * <ini> + * roam_bad_rssi_thresh_offset_2g - RSSI threshold offset for 2G to 5G roam + * @Min: 0 + * @Max: 86 + * @Default: 40 + * + * If the DUT is connected to an AP with weak signal in 2G band, then the + * bad RSSI offset for 2g would be used as offset from the bad RSSI + * threshold configured and then use the resulting rssi for an opportunity + * to use the scan results from other scan clients and try to roam to + * 5G Band ONLY if there is a better AP available in the environment. + * + * For example if the roam_bg_scan_bad_rssi_thresh is -76 and + * roam_bad_rssi_thresh_offset_2g is 40 then the difference of -36 would be + * used as a trigger to roam to a 5G AP if DUT initially connected to a 2G AP + * + * Related: roam_bg_scan_bad_rssi_thresh + * + * Supported Feature: Roaming + * + * Usage: External + * + * </ini> + */ +#define CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_NAME "roam_bad_rssi_thresh_offset_2g" +#define CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_MIN (0) +#define CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_MAX (86) +#define CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_DEFAULT (40) + +/* + * <ini> * roamscan_adaptive_dwell_mode - Sets dwell time adaptive mode * @Min: 0 * @Max: 4 @@ -12796,6 +12826,7 @@ struct hdd_config { bool ignore_peer_ht_opmode; uint32_t roam_dense_min_aps; int8_t roam_bg_scan_bad_rssi_thresh; + uint8_t roam_bad_rssi_thresh_offset_2g; uint32_t roam_bg_scan_client_bitmap; bool enable_edca_params; uint32_t edca_vo_cwmin; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 1d252b911a3b..40ede3c840b6 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -4043,6 +4043,14 @@ struct reg_table_entry g_registry_table[] = { CFG_ROAM_BG_SCAN_CLIENT_BITMAP_MIN, CFG_ROAM_BG_SCAN_CLIENT_BITMAP_MAX), + REG_VARIABLE(CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_NAME, + WLAN_PARAM_Integer, struct hdd_config, + roam_bad_rssi_thresh_offset_2g, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_DEFAULT, + CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_MIN, + CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_MAX), + REG_VARIABLE(CFG_ENABLE_FATAL_EVENT_TRIGGER, WLAN_PARAM_Integer, struct hdd_config, enable_fatal_event, VAR_FLAGS_OPTIONAL | @@ -6473,6 +6481,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) CFG_ROAM_BG_SCAN_CLIENT_BITMAP_NAME, pHddCtx->config->roam_bg_scan_client_bitmap); hdd_debug("Name = [%s] Value = [%u]", + CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_NAME, + pHddCtx->config->roam_bad_rssi_thresh_offset_2g); + hdd_debug("Name = [%s] Value = [%u]", CFG_MIN_REST_TIME_NAME, pHddCtx->config->min_rest_time_conc); hdd_debug("Name = [%s] Value = [%u]", @@ -8315,6 +8326,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) pHddCtx->config->roam_bg_scan_bad_rssi_thresh; smeConfig->csrConfig.roam_bg_scan_client_bitmap = pHddCtx->config->roam_bg_scan_client_bitmap; + smeConfig->csrConfig.roam_bad_rssi_thresh_offset_2g = + pHddCtx->config->roam_bad_rssi_thresh_offset_2g; smeConfig->csrConfig.obss_width_interval = pHddCtx->config->obss_width_trigger_interval; smeConfig->csrConfig.obss_active_dwelltime = diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 893599032a5b..eea9755e988f 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3337,6 +3337,7 @@ typedef enum { * @is_5g_pref_enabled: 5GHz BSSID preference feature enable/disable. * @bg_scan_bad_rssi_thresh: Bad RSSI threshold to perform bg scan. * @bg_scan_client_bitmap: Bitmap to identify the client scans to snoop. + * @bad_rssi_thresh_offset_2g: Offset from Bad RSSI threshold for 2G to 5G Roam * * This structure holds all the key parameters related to * initial connection and also roaming connections. @@ -3368,6 +3369,7 @@ struct roam_ext_params { uint8_t num_rssi_rejection_ap; struct rssi_disallow_bssid rssi_rejection_ap[MAX_RSSI_AVOID_BSSID_LIST]; int8_t bg_scan_bad_rssi_thresh; + uint8_t roam_bad_rssi_thresh_offset_2g; uint32_t bg_scan_client_bitmap; }; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 7344786e53d7..2c55537ee755 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1347,6 +1347,7 @@ typedef struct tagCsrConfigParam { uint32_t roam_dense_rssi_thresh_offset; uint32_t roam_dense_min_aps; int8_t roam_bg_scan_bad_rssi_thresh; + uint8_t roam_bad_rssi_thresh_offset_2g; uint32_t roam_bg_scan_client_bitmap; uint32_t obss_width_interval; uint32_t obss_active_dwelltime; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 276fa9c30211..a41711cce60a 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2763,11 +2763,9 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pParam->roam_bg_scan_bad_rssi_thresh; pMac->roam.configParam.roam_params.bg_scan_client_bitmap = pParam->roam_bg_scan_client_bitmap; - - pMac->roam.configParam.roam_params.bg_scan_bad_rssi_thresh = - pParam->roam_bg_scan_bad_rssi_thresh; - pMac->roam.configParam.roam_params.bg_scan_client_bitmap = - pParam->roam_bg_scan_client_bitmap; + pMac->roam.configParam.roam_params. + roam_bad_rssi_thresh_offset_2g = + pParam->roam_bad_rssi_thresh_offset_2g; pMac->roam.configParam.scan_adaptive_dwell_mode = pParam->scan_adaptive_dwell_mode; @@ -3027,6 +3025,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) cfg_params->roam_params.bg_scan_bad_rssi_thresh; pParam->roam_bg_scan_client_bitmap = cfg_params->roam_params.bg_scan_client_bitmap; + pParam->roam_bad_rssi_thresh_offset_2g = + cfg_params->roam_params.roam_bad_rssi_thresh_offset_2g; pParam->scan_adaptive_dwell_mode = cfg_params->scan_adaptive_dwell_mode; @@ -19339,9 +19339,10 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, roam_params_dst->traffic_threshold, roam_params_dst->initial_dense_status, mac_ctx->scan.roam_candidate_count[session_id]); - sme_debug("BG Scan Bad RSSI:%d, bitmap:0x%x", + sme_debug("BG Scan Bad RSSI:%d, bitmap:0x%x Offset for 2G to 5G Roam %d", roam_params_dst->bg_scan_bad_rssi_thresh, - roam_params_dst->bg_scan_client_bitmap); + roam_params_dst->bg_scan_client_bitmap, + roam_params_dst->roam_bad_rssi_thresh_offset_2g); for (i = 0; i < roam_params_dst->num_bssid_avoid_list; i++) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 99ed3b8929cb..6d89993353a1 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -1014,6 +1014,10 @@ QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle, params.bg_scan_bad_rssi_thresh = roam_params->bg_scan_bad_rssi_thresh - WMA_NOISE_FLOOR_DBM_DEFAULT; params.bg_scan_client_bitmap = roam_params->bg_scan_client_bitmap; + params.roam_bad_rssi_thresh_offset_2g = + roam_params->roam_bad_rssi_thresh_offset_2g; + if (params.roam_bad_rssi_thresh_offset_2g) + params.flags |= WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY; /* * The current Noise floor in firmware is -96dBm. Penalty/Boost @@ -1087,9 +1091,10 @@ QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle, roam_params->dense_min_aps_cnt, roam_params->traffic_threshold, roam_params->initial_dense_status); - WMA_LOGD(FL("BG Scan Bad RSSI:%d, bitmap:0x%x"), + WMA_LOGD(FL("BG Scan Bad RSSI:%d, bitmap:0x%x Offset for 2G to 5G Roam:%d"), roam_params->bg_scan_bad_rssi_thresh, - roam_params->bg_scan_client_bitmap); + roam_params->bg_scan_client_bitmap, + roam_params->roam_bad_rssi_thresh_offset_2g); return status; } |
