Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352183
b: refs/heads/master
c: 7230341
h: refs/heads/master
i:
  352181: 72f8005
  352179: 62ea3ba
  352175: cced238
v: v3
  • Loading branch information
Yair Shapira authored and Luciano Coelho committed Dec 4, 2012
1 parent 59724d4 commit 4bfcbb7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c108c90535ae29099de88187a90b8411bc1fe9a1
refs/heads/master: 7230341f254c9bce39e9576362f18b94854bc779
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ static struct wlcore_conf wl12xx_conf = {
.increase_time = 1,
.window_size = 16,
},
.recovery = {
.bug_on_recovery = 0,
.no_recovery = 0,
},
};

static struct wl12xx_priv_conf wl12xx_default_priv_conf = {
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/ti/wl18xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,10 @@ static struct wlcore_conf wl18xx_conf = {
.increase_time = 1,
.window_size = 16,
},
.recovery = {
.bug_on_recovery = 0,
.no_recovery = 0,
},
};

static struct wl18xx_priv_conf wl18xx_default_priv_conf = {
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1268,12 +1268,20 @@ struct conf_hangover_settings {
u8 window_size;
} __packed;

struct conf_recovery_settings {
/* BUG() on fw recovery */
u8 bug_on_recovery;

/* Prevent HW recovery. FW will remain stuck. */
u8 no_recovery;
} __packed;

/*
* The conf version consists of 4 bytes. The two MSB are the wlcore
* version, the two LSB are the lower driver's private conf
* version.
*/
#define WLCORE_CONF_VERSION (0x0003 << 16)
#define WLCORE_CONF_VERSION (0x0004 << 16)
#define WLCORE_CONF_MASK 0xffff0000
#define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \
sizeof(struct wlcore_conf))
Expand Down Expand Up @@ -1301,6 +1309,7 @@ struct wlcore_conf {
struct conf_fwlog fwlog;
struct conf_rate_policy_settings rate;
struct conf_hangover_settings hangover;
struct conf_recovery_settings recovery;
} __packed;

struct wlcore_conf_file {
Expand Down
19 changes: 13 additions & 6 deletions trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
#define WL1271_BOOT_RETRIES 3

static char *fwlog_param;
static bool bug_on_recovery;
static bool no_recovery;
static int bug_on_recovery = -1;
static int no_recovery = -1;

static void __wl1271_op_remove_interface(struct wl1271 *wl,
struct ieee80211_vif *vif,
Expand Down Expand Up @@ -306,6 +306,7 @@ static void wl12xx_tx_watchdog_work(struct work_struct *work)
static void wlcore_adjust_conf(struct wl1271 *wl)
{
/* Adjust settings according to optional module parameters */

if (fwlog_param) {
if (!strcmp(fwlog_param, "continuous")) {
wl->conf.fwlog.mode = WL12XX_FWLOG_CONTINUOUS;
Expand All @@ -321,6 +322,12 @@ static void wlcore_adjust_conf(struct wl1271 *wl)
wl1271_error("Unknown fwlog parameter %s", fwlog_param);
}
}

if (bug_on_recovery != -1)
wl->conf.recovery.bug_on_recovery = (u8) bug_on_recovery;

if (no_recovery != -1)
wl->conf.recovery.no_recovery = (u8) no_recovery;
}

static void wl12xx_irq_ps_regulate_link(struct wl1271 *wl,
Expand Down Expand Up @@ -903,10 +910,10 @@ static void wl1271_recovery_work(struct work_struct *work)
wlcore_print_recovery(wl);
}

BUG_ON(bug_on_recovery &&
BUG_ON(wl->conf.recovery.bug_on_recovery &&
!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags));

if (no_recovery) {
if (wl->conf.recovery.no_recovery) {
wl1271_info("No recovery (chosen on module load). Fw will remain stuck.");
goto out_unlock;
}
Expand Down Expand Up @@ -6013,10 +6020,10 @@ module_param_named(fwlog, fwlog_param, charp, 0);
MODULE_PARM_DESC(fwlog,
"FW logger options: continuous, ondemand, dbgpins or disable");

module_param(bug_on_recovery, bool, S_IRUSR | S_IWUSR);
module_param(bug_on_recovery, int, S_IRUSR | S_IWUSR);
MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery");

module_param(no_recovery, bool, S_IRUSR | S_IWUSR);
module_param(no_recovery, int, S_IRUSR | S_IWUSR);
MODULE_PARM_DESC(no_recovery, "Prevent HW recovery. FW will remain stuck.");

MODULE_LICENSE("GPL");
Expand Down

0 comments on commit 4bfcbb7

Please sign in to comment.