qcacmn: Add support for dynamic dwell time in 6G

Currently, there is no provision for dynamic dwell time control in 6G.

Update existing driver commands SETDWELLTIME and GETDWELLTIME to
support 6G.

Change-Id: Id284097e300f3ed45557ebe7ea2287e0da9a485b
CRs-Fixed: 2789720
This commit is contained in:
Bapiraju Alla 2020-10-01 16:51:19 +05:30 • committed by Gerrit - the friendly Code Review server
commit dfa4f31e16
3 changed files with 160 additions and 0 deletions

View file

@ -48,6 +48,49 @@ void wlan_scan_cfg_set_active_2g_dwelltime(struct wlan_objmgr_psoc *psoc,
void wlan_scan_cfg_get_active_2g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time);
#ifdef CONFIG_BAND_6GHZ
/**
* wlan_scan_cfg_set_active_6g_dwelltime() - API to set scan active 6g dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active dwell time
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_scan_cfg_set_active_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time);
/**
* wlan_scan_cfg_get_active_6g_dwelltime() - API to get active 6g dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active dwelltime
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_scan_cfg_get_active_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time);
/**
* wlan_scan_cfg_set_passive_6g_dwelltime() - API to set scan passive 6g
* dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive dwell time
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_scan_cfg_set_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time);
/**
* wlan_scan_cfg_get_passive_6g_dwelltime() - API to get passive 6g dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive dwelltime
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_scan_cfg_get_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time);
#endif
/**
* wlan_scan_cfg_set_active_dwelltime() - API to set scan active dwelltime
* @psoc: pointer to psoc object

View file

@ -743,6 +743,65 @@ void ucfg_scan_cfg_get_active_2g_dwelltime(struct wlan_objmgr_psoc *psoc,
return wlan_scan_cfg_get_active_2g_dwelltime(psoc, dwell_time);
}
#ifdef CONFIG_BAND_6GHZ
/**
* ucfg_scan_cfg_set_active_6g_dwelltime() - API to set scan active 6g dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active dwell time
*
* Return: QDF_STATUS
*/
static inline
QDF_STATUS ucfg_scan_cfg_set_active_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time)
{
return wlan_scan_cfg_set_active_6g_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_get_passive_6g_dwelltime() - API to get passive 6g dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive 6g dwelltime
*
* Return: QDF_STATUS
*/
static inline
QDF_STATUS ucfg_scan_cfg_get_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time)
{
return wlan_scan_cfg_get_passive_6g_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_set_passive_6g_dwelltime() - API to set scan passive 6g
* dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan passive dwell time
*
* Return: QDF_STATUS
*/
static inline
QDF_STATUS ucfg_scan_cfg_set_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t dwell_time)
{
return wlan_scan_cfg_set_passive_6g_dwelltime(psoc, dwell_time);
}
/**
* ucfg_scan_cfg_get_active_6g_dwelltime() - API to get active 6g dwelltime
* @psoc: pointer to psoc object
* @dwell_time: scan active 6g dwelltime
*
* Return: QDF_STATUS
*/
static inline
QDF_STATUS ucfg_scan_cfg_get_active_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time)
{
return wlan_scan_cfg_get_active_6g_dwelltime(psoc, dwell_time);
}
#endif
/**
* ucfg_scan_cfg_get_conc_active_dwelltime() - Get concurrent active dwelltime
* @psoc: pointer to psoc object

View file

@ -91,6 +91,64 @@ void wlan_scan_cfg_set_active_2g_dwelltime(struct wlan_objmgr_psoc *psoc,
scan_obj->scan_def.active_dwell_2g = dwell_time;
}
#ifdef CONFIG_BAND_6GHZ
QDF_STATUS wlan_scan_cfg_get_active_6g_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 QDF_STATUS_E_INVAL;
*dwell_time = scan_obj->scan_def.active_dwell_6g;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_scan_cfg_set_active_6g_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 QDF_STATUS_E_INVAL;
scan_obj->scan_def.active_dwell_6g = dwell_time;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_scan_cfg_get_passive_6g_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 QDF_STATUS_E_INVAL;
*dwell_time = scan_obj->scan_def.passive_dwell_6g;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_scan_cfg_set_passive_6g_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 QDF_STATUS_E_INVAL;
scan_obj->scan_def.passive_dwell_6g = dwell_time;
return QDF_STATUS_SUCCESS;
}
#endif
void wlan_scan_cfg_get_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
uint32_t *dwell_time)
{