qcacmn: Add ini parameters to control the burst duration
Add ini parameters to control the scan burst duration in STA, SAP
and GO cases.
Change-Id: Ib9f0cdae660b6d425887fefebf9e64f9ac977593
CRs-Fixed: 2398746
This commit is contained in:
@@ -396,6 +396,10 @@ struct scan_default_params {
|
||||
uint32_t usr_cfg_num_probes;
|
||||
uint16_t max_bss_per_pdev;
|
||||
uint32_t max_active_scans_allowed;
|
||||
uint8_t sta_scan_burst_duration;
|
||||
uint8_t p2p_scan_burst_duration;
|
||||
uint8_t go_scan_burst_duration;
|
||||
uint8_t ap_scan_burst_duration;
|
||||
enum scan_priority scan_priority;
|
||||
enum scan_dwelltime_adaptive_mode adaptive_dwell_time_mode;
|
||||
enum scan_dwelltime_adaptive_mode adaptive_dwell_time_mode_nc;
|
||||
|
@@ -644,19 +644,24 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
|
||||
* of channels in every transition by using
|
||||
* burst scan.
|
||||
*/
|
||||
req->scan_req.burst_duration =
|
||||
scm_scan_get_burst_duration(
|
||||
req->scan_req.dwell_time_active,
|
||||
scan_obj->miracast_enabled);
|
||||
if (scan_obj->scan_def.go_scan_burst_duration)
|
||||
req->scan_req.burst_duration =
|
||||
scan_obj->
|
||||
scan_def.go_scan_burst_duration;
|
||||
else
|
||||
req->scan_req.burst_duration =
|
||||
scm_scan_get_burst_duration(
|
||||
req->scan_req.
|
||||
dwell_time_active,
|
||||
scan_obj->
|
||||
miracast_enabled);
|
||||
break;
|
||||
}
|
||||
if ((sta_active || p2p_cli_present) &&
|
||||
!req->scan_req.burst_duration) {
|
||||
/*
|
||||
* Typical background scan.
|
||||
* Disable burst scan for now.
|
||||
*/
|
||||
req->scan_req.burst_duration = 0;
|
||||
if ((sta_active || p2p_cli_present)) {
|
||||
if (scan_obj->scan_def.sta_scan_burst_duration)
|
||||
req->scan_req.burst_duration =
|
||||
scan_obj->scan_def.
|
||||
sta_scan_burst_duration;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -707,11 +712,17 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
|
||||
req->scan_req.dwell_time_passive =
|
||||
req->scan_req.dwell_time_active;
|
||||
}
|
||||
req->scan_req.burst_duration = 0;
|
||||
if (utils_is_dfs_ch(pdev, ap_chan))
|
||||
|
||||
if (scan_obj->scan_def.ap_scan_burst_duration) {
|
||||
req->scan_req.burst_duration =
|
||||
SCAN_BURST_SCAN_MAX_NUM_OFFCHANNELS *
|
||||
req->scan_req.dwell_time_active;
|
||||
scan_obj->scan_def.ap_scan_burst_duration;
|
||||
} else {
|
||||
req->scan_req.burst_duration = 0;
|
||||
if (utils_is_dfs_ch(pdev, ap_chan))
|
||||
req->scan_req.burst_duration =
|
||||
SCAN_BURST_SCAN_MAX_NUM_OFFCHANNELS *
|
||||
req->scan_req.dwell_time_active;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -860,22 +871,27 @@ scm_scan_req_update_params(struct wlan_objmgr_vdev *vdev,
|
||||
else
|
||||
req->scan_req.repeat_probe_time =
|
||||
req->scan_req.dwell_time_active / 3;
|
||||
|
||||
req->scan_req.burst_duration =
|
||||
BURST_SCAN_MAX_NUM_OFFCHANNELS *
|
||||
req->scan_req.dwell_time_active;
|
||||
if (req->scan_req.burst_duration >
|
||||
P2P_SCAN_MAX_BURST_DURATION) {
|
||||
uint8_t channels =
|
||||
P2P_SCAN_MAX_BURST_DURATION /
|
||||
req->scan_req.dwell_time_active;
|
||||
if (channels)
|
||||
req->scan_req.burst_duration =
|
||||
if (scan_obj->scan_def.p2p_scan_burst_duration) {
|
||||
req->scan_req.burst_duration =
|
||||
scan_obj->scan_def.
|
||||
p2p_scan_burst_duration;
|
||||
} else {
|
||||
req->scan_req.burst_duration =
|
||||
BURST_SCAN_MAX_NUM_OFFCHANNELS *
|
||||
req->scan_req.dwell_time_active;
|
||||
if (req->scan_req.burst_duration >
|
||||
P2P_SCAN_MAX_BURST_DURATION) {
|
||||
uint8_t channels =
|
||||
P2P_SCAN_MAX_BURST_DURATION /
|
||||
req->scan_req.dwell_time_active;
|
||||
if (channels)
|
||||
req->scan_req.burst_duration =
|
||||
channels *
|
||||
req->scan_req.dwell_time_active;
|
||||
else
|
||||
req->scan_req.burst_duration =
|
||||
else
|
||||
req->scan_req.burst_duration =
|
||||
P2P_SCAN_MAX_BURST_DURATION;
|
||||
}
|
||||
}
|
||||
req->scan_req.scan_ev_bss_chan = false;
|
||||
}
|
||||
|
@@ -943,6 +943,108 @@
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"ext scan adaptive dwell mode")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* sta_scan_burst_duration - Burst duration in case of split scan.
|
||||
* @Min: 0
|
||||
* @Max: 180
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to set burst duration of sta scan requests.
|
||||
*
|
||||
* Related: None.
|
||||
*
|
||||
* Supported Feature: Concurrency
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_STA_SCAN_BURST_DURATION CFG_INI_UINT( \
|
||||
"sta_scan_burst_duration", \
|
||||
0, \
|
||||
180, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"sta scan burst duration")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* p2p_scan_burst_duration - Burst duration in case of split scan for p2p scan.
|
||||
* @Min: 0
|
||||
* @Max: 180
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to set burst duration of scan for p2p scan requests.
|
||||
*
|
||||
* Related: None.
|
||||
*
|
||||
* Supported Feature: Concurrency
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
|
||||
#define CFG_P2P_SCAN_BURST_DURATION CFG_INI_UINT( \
|
||||
"p2p_scan_burst_duration", \
|
||||
0, \
|
||||
180, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"p2p scan burst duration")
|
||||
/*
|
||||
* <ini>
|
||||
* go_scan_burst_duration - Burst duration in case of split scan when GO is
|
||||
* active.
|
||||
* @Min: 0
|
||||
* @Max: 180
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to set burst duration of scan when GO is active.
|
||||
*
|
||||
* Related: None.
|
||||
*
|
||||
* Supported Feature: Concurrency
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_GO_SCAN_BURST_DURATION CFG_INI_UINT( \
|
||||
"go_scan_burst_duration", \
|
||||
0, \
|
||||
180, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"go scan burst duration")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* ap_scan_burst_duration - Burst duration in case of split scan when ap
|
||||
* is active.
|
||||
* @Min: 0
|
||||
* @Max: 32
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to set burst duration of scan when SAP is active.
|
||||
*
|
||||
* Related: None.
|
||||
*
|
||||
* Supported Feature: Concurrency
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_AP_SCAN_BURST_DURATION CFG_INI_UINT( \
|
||||
"ap_scan_burst_duration", \
|
||||
0, \
|
||||
32, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"ap scan burst duration")
|
||||
|
||||
#define CFG_SCAN_ALL \
|
||||
CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
|
||||
CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
|
||||
@@ -964,6 +1066,10 @@
|
||||
CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
|
||||
CFG(CFG_SCAN_AGING_TIME) \
|
||||
CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
|
||||
CFG(CFG_STA_SCAN_BURST_DURATION) \
|
||||
CFG(CFG_P2P_SCAN_BURST_DURATION) \
|
||||
CFG(CFG_GO_SCAN_BURST_DURATION) \
|
||||
CFG(CFG_AP_SCAN_BURST_DURATION) \
|
||||
CFG_SCAN_PNO
|
||||
|
||||
#endif /* __CONFIG_SCAN_H */
|
||||
|
@@ -993,6 +993,15 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc,
|
||||
scan_obj->scan_def.extscan_adaptive_dwell_mode =
|
||||
cfg_get(psoc, CFG_ADAPTIVE_EXTSCAN_DWELL_MODE);
|
||||
|
||||
/* init burst durations */
|
||||
scan_obj->scan_def.sta_scan_burst_duration =
|
||||
cfg_get(psoc, CFG_STA_SCAN_BURST_DURATION);
|
||||
scan_obj->scan_def.p2p_scan_burst_duration =
|
||||
cfg_get(psoc, CFG_P2P_SCAN_BURST_DURATION);
|
||||
scan_obj->scan_def.go_scan_burst_duration =
|
||||
cfg_get(psoc, CFG_GO_SCAN_BURST_DURATION);
|
||||
scan_obj->scan_def.ap_scan_burst_duration =
|
||||
cfg_get(psoc, CFG_AP_SCAN_BURST_DURATION);
|
||||
/* scan contrl flags */
|
||||
scan_obj->scan_def.scan_f_passive = true;
|
||||
scan_obj->scan_def.scan_f_ofdm_rates = true;
|
||||
|
Reference in New Issue
Block a user