qcacld-3.0: Add FW offload INI items (1)

Relocate the following ini items to the FW offload component.

CFG_ENABLE_ANI - gEnableANI
CFG_SET_RTS_FOR_SIFS_BURSTING - gSetRTSForSIFSBursting
CFG_MAX_MPDUS_IN_AMPDU - gMaxMPDUsInAMPDU
CFG_ARP_AC_CATEGORY - arp_ac_category
CFG_ENABLE_PHY_REG - gEnableFastPwrTransition
CFG_UPPER_BRSSI_THRESH - gUpperBrssiThresh
CFG_LOWER_BRSSI_THRESH - gLowerBrssiThresh
CFG_DTIM_1CHRX_ENABLE - gDtim1ChRxEnable
CFG_ENABLE_COEX_ALT_CHAINMASK - gEnableAlternativeChainmask

Change-Id: I5046edec1a668e198ed4fcc997a0d24affe342ea
CRs-Fixed: 2312897
This commit is contained in:
Sourav Mohapatra
2018-09-07 12:28:52 +05:30
committed by nshrivas
parent c8063ab0fc
commit 14f7562015
6 changed files with 498 additions and 2 deletions

View File

@@ -112,11 +112,30 @@ struct wlan_fwol_ie_whitelist {
* coex_config: coex config items * coex_config: coex config items
* thermal_temp_cfg: Thermal temperature related config items * thermal_temp_cfg: Thermal temperature related config items
* ie_whitelist_cfg: IE Whitelist related config items * ie_whitelist_cfg: IE Whitelist related config items
* @ani_enabled: ANI enable/disable
* @enable_rts_sifsbursting: Enable RTS SIFS Bursting
* @max_mpdus_inampdu: Max number of MPDUS
* @arp_ac_category: ARP AC category
* @enable_phy_reg_retention: Enable PHY reg retention
* @upper_brssi_thresh: Upper BRSSI threshold
* @lower_brssi_thresh: Lower BRSSI threshold
* @enable_dtim_1chrx: Enable/disable DTIM 1 CHRX
* @alternative_chainmask_enabled: Alternate chainmask
*/ */
struct wlan_fwol_cfg { struct wlan_fwol_cfg {
/* Add CFG and INI items here */
struct wlan_fwol_coex_config coex_config; struct wlan_fwol_coex_config coex_config;
struct wlan_fwol_thermal_temp thermal_temp_cfg; struct wlan_fwol_thermal_temp thermal_temp_cfg;
struct wlan_fwol_ie_whitelist ie_whitelist_cfg; struct wlan_fwol_ie_whitelist ie_whitelist_cfg;
bool ani_enabled;
bool enable_rts_sifsbursting;
uint8_t max_mpdus_inampdu;
uint32_t arp_ac_category;
uint8_t enable_phy_reg_retention;
uint16_t upper_brssi_thresh;
uint16_t lower_brssi_thresh;
bool enable_dtim_1chrx;
bool alternative_chainmask_enabled;
}; };
/** /**

View File

@@ -108,6 +108,17 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
fwol_init_coex_config_in_cfg(psoc, &fwol_cfg->coex_config); fwol_init_coex_config_in_cfg(psoc, &fwol_cfg->coex_config);
fwol_init_thermal_temp_in_cfg(psoc, &fwol_cfg->thermal_temp_cfg); fwol_init_thermal_temp_in_cfg(psoc, &fwol_cfg->thermal_temp_cfg);
fwol_init_ie_whiltelist_in_cfg(psoc, &fwol_cfg->ie_whitelist_cfg); fwol_init_ie_whiltelist_in_cfg(psoc, &fwol_cfg->ie_whitelist_cfg);
fwol_cfg->ani_enabled = cfg_get(psoc, CFG_ENABLE_ANI);
fwol_cfg->enable_rts_sifsbursting =
cfg_get(psoc, CFG_SET_RTS_FOR_SIFS_BURSTING);
fwol_cfg->max_mpdus_inampdu = cfg_get(psoc, CFG_MAX_MPDUS_IN_AMPDU);
fwol_cfg->arp_ac_category = cfg_get(psoc, CFG_ARP_AC_CATEGORY);
fwol_cfg->enable_phy_reg_retention = cfg_get(psoc, CFG_ENABLE_PHY_REG);
fwol_cfg->upper_brssi_thresh = cfg_get(psoc, CFG_UPPER_BRSSI_THRESH);
fwol_cfg->lower_brssi_thresh = cfg_get(psoc, CFG_LOWER_BRSSI_THRESH);
fwol_cfg->enable_dtim_1chrx = cfg_get(psoc, CFG_DTIM_1CHRX_ENABLE);
fwol_cfg->alternative_chainmask_enabled =
cfg_get(psoc, CFG_ENABLE_COEX_ALT_CHAINMASK);
return status; return status;
} }

View File

@@ -22,13 +22,14 @@
#include "cfg_define.h" #include "cfg_define.h"
#include "cfg_converged.h" #include "cfg_converged.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "cfg_coex.h" #include "cfg_coex.h"
#include "cfg_thermal_temp.h" #include "cfg_thermal_temp.h"
#include "cfg_ie_whitelist.h" #include "cfg_ie_whitelist.h"
#include "cfg_fwol_generic.h"
#define CFG_FWOL_ALL \ #define CFG_FWOL_ALL \
CFG_COEX_ALL \ CFG_COEX_ALL \
CFG_FWOL_GENERIC_ALL \
CFG_IE_WHITELIST \ CFG_IE_WHITELIST \
CFG_THERMAL_TEMP_ALL CFG_THERMAL_TEMP_ALL

View File

@@ -0,0 +1,248 @@
/*
* Copyright (c) 2012-2018 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 centralized definitions of converged configuration.
*/
#ifndef __CFG_FWOL_GENERIC_H
#define __CFG_FWOL_GENERIC_H
/*
*
* <ini>
* gEnableANI - Enable Adaptive Noise Immunity
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable or disable Adaptive Noise Immunity.
*
* Related: None
*
* Supported Feature: ANI
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_ANI CFG_INI_BOOL( \
"gEnableANI", \
1, \
"Enable/Disable Adaptive Noise Immunity")
/**
* gSetRTSForSIFSBursting - set rts for sifs bursting
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini set rts for sifs bursting
*
* Usage: External
*
* </ini>
*/
#define CFG_SET_RTS_FOR_SIFS_BURSTING CFG_INI_BOOL( \
"gSetRTSForSIFSBursting", \
0, \
"Set rts for sifs bursting")
/**
* <ini>
* gMaxMPDUsInAMPDU - max mpdus in ampdu
* @Min: 0
* @Max: 64
* @Default: 0
*
* This ini configure max mpdus in ampdu
*
* Usage: External
*
* </ini>
*/
#define CFG_MAX_MPDUS_IN_AMPDU CFG_INI_INT( \
"gMaxMPDUsInAMPDU", \
0, \
64, \
0, \
CFG_VALUE_OR_DEFAULT, \
"This ini configure max mpdus in ampdu")
/**
* arp_ac_category - ARP access category
* @Min: 0
* @Max: 3
* @Default: 3
*
* Firmware by default categorizes ARP packets with VOICE TID.
* This ini shall be used to override the default configuration.
* Access category enums are referenced in ieee80211_common.h
* WME_AC_BE = 0 (Best effort)
* WME_AC_BK = 1 (Background)
* WME_AC_VI = 2 (Video)
* WME_AC_VO = 3 (Voice)
*
* Related: none
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ARP_AC_CATEGORY CFG_INI_INT( \
"arp_ac_category", \
0, \
3, \
3, \
CFG_VALUE_OR_DEFAULT, \
"Override the default ARP AC configuration")
/*
* </ini>
* gEnableFastPwrTransition - Configuration for fast power transition
* @Min: 0
* @Max: 2
* @Default: 0
*
* This ini supported values:
* 0x0: Phy register retention disabled (Higher timeline, Good for power)
* 0x1: Phy register retention statically enabled
* 0x2: Phy register retention enabled/disabled dynamically
*
* Usage: Internal
*
* </ini>
*/
#define CFG_ENABLE_PHY_REG CFG_INI_UINT( \
"gEnableFastPwrTransition", \
0x0, \
0x2, \
0x0, \
CFG_VALUE_OR_DEFAULT, \
"Configuration for fast power transition")
/*
* <ini>
* gUpperBrssiThresh - Sets Upper threshold for beacon RSSI
* @Min: 36
* @Max: 66
* @Default: 46
*
* This ini sets Upper beacon threshold for beacon RSSI in FW
* Used to reduced RX chainmask in FW, once this threshold is
* reached FW will switch to 1X1 (Single chain).
*
* Supported Feature: STA
*
* Usage: External
*
* </ini>
*/
#define CFG_UPPER_BRSSI_THRESH CFG_INI_UINT( \
"gUpperBrssiThresh", \
36, \
66, \
46, \
CFG_VALUE_OR_DEFAULT, \
"Sets Upper threshold for beacon RSSI")
/*
* <ini>
* gLowerrBrssiThresh - Sets Lower threshold for beacon RSSI
* @Min: 6
* @Max: 36
* @Default: 26
*
* This ini sets Lower beacon threshold for beacon RSSI in FW
* Used to increase RX chainmask in FW, once this threshold is
* reached FW will switch to 2X2 chain.
*
* Supported Feature: STA
*
* Usage: External
*
* </ini>
*/
#define CFG_LOWER_BRSSI_THRESH CFG_INI_UINT( \
"gLowerBrssiThresh", \
6, \
36, \
26, \
CFG_VALUE_OR_DEFAULT, \
"Sets Lower threshold for beacon RSSI")
/*
* <ini>
* gDtim1ChRxEnable - Enable/Disable DTIM 1Chrx feature
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini Enables or Disables DTIM 1CHRX feature in FW
* If this flag is set FW enables shutting off one chain
* while going to power save.
*
* Supported Feature: STA
*
* Usage: External
*
* </ini>
*/
#define CFG_DTIM_1CHRX_ENABLE CFG_INI_BOOL( \
"gDtim1ChRxEnable", \
1, \
"Enable/Disable DTIM 1Chrx feature")
/*
* <ini>
* gEnableAlternativeChainmask - Enable Co-Ex Alternative Chainmask
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable the Co-ex Alternative Chainmask
* feature via the WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME
* firmware parameter.
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_COEX_ALT_CHAINMASK CFG_INI_BOOL( \
"gEnableAlternativeChainmask", \
0, \
"Enable Co-Ex Alternative Chainmask")
#define CFG_FWOL_GENERIC_ALL \
CFG(CFG_ENABLE_ANI) \
CFG(CFG_SET_RTS_FOR_SIFS_BURSTING) \
CFG(CFG_MAX_MPDUS_IN_AMPDU) \
CFG(CFG_ARP_AC_CATEGORY) \
CFG(CFG_ENABLE_PHY_REG) \
CFG(CFG_UPPER_BRSSI_THRESH) \
CFG(CFG_LOWER_BRSSI_THRESH) \
CFG(CFG_DTIM_1CHRX_ENABLE) \
CFG(CFG_ENABLE_COEX_ALT_CHAINMASK)
#endif

View File

@@ -128,4 +128,85 @@ QDF_STATUS
ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc, ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_whitelist *whitelist); struct wlan_fwol_ie_whitelist *whitelist);
/** ucfg_fwol_get_ani_enabled() - Assigns the ani_enabled value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_ani_enabled(struct wlan_objmgr_psoc *psoc,
bool *ani_enabled);
/**
* ucfg_fwol_get_ani_enabled() - Assigns the enable_rts_sifsbursting value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_enable_rts_sifsbursting(struct wlan_objmgr_psoc *psoc,
bool *enable_rts_sifsbursting);
/**
* ucfg_get_max_mpdus_inampdu() - Assigns the max_mpdus_inampdu value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_max_mpdus_inampdu(struct wlan_objmgr_psoc *psoc,
uint8_t *max_mpdus_inampdu);
/**
* ucfg_get_arp_ac_category() - Assigns the arp_ac_category value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_arp_ac_category(struct wlan_objmgr_psoc *psoc,
uint32_t *arp_ac_category);
/**
* ucfg_get_enable_phy_reg_retention() - Assigns enable_phy_reg_retention value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_enable_phy_reg_retention(struct wlan_objmgr_psoc *psoc,
uint8_t *enable_phy_reg_retention);
/**
* ucfg_get_upper_brssi_thresh() - Assigns upper_brssi_thresh value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_upper_brssi_thresh(struct wlan_objmgr_psoc *psoc,
uint16_t *upper_brssi_thresh);
/**
* ucfg_get_lower_brssi_thresh() - Assigns lower_brssi_thresh value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_lower_brssi_thresh(struct wlan_objmgr_psoc *psoc,
uint16_t *lower_brssi_thresh);
/**
* ucfg_get_enable_dtim_1chrx() - Assigns enable_dtim_1chrx value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_enable_dtim_1chrx(struct wlan_objmgr_psoc *psoc,
bool *enable_dtim_1chrx);
/**
* ucfg_get_alternate_chainmask_enabled() - Assigns alt chainmask_enabled value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_get_alternative_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
bool *alternative_chainmask_enabled);
#endif /* _WLAN_FWOL_UCFG_API_H_ */ #endif /* _WLAN_FWOL_UCFG_API_H_ */

View File

@@ -215,6 +215,81 @@ ucfg_fwol_set_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool ie_whitelist)
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
QDF_STATUS ucfg_fwol_get_ani_enabled(struct wlan_objmgr_psoc *psoc,
bool *ani_enabled)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*ani_enabled = fwol_obj->cfg.ani_enabled;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_enable_rts_sifsbursting(struct wlan_objmgr_psoc *psoc,
bool *enable_rts_sifsbursting)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*enable_rts_sifsbursting = fwol_obj->cfg.enable_rts_sifsbursting;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_max_mpdus_inampdu(struct wlan_objmgr_psoc *psoc,
uint8_t *max_mpdus_inampdu)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*max_mpdus_inampdu = fwol_obj->cfg.max_mpdus_inampdu;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_arp_ac_category(struct wlan_objmgr_psoc *psoc,
uint32_t *arp_ac_category)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*arp_ac_category = fwol_obj->cfg.arp_ac_category;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_enable_phy_reg_retention(struct wlan_objmgr_psoc *psoc,
uint8_t *enable_phy_reg_retention)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*enable_phy_reg_retention = fwol_obj->cfg.enable_phy_reg_retention;
return QDF_STATUS_SUCCESS;
}
bool ucfg_validate_ie_bitmaps(struct wlan_objmgr_psoc *psoc) bool ucfg_validate_ie_bitmaps(struct wlan_objmgr_psoc *psoc)
{ {
struct wlan_fwol_psoc_obj *fwol_obj; struct wlan_fwol_psoc_obj *fwol_obj;
@@ -250,6 +325,67 @@ ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc,
} }
*whitelist = fwol_obj->cfg.ie_whitelist_cfg; *whitelist = fwol_obj->cfg.ie_whitelist_cfg;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_upper_brssi_thresh(struct wlan_objmgr_psoc *psoc,
uint16_t *upper_brssi_thresh)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*upper_brssi_thresh = fwol_obj->cfg.upper_brssi_thresh;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_lower_brssi_thresh(struct wlan_objmgr_psoc *psoc,
uint16_t *lower_brssi_thresh)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*lower_brssi_thresh = fwol_obj->cfg.lower_brssi_thresh;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_enable_dtim_1chrx(struct wlan_objmgr_psoc *psoc,
bool *enable_dtim_1chrx)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*enable_dtim_1chrx = fwol_obj->cfg.enable_dtim_1chrx;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_get_alternative_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
bool *alternative_chainmask_enabled)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get fwol obj");
return QDF_STATUS_E_FAILURE;
}
*alternative_chainmask_enabled =
fwol_obj->cfg.alternative_chainmask_enabled;
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }