diff options
author | Eliad Peller <eliad@wizery.com> | 2011-08-25 11:10:59 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-09-14 04:47:18 -0400 |
commit | 2a5bff091f4c32d07f007d6491453b67b497a3a4 (patch) | |
tree | 208b4b2ac57efca6e454ad8d445ade0dbdff17dd /drivers/net/wireless/wl12xx/main.c | |
parent | 5c472148b0894478c427f5b1b0f69602cb103f88 (diff) |
wl12xx: add module_param to trigger BUG() on recovery
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>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | 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 bde84027ab7f..8324d905b431 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 = { | |||
362 | }; | 362 | }; |
363 | 363 | ||
364 | static char *fwlog_param; | 364 | static char *fwlog_param; |
365 | static bool bug_on_recovery; | ||
365 | 366 | ||
366 | static void __wl1271_op_remove_interface(struct wl1271 *wl, | 367 | static void __wl1271_op_remove_interface(struct wl1271 *wl, |
367 | bool reset_tx_queues); | 368 | bool reset_tx_queues); |
@@ -1213,6 +1214,8 @@ static void wl1271_recovery_work(struct work_struct *work) | |||
1213 | wl1271_info("Hardware recovery in progress. FW ver: %s pc: 0x%x", | 1214 | wl1271_info("Hardware recovery in progress. FW ver: %s pc: 0x%x", |
1214 | wl->chip.fw_ver_str, wl1271_read32(wl, SCR_PAD4)); | 1215 | wl->chip.fw_ver_str, wl1271_read32(wl, SCR_PAD4)); |
1215 | 1216 | ||
1217 | BUG_ON(bug_on_recovery); | ||
1218 | |||
1216 | /* | 1219 | /* |
1217 | * Advance security sequence number to overcome potential progress | 1220 | * Advance security sequence number to overcome potential progress |
1218 | * in the firmware during recovery. This doens't hurt if the network is | 1221 | * 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); | |||
4776 | MODULE_PARM_DESC(keymap, | 4779 | MODULE_PARM_DESC(keymap, |
4777 | "FW logger options: continuous, ondemand, dbgpins or disable"); | 4780 | "FW logger options: continuous, ondemand, dbgpins or disable"); |
4778 | 4781 | ||
4782 | module_param(bug_on_recovery, bool, S_IRUSR | S_IWUSR); | ||
4783 | MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery"); | ||
4784 | |||
4779 | MODULE_LICENSE("GPL"); | 4785 | MODULE_LICENSE("GPL"); |
4780 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); | 4786 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); |
4781 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); | 4787 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); |