mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
qcacld-3.0: Add INI param to configure wow-mode logging
Add an INI to configure the wow-mode logging config. So that,the fw would use this bitmap for logging when it is in wow mode. Change-Id: Ib2fbd0c5c9cc573b2f5b12dcdf06682c16550cb2 CRs-Fixed: 2810372
This commit is contained in:
parent
9e555529fc
commit
73cd520a77
7 changed files with 131 additions and 18 deletions
|
|
@ -197,7 +197,9 @@ struct wlan_fwol_neighbor_report_cfg {
|
|||
* @enable_fw_log_level: Set the FW log level
|
||||
* @enable_fw_log_type: Set the FW log type
|
||||
* @enable_fw_module_log_level: enable fw module log level
|
||||
* @enable_fw_module_log_level_num: enablefw module log level num
|
||||
* @enable_fw_module_log_level_num: enable fw module log level num
|
||||
* @enable_fw_mod_wow_log_level: enable fw wow module log level
|
||||
* @enable_fw_mod_wow_log_level_num: enable fw wow module log level num
|
||||
* @sap_xlna_bypass: bypass SAP xLNA
|
||||
* @is_rate_limit_enabled: Enable/disable RA rate limited
|
||||
* @tsf_gpio_pin: TSF GPIO Pin config
|
||||
|
|
@ -235,6 +237,8 @@ struct wlan_fwol_cfg {
|
|||
uint16_t enable_fw_log_type;
|
||||
uint8_t enable_fw_module_log_level[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
|
||||
uint8_t enable_fw_module_log_level_num;
|
||||
uint8_t enable_fw_mod_wow_log_level[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
|
||||
uint8_t enable_fw_mod_wow_log_level_num;
|
||||
bool sap_xlna_bypass;
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
bool is_rate_limit_enabled;
|
||||
|
|
|
|||
|
|
@ -498,6 +498,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||
struct wlan_fwol_psoc_obj *fwol_obj;
|
||||
struct wlan_fwol_cfg *fwol_cfg;
|
||||
qdf_size_t enable_fw_module_log_level_num;
|
||||
qdf_size_t enable_fw_wow_mod_log_level_num;
|
||||
|
||||
fwol_obj = fwol_get_psoc_obj(psoc);
|
||||
if (!fwol_obj) {
|
||||
|
|
@ -534,6 +535,12 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||
&enable_fw_module_log_level_num);
|
||||
fwol_cfg->enable_fw_module_log_level_num =
|
||||
(uint8_t)enable_fw_module_log_level_num;
|
||||
qdf_uint8_array_parse(cfg_get(psoc, CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL),
|
||||
fwol_cfg->enable_fw_mod_wow_log_level,
|
||||
FW_MODULE_LOG_LEVEL_STRING_LENGTH,
|
||||
&enable_fw_wow_mod_log_level_num);
|
||||
fwol_cfg->enable_fw_mod_wow_log_level_num =
|
||||
(uint8_t)enable_fw_wow_mod_log_level_num;
|
||||
ucfg_fwol_init_tsf_ptp_options(psoc, fwol_cfg);
|
||||
ucfg_fwol_init_sae_cfg(psoc, fwol_cfg);
|
||||
fwol_cfg->lprx_enable = cfg_get(psoc, CFG_LPRX);
|
||||
|
|
|
|||
|
|
@ -394,6 +394,44 @@
|
|||
"29,1,31,1,36,1,38,1,46,1,47,1,50,1,52,1,53,1,56,1,60,1,61,1", \
|
||||
"Set modulized firmware debug log level")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gFwDebugWowModuleLoglevel - modulized firmware wow debug log level
|
||||
* @Min: N/A
|
||||
* @Max: N/A
|
||||
* @Default: N/A
|
||||
*
|
||||
* This ini is used to set modulized firmware wow debug log level.
|
||||
* FW module log level input string format looks like below:
|
||||
* gFwDebugWowModuleLoglevel="<FW Module ID>,<Log Level>,..."
|
||||
* For example:
|
||||
* gFwDebugWowModuleLoglevel="1,0,2,1,3,2,4,3,5,4,6,5,7,6"
|
||||
* The above input string means:
|
||||
* For FW module ID 1 enable log level 0
|
||||
* For FW module ID 2 enable log level 1
|
||||
* For FW module ID 3 enable log level 2
|
||||
* For FW module ID 4 enable log level 3
|
||||
* For FW module ID 5 enable log level 4
|
||||
* For FW module ID 6 enable log level 5
|
||||
* For FW module ID 7 enable log level 6
|
||||
* For valid values of log levels check enum DBGLOG_LOG_LVL and
|
||||
* for valid values of module ids check enum WLAN_MODULE_ID.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: Debugging
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL CFG_INI_STRING( \
|
||||
"gFwDebugWowModuleLoglevel", \
|
||||
0, \
|
||||
FW_MODULE_LOG_LEVEL_STRING_LENGTH, \
|
||||
"5,3,18,3,31,3,36,3", \
|
||||
"Set modulized firmware wow debug log level")
|
||||
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
/* <ini>
|
||||
* gRAFilterEnable
|
||||
|
|
@ -776,6 +814,6 @@
|
|||
CFG(CFG_TX_SCH_DELAY) \
|
||||
CFG(CFG_ENABLE_SECONDARY_RATE) \
|
||||
CFG(CFG_SET_SAP_XLNA_BYPASS) \
|
||||
CFG(CFG_SET_ENABLE_ILP)
|
||||
|
||||
CFG(CFG_SET_ENABLE_ILP) \
|
||||
CFG(CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ QDF_STATUS ucfg_fwol_get_enable_fw_log_type(struct wlan_objmgr_psoc *psoc,
|
|||
* @enable_fw_module_log_level:
|
||||
* pointer to enable_fw_module_log_level array
|
||||
* @enable_fw_module_log_level_num:
|
||||
* pointer to enable_fw_module_log_leve array element num
|
||||
* pointer to enable_fw_module_log_level array element num
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
|
|
@ -276,6 +276,23 @@ QDF_STATUS ucfg_fwol_get_enable_fw_module_log_level(
|
|||
uint8_t **enable_fw_module_log_level,
|
||||
uint8_t *enable_fw_module_log_level_num);
|
||||
|
||||
/**
|
||||
* ucfg_fwol_wow_get_enable_fw_module_log_level() - Assigns
|
||||
* enable_fw_module_log_level string
|
||||
*
|
||||
* @psoc: pointer to the psoc object
|
||||
* @enable_fw_wow_module_log_level:
|
||||
* pointer to enable_fw_wow_module_log_level array
|
||||
* @enable_fw_wow_module_log_level_num:
|
||||
* pointer to enable_fw_wow_module_log_level array element num
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS ucfg_fwol_wow_get_enable_fw_module_log_level(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t **enable_fw_wow_module_log_level,
|
||||
uint8_t *enable_fw_wow_module_log_level_num);
|
||||
|
||||
/**
|
||||
* ucfg_fwol_get_sap_xlna_bypass() - Assigns sap_xlna_bypass value
|
||||
* @psoc: pointer to the psoc object
|
||||
|
|
|
|||
|
|
@ -520,6 +520,26 @@ QDF_STATUS ucfg_fwol_get_enable_fw_module_log_level(
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_fwol_wow_get_enable_fw_module_log_level(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t **enable_fw_wow_module_log_level,
|
||||
uint8_t *enable_fw_wow_module_log_level_num)
|
||||
{
|
||||
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_fw_wow_module_log_level =
|
||||
fwol_obj->cfg.enable_fw_mod_wow_log_level;
|
||||
*enable_fw_wow_module_log_level_num =
|
||||
fwol_obj->cfg.enable_fw_mod_wow_log_level_num;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_fwol_get_sap_xlna_bypass(struct wlan_objmgr_psoc *psoc,
|
||||
bool *sap_xlna_bypass)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15694,22 +15694,15 @@ void sme_update_score_config(mac_handle_t mac_handle, eCsrPhyMode phy_mode,
|
|||
wlan_psoc_set_phy_config(mac_ctx->psoc, &config);
|
||||
}
|
||||
|
||||
void sme_enable_fw_module_log_level(mac_handle_t mac_handle, int vdev_id)
|
||||
static void
|
||||
__sme_enable_fw_module_log_level(uint8_t *enable_fw_module_log_level,
|
||||
uint8_t enable_fw_module_log_level_num,
|
||||
int vdev_id, int param_id)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
uint8_t *enable_fw_module_log_level;
|
||||
uint8_t enable_fw_module_log_level_num;
|
||||
uint8_t count = 0;
|
||||
uint32_t value = 0;
|
||||
int ret;
|
||||
|
||||
status = ucfg_fwol_get_enable_fw_module_log_level(
|
||||
mac_ctx->psoc, &enable_fw_module_log_level,
|
||||
&enable_fw_module_log_level_num);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return;
|
||||
|
||||
while (count < enable_fw_module_log_level_num) {
|
||||
/*
|
||||
* FW module log level input array looks like
|
||||
|
|
@ -15740,9 +15733,7 @@ void sme_enable_fw_module_log_level(mac_handle_t mac_handle, int vdev_id)
|
|||
|
||||
value = enable_fw_module_log_level[count] << 16;
|
||||
value |= enable_fw_module_log_level[count + 1];
|
||||
ret = sme_cli_set_command(vdev_id,
|
||||
WMI_DBGLOG_MOD_LOG_LEVEL,
|
||||
value, DBG_CMD);
|
||||
ret = sme_cli_set_command(vdev_id, param_id, value, DBG_CMD);
|
||||
if (ret != 0)
|
||||
sme_err("Failed to enable FW module log level %d ret %d",
|
||||
value, ret);
|
||||
|
|
@ -15751,6 +15742,35 @@ void sme_enable_fw_module_log_level(mac_handle_t mac_handle, int vdev_id)
|
|||
}
|
||||
}
|
||||
|
||||
void sme_enable_fw_module_log_level(mac_handle_t mac_handle, int vdev_id)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
uint8_t *enable_fw_module_log_level;
|
||||
uint8_t enable_fw_module_log_level_num;
|
||||
|
||||
status = ucfg_fwol_get_enable_fw_module_log_level(
|
||||
mac_ctx->psoc, &enable_fw_module_log_level,
|
||||
&enable_fw_module_log_level_num);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return;
|
||||
__sme_enable_fw_module_log_level(enable_fw_module_log_level,
|
||||
enable_fw_module_log_level_num,
|
||||
vdev_id,
|
||||
WMI_DBGLOG_MOD_LOG_LEVEL);
|
||||
|
||||
enable_fw_module_log_level_num = 0;
|
||||
status = ucfg_fwol_wow_get_enable_fw_module_log_level(
|
||||
mac_ctx->psoc, &enable_fw_module_log_level,
|
||||
&enable_fw_module_log_level_num);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return;
|
||||
__sme_enable_fw_module_log_level(enable_fw_module_log_level,
|
||||
enable_fw_module_log_level_num,
|
||||
vdev_id,
|
||||
WMI_DBGLOG_MOD_WOW_LOG_LEVEL);
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_MOTION_DETECTION
|
||||
/**
|
||||
* sme_set_md_bl_evt_cb - Register/set motion detection baseline callback
|
||||
|
|
|
|||
|
|
@ -1018,6 +1018,13 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
|||
wma_err("dbglog_module_log_enable failed ret %d",
|
||||
ret);
|
||||
break;
|
||||
case WMI_DBGLOG_MOD_WOW_LOG_LEVEL:
|
||||
ret = dbglog_set_mod_wow_log_lvl(wma->wmi_handle,
|
||||
privcmd->param_value);
|
||||
if (ret)
|
||||
wma_err("WMI_DBGLOG_MOD_WOW_LOG_LEVEL failed ret %d",
|
||||
ret);
|
||||
break;
|
||||
case WMI_DBGLOG_TYPE:
|
||||
ret = dbglog_parser_type_init(wma->wmi_handle,
|
||||
privcmd->param_value);
|
||||
|
|
|
|||
Loading…
Reference in a new issue