* [PATCH 2/4] wl12xx: print the seq_num of rx packet
2011-08-25 15:10 [PATCH 1/4] wl12xx: print acx id Eliad Peller
@ 2011-08-25 15:10 ` Eliad Peller
2011-08-25 15:10 ` [PATCH 3/4] wl12xx: add module_param to trigger BUG() on recovery Eliad Peller
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Eliad Peller @ 2011-08-25 15:10 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
Make it easier to match the driver log against
a sniffer log.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/rx.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c
index 78d8410..9074625 100644
--- a/drivers/net/wireless/wl12xx/rx.c
+++ b/drivers/net/wireless/wl12xx/rx.c
@@ -107,6 +107,7 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
u8 beacon = 0;
u8 is_data = 0;
u8 reserved = unaligned ? NET_IP_ALIGN : 0;
+ u16 seq_num;
/*
* In PLT mode we seem to get frames and mac80211 warns about them,
@@ -169,9 +170,11 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon);
- wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb,
+ seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
+ wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s seq %d", skb,
skb->len - desc->pad_len,
- beacon ? "beacon" : "");
+ beacon ? "beacon" : "",
+ seq_num);
skb_trim(skb, skb->len - desc->pad_len);
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/4] wl12xx: add module_param to trigger BUG() on recovery
2011-08-25 15:10 [PATCH 1/4] wl12xx: print acx id Eliad Peller
2011-08-25 15:10 ` [PATCH 2/4] wl12xx: print the seq_num of rx packet Eliad Peller
@ 2011-08-25 15:10 ` Eliad Peller
2011-08-25 15:11 ` [PATCH 4/4] wl12xx: add beacon_filtering debugfs file Eliad Peller
2011-09-14 9:19 ` [PATCH 1/4] wl12xx: print acx id Luciano Coelho
3 siblings, 0 replies; 5+ messages in thread
From: Eliad Peller @ 2011-08-25 15:10 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
Crashing on recovery is useful for debugging, as a JTAG
can be connected in order to investigate the current fw state.
(otherwise, a reconfiguration will occur)
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index bde8402..8324d90 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -362,6 +362,7 @@ static struct conf_drv_settings default_conf = {
};
static char *fwlog_param;
+static bool bug_on_recovery;
static void __wl1271_op_remove_interface(struct wl1271 *wl,
bool reset_tx_queues);
@@ -1213,6 +1214,8 @@ static void wl1271_recovery_work(struct work_struct *work)
wl1271_info("Hardware recovery in progress. FW ver: %s pc: 0x%x",
wl->chip.fw_ver_str, wl1271_read32(wl, SCR_PAD4));
+ BUG_ON(bug_on_recovery);
+
/*
* Advance security sequence number to overcome potential progress
* in the firmware during recovery. This doens't hurt if the network is
@@ -4776,6 +4779,9 @@ module_param_named(fwlog, fwlog_param, charp, 0);
MODULE_PARM_DESC(keymap,
"FW logger options: continuous, ondemand, dbgpins or disable");
+module_param(bug_on_recovery, bool, S_IRUSR | S_IWUSR);
+MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery");
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 4/4] wl12xx: add beacon_filtering debugfs file
2011-08-25 15:10 [PATCH 1/4] wl12xx: print acx id Eliad Peller
2011-08-25 15:10 ` [PATCH 2/4] wl12xx: print the seq_num of rx packet Eliad Peller
2011-08-25 15:10 ` [PATCH 3/4] wl12xx: add module_param to trigger BUG() on recovery Eliad Peller
@ 2011-08-25 15:11 ` Eliad Peller
2011-09-14 9:19 ` [PATCH 1/4] wl12xx: print acx id Luciano Coelho
3 siblings, 0 replies; 5+ messages in thread
From: Eliad Peller @ 2011-08-25 15:11 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
Allow enabling/disabling beacon_filtering by debugfs,
in order to reduce the log size while debugging (beacon
filtering is disabled by default in AP mode, as beacons
are needed for ERP configuration).
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/debugfs.c | 42 +++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c
index d59354f..d227385 100644
--- a/drivers/net/wireless/wl12xx/debugfs.c
+++ b/drivers/net/wireless/wl12xx/debugfs.c
@@ -655,6 +655,47 @@ static const struct file_operations rx_streaming_always_ops = {
.llseek = default_llseek,
};
+static ssize_t beacon_filtering_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct wl1271 *wl = file->private_data;
+ char buf[10];
+ size_t len;
+ unsigned long value;
+ int ret;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EFAULT;
+ buf[len] = '\0';
+
+ ret = kstrtoul(buf, 0, &value);
+ if (ret < 0) {
+ wl1271_warning("illegal value for beacon_filtering!");
+ return -EINVAL;
+ }
+
+ mutex_lock(&wl->mutex);
+
+ ret = wl1271_ps_elp_wakeup(wl);
+ if (ret < 0)
+ goto out;
+
+ ret = wl1271_acx_beacon_filter_opt(wl, !!value);
+
+ wl1271_ps_elp_sleep(wl);
+out:
+ mutex_unlock(&wl->mutex);
+ return count;
+}
+
+static const struct file_operations beacon_filtering_ops = {
+ .write = beacon_filtering_write,
+ .open = wl1271_open_file_generic,
+ .llseek = default_llseek,
+};
+
static int wl1271_debugfs_add_files(struct wl1271 *wl,
struct dentry *rootdir)
{
@@ -767,6 +808,7 @@ static int wl1271_debugfs_add_files(struct wl1271 *wl,
DEBUGFS_ADD(driver_state, rootdir);
DEBUGFS_ADD(dtim_interval, rootdir);
DEBUGFS_ADD(beacon_interval, rootdir);
+ DEBUGFS_ADD(beacon_filtering, rootdir);
streaming = debugfs_create_dir("rx_streaming", rootdir);
if (!streaming || IS_ERR(streaming))
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/4] wl12xx: print acx id
2011-08-25 15:10 [PATCH 1/4] wl12xx: print acx id Eliad Peller
` (2 preceding siblings ...)
2011-08-25 15:11 ` [PATCH 4/4] wl12xx: add beacon_filtering debugfs file Eliad Peller
@ 2011-09-14 9:19 ` Luciano Coelho
3 siblings, 0 replies; 5+ messages in thread
From: Luciano Coelho @ 2011-09-14 9:19 UTC (permalink / raw)
To: Eliad Peller; +Cc: linux-wireless
On Thu, 2011-08-25 at 18:10 +0300, Eliad Peller wrote:
> Add id param to the acx debug print (on wl1271_cmd_configure)
>
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---
Applied the series, thanks!
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 5+ messages in thread