qcacmn: Add support to acquire wake lock during user scan

Acquire wakelock to handle the case where APP's send
scan to connect. If suspend is received during scan, scan will be
aborted and APP will not get scan result and will not connect.
eg if PNO is implemented in framework.

Fix is to avoid the system suspend by taking the wake-lock
during scan. Added INI wake_lock_in_user_scan to control this.
The INI is disabled by default.

Change-Id: I62fdbbcbc6f049cb4e36e774d5a417600a2dfa86
CRs-Fixed: 2381622
This commit is contained in:
Abhishek Singh
2018-11-13 18:24:20 +05:30
committad av nshrivas
förälder 6a00f1e830
incheckning 0c1dedb899
6 ändrade filer med 142 tillägg och 7 borttagningar

Visa fil

@@ -434,6 +434,26 @@
CFG_VALUE_OR_DEFAULT, \
"minimum time spent on home channel")
/*
* <ini>
* wake_lock_in_user_scan - use wake lock during user scan
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to define if wake lock is held used during user scan req
*
* Related: Scan
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_WAKE_LOCK_IN_SCAN CFG_INI_BOOL( \
"wake_lock_in_user_scan", \
false, \
"use wake lock during scan")
/*
* <ini>
* gIdleTimeConc - Data inactivity time in msec.
@@ -464,6 +484,7 @@
#define CFG_SCAN_ALL \
CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
CFG(CFG_ENABLE_DFS_SCAN) \
CFG(CFG_INITIAL_NO_DFS_SCAN) \

Visa fil

@@ -778,6 +778,15 @@ void ucfg_scan_cfg_set_dfs_chan_scan_allowed(struct wlan_objmgr_psoc *psoc,
return wlan_scan_cfg_set_dfs_chan_scan_allowed(psoc, dfs_scan_enable);
}
/**
* ucfg_scan_wake_lock_in_user_scan() - API to determine if wake lock in user
* scan is used.
* @psoc: pointer to psoc object
*
* Return: true if wake lock in user scan is required
*/
bool ucfg_scan_wake_lock_in_user_scan(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_scan_cfg_get_conc_max_resttime() - API to get max rest time
* @psoc: pointer to psoc object