qcacmn: Add concurrent cfg items of scan

Add following scan cfg items:
CFG_ACTIVE_MAX_CHANNEL_TIME_CONC
CFG_MIN_REST_TIME
CFG_REST_TIME_CONC
CFG_PASSIVE_MAX_CHANNEL_TIME_CONC

Change-Id: I5b20ea153269f32b503d6c9cd1667d8086148871
CRs-Fixed: 2364994
This commit is contained in:
Sandeep Puligilla 2018-07-19 19:04:18 -07:00 • committed by nshrivas
commit 5957f0030a
6 changed files with 358 additions and 28 deletions

View file

@ -114,16 +114,9 @@ struct probe_time_dwell_time {
#ifdef CONFIG_MCL
#define MAX_SCAN_CACHE_SIZE 300
#define SCAN_ACTIVE_DWELL_TIME 40
#define SCAN_PASSIVE_DWELL_TIME 110
#define SCAN_MAX_REST_TIME 0
#define SCAN_MIN_REST_TIME 0
#define SCAN_BURST_DURATION 0
#define SCAN_CONC_ACTIVE_DWELL_TIME 20
#define SCAN_CONC_PASSIVE_DWELL_TIME 100
#define SCAN_CONC_IDLE_TIME 25
#define SCAN_CONC_MAX_REST_TIME 20
#define SCAN_CONC_MIN_REST_TIME 10
#define SCAN_PROBE_SPACING_TIME 0
#define SCAN_PROBE_DELAY 0
#define SCAN_MAX_SCAN_TIME 30000
@ -132,16 +125,9 @@ struct probe_time_dwell_time {
#define SCAN_CHAN_STATS_EVENT_ENAB (false)
#else
#define MAX_SCAN_CACHE_SIZE 1024
#define SCAN_ACTIVE_DWELL_TIME 105
#define SCAN_PASSIVE_DWELL_TIME 300
#define SCAN_MAX_REST_TIME 0
#define SCAN_MIN_REST_TIME 50
#define SCAN_BURST_DURATION 0
#define SCAN_CONC_ACTIVE_DWELL_TIME 0
#define SCAN_CONC_PASSIVE_DWELL_TIME 0
#define SCAN_CONC_IDLE_TIME 0
#define SCAN_CONC_MAX_REST_TIME 0
#define SCAN_CONC_MIN_REST_TIME 0
#define SCAN_PROBE_SPACING_TIME 0
#define SCAN_PROBE_DELAY 0
#define SCAN_MAX_SCAN_TIME 50000

View file

@ -66,4 +66,63 @@ void wlan_scan_cfg_set_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
void wlan_scan_cfg_get_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time);
/**
* wlan_scan_cfg_get_conc_active_dwelltime() - Get concurrent active dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active dwelltime
*
* Return: scan concurrent active dwell time
*/
void wlan_scan_cfg_get_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time);
/**
* wlan_scan_cfg_set_conc_active_dwelltime() - Set concurrent active dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active dwelltime
*
* Return: scan concurrent active dwell time
*/
void wlan_scan_cfg_set_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time);
/**
* wlan_scan_cfg_get_conc_passive_dwelltime() - Get passive concurrent dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive dwelltime
*
* Return: scan concurrent passive dwell time
*/
void wlan_scan_cfg_get_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time);
/**
* wlan_scan_cfg_set_conc_passive_dwelltime() - Set passive concurrent dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive dwelltime
*
* Return: scan concurrent passive dwell time
*/
void wlan_scan_cfg_set_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time);
/**
* wlan_scan_cfg_get_conc_max_resttime() - API to get max rest time
* @psoc: pointer to psoc object
* @rest_time: scan concurrent max resttime
*
* Return: scan concurrent max rest time
*/
void wlan_scan_cfg_get_conc_max_resttime(struct wlan_objmgr_psoc *psoc,
uint32_t *rest_time);
/**
* wlan_scan_cfg_get_conc_min_resttime() - API to get concurrent min rest time
* @psoc: pointer to psoc object
* @rest_time: scan concurrent min rest time
*
* Return: scan concurrent min rest time
*/
void wlan_scan_cfg_get_conc_min_resttime(struct wlan_objmgr_psoc *psoc,
uint32_t *rest_time);
#endif

View file

@ -121,7 +121,7 @@
*/
#define CFG_SCAN_NUM_PROBES CFG_INI_UINT(\
"gScanNumProbes",\
0, 20, MCL_OR_WIN_VALUE(0, 5),\
0, 20, MCL_OR_WIN_VALUE(0, 2),\
CFG_VALUE_OR_DEFAULT,\
"number of probes on each channel")
@ -177,7 +177,7 @@
*/
#define CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_INI_UINT(\
"hostscan_adaptive_dwell_mode",\
0, 4, 2,\
0, 4, MCL_OR_WIN_VALUE(2, 0),\
CFG_VALUE_OR_DEFAULT,\
"Enable adaptive dwell mode")
@ -267,6 +267,130 @@
#define CFG_SCAN_PNO
#endif
/*
* <ini>
* gActiveMaxChannelTimeConc - Maximum active scan time in milliseconds.
* @Min: 0
* @Max: 10000
* @Default: 40
*
* This ini is used to set maximum active scan time in STA+SAP concurrent
* mode.
*
* Related: None.
*
* Supported Feature: Concurrency
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
"gActiveMaxChannelTimeConc",\
0, 10000, MCL_OR_WIN_VALUE(40, 0),\
CFG_VALUE_OR_DEFAULT, \
"active scan time in STA+SAP concurrent")
/*
* <ini>
* gPassiveMaxChannelTimeConc - Maximum passive scan time in milliseconds.
* @Min: 0
* @Max: 10000
* @Default: 110
*
* This ini is used to set maximum passive scan time in STA+SAP concurrent
* mode.
*
* Related: None.
*
* Supported Feature: Concurrency
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
"gPassiveMaxChannelTimeConc",\
0, 10000, MCL_OR_WIN_VALUE(110, 0),\
CFG_VALUE_OR_DEFAULT, \
"Set priority for connection with bssid_hint")
/*
* <ini>
* gRestTimeConc - Rest time before moving to a new channel to scan.
* @Min: 0
* @Max: 10000
* @Default: 100
*
* This ini is used to configure rest time.
*
* Related: None.
*
* Supported Feature: Concurrency
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_MAX_REST_TIME_CONC CFG_INI_UINT(\
"nRestTimeConc",\
0, 10000, MCL_OR_WIN_VALUE(100, 0),\
CFG_VALUE_OR_DEFAULT, \
"Rest time before moving to a new channel")
/*
* <ini>
* min_rest_time_conc - Mininum time spent on home channel before moving to a
* new channel to scan.
* @Min: 0
* @Max: 50
* @Default: 50
*
* This ini is used to configure minimum time spent on home channel before
* moving to a new channel to scan.
*
* Related: None.
*
* Supported Feature: Concurrency
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_MIN_REST_TIME_CONC CFG_INI_UINT(\
"min_rest_time_conc",\
0, 50, MCL_OR_WIN_VALUE(50, 0),\
CFG_VALUE_OR_DEFAULT, \
"minimum time spent on home channel")
/*
* <ini>
* gIdleTimeConc - Data inactivity time in msec.
* @Min: 0
* @Max: 25
* @Default: 25
*
* This ini is used to configure data inactivity time in msec on bss channel
* that will be used by scan engine in firmware.
* For example if this value is 25ms then firmware will check for data
* inactivity every 25ms till gRestTimeConc is reached.
* If inactive then scan engine will move from home channel to scan the next
* frequency.
*
* Related: None.
*
* Supported Feature: Concurrency
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_IDLE_TIME_CONC CFG_INI_UINT(\
"gIdleTimeConc",\
0, 25, MCL_OR_WIN_VALUE(25, 0),\
CFG_VALUE_OR_DEFAULT, \
"data inactivity time on bss channel")
#define CFG_SCAN_ALL \
CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
@ -276,5 +400,11 @@
CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
CFG(CFG_IS_BSSID_HINT_PRIORITY) \
CFG_SCAN_PNO
CFG_SCAN_PNO \
CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
CFG(CFG_MAX_REST_TIME_CONC) \
CFG(CFG_MIN_REST_TIME_CONC) \
CFG(CFG_IDLE_TIME_CONC)
#endif

View file

@ -694,4 +694,88 @@ void ucfg_scan_cfg_get_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
return wlan_scan_cfg_get_passive_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_get_conc_active_dwelltime() - Get concurrent active dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active dwelltime
*
* Return: scan concurrent active dwell time
*/
static inline
void ucfg_scan_cfg_get_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time)
{
return wlan_scan_cfg_get_conc_active_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_set_conc_active_dwelltime() - Set concurrent active dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active dwelltime
*
* Return: scan concurrent active dwell time
*/
static inline
void ucfg_scan_cfg_set_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time)
{
return wlan_scan_cfg_set_conc_active_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_get_conc_passive_dwelltime() - Get passive concurrent dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive dwelltime
*
* Return: scan concurrent passive dwell time
*/
static inline
void ucfg_scan_cfg_get_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time)
{
return wlan_scan_cfg_get_conc_passive_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_set_conc_passive_dwelltime() - Set passive concurrent dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive dwelltime
*
* Return: scan concurrent passive dwell time
*/
static inline
void ucfg_scan_cfg_set_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time)
{
return wlan_scan_cfg_set_conc_passive_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_get_conc_max_resttime() - API to get max rest time
* @psoc: pointer to psoc object
* @rest_time: scan concurrent max resttime
*
* Return: scan concurrent max rest time
*/
static inline
void ucfg_scan_cfg_get_conc_max_resttime(struct wlan_objmgr_psoc *psoc,
uint32_t *rest_time)
{
return wlan_scan_cfg_get_conc_max_resttime(psoc, rest_time);
}
/**
* ucfg_scan_cfg_get_conc_min_resttime() - API to get concurrent min rest time
* @psoc: pointer to psoc object
* @rest_time: scan concurrent min rest time
*
* Return: scan concurrent min rest time
*/
static inline
void ucfg_scan_cfg_get_conc_min_resttime(struct wlan_objmgr_psoc *psoc,
uint32_t *rest_time)
{
return wlan_scan_cfg_get_conc_min_resttime(psoc, rest_time);
}
#endif

View file

@ -66,3 +66,75 @@ void wlan_scan_cfg_set_active_dwelltime(struct wlan_objmgr_psoc *psoc,
return;
scan_obj->scan_def.active_dwell = dwell_time;
}
void wlan_scan_cfg_get_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return;
*dwell_time = scan_obj->scan_def.conc_active_dwell;
}
void wlan_scan_cfg_set_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return;
scan_obj->scan_def.conc_active_dwell = dwell_time;
}
void wlan_scan_cfg_get_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return;
*dwell_time = scan_obj->scan_def.conc_passive_dwell;
}
void wlan_scan_cfg_set_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return;
scan_obj->scan_def.conc_passive_dwell = dwell_time;
}
void wlan_scan_cfg_get_conc_max_resttime(struct wlan_objmgr_psoc *psoc,
uint32_t *rest_time)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return;
*rest_time = scan_obj->scan_def.conc_max_rest_time;
}
void wlan_scan_cfg_get_conc_min_resttime(struct wlan_objmgr_psoc *psoc,
uint32_t *rest_time)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return;
*rest_time = scan_obj->scan_def.conc_min_rest_time;
}

