qcacld-3.0: Add ini support for extscan

qcacld-2.0 to qcacld-3.0 propagation.
Added ini parameter for extscan so that scan can be aborted
if extscan ini is not enabled.

Change-Id: I7bfcd88901512de6b70af94d1ebd76894bb14755
CRs-Fixed: 927236
(cherry picked from commit 5af7ebadac8ea8ccd11af6c03d5d3a4cf209e85b)
Bu işleme şunda yer alıyor:
Manjeet Singh
2016-09-01 12:08:57 +05:30
işlemeyi yapan: qcabuildsw
ebeveyn 2d3b0c5876
işleme 0f2ce5c0c4
4 değiştirilmiş dosya ile 66 ekleme ve 1 silme

Dosyayı Görüntüle

@@ -2921,6 +2921,17 @@ enum dot11p_mode {
#define CFG_DOT11P_MODE_MAX (WLAN_HDD_11P_CONCURRENT)
#ifdef FEATURE_WLAN_EXTSCAN
/*
* This ini is added to control the enabling of extscan feature outside of code
* To enable , gExtScanEnable=1 need to be declared in ini file.
* Otherwise, Extscan feature will remain disabled.
*/
#define CFG_EXTSCAN_ALLOWED_NAME "gExtScanEnable"
#define CFG_EXTSCAN_ALLOWED_MIN (0)
#define CFG_EXTSCAN_ALLOWED_MAX (1)
#define CFG_EXTSCAN_ALLOWED_DEF (0)
#define CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_NAME "gExtScanPassiveMaxChannelTime"
#define CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_MIN (0)
#define CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_MAX (500)
@@ -4092,6 +4103,7 @@ struct hdd_config {
uint8_t rx_mode;
uint8_t cpu_map_list[CFG_RPS_RX_QUEUE_CPU_MAP_LIST_LEN];
#ifdef FEATURE_WLAN_EXTSCAN
bool extscan_enabled;
uint32_t extscan_passive_max_chn_time;
uint32_t extscan_passive_min_chn_time;
uint32_t extscan_active_max_chn_time;

Dosyayı Görüntüle

@@ -3557,6 +3557,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_DOT11P_MODE_MAX),
#ifdef FEATURE_WLAN_EXTSCAN
REG_VARIABLE(CFG_EXTSCAN_ALLOWED_NAME, WLAN_PARAM_Integer,
struct hdd_config, extscan_enabled,
VAR_FLAGS_OPTIONAL |
VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_EXTSCAN_ALLOWED_DEF,
CFG_EXTSCAN_ALLOWED_MIN,
CFG_EXTSCAN_ALLOWED_MAX),
REG_VARIABLE(CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_NAME,
WLAN_PARAM_Integer,
struct hdd_config, extscan_passive_max_chn_time,

Dosyayı Görüntüle

@@ -1826,7 +1826,8 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
fset |= WIFI_FEATURE_HOTSPOT;
#ifdef FEATURE_WLAN_EXTSCAN
if (sme_is_feature_supported_by_fw(EXTENDED_SCAN)) {
if (pHddCtx->config->extscan_enabled &&
sme_is_feature_supported_by_fw(EXTENDED_SCAN)) {
hdd_notice("EXTScan is supported by firmware");
fset |= WIFI_FEATURE_EXTSCAN | WIFI_FEATURE_HAL_EPNO;
}

Dosyayı Görüntüle

@@ -1761,6 +1761,10 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
if (0 != ret)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -1895,6 +1899,10 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
if (0 != retval)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, PARAM_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -2042,6 +2050,10 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
if (0 != retval)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -2520,6 +2532,10 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
if (0 != ret)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -3181,6 +3197,10 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
if (0 != retval)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, PARAM_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -3394,6 +3414,10 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
if (0 != retval)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, PARAM_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -3520,6 +3544,10 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
if (0 != retval)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -3644,6 +3672,10 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
if (0 != retval)
return -EINVAL;
if (!pHddCtx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
hdd_err("Invalid ATTR");
@@ -3851,6 +3883,10 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
if (ret_val)
return ret_val;
if (!hdd_ctx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
hdd_err("Command not allowed in FTM mode");
return -EPERM;
@@ -4306,6 +4342,10 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
if (0 != retval)
return -EINVAL;
if (!hdd_ctx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
@@ -4524,6 +4564,10 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy,
if (0 != retval)
return -EINVAL;
if (!hdd_ctx->config->extscan_enabled) {
hdd_err("extscan not supported");
return -ENOTSUPP;
}
if (nla_parse(tb, PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {