wlcore: fwlog dynamic mem_block control
number of fwlog mem_blocks can be configured using module param. this is a fw debug feature: in case a large fw log data is busrted during a short period of time, the memory get filled and data is lost. this allows us to dynamicly set the fw log mem_block usage, although configuring more mem_block for logger comes at the expense of TP. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
4b67414432
commit
93ac8488a2
|
@ -1274,6 +1274,9 @@ struct conf_rx_streaming_settings {
|
||||||
u8 always;
|
u8 always;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
|
#define CONF_FWLOG_MIN_MEM_BLOCKS 2
|
||||||
|
#define CONF_FWLOG_MAX_MEM_BLOCKS 16
|
||||||
|
|
||||||
struct conf_fwlog {
|
struct conf_fwlog {
|
||||||
/* Continuous or on-demand */
|
/* Continuous or on-demand */
|
||||||
u8 mode;
|
u8 mode;
|
||||||
|
@ -1281,7 +1284,7 @@ struct conf_fwlog {
|
||||||
/*
|
/*
|
||||||
* Number of memory blocks dedicated for the FW logger
|
* Number of memory blocks dedicated for the FW logger
|
||||||
*
|
*
|
||||||
* Range: 1-3, or 0 to disable the FW logger
|
* Range: 2-16, or 0 to disable the FW logger
|
||||||
*/
|
*/
|
||||||
u8 mem_blocks;
|
u8 mem_blocks;
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#define WL1271_BOOT_RETRIES 3
|
#define WL1271_BOOT_RETRIES 3
|
||||||
|
|
||||||
static char *fwlog_param;
|
static char *fwlog_param;
|
||||||
|
static int fwlog_mem_blocks = -1;
|
||||||
static int bug_on_recovery = -1;
|
static int bug_on_recovery = -1;
|
||||||
static int no_recovery = -1;
|
static int no_recovery = -1;
|
||||||
|
|
||||||
|
@ -291,6 +292,18 @@ static void wlcore_adjust_conf(struct wl1271 *wl)
|
||||||
{
|
{
|
||||||
/* Adjust settings according to optional module parameters */
|
/* Adjust settings according to optional module parameters */
|
||||||
|
|
||||||
|
/* Firmware Logger params */
|
||||||
|
if (fwlog_mem_blocks != -1) {
|
||||||
|
if (fwlog_mem_blocks >= CONF_FWLOG_MIN_MEM_BLOCKS &&
|
||||||
|
fwlog_mem_blocks <= CONF_FWLOG_MAX_MEM_BLOCKS) {
|
||||||
|
wl->conf.fwlog.mem_blocks = fwlog_mem_blocks;
|
||||||
|
} else {
|
||||||
|
wl1271_error(
|
||||||
|
"Illegal fwlog_mem_blocks=%d using default %d",
|
||||||
|
fwlog_mem_blocks, wl->conf.fwlog.mem_blocks);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (fwlog_param) {
|
if (fwlog_param) {
|
||||||
if (!strcmp(fwlog_param, "continuous")) {
|
if (!strcmp(fwlog_param, "continuous")) {
|
||||||
wl->conf.fwlog.mode = WL12XX_FWLOG_CONTINUOUS;
|
wl->conf.fwlog.mode = WL12XX_FWLOG_CONTINUOUS;
|
||||||
|
@ -6158,6 +6171,9 @@ module_param_named(fwlog, fwlog_param, charp, 0);
|
||||||
MODULE_PARM_DESC(fwlog,
|
MODULE_PARM_DESC(fwlog,
|
||||||
"FW logger options: continuous, ondemand, dbgpins or disable");
|
"FW logger options: continuous, ondemand, dbgpins or disable");
|
||||||
|
|
||||||
|
module_param(fwlog_mem_blocks, int, S_IRUSR | S_IWUSR);
|
||||||
|
MODULE_PARM_DESC(fwlog_mem_blocks, "fwlog mem_blocks");
|
||||||
|
|
||||||
module_param(bug_on_recovery, int, S_IRUSR | S_IWUSR);
|
module_param(bug_on_recovery, int, S_IRUSR | S_IWUSR);
|
||||||
MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery");
|
MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue