diff options
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/conf.h | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 19 |
4 files changed, 31 insertions, 7 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index 97cc79c1bcf0..aa73ada06463 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c | |||
@@ -370,6 +370,10 @@ static struct wlcore_conf wl12xx_conf = { | |||
370 | .increase_time = 1, | 370 | .increase_time = 1, |
371 | .window_size = 16, | 371 | .window_size = 16, |
372 | }, | 372 | }, |
373 | .recovery = { | ||
374 | .bug_on_recovery = 0, | ||
375 | .no_recovery = 0, | ||
376 | }, | ||
373 | }; | 377 | }; |
374 | 378 | ||
375 | static struct wl12xx_priv_conf wl12xx_default_priv_conf = { | 379 | static struct wl12xx_priv_conf wl12xx_default_priv_conf = { |
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 18a01b404ea5..98d034b4530d 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -492,6 +492,10 @@ static struct wlcore_conf wl18xx_conf = { | |||
492 | .increase_time = 1, | 492 | .increase_time = 1, |
493 | .window_size = 16, | 493 | .window_size = 16, |
494 | }, | 494 | }, |
495 | .recovery = { | ||
496 | .bug_on_recovery = 0, | ||
497 | .no_recovery = 0, | ||
498 | }, | ||
495 | }; | 499 | }; |
496 | 500 | ||
497 | static struct wl18xx_priv_conf wl18xx_default_priv_conf = { | 501 | static struct wl18xx_priv_conf wl18xx_default_priv_conf = { |
diff --git a/drivers/net/wireless/ti/wlcore/conf.h b/drivers/net/wireless/ti/wlcore/conf.h index c9de4d5c8965..1bd831c9e843 100644 --- a/drivers/net/wireless/ti/wlcore/conf.h +++ b/drivers/net/wireless/ti/wlcore/conf.h | |||
@@ -1268,12 +1268,20 @@ struct conf_hangover_settings { | |||
1268 | u8 window_size; | 1268 | u8 window_size; |
1269 | } __packed; | 1269 | } __packed; |
1270 | 1270 | ||
1271 | struct conf_recovery_settings { | ||
1272 | /* BUG() on fw recovery */ | ||
1273 | u8 bug_on_recovery; | ||
1274 | |||
1275 | /* Prevent HW recovery. FW will remain stuck. */ | ||
1276 | u8 no_recovery; | ||
1277 | } __packed; | ||
1278 | |||
1271 | /* | 1279 | /* |
1272 | * The conf version consists of 4 bytes. The two MSB are the wlcore | 1280 | * The conf version consists of 4 bytes. The two MSB are the wlcore |
1273 | * version, the two LSB are the lower driver's private conf | 1281 | * version, the two LSB are the lower driver's private conf |
1274 | * version. | 1282 | * version. |
1275 | */ | 1283 | */ |
1276 | #define WLCORE_CONF_VERSION (0x0003 << 16) | 1284 | #define WLCORE_CONF_VERSION (0x0004 << 16) |
1277 | #define WLCORE_CONF_MASK 0xffff0000 | 1285 | #define WLCORE_CONF_MASK 0xffff0000 |
1278 | #define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \ | 1286 | #define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \ |
1279 | sizeof(struct wlcore_conf)) | 1287 | sizeof(struct wlcore_conf)) |
@@ -1301,6 +1309,7 @@ struct wlcore_conf { | |||
1301 | struct conf_fwlog fwlog; | 1309 | struct conf_fwlog fwlog; |
1302 | struct conf_rate_policy_settings rate; | 1310 | struct conf_rate_policy_settings rate; |
1303 | struct conf_hangover_settings hangover; | 1311 | struct conf_hangover_settings hangover; |
1312 | struct conf_recovery_settings recovery; | ||
1304 | } __packed; | 1313 | } __packed; |
1305 | 1314 | ||
1306 | struct wlcore_conf_file { | 1315 | struct wlcore_conf_file { |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 615b40dc981e..4dfd533a81c1 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -56,8 +56,8 @@ | |||
56 | #define WL1271_BOOT_RETRIES 3 | 56 | #define WL1271_BOOT_RETRIES 3 |
57 | 57 | ||
58 | static char *fwlog_param; | 58 | static char *fwlog_param; |
59 | static bool bug_on_recovery; | 59 | static int bug_on_recovery = -1; |
60 | static bool no_recovery; | 60 | static int no_recovery = -1; |
61 | 61 | ||
62 | static void __wl1271_op_remove_interface(struct wl1271 *wl, | 62 | static void __wl1271_op_remove_interface(struct wl1271 *wl, |
63 | struct ieee80211_vif *vif, | 63 | struct ieee80211_vif *vif, |
@@ -306,6 +306,7 @@ out: | |||
306 | static void wlcore_adjust_conf(struct wl1271 *wl) | 306 | static void wlcore_adjust_conf(struct wl1271 *wl) |
307 | { | 307 | { |
308 | /* Adjust settings according to optional module parameters */ | 308 | /* Adjust settings according to optional module parameters */ |
309 | |||
309 | if (fwlog_param) { | 310 | if (fwlog_param) { |
310 | if (!strcmp(fwlog_param, "continuous")) { | 311 | if (!strcmp(fwlog_param, "continuous")) { |
311 | wl->conf.fwlog.mode = WL12XX_FWLOG_CONTINUOUS; | 312 | wl->conf.fwlog.mode = WL12XX_FWLOG_CONTINUOUS; |
@@ -321,6 +322,12 @@ static void wlcore_adjust_conf(struct wl1271 *wl) | |||
321 | wl1271_error("Unknown fwlog parameter %s", fwlog_param); | 322 | wl1271_error("Unknown fwlog parameter %s", fwlog_param); |
322 | } | 323 | } |
323 | } | 324 | } |
325 | |||
326 | if (bug_on_recovery != -1) | ||
327 | wl->conf.recovery.bug_on_recovery = (u8) bug_on_recovery; | ||
328 | |||
329 | if (no_recovery != -1) | ||
330 | wl->conf.recovery.no_recovery = (u8) no_recovery; | ||
324 | } | 331 | } |
325 | 332 | ||
326 | static void wl12xx_irq_ps_regulate_link(struct wl1271 *wl, | 333 | static void wl12xx_irq_ps_regulate_link(struct wl1271 *wl, |
@@ -903,10 +910,10 @@ static void wl1271_recovery_work(struct work_struct *work) | |||
903 | wlcore_print_recovery(wl); | 910 | wlcore_print_recovery(wl); |
904 | } | 911 | } |
905 | 912 | ||
906 | BUG_ON(bug_on_recovery && | 913 | BUG_ON(wl->conf.recovery.bug_on_recovery && |
907 | !test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)); | 914 | !test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)); |
908 | 915 | ||
909 | if (no_recovery) { | 916 | if (wl->conf.recovery.no_recovery) { |
910 | wl1271_info("No recovery (chosen on module load). Fw will remain stuck."); | 917 | wl1271_info("No recovery (chosen on module load). Fw will remain stuck."); |
911 | goto out_unlock; | 918 | goto out_unlock; |
912 | } | 919 | } |
@@ -6013,10 +6020,10 @@ module_param_named(fwlog, fwlog_param, charp, 0); | |||
6013 | MODULE_PARM_DESC(fwlog, | 6020 | MODULE_PARM_DESC(fwlog, |
6014 | "FW logger options: continuous, ondemand, dbgpins or disable"); | 6021 | "FW logger options: continuous, ondemand, dbgpins or disable"); |
6015 | 6022 | ||
6016 | module_param(bug_on_recovery, bool, S_IRUSR | S_IWUSR); | 6023 | module_param(bug_on_recovery, int, S_IRUSR | S_IWUSR); |
6017 | MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery"); | 6024 | MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery"); |
6018 | 6025 | ||
6019 | module_param(no_recovery, bool, S_IRUSR | S_IWUSR); | 6026 | module_param(no_recovery, int, S_IRUSR | S_IWUSR); |
6020 | MODULE_PARM_DESC(no_recovery, "Prevent HW recovery. FW will remain stuck."); | 6027 | MODULE_PARM_DESC(no_recovery, "Prevent HW recovery. FW will remain stuck."); |
6021 | 6028 | ||
6022 | MODULE_LICENSE("GPL"); | 6029 | MODULE_LICENSE("GPL"); |