qcacld-3.0: Get schedule scan params using cfg_get

Get schedule scan param values using cfg_get

Change-Id: I62543f87dceeb1698f912a7bb65d1850fc3d541e
CRs-Fixed: 2324157
This commit is contained in:
Dundi Raviteja 2018-09-17 19:57:26 +05:30 • committed by nshrivas
commit c5a9556365
3 changed files with 21 additions and 67 deletions

View file

@ -7044,52 +7044,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_5G_MAX_RSSI_PENALIZE_MAX (20)
#define CFG_5G_MAX_RSSI_PENALIZE_DEFAULT (10)
/*
* <ini>
* g_max_sched_scan_plan_int - pno sched max scan plan interval.
* @Min: 1
* @Max: 7200
* @Default: 3600
*
* This ini is used to set max sched scan plan interval for pno scan
* (value in seconds).
*
* Related: gPNOScanSupport
*
* Supported Feature: PNO scan
*
* Usage: External
*
* </ini>
*/
#define CFG_MAX_SCHED_SCAN_PLAN_INT_NAME "g_max_sched_scan_plan_int"
#define CFG_MAX_SCHED_SCAN_PLAN_INT_MIN (1)
#define CFG_MAX_SCHED_SCAN_PLAN_INT_MAX (7200)
#define CFG_MAX_SCHED_SCAN_PLAN_INT_DEFAULT (3600)
/*
* <ini>
* g_max_sched_scan_plan_iterations - pno sched max scan plan iterations.
* @Min: 1
* @Max: 100
* @Default: 10
*
* This ini is used to set max sched scan plan iterations for pno scan
* (value in seconds).
*
* Related: gPNOScanSupport
*
* Supported Feature: PNO scan
*
* Usage: External
*
* </ini>
*/
#define CFG_MAX_SCHED_SCAN_PLAN_ITRNS_NAME "g_max_sched_scan_plan_iterations"
#define CFG_MAX_SCHED_SCAN_PLAN_ITRNS_MIN (1)
#define CFG_MAX_SCHED_SCAN_PLAN_ITRNS_MAX (100)
#define CFG_MAX_SCHED_SCAN_PLAN_ITRNS_DEFAULT (10)
/*
* <ini>
* gPowerUsage - Preferred Power Usage
@ -9174,8 +9128,6 @@ struct hdd_config {
bool goptimize_chan_avoid_event;
bool fw_timeout_crash;
uint32_t rx_wakelock_timeout;
uint32_t max_sched_scan_plan_interval;
uint32_t max_sched_scan_plan_iterations;
bool sap_internal_restart;
enum restart_beaconing_on_ch_avoid_rule
restart_beaconing_on_chan_avoid_event;

View file

@ -2908,19 +2908,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_RX_WAKELOCK_TIMEOUT_MIN,
CFG_RX_WAKELOCK_TIMEOUT_MAX),
REG_VARIABLE(CFG_MAX_SCHED_SCAN_PLAN_INT_NAME, WLAN_PARAM_Integer,
struct hdd_config, max_sched_scan_plan_interval,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_MAX_SCHED_SCAN_PLAN_INT_DEFAULT,
CFG_MAX_SCHED_SCAN_PLAN_INT_MIN,
CFG_MAX_SCHED_SCAN_PLAN_INT_MAX),
REG_VARIABLE(CFG_MAX_SCHED_SCAN_PLAN_ITRNS_NAME, WLAN_PARAM_Integer,
struct hdd_config, max_sched_scan_plan_iterations,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_MAX_SCHED_SCAN_PLAN_ITRNS_DEFAULT,
CFG_MAX_SCHED_SCAN_PLAN_ITRNS_MIN,
CFG_MAX_SCHED_SCAN_PLAN_ITRNS_MAX),
REG_VARIABLE(CFG_RESTART_BEACONING_ON_CH_AVOID_NAME, WLAN_PARAM_Integer,
struct hdd_config, restart_beaconing_on_chan_avoid_event,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

View file

@ -11825,18 +11825,33 @@ static void wlan_hdd_cfg80211_add_connected_pno_support(struct wiphy *wiphy)
static void hdd_config_sched_scan_plans_to_wiphy(struct wiphy *wiphy,
struct hdd_config *config)
{
struct wlan_objmgr_psoc *psoc;
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
psoc = hdd_ctx->psoc;
if (!psoc) {
hdd_err("Invalid psoc");
return;
}
if (config->configPNOScanSupport) {
hdd_wiphy_set_max_sched_scans(wiphy, 1);
wiphy->max_sched_scan_ssids = SCAN_PNO_MAX_SUPP_NETWORKS;
wiphy->max_match_sets = SCAN_PNO_MAX_SUPP_NETWORKS;
wiphy->max_sched_scan_ie_len = SIR_MAC_MAX_IE_LENGTH;
wiphy->max_sched_scan_plans = SCAN_PNO_MAX_PLAN_REQUEST;
if (config->max_sched_scan_plan_interval)
wiphy->max_sched_scan_plan_interval =
config->max_sched_scan_plan_interval;
if (config->max_sched_scan_plan_iterations)
wiphy->max_sched_scan_plan_iterations =
config->max_sched_scan_plan_iterations;
/*
* Exception: Using cfg_get() here because these two
* schedule scan params are used only at this place
* to copy to wiphy structure
*/
wiphy->max_sched_scan_plan_interval =
cfg_get(psoc, CFG_MAX_SCHED_SCAN_PLAN_INTERVAL);
wiphy->max_sched_scan_plan_iterations =
cfg_get(psoc, CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS);
}
}
#else