qcacld-3.0: Clean up adaptive dwell time params CFG

Clean following adapative dwell time params
CFG/INI item.
CFG_ADAPTIVE_DWELL_MODE_ENABLED
CFG_GLOBAL_ADAPTIVE_DWELL_MODE
CFG_ADAPT_DWELL_LPF_WEIGHT
CFG_ADAPT_DWELL_PASMON_INTVAL
CFG_ADAPT_DWELL_WIFI_THRESH

Change-Id: Iebc8507b0eefe52969f928d98473f99d69095480
CRs-Fixed: 2378488
此提交包含在:
Harprit Chhabada
2019-01-08 16:40:43 -08:00
提交者 nshrivas
父節點 bcd175cca1
當前提交 23c0c11170
共有 6 個檔案被更改,包括 445 行新增4 行删除

查看文件

@@ -0,0 +1,160 @@
/*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: This file contains adaptive dwell components.
*/
#ifndef __CFG_ADAPTIVE_DWELLTIME_H
#define __CFG_ADAPTIVE_DWELLTIME_H
/*
* <ini>
* adaptive_dwell_mode_enabled - enable/disable the adaptive dwell config.
* @Min: 0
* @Max: 1
* @Default: 1
*
*
* This ini will globally disable/enable the adaptive dwell config.
* Following parameters will set different values of attributes for dwell
* time optimization thus reducing total scan time.
* Acceptable values for this:
* 0: Config is disabled
* 1: Config is enabled
*
* Related: None.
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_ADAPTIVE_DWELL_MODE_ENABLED CFG_INI_BOOL(\
"adaptive_dwell_mode_enabled",\
1, \
"enable the adaptive dwell config")
/*
* <ini>
* global_adapt_dwelltime_mode - set default adaptive mode.
* @Min: 0
* @Max: 4
* @Default: 0
*
* This ini will set default adaptive mode, will be used if any of the
* scan dwell mode is set to default.
* For uses : see enum scan_dwelltime_adaptive_mode
*
* Related: None.
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_GLOBAL_ADAPTIVE_DWELL_MODE CFG_INI_UINT(\
"global_adapt_dwelltime_mode",\
0, 4, 0,\
CFG_VALUE_OR_DEFAULT, \
"set default adaptive mode")
/*
* <ini>
* adapt_dwell_lpf_weight - weight to caclulate avg low pass filter.
* @Min: 0
* @Max: 100
* @Default: 80
*
* This ini is used to set the weight to calculate
* the average low pass filter for channel congestion.
* Acceptable values for this: 0-100 (In %)
*
* Related: None.
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_ADAPT_DWELL_LPF_WEIGHT CFG_INI_UINT(\
"adapt_dwell_lpf_weight",\
0, 100, 80,\
CFG_VALUE_OR_DEFAULT, \
"weight to calc avg low pass filter")
/*
* <ini>
* adapt_dwell_passive_mon_intval - Interval to monitor passive scan in msec.
* @Min: 0
* @Max: 25
* @Default: 10
*
* This ini is used to set interval to monitor wifi
* activity in passive scan in milliseconds.
*
* Related: None.
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_ADAPT_DWELL_PASMON_INTVAL CFG_INI_UINT(\
"adapt_dwell_passive_mon_intval",\
0, 25, 10,\
CFG_VALUE_OR_DEFAULT, \
"interval to monitor passive scan")
/*
* <ini>
* adapt_dwell_wifi_act_threshold - % of wifi activity used in passive scan
* @Min: 0
* @Max: 100
* @Default: 10
*
* This ini is used to set % of wifi activity used in passive scan
* Acceptable values for this: 0-100 (in %)
*
* Related: None.
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_ADAPT_DWELL_WIFI_THRESH CFG_INI_UINT(\
"adapt_dwell_wifi_act_threshold",\
0, 100, 10,\
CFG_VALUE_OR_DEFAULT, \
"percent of wifi activity in pas scan")
#define CFG_ADAPTIVE_DWELLTIME_ALL \
CFG(CFG_ADAPTIVE_DWELL_MODE_ENABLED) \
CFG(CFG_GLOBAL_ADAPTIVE_DWELL_MODE) \
CFG(CFG_ADAPT_DWELL_LPF_WEIGHT) \
CFG(CFG_ADAPT_DWELL_PASMON_INTVAL) \
CFG(CFG_ADAPT_DWELL_WIFI_THRESH)
#endif

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012 - 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012 - 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -27,8 +27,10 @@
#include "cfg_ie_whitelist.h"
#include "cfg_fwol_generic.h"
#include "cfg_neighbor_roam.h"
#include "cfg_adaptive_dwelltime.h"
#define CFG_FWOL_ALL \
CFG_ADAPTIVE_DWELLTIME_ALL \
CFG_11K_ALL \
CFG_COEX_ALL \
CFG_FWOL_GENERIC_ALL \

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -383,4 +383,112 @@ QDF_STATUS ucfg_fwol_get_enable_tx_sch_delay(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS ucfg_fwol_get_enable_secondary_rate(struct wlan_objmgr_psoc *psoc,
uint32_t *enable_secondary_rate);
/**
* ucfg_fwol_get_all_adaptive_dwelltime_params() - Get all adaptive
dwelltime_params
* @psoc: Pointer to psoc object
* @dwelltime_params: Pointer to struct adaptive_dwelltime_params
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_all_adaptive_dwelltime_params(
struct wlan_objmgr_psoc *psoc,
struct adaptive_dwelltime_params *dwelltime_params);
/**
* ucfg_fwol_get_adaptive_dwell_mode_enabled() - API to globally disable/enable
* the adaptive dwell config.
* Acceptable values for this:
* 0: Config is disabled
* 1: Config is enabled
*
* @psoc: pointer to psoc object
* @adaptive_dwell_mode_enabled: adaptive dwell mode enable/disable
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_adaptive_dwell_mode_enabled(struct wlan_objmgr_psoc *psoc,
bool *adaptive_dwell_mode_enabled);
/**
* ucfg_fwol_get_global_adapt_dwelltime_mode() - API to set default
* adaptive mode.
* It will be used if any of the scan dwell mode is set to default.
* For uses : see enum scan_dwelltime_adaptive_mode
*
* @psoc: pointer to psoc object
* global_adapt_dwelltime_mode@: global adaptive dwell mode value
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_global_adapt_dwelltime_mode(struct wlan_objmgr_psoc *psoc,
uint8_t *global_adapt_dwelltime_mode);
/**
* ucfg_fwol_get_adapt_dwell_lpf_weight() - API to get weight to calculate
* the average low pass filter for channel congestion
* @psoc: pointer to psoc object
* @adapt_dwell_lpf_weight: adaptive low pass filter weight
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_adapt_dwell_lpf_weight(struct wlan_objmgr_psoc *psoc,
uint8_t *adapt_dwell_lpf_weight);
/**
* ucfg_fwol_get_adapt_dwell_passive_mon_intval() - API to get interval value
* for montitoring wifi activity in passive scan in msec.
* @psoc: pointer to psoc object
* @adapt_dwell_passive_mon_intval: adaptive monitor interval in passive scan
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_adapt_dwell_passive_mon_intval(
struct wlan_objmgr_psoc *psoc,
uint8_t *adapt_dwell_passive_mon_intval);
/**
* ucfg_fwol_get_adapt_dwell_wifi_act_threshold - API to get % of wifi activity
* used in passive scan
* @psoc: pointer to psoc object
* @adapt_dwell_wifi_act_threshold: percent of wifi activity in passive scan
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_adapt_dwell_wifi_act_threshold(
struct wlan_objmgr_psoc *psoc,
uint8_t *adapt_dwell_wifi_act_threshold);
/**
* ucfg_fwol_init_adapt_dwelltime_in_cfg - API to initialize adaptive
* dwell params
* @psoc: pointer to psoc object
* @adaptive_dwelltime_params: pointer to adaptive_dwelltime_params structure
*
* Return: QDF Status
*/
static inline QDF_STATUS
ucfg_fwol_init_adapt_dwelltime_in_cfg(
struct wlan_objmgr_psoc *psoc,
struct adaptive_dwelltime_params *dwelltime_params)
{
return fwol_init_adapt_dwelltime_in_cfg(psoc, dwelltime_params);
}
/**
* ucfg_fwol_set_adaptive_dwelltime_config - API to set adaptive
* dwell params config
* @adaptive_dwelltime_params: adaptive_dwelltime_params structure
*
* Return: QDF Status
*/
static inline QDF_STATUS
ucfg_fwol_set_adaptive_dwelltime_config(
struct adaptive_dwelltime_params *dwelltime_params)
{
return fwol_set_adaptive_dwelltime_config(dwelltime_params);
}
#endif /* _WLAN_FWOL_UCFG_API_H_ */