From: Eliad Peller <eliad@wizery.com>
To: Luciano Coelho <luca@coelho.fi>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 05/13] wlcore: fwlog dynamic mem_block control
Date: Mon, 9 Sep 2013 12:24:36 +0300 [thread overview]
Message-ID: <1378718684-14430-5-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1378718684-14430-1-git-send-email-eliad@wizery.com>
From: Ido Reis <idor@ti.com>
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>
---
drivers/net/wireless/ti/wlcore/conf.h | 5 ++++-
drivers/net/wireless/ti/wlcore/main.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ti/wlcore/conf.h b/drivers/net/wireless/ti/wlcore/conf.h
index 2b96ff8..40995c4 100644
--- a/drivers/net/wireless/ti/wlcore/conf.h
+++ b/drivers/net/wireless/ti/wlcore/conf.h
@@ -1274,6 +1274,9 @@ struct conf_rx_streaming_settings {
u8 always;
} __packed;
+#define CONF_FWLOG_MIN_MEM_BLOCKS 2
+#define CONF_FWLOG_MAX_MEM_BLOCKS 16
+
struct conf_fwlog {
/* Continuous or on-demand */
u8 mode;
@@ -1281,7 +1284,7 @@ struct conf_fwlog {
/*
* 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;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index dbf3315..ebb1076 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -44,6 +44,7 @@
#define WL1271_BOOT_RETRIES 3
static char *fwlog_param;
+static int fwlog_mem_blocks = -1;
static int bug_on_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 */
+ /* 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 (!strcmp(fwlog_param, "continuous")) {
wl->conf.fwlog.mode = WL12XX_FWLOG_CONTINUOUS;
@@ -6161,6 +6174,9 @@ module_param_named(fwlog, fwlog_param, charp, 0);
MODULE_PARM_DESC(fwlog,
"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_PARM_DESC(bug_on_recovery, "BUG() on fw recovery");
--
1.8.3.rc1.35.g9b79519
next prev parent reply other threads:[~2013-09-09 9:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 9:24 [PATCH 01/13] wl18xx: default config alignment with phy defaults Eliad Peller
2013-09-09 9:24 ` [PATCH 02/13] wlcore: print active channel in the driver_state Eliad Peller
2013-09-09 9:24 ` [PATCH 03/13] wlcore: add ap_event_mask Eliad Peller
2013-09-09 9:24 ` [PATCH 04/13] wlcore: fix interrogate command length Eliad Peller
2013-09-09 9:24 ` Eliad Peller [this message]
2013-09-09 9:24 ` [PATCH 06/13] wl12xx/wl18xx: update default fw logger's settings Eliad Peller
2013-09-09 9:24 ` [PATCH 07/13] wlcore/wl18xx/wl12xx: FW log params per chip arch Eliad Peller
2013-09-09 9:24 ` [PATCH 08/13] wlcore: read fw panic log only in host mode Eliad Peller
2013-09-09 9:24 ` [PATCH 09/13] wlcore: Allow stopping fw log in recovery Eliad Peller
2013-09-09 9:24 ` [PATCH 10/13] wlcore: wakeup from ELP before starting recovery Eliad Peller
2013-09-09 9:24 ` [PATCH 11/13] wlcore: memset wl->rx_filter_enabled to zero after recovery Eliad Peller
2013-10-23 5:23 ` Luca Coelho
2013-10-23 7:37 ` Eliad Peller
2013-09-09 9:24 ` [PATCH 12/13] wlcore: fix started_vifs calculation Eliad Peller
2013-09-09 9:24 ` [PATCH 13/13] wlcore: save last regdom configuration on stop Eliad Peller
2013-10-23 7:07 ` [PATCH 01/13] wl18xx: default config alignment with phy defaults Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378718684-14430-5-git-send-email-eliad@wizery.com \
--to=eliad@wizery.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luca@coelho.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox