qcacld-3.0: Create configuration item gfirst_scan_bucket_threshold

qcacld-2.0 to qcacld-3.0 propagation

Create a configuration item to program the first bucket
threshold of the scan results to have the flexibility to
adjust the first bucket threshold.

CRs-Fixed: 922979
Change-Id: I6fad27a2990f7555173e4735131e8392d0277009
This commit is contained in:
Varun Reddy Yeturu 2015-11-21 22:03:40 -08:00 • committed by Satish Singh
commit 044bda2e10
6 changed files with 40 additions and 4 deletions

View file

@ -2758,6 +2758,19 @@ enum dot11p_mode {
#define CFG_EARLY_STOP_SCAN_MAX_THRESHOLD_MAX (-40)
#define CFG_EARLY_STOP_SCAN_MAX_THRESHOLD_DEFAULT (-45)
/*
* This parameter will configure the first scan bucket
* threshold to the mentioned value and all the AP's which
* have RSSI under this threshold will fall under this
* bucket.
* This is a configuration item used to tweak and test the input
* for internal algorithm. It should not be modified externally.
*/
#define CFG_FIRST_SCAN_BUCKET_THRESHOLD_NAME "gFirstScanBucketThreshold"
#define CFG_FIRST_SCAN_BUCKET_THRESHOLD_MIN (-50)
#define CFG_FIRST_SCAN_BUCKET_THRESHOLD_MAX (-30)
#define CFG_FIRST_SCAN_BUCKET_THRESHOLD_DEFAULT (-30)
/*---------------------------------------------------------------------------
Type declarations
-------------------------------------------------------------------------*/
@ -3335,6 +3348,7 @@ struct hdd_config {
bool early_stop_scan_enable;
int8_t early_stop_scan_min_threshold;
int8_t early_stop_scan_max_threshold;
int8_t first_scan_bucket_threshold;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

View file

@ -3603,6 +3603,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_EARLY_STOP_SCAN_MAX_THRESHOLD_MIN,
CFG_EARLY_STOP_SCAN_MAX_THRESHOLD_MAX),
REG_VARIABLE(CFG_FIRST_SCAN_BUCKET_THRESHOLD_NAME,
WLAN_PARAM_SignedInteger,
struct hdd_config, first_scan_bucket_threshold,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_FIRST_SCAN_BUCKET_THRESHOLD_DEFAULT,
CFG_FIRST_SCAN_BUCKET_THRESHOLD_MIN,
CFG_FIRST_SCAN_BUCKET_THRESHOLD_MAX),
};
@ -5146,7 +5154,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hddLog(LOGE, "Name = [%s] Value = [%d]",
CFG_EARLY_STOP_SCAN_MAX_THRESHOLD,
pHddCtx->config->early_stop_scan_max_threshold);
hddLog(LOGE, "Name = [%s] Value = [%d]",
CFG_FIRST_SCAN_BUCKET_THRESHOLD_NAME,
pHddCtx->config->first_scan_bucket_threshold);
}
@ -6589,6 +6599,8 @@ CDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
pHddCtx->config->early_stop_scan_min_threshold;
smeConfig->early_stop_scan_max_threshold =
pHddCtx->config->early_stop_scan_max_threshold;
smeConfig->csrConfig.first_scan_bucket_threshold =
pHddCtx->config->first_scan_bucket_threshold;
status = sme_update_config(pHddCtx->hHal, smeConfig);
if (!CDF_IS_STATUS_SUCCESS(status)) {
hddLog(LOGE, "sme_update_config() return failure %d",

View file

@ -1043,6 +1043,7 @@ typedef struct sAniSirGlobal {
uint32_t dual_mac_feature_disable;
bool first_scan_done;
int8_t first_scan_bucket_threshold;
} tAniSirGlobal;
typedef enum {

View file

@ -1274,6 +1274,7 @@ typedef struct tagCsrConfigParam {
bool early_stop_scan_enable;
int8_t early_stop_scan_min_threshold;
int8_t early_stop_scan_max_threshold;
int8_t first_scan_bucket_threshold;
} tCsrConfigParam;
/* Tush */

View file

@ -134,6 +134,7 @@ typedef struct _smeConfigParams {
bool early_stop_scan_enable;
int8_t early_stop_scan_min_threshold;
int8_t early_stop_scan_max_threshold;
int8_t first_scan_bucket_threshold;
} tSmeConfigParams, *tpSmeConfigParams;
#ifdef FEATURE_WLAN_TDLS

View file

@ -1189,6 +1189,8 @@ void csr_assign_rssi_for_category(tpAniSirGlobal pMac, int8_t bestApRssi,
uint8_t catOffset)
{
int i;
sms_log(pMac, LOG2, FL("best AP RSSI:%d, cat offset:%d"),
bestApRssi, catOffset);
if (catOffset) {
pMac->roam.configParam.bCatRssiOffset = catOffset;
for (i = 0; i < CSR_NUM_RSSI_CAT; i++) {
@ -1238,7 +1240,7 @@ static void init_config_param(tpAniSirGlobal pMac)
pMac->roam.configParam.BssPreferValue[i] = i;
}
csr_assign_rssi_for_category(pMac, CSR_BEST_RSSI_VALUE,
CSR_DEFAULT_RSSI_DB_GAP);
CSR_DEFAULT_RSSI_DB_GAP);
pMac->roam.configParam.nRoamingTime = CSR_DEFAULT_ROAMING_TIME;
pMac->roam.configParam.fSupplicantCountryCodeHasPriority = false;
pMac->roam.configParam.nActiveMaxChnTime = CSR_ACTIVE_MAX_CHANNEL_TIME;
@ -1821,8 +1823,11 @@ CDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pParam->scanAgeTimeCPS;
}
csr_assign_rssi_for_category(pMac, CSR_BEST_RSSI_VALUE,
pParam->bCatRssiOffset);
pMac->first_scan_bucket_threshold =
pParam->first_scan_bucket_threshold;
csr_assign_rssi_for_category(pMac,
pMac->first_scan_bucket_threshold,
pParam->bCatRssiOffset);
pMac->roam.configParam.nRoamingTime = pParam->nRoamingTime;
pMac->roam.configParam.fSupplicantCountryCodeHasPriority =
pParam->fSupplicantCountryCodeHasPriority;
@ -2158,6 +2163,8 @@ CDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->sendDeauthBeforeCon =
cfg_params->sendDeauthBeforeCon;
pParam->max_scan_count = pMac->scan.max_scan_count;
pParam->first_scan_bucket_threshold =
pMac->first_scan_bucket_threshold;
return CDF_STATUS_SUCCESS;
}