aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2012-11-26 11:05:49 -0500
committerLuciano Coelho <coelho@ti.com>2012-12-04 09:36:09 -0500
commitc108c90535ae29099de88187a90b8411bc1fe9a1 (patch)
tree05d2f15d83ffa3e964e3547e57b1483511f3b42f /drivers/net/wireless/ti
parent518b680a8eb3ef953c80c9ef1bd6502e107b36fb (diff)
wlcore: gather information about firmware stability
It's sometimes useful to gather information about the firmware stability in long test runs, especially to see if problems are recurring frequently or not. With this commit we count the number of times a hardware recovery was issued and print it out during recovery and in the driver_state in debugfs. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wlcore/debugfs.c1
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c4
-rw-r--r--drivers/net/wireless/ti/wlcore/wlcore.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c b/drivers/net/wireless/ti/wlcore/debugfs.c
index 1cf2cdbae292..e61fc2b01046 100644
--- a/drivers/net/wireless/ti/wlcore/debugfs.c
+++ b/drivers/net/wireless/ti/wlcore/debugfs.c
@@ -490,6 +490,7 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
490 DRIVER_STATE_PRINT_HEX(chip.id); 490 DRIVER_STATE_PRINT_HEX(chip.id);
491 DRIVER_STATE_PRINT_STR(chip.fw_ver_str); 491 DRIVER_STATE_PRINT_STR(chip.fw_ver_str);
492 DRIVER_STATE_PRINT_STR(chip.phy_fw_ver_str); 492 DRIVER_STATE_PRINT_STR(chip.phy_fw_ver_str);
493 DRIVER_STATE_PRINT_INT(recovery_count);
493 494
494#undef DRIVER_STATE_PRINT_INT 495#undef DRIVER_STATE_PRINT_INT
495#undef DRIVER_STATE_PRINT_LONG 496#undef DRIVER_STATE_PRINT_LONG
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 5d3ca6ce9d20..615b40dc981e 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -879,7 +879,8 @@ static void wlcore_print_recovery(struct wl1271 *wl)
879 if (ret < 0) 879 if (ret < 0)
880 return; 880 return;
881 881
882 wl1271_info("pc: 0x%x, hint_sts: 0x%08x", pc, hint_sts); 882 wl1271_info("pc: 0x%x, hint_sts: 0x%08x count: %d",
883 pc, hint_sts, ++wl->recovery_count);
883 884
884 wlcore_set_partition(wl, &wl->ptable[PART_WORK]); 885 wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
885} 886}
@@ -5685,6 +5686,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size,
5685 wl->flags = 0; 5686 wl->flags = 0;
5686 wl->sg_enabled = true; 5687 wl->sg_enabled = true;
5687 wl->sleep_auth = WL1271_PSM_ILLEGAL; 5688 wl->sleep_auth = WL1271_PSM_ILLEGAL;
5689 wl->recovery_count = 0;
5688 wl->hw_pg_ver = -1; 5690 wl->hw_pg_ver = -1;
5689 wl->ap_ps_map = 0; 5691 wl->ap_ps_map = 0;
5690 wl->ap_fw_ps_map = 0; 5692 wl->ap_fw_ps_map = 0;
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
index 5f580e56a19b..4d5c69ecb022 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore.h
@@ -337,6 +337,8 @@ struct wl1271 {
337 337
338 bool enable_11a; 338 bool enable_11a;
339 339
340 int recovery_count;
341
340 /* Most recently reported noise in dBm */ 342 /* Most recently reported noise in dBm */
341 s8 noise; 343 s8 noise;
342 344