qcacmn: Add ini to honour NL80211 scan policy flags

Currently dwell time is determined by scan policy flags from kernel.
Sometimes when we suspect the scan result is not full enough, we need
to set dwell time by force through ini.

Add ini to decide whether to honour NL80211 scan policy flags, so that
we can disable dwell time changed by scan policy flag from kernel.

Change-Id: Ia0b9f957a7de901513479522e008e4bcbd6b2c0e
CRs-Fixed: 2428630
此提交包含在:
bings
2019-04-19 14:38:25 +08:00
提交者 nshrivas
父節點 af7c3c95d9
當前提交 47c737dba8
共有 8 個檔案被更改,包括 81 行新增7 行删除

查看文件

@@ -106,6 +106,15 @@ void wlan_scan_cfg_get_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
void wlan_scan_cfg_set_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time);
/**
* wlan_scan_cfg_honour_nl_scan_policy_flags() - API to get nl scan policy
* flags honoured
* @psoc: pointer to psoc object
*
* Return: nl scan policy flags honoured or not
*/
bool wlan_scan_cfg_honour_nl_scan_policy_flags(struct wlan_objmgr_psoc *psoc);
/**
* wlan_scan_cfg_get_conc_max_resttime() - API to get max rest time
* @psoc: pointer to psoc object

查看文件

@@ -252,6 +252,35 @@
0, 4, MCL_OR_WIN_VALUE(4, 0),\
CFG_VALUE_OR_DEFAULT,\
"Enable adaptive dwell mode without connection")
/*
* <ini>
* honour_nl_scan_policy_flags - This ini will decide whether to honour
* NL80211 scan policy flags
* @Min: 0
* @Max: 1
* @Default: 1
*
* This parameter will decide whether to honour scan flags such as
* NL80211_SCAN_FLAG_HIGH_ACCURACY , NL80211_SCAN_FLAG_LOW_SPAN,
* NL80211_SCAN_FLAG_LOW_POWER.
* Acceptable values for this:
* 0: Config is disabled
* 1: Config is enabled
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: Internal
*
* </ini>
*/
#define CFG_HONOUR_NL_SCAN_POLICY_FLAGS CFG_INI_BOOL(\
"honour_nl_scan_policy_flags",\
true, \
"honour NL80211 scan policy flags")
/*
* <ini>
* is_bssid_hint_priority - Set priority for connection with bssid_hint
@@ -1124,6 +1153,7 @@
CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
CFG(CFG_HONOUR_NL_SCAN_POLICY_FLAGS) \
CFG(CFG_IS_BSSID_HINT_PRIORITY) \
CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \

查看文件

@@ -805,6 +805,19 @@ void ucfg_scan_cfg_set_dfs_chan_scan_allowed(struct wlan_objmgr_psoc *psoc,
*/
bool ucfg_scan_wake_lock_in_user_scan(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_scan_cfg_honour_nl_scan_policy_flags() - API to get nl scan policy
* flags honoured.
* @psoc: pointer to psoc object
*
* Return: nl scan flags is honoured or not
*/
static inline
bool ucfg_scan_cfg_honour_nl_scan_policy_flags(struct wlan_objmgr_psoc *psoc)
{
return wlan_scan_cfg_honour_nl_scan_policy_flags(psoc);
}
/**
* ucfg_scan_cfg_get_conc_max_resttime() - API to get max rest time
* @psoc: pointer to psoc object

查看文件

@@ -141,6 +141,17 @@ wlan_scan_cfg_set_dfs_chan_scan_allowed(struct wlan_objmgr_psoc *psoc,
scan_obj->scan_def.allow_dfs_chan_in_scan = enable_dfs_scan;
}
bool wlan_scan_cfg_honour_nl_scan_policy_flags(struct wlan_objmgr_psoc *psoc)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return false;
return scan_obj->scan_def.honour_nl_scan_policy_flags;
}
void wlan_scan_cfg_get_conc_max_resttime(struct wlan_objmgr_psoc *psoc,
uint32_t *rest_time)
{

查看文件

@@ -992,6 +992,8 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_ADAPTIVE_SCAN_DWELL_MODE);
scan_obj->scan_def.adaptive_dwell_time_mode_nc =
cfg_get(psoc, CFG_ADAPTIVE_SCAN_DWELL_MODE_NC);
scan_obj->scan_def.honour_nl_scan_policy_flags =
cfg_get(psoc, CFG_HONOUR_NL_SCAN_POLICY_FLAGS);
scan_obj->scan_def.enable_mac_spoofing =
cfg_get(psoc, CFG_ENABLE_MAC_ADDR_SPOOFING);
scan_obj->scan_def.extscan_adaptive_dwell_mode =