diff options
| author | CNSS_WLAN Service <cnssbldsw@qualcomm.com> | 2017-08-17 00:26:08 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-17 00:26:08 -0700 |
| commit | a618cb4f1bc95dd0cbc2385cbf6b31b35fc75048 (patch) | |
| tree | 1f711be5a9b953c0949f916d3cd9028f692de9a8 | |
| parent | a1c3f5bd33bf3fc66a870014b572d297e31fb654 (diff) | |
| parent | e501262cffec4294770195197333939997466e03 (diff) | |
Merge "qcacld-3.0: Introduce lookup_threshold_5g_offset INI item" into wlan-cld3.driver.lnx.1.1
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 35 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 13 | ||||
| -rw-r--r-- | core/mac/inc/sir_api.h | 1 | ||||
| -rw-r--r-- | core/sme/inc/csr_api.h | 1 | ||||
| -rw-r--r-- | core/sme/inc/csr_internal.h | 1 | ||||
| -rw-r--r-- | core/sme/inc/csr_neighbor_roam.h | 1 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 6 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_neighbor_roam.c | 2 | ||||
| -rw-r--r-- | core/wma/src/wma_scan_roam.c | 3 |
9 files changed, 62 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index e45c64150715..0995e60b5b52 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -4381,6 +4381,39 @@ enum station_keepalive_method { #define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX (120) #define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_DEFAULT (78) +/* + * <ini> + * lookup_threshold_5g_offset - Lookup Threshold offset for 5G band + * @Min: -120 + * @Max: +120 + * @Default: 0 + * + * This ini is used to set the 5G band lookup threshold for roaming. + * It depends on another INI which is gNeighborLookupThreshold. + * gNeighborLookupThreshold is a legacy INI item which will be used to + * set the RSSI lookup threshold for both 2G and 5G bands. If the + * user wants to setup a different threshold for a 5G band, then user + * can use this offset value which will be summed up to the value of + * gNeighborLookupThreshold and used for 5G + * e.g: gNeighborLookupThreshold = -76dBm + * lookup_threshold_5g_offset = 6dBm + * Then the 5G band will be configured to -76+6 = -70dBm + * A default value of Zero to lookup_threshold_5g_offset will keep the + * thresholds same for both 2G and 5G bands + * + * Related: gNeighborLookupThreshold + * + * Supported Feature: Roaming + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_5G_RSSI_THRESHOLD_OFFSET_NAME "lookup_threshold_5g_offset" +#define CFG_5G_RSSI_THRESHOLD_OFFSET_MIN (-120) +#define CFG_5G_RSSI_THRESHOLD_OFFSET_MAX (120) +#define CFG_5G_RSSI_THRESHOLD_OFFSET_DEFAULT (0) + #define CFG_DELAY_BEFORE_VDEV_STOP_NAME "gDelayBeforeVdevStop" #define CFG_DELAY_BEFORE_VDEV_STOP_MIN (2) #define CFG_DELAY_BEFORE_VDEV_STOP_MAX (200) @@ -12624,7 +12657,6 @@ struct hdd_config { bool is_force_1x1; uint16_t num_11b_tx_chains; uint16_t num_11ag_tx_chains; - /* LCA(Last connected AP) disallow configs */ uint32_t disallow_duration; uint32_t rssi_channel_penalization; @@ -12638,6 +12670,7 @@ struct hdd_config { bool oce_sta_enabled; bool oce_sap_enabled; bool enable_11d_in_world_mode; + int8_t rssi_thresh_offset_5g; }; #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 00888ad02846..66da992dca93 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -1441,6 +1441,14 @@ struct reg_table_entry g_registry_table[] = { CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX, cb_notify_set_neighbor_lookup_rssi_threshold, 0), + REG_VARIABLE(CFG_5G_RSSI_THRESHOLD_OFFSET_NAME, + WLAN_PARAM_SignedInteger, struct hdd_config, + rssi_thresh_offset_5g, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_5G_RSSI_THRESHOLD_OFFSET_DEFAULT, + CFG_5G_RSSI_THRESHOLD_OFFSET_MIN, + CFG_5G_RSSI_THRESHOLD_OFFSET_MAX), + REG_DYNAMIC_VARIABLE(CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_NAME, WLAN_PARAM_Integer, struct hdd_config, nOpportunisticThresholdDiff, @@ -5992,6 +6000,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) hdd_debug("Name = [nNeighborLookupRssiThreshold] Value = [%u] ", pHddCtx->config->nNeighborLookupRssiThreshold); + hdd_debug("Name = [%s] Value = [%d] ", + CFG_5G_RSSI_THRESHOLD_OFFSET_NAME, + pHddCtx->config->rssi_thresh_offset_5g); hdd_debug("Name = [delay_before_vdev_stop] Value = [%u] ", pHddCtx->config->delay_before_vdev_stop); hdd_debug("Name = [nOpportunisticThresholdDiff] Value = [%u] ", @@ -8020,6 +8031,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) } smeConfig->csrConfig.neighborRoamConfig.nNeighborLookupRssiThreshold = pConfig->nNeighborLookupRssiThreshold; + smeConfig->csrConfig.neighborRoamConfig.rssi_thresh_offset_5g = + pConfig->rssi_thresh_offset_5g; smeConfig->csrConfig.neighborRoamConfig.delay_before_vdev_stop = pConfig->delay_before_vdev_stop; smeConfig->csrConfig.neighborRoamConfig.nOpportunisticThresholdDiff = diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 757ed7467147..8cf2b92bcb57 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3407,6 +3407,7 @@ typedef struct sSirRoamOffloadScanReq { bool RoamScanOffloadEnabled; struct mawc_params mawc_roam_params; int8_t LookupThreshold; + int8_t rssi_thresh_offset_5g; uint8_t delay_before_vdev_stop; uint8_t OpportunisticScanThresholdDiff; uint8_t RoamRescanRssiDiff; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 56adc4bb0f40..e2a7977610f9 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1083,6 +1083,7 @@ typedef struct tagCsrNeighborRoamConfigParams { uint32_t nNeighborScanTimerPeriod; uint32_t neighbor_scan_min_timer_period; uint8_t nNeighborLookupRssiThreshold; + int8_t rssi_thresh_offset_5g; uint16_t nNeighborScanMinChanTime; uint16_t nNeighborScanMaxChanTime; sCsrChannel neighborScanChanList; diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index b3e0c4e00d7d..d335b24d022f 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -454,6 +454,7 @@ typedef struct tagCsrNeighborRoamConfig { uint32_t nNeighborScanTimerPeriod; uint32_t neighbor_scan_min_timer_period; uint8_t nNeighborLookupRssiThreshold; + int8_t rssi_thresh_offset_5g; uint16_t nNeighborScanMinChanTime; uint16_t nNeighborScanMaxChanTime; sCsrChannel neighborScanChanList; diff --git a/core/sme/inc/csr_neighbor_roam.h b/core/sme/inc/csr_neighbor_roam.h index dcf73f8cd78f..306d54615cc0 100644 --- a/core/sme/inc/csr_neighbor_roam.h +++ b/core/sme/inc/csr_neighbor_roam.h @@ -57,6 +57,7 @@ typedef struct sCsrNeighborRoamCfgParams { uint32_t neighbor_scan_min_period; tCsrChannelInfo channelInfo; uint8_t neighborLookupThreshold; + int8_t rssi_thresh_offset_5g; uint8_t neighborReassocThreshold; uint32_t minChannelScanTime; uint32_t maxChannelScanTime; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 9da965bbbdfe..69922ba87384 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -1616,6 +1616,7 @@ static void init_config_param(tpAniSirGlobal pMac) pMac->roam.configParam.neighborRoamConfig.nMaxNeighborRetries = 3; pMac->roam.configParam.neighborRoamConfig.nNeighborLookupRssiThreshold = 120; + pMac->roam.configParam.neighborRoamConfig.rssi_thresh_offset_5g = 0; pMac->roam.configParam.neighborRoamConfig.nOpportunisticThresholdDiff = 30; pMac->roam.configParam.neighborRoamConfig.nRoamRescanRssiDiff = 5; @@ -2553,6 +2554,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, sme_debug("nNeighborLookupRssiThreshold: %d", pMac->roam.configParam.neighborRoamConfig. nNeighborLookupRssiThreshold); + sme_debug("rssi_thresh_offset_5g: %d", + pMac->roam.configParam.neighborRoamConfig.rssi_thresh_offset_5g); sme_debug("nOpportunisticThresholdDiff: %d", pMac->roam.configParam.neighborRoamConfig. nOpportunisticThresholdDiff); @@ -19153,6 +19156,9 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, req_buf->LookupThreshold = (int8_t)roam_info->cfgParams.neighborLookupThreshold * (-1); + req_buf->rssi_thresh_offset_5g = + roam_info->cfgParams.rssi_thresh_offset_5g; + sme_debug("5g offset threshold: %d", req_buf->rssi_thresh_offset_5g); qdf_mem_copy(roam_params_dst, roam_params_src, sizeof(*roam_params_dst)); /* diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index d66e342bf566..c39c94f3c771 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -1249,6 +1249,8 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId) pNeighborRoamInfo->cfgParams.neighborLookupThreshold = pMac->roam.configParam.neighborRoamConfig. nNeighborLookupRssiThreshold; + pNeighborRoamInfo->cfgParams.rssi_thresh_offset_5g = + pMac->roam.configParam.neighborRoamConfig.rssi_thresh_offset_5g; pNeighborRoamInfo->cfgParams.delay_before_vdev_stop = pMac->roam.configParam.neighborRoamConfig. delay_before_vdev_stop; diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index cc6e3c7bd4b6..a6ba7c92b1e5 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -1057,11 +1057,14 @@ QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle, params.roam_earlystop_thres_min = 0; params.roam_earlystop_thres_max = 0; } + params.rssi_thresh_offset_5g = + roam_req->rssi_thresh_offset_5g; WMA_LOGD("early_stop_thresholds en=%d, min=%d, max=%d", roam_req->early_stop_scan_enable, params.roam_earlystop_thres_min, params.roam_earlystop_thres_max); + WMA_LOGD("rssi_thresh_offset_5g = %d", params.rssi_thresh_offset_5g); status = wmi_unified_roam_scan_offload_rssi_thresh_cmd( wma_handle->wmi_handle, ¶ms); |