View file

@ -1418,11 +1418,16 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc,
scan_obj->scan_def.sta_miracast_mcc_rest_time =
SCAN_STA_MIRACAST_MCC_REST_TIME;
scan_obj->scan_def.min_rest_time = SCAN_MIN_REST_TIME;
scan_obj->scan_def.conc_active_dwell = SCAN_CONC_ACTIVE_DWELL_TIME;
scan_obj->scan_def.conc_passive_dwell = SCAN_CONC_PASSIVE_DWELL_TIME;
scan_obj->scan_def.conc_max_rest_time = SCAN_CONC_MAX_REST_TIME;
scan_obj->scan_def.conc_min_rest_time = SCAN_CONC_MIN_REST_TIME;
scan_obj->scan_def.conc_idle_time = SCAN_CONC_IDLE_TIME;
scan_obj->scan_def.conc_active_dwell =
cfg_get(psoc, CFG_ACTIVE_MAX_CHANNEL_TIME_CONC);
scan_obj->scan_def.conc_passive_dwell =
cfg_get(psoc, CFG_PASSIVE_MAX_CHANNEL_TIME_CONC);
scan_obj->scan_def.conc_max_rest_time =
cfg_get(psoc, CFG_MAX_REST_TIME_CONC);
scan_obj->scan_def.conc_min_rest_time =
cfg_get(psoc, CFG_MIN_REST_TIME_CONC);
scan_obj->scan_def.conc_idle_time =
cfg_get(psoc, CFG_IDLE_TIME_CONC);
scan_obj->scan_def.repeat_probe_time =
cfg_get(psoc, CFG_SCAN_PROBE_REPEAT_TIME);
scan_obj->scan_def.probe_spacing_time = SCAN_PROBE_SPACING_TIME;
@ -1936,12 +1941,6 @@ QDF_STATUS ucfg_scan_update_user_config(struct wlan_objmgr_psoc *psoc,
}
scan_def = &scan_obj->scan_def;
scan_def->passive_dwell = scan_cfg->passive_dwell;
scan_def->conc_active_dwell = scan_cfg->conc_active_dwell;
scan_def->conc_passive_dwell = scan_cfg->conc_passive_dwell;
scan_def->conc_max_rest_time = scan_cfg->conc_max_rest_time;
scan_def->conc_min_rest_time = scan_cfg->conc_min_rest_time;
scan_def->conc_idle_time = scan_cfg->conc_idle_time;
scan_def->scan_cache_aging_time = scan_cfg->scan_cache_aging_time;
scan_def->prefer_5ghz = scan_cfg->prefer_5ghz;
scan_def->select_5ghz_margin = scan_cfg->select_5ghz_margin;