qcacmn: Refactor legacy ini items

Refactor the below ini item to new converged cfg/ini
infrastructure:
CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_NAME

CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_NAME - move this to scm module

Change-Id: I2980b2f3f1f451c99ceb19df87fd254a0c919c9b
CRs-Fixed: 2394241
这个提交包含在:
Pragaspathi Thilagaraj
2019-02-06 20:03:27 +05:30
提交者 nshrivas
父节点 2750c27818
当前提交 1e618d6444
修改 4 个文件,包含 61 行新增0 行删除

查看文件

@@ -321,6 +321,7 @@ struct extscan_def_config {
* @scan_priority: default scan priority * @scan_priority: default scan priority
* @adaptive_dwell_time_mode: adaptive dwell mode with connection * @adaptive_dwell_time_mode: adaptive dwell mode with connection
* @adaptive_dwell_time_mode_nc: adaptive dwell mode without connection * @adaptive_dwell_time_mode_nc: adaptive dwell mode without connection
* @extscan_adaptive_dwell_mode: Adaptive dwell mode during ext scan
* @scan_f_passive: passively scan all channels including active channels * @scan_f_passive: passively scan all channels including active channels
* @scan_f_bcast_probe: add wild card ssid prbreq even if ssid_list is specified * @scan_f_bcast_probe: add wild card ssid prbreq even if ssid_list is specified
* @scan_f_cck_rates: add cck rates to rates/xrates ie in prb req * @scan_f_cck_rates: add cck rates to rates/xrates ie in prb req
@@ -398,6 +399,7 @@ struct scan_default_params {
enum scan_priority scan_priority; enum scan_priority scan_priority;
enum scan_dwelltime_adaptive_mode adaptive_dwell_time_mode; enum scan_dwelltime_adaptive_mode adaptive_dwell_time_mode;
enum scan_dwelltime_adaptive_mode adaptive_dwell_time_mode_nc; enum scan_dwelltime_adaptive_mode adaptive_dwell_time_mode_nc;
enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
union { union {
struct { struct {
uint32_t scan_f_passive:1, uint32_t scan_f_passive:1,

查看文件

@@ -910,6 +910,38 @@
CFG_SCAN_AGING_TIME_DEFAULT, \ CFG_SCAN_AGING_TIME_DEFAULT, \
CFG_VALUE_OR_DEFAULT, \ CFG_VALUE_OR_DEFAULT, \
"scan aging time") "scan aging time")
/*
* <ini>
* extscan_adaptive_dwell_mode Enable adaptive dwell mode
* during ext scan
* @Min: 0
* @Max: 4
* @Default: 1
*
* This ini will set the algo used in dwell time optimization
* during ext scan. see enum scan_dwelltime_adaptive_mode.
* Acceptable values for this:
* 0: Default (Use firmware default mode)
* 1: Conservative optimization
* 2: Moderate optimization
* 3: Aggressive optimization
* 4: Static
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE CFG_INI_UINT( \
"extscan_adaptive_dwell_mode", \
0, \
4, \
1, \
CFG_VALUE_OR_DEFAULT, \
"ext scan adaptive dwell mode")
#define CFG_SCAN_ALL \ #define CFG_SCAN_ALL \
CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \ CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
@@ -931,6 +963,7 @@
CFG(CFG_IDLE_TIME_CONC) \ CFG(CFG_IDLE_TIME_CONC) \
CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \ CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
CFG(CFG_SCAN_AGING_TIME) \ CFG(CFG_SCAN_AGING_TIME) \
CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
CFG_SCAN_PNO CFG_SCAN_PNO
#endif /* __CONFIG_SCAN_H */ #endif /* __CONFIG_SCAN_H */

查看文件

@@ -647,6 +647,16 @@ bool ucfg_scan_get_bt_activity(struct wlan_objmgr_psoc *psoc);
*/ */
bool ucfg_scan_is_mac_spoofing_enabled(struct wlan_objmgr_psoc *psoc); bool ucfg_scan_is_mac_spoofing_enabled(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_scan_get_extscan_adaptive_dwell_mode() - API to get the adaptive dwell
* mode during ext scan
* @psoc: pointer to psoc object
*
* Return: value of type enum scan_dwelltime_adaptive_mode
*/
enum scan_dwelltime_adaptive_mode
ucfg_scan_get_extscan_adaptive_dwell_mode(struct wlan_objmgr_psoc *psoc);
/** /**
* ucfg_scan_cfg_set_active_dwelltime() - API to set scan active dwelltime * ucfg_scan_cfg_set_active_dwelltime() - API to set scan active dwelltime
* @psoc: pointer to psoc object * @psoc: pointer to psoc object

查看文件

@@ -990,6 +990,8 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_ADAPTIVE_SCAN_DWELL_MODE_NC); cfg_get(psoc, CFG_ADAPTIVE_SCAN_DWELL_MODE_NC);
scan_obj->scan_def.enable_mac_spoofing = scan_obj->scan_def.enable_mac_spoofing =
cfg_get(psoc, CFG_ENABLE_MAC_ADDR_SPOOFING); cfg_get(psoc, CFG_ENABLE_MAC_ADDR_SPOOFING);
scan_obj->scan_def.extscan_adaptive_dwell_mode =
cfg_get(psoc, CFG_ADAPTIVE_EXTSCAN_DWELL_MODE);
/* scan contrl flags */ /* scan contrl flags */
scan_obj->scan_def.scan_f_passive = true; scan_obj->scan_def.scan_f_passive = true;
@@ -1825,6 +1827,20 @@ bool ucfg_scan_is_mac_spoofing_enabled(struct wlan_objmgr_psoc *psoc)
return scan_obj->scan_def.enable_mac_spoofing; return scan_obj->scan_def.enable_mac_spoofing;
} }
enum scan_dwelltime_adaptive_mode
ucfg_scan_get_extscan_adaptive_dwell_mode(struct wlan_objmgr_psoc *psoc)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj) {
scm_err("Failed to get scan object");
return cfg_default(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE);
}
return scan_obj->scan_def.extscan_adaptive_dwell_mode;
}
QDF_STATUS QDF_STATUS
ucfg_scan_set_global_config(struct wlan_objmgr_psoc *psoc, ucfg_scan_set_global_config(struct wlan_objmgr_psoc *psoc,
enum scan_config config, uint32_t val) enum scan_config config, uint32_t val)