diff --git a/Kbuild b/Kbuild index 5fae1e7d8adb..0ddd55cfa2b5 100644 --- a/Kbuild +++ b/Kbuild @@ -647,6 +647,7 @@ UMAC_SCAN_OBJS := $(UMAC_SCAN_CORE_DIR)/wlan_scan_cache_db.o \ $(UMAC_SCAN_CORE_DIR)/wlan_scan_manager.o \ $(UMAC_SCAN_DISP_DIR)/wlan_scan_tgt_api.o \ $(UMAC_SCAN_DISP_DIR)/wlan_scan_ucfg_api.o \ + $(UMAC_SCAN_DISP_DIR)/wlan_scan_api.o \ $(UMAC_SCAN_DISP_DIR)/wlan_scan_utils_api.o \ $(WLAN_COMMON_ROOT)/os_if/linux/scan/src/wlan_cfg80211_scan.o \ $(WLAN_COMMON_ROOT)/os_if/linux/wlan_cfg80211.o \ diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 2db1292675bd..8bdfe18f81f1 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -3525,14 +3525,6 @@ struct hdd_config { uint32_t nInitialDwellTime; /* in units of milliseconds */ bool initial_scan_no_dfs_chnl; - uint32_t nPassiveMaxChnTimeConc; /* in units of milliseconds */ - uint32_t nActiveMaxChnTimeConc; /* in units of milliseconds */ - uint32_t nRestTimeConc; /* in units of milliseconds */ - /* In units of milliseconds */ - uint32_t min_rest_time_conc; - /* In units of milliseconds */ - uint32_t idle_time_conc; - uint8_t nRssiFilterPeriod; uint8_t wow_data_inactivity_timeout; diff --git a/core/hdd/src/wlan_hdd_active_tos.c b/core/hdd/src/wlan_hdd_active_tos.c index fbcaf633933e..9d2562954fb0 100644 --- a/core/hdd/src/wlan_hdd_active_tos.c +++ b/core/hdd/src/wlan_hdd_active_tos.c @@ -30,6 +30,7 @@ #include #include #include "wlan_policy_mgr_ucfg.h" +#include "wlan_scan_ucfg_api.h" /** * tos - Type of service requested by the application @@ -95,6 +96,7 @@ hdd_set_limit_off_chan_for_tos(struct hdd_adapter *adapter, QDF_STATUS status; int ret; uint8_t def_sys_pref = 0; + uint32_t rest_conc_time; hdd_ctx = WLAN_HDD_GET_CTX(adapter); ret = wlan_hdd_validate_context(hdd_ctx); @@ -134,11 +136,12 @@ hdd_set_limit_off_chan_for_tos(struct hdd_adapter *adapter, def_sys_pref); } + ucfg_scan_cfg_get_conc_max_resttime(hdd_ctx->psoc, &rest_conc_time); status = sme_send_limit_off_channel_params(hdd_ctx->mac_handle, adapter->session_id, is_tos_active, max_off_chan_time, - hdd_ctx->config->nRestTimeConc, + rest_conc_time, true); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("failed to set limit off chan params"); diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 6307b5264c97..ac46c324a1e3 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -182,41 +182,6 @@ struct reg_table_entry g_registry_table[] = { CFG_SCAN_PROBE_REPEAT_TIME_MIN, CFG_SCAN_PROBE_REPEAT_TIME_MAX), - REG_VARIABLE(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_NAME, WLAN_PARAM_Integer, - struct hdd_config, nPassiveMaxChnTimeConc, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_DEFAULT, - CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_MIN, - CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_MAX), - - REG_VARIABLE(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_NAME, WLAN_PARAM_Integer, - struct hdd_config, nActiveMaxChnTimeConc, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_DEFAULT, - CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_MIN, - CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_MAX), - - REG_VARIABLE(CFG_REST_TIME_CONC_NAME, WLAN_PARAM_Integer, - struct hdd_config, nRestTimeConc, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_REST_TIME_CONC_DEFAULT, - CFG_REST_TIME_CONC_MIN, - CFG_REST_TIME_CONC_MAX), - - REG_VARIABLE(CFG_MIN_REST_TIME_NAME, WLAN_PARAM_Integer, - struct hdd_config, min_rest_time_conc, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_MIN_REST_TIME_DEFAULT, - CFG_MIN_REST_TIME_MIN, - CFG_MIN_REST_TIME_MAX), - - REG_VARIABLE(CFG_IDLE_TIME_NAME, WLAN_PARAM_Integer, - struct hdd_config, idle_time_conc, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_IDLE_TIME_DEFAULT, - CFG_IDLE_TIME_MIN, - CFG_IDLE_TIME_MAX), - REG_VARIABLE(CFG_MAX_TX_POWER_NAME, WLAN_PARAM_Integer, struct hdd_config, nTxPowerCap, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2527,13 +2492,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx) pConfig->initial_scan_no_dfs_chnl; smeConfig->csrConfig.nActiveMaxChnTime = pConfig->nActiveMaxChnTime; smeConfig->csrConfig.nPassiveMaxChnTime = pConfig->nPassiveMaxChnTime; - smeConfig->csrConfig.nActiveMaxChnTimeConc = - pConfig->nActiveMaxChnTimeConc; - smeConfig->csrConfig.nPassiveMaxChnTimeConc = - pConfig->nPassiveMaxChnTimeConc; - smeConfig->csrConfig.nRestTimeConc = pConfig->nRestTimeConc; - smeConfig->csrConfig.min_rest_time_conc = pConfig->min_rest_time_conc; - smeConfig->csrConfig.idle_time_conc = pConfig->idle_time_conc; /* Remaining config params not obtained from registry * On RF EVB beacon using channel 1. */ diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 2fc82b99dd9f..bc35b99b14cc 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -42,6 +42,8 @@ #include #endif #include "hif.h" +#include "wlan_scan_ucfg_api.h" +#include "cfg_ucfg_api.h" #if defined(LINUX_QCMBR) #define SIOCIOCTLTX99 (SIOCDEVPRIVATE+13) @@ -2281,16 +2283,13 @@ static int hdd_conc_set_dwell_time(hdd_context_t *hdd_ctx, uint8_t *command) value = value + 28; temp = kstrtou32(value, 10, &val); - if (temp != 0 || val < CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_MIN || - val > CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_MAX) { - hdd_err("Argument passed for CONCSETDWELLTIME ACTIVE MAX is incorrect"); + if (temp != 0 || + cfg_in_range(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC, val)) { + hdd_err("CONC ACTIVE MAX value %d incorrect", val); retval = -EFAULT; goto sme_config_free; } - - p_cfg->nActiveMaxChnTimeConc = val; - sme_config->csrConfig.nActiveMaxChnTimeConc = val; - sme_update_config(mac_handle, sme_config); + ucfg_scan_cfg_set_conc_active_dwelltime(hdd_ctx->psoc, val); } else if (strncmp(command, "CONCSETDWELLTIME PASSIVE MAX", 28) == 0) { if (drv_cmd_validate(command, 28)) { hdd_err("Invalid driver command"); @@ -2300,16 +2299,13 @@ static int hdd_conc_set_dwell_time(hdd_context_t *hdd_ctx, uint8_t *command) value = value + 29; temp = kstrtou32(value, 10, &val); - if (temp != 0 || val < CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_MIN || - val > CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_MAX) { - hdd_err("Argument passed for CONCSETDWELLTIME PASSIVE MAX is incorrect"); + if (temp != 0 || + cfg_in_range(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC, val)) { + hdd_err("CONC PASSIVE MAX val %d incorrect", val); retval = -EFAULT; goto sme_config_free; } - - p_cfg->nPassiveMaxChnTimeConc = val; - sme_config->csrConfig.nPassiveMaxChnTimeConc = val; - sme_update_config(mac_handle, sme_config); + ucfg_scan_cfg_set_conc_passive_dwelltime(hdd_ctx->psoc, val); } else { retval = -EINVAL; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index b04d923f4a85..8c9033605608 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -14544,11 +14544,6 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx) scan_cfg.active_dwell = cfg->nActiveMaxChnTime; scan_cfg.passive_dwell = cfg->nPassiveMaxChnTime; - scan_cfg.conc_active_dwell = cfg->nActiveMaxChnTimeConc; - scan_cfg.conc_passive_dwell = cfg->nPassiveMaxChnTimeConc; - scan_cfg.conc_max_rest_time = cfg->nRestTimeConc; - scan_cfg.conc_min_rest_time = cfg->min_rest_time_conc; - scan_cfg.conc_idle_time = cfg->idle_time_conc; /* convert to ms */ scan_cfg.scan_cache_aging_time = cfg->scanAgingTimeout * 1000; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 4a049dbb1e3c..39875fe8dc56 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1039,14 +1039,6 @@ typedef struct tagCsrConfigParam { uint32_t nActiveMaxChnTime; /* in units of milliseconds */ uint32_t nInitialDwellTime; /* in units of milliseconds */ bool initial_scan_no_dfs_chnl; - uint32_t nPassiveMaxChnTimeConc; /* in units of milliseconds */ - uint32_t nActiveMaxChnTimeConc; /* in units of milliseconds */ - uint32_t nRestTimeConc; /* in units of milliseconds */ - /*In units of milliseconds*/ - uint32_t min_rest_time_conc; - /*In units of milliseconds*/ - uint32_t idle_time_conc; - /* * in dBm, the maximum TX power The actual TX power is the lesser of * this value and 11d. If 11d is disable, the lesser of this and diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index 4acd0af84bae..413cfdb5874c 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -400,13 +400,6 @@ struct csr_config { uint32_t nInitialDwellTime; /* in units of milliseconds */ bool initial_scan_no_dfs_chnl; - uint32_t nPassiveMaxChnTimeConc;/* in units of milliseconds */ - uint32_t nActiveMaxChnTimeConc; /* in units of milliseconds */ - uint32_t nRestTimeConc; /* in units of milliseconds */ - /* In units of milliseconds */ - uint32_t min_rest_time_conc; - /* In units of milliseconds */ - uint32_t idle_time_conc; /* * in dBm, the max TX power. The actual TX power is the lesser of this * value & 11d. If 11d is disable, the lesser of this & default setting. diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index fc8ea70a00d9..127ddbdab11a 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -1672,13 +1672,6 @@ static void init_config_param(struct mac_context *mac) mac->roam.configParam.nActiveMaxChnTime = CSR_ACTIVE_MAX_CHANNEL_TIME; mac->roam.configParam.nPassiveMaxChnTime = CSR_PASSIVE_MAX_CHANNEL_TIME; - mac->roam.configParam.nActiveMaxChnTimeConc = - CSR_ACTIVE_MAX_CHANNEL_TIME_CONC; - mac->roam.configParam.nPassiveMaxChnTimeConc = - CSR_PASSIVE_MAX_CHANNEL_TIME_CONC; - mac->roam.configParam.nRestTimeConc = CSR_REST_TIME_CONC; - mac->roam.configParam.min_rest_time_conc = CSR_MIN_REST_TIME_CONC; - mac->roam.configParam.idle_time_conc = CSR_IDLE_TIME_CONC; mac->roam.configParam.nTxPowerCap = CSR_MAX_TX_POWER; mac->roam.configParam.statsReqPeriodicity = CSR_MIN_GLOBAL_STAT_QUERY_PERIOD; @@ -2544,19 +2537,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac, cfg_set_int(mac, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME, pParam->nPassiveMaxChnTime); } - if (pParam->nActiveMaxChnTimeConc) { - mac->roam.configParam.nActiveMaxChnTimeConc = - pParam->nActiveMaxChnTimeConc; - } - if (pParam->nPassiveMaxChnTimeConc) { - mac->roam.configParam.nPassiveMaxChnTimeConc = - pParam->nPassiveMaxChnTimeConc; - } - mac->roam.configParam.nRestTimeConc = pParam->nRestTimeConc; - mac->roam.configParam.min_rest_time_conc = - pParam->min_rest_time_conc; - mac->roam.configParam.idle_time_conc = pParam->idle_time_conc; - mac->roam.configParam.uCfgDot11Mode = csr_get_cfg_dot11_mode_from_csr_phy_mode(NULL, mac->roam.configParam. @@ -2777,11 +2757,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam pParam->AdHocChannel5G = cfg_params->AdHocChannel5G; pParam->nActiveMaxChnTime = cfg_params->nActiveMaxChnTime; pParam->nPassiveMaxChnTime = cfg_params->nPassiveMaxChnTime; - pParam->nActiveMaxChnTimeConc = cfg_params->nActiveMaxChnTimeConc; - pParam->nPassiveMaxChnTimeConc = cfg_params->nPassiveMaxChnTimeConc; - pParam->nRestTimeConc = cfg_params->nRestTimeConc; - pParam->min_rest_time_conc = cfg_params->min_rest_time_conc; - pParam->idle_time_conc = cfg_params->idle_time_conc; pParam->nScanResultAgeCount = cfg_params->agingCount; pParam->bCatRssiOffset = cfg_params->bCatRssiOffset; pParam->nTxPowerCap = cfg_params->nTxPowerCap;