diff options
author | Roland Vossen <rvossen@broadcom.com> | 2011-10-18 08:03:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-08 15:54:06 -0500 |
commit | c261bdf8acad56717cae233709808d8d9291ce36 (patch) | |
tree | 0cfadca532d8e58122c2ddf8fe40efa1704403cb /drivers/net/wireless/brcm80211 | |
parent | 0527781eb00550226d638b9be23d246c7ba796f6 (diff) |
brcm80211: smac: indicate severe problems to Mac80211
In case the hardware crashes, a reinitialization internal to the driver
was performed. Since Mac80211 must be in the know of such an event as
well, ieee80211_restart_hw() is now called.
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 14 |
3 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 538b504f9bdd..7a24a8314445 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
@@ -1334,6 +1334,14 @@ uint brcms_reset(struct brcms_info *wl) | |||
1334 | return 0; | 1334 | return 0; |
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | void brcms_fatal_error(struct brcms_info *wl) | ||
1338 | { | ||
1339 | wiphy_err(wl->wlc->wiphy, "wl%d: fatal error, reinitializing\n", | ||
1340 | wl->wlc->pub->unit); | ||
1341 | brcms_reset(wl); | ||
1342 | ieee80211_restart_hw(wl->pub->ieee_hw); | ||
1343 | } | ||
1344 | |||
1337 | /* | 1345 | /* |
1338 | * These are interrupt on/off entry points. Disable interrupts | 1346 | * These are interrupt on/off entry points. Disable interrupts |
1339 | * during interrupt state transition. | 1347 | * during interrupt state transition. |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h index 177f0e44e4b6..5c279c0a898c 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h | |||
@@ -104,5 +104,6 @@ extern bool brcms_del_timer(struct brcms_timer *timer); | |||
104 | extern void brcms_msleep(struct brcms_info *wl, uint ms); | 104 | extern void brcms_msleep(struct brcms_info *wl, uint ms); |
105 | extern void brcms_dpc(unsigned long data); | 105 | extern void brcms_dpc(unsigned long data); |
106 | extern void brcms_timer(struct brcms_timer *t); | 106 | extern void brcms_timer(struct brcms_timer *t); |
107 | extern void brcms_fatal_error(struct brcms_info *wl); | ||
107 | 108 | ||
108 | #endif /* _BRCM_MAC80211_IF_H_ */ | 109 | #endif /* _BRCM_MAC80211_IF_H_ */ |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 84f32b66474c..2e1a20be5565 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -2301,13 +2301,6 @@ void brcms_b_antsel_type_set(struct brcms_hardware *wlc_hw, u8 antsel_type) | |||
2301 | wlc_phy_antsel_type_set(wlc_hw->band->pi, antsel_type); | 2301 | wlc_phy_antsel_type_set(wlc_hw->band->pi, antsel_type); |
2302 | } | 2302 | } |
2303 | 2303 | ||
2304 | static void brcms_c_fatal_error(struct brcms_c_info *wlc) | ||
2305 | { | ||
2306 | wiphy_err(wlc->wiphy, "wl%d: fatal error, reinitializing\n", | ||
2307 | wlc->pub->unit); | ||
2308 | brcms_init(wlc->wl); | ||
2309 | } | ||
2310 | |||
2311 | static void brcms_b_fifoerrors(struct brcms_hardware *wlc_hw) | 2304 | static void brcms_b_fifoerrors(struct brcms_hardware *wlc_hw) |
2312 | { | 2305 | { |
2313 | bool fatal = false; | 2306 | bool fatal = false; |
@@ -2363,7 +2356,7 @@ static void brcms_b_fifoerrors(struct brcms_hardware *wlc_hw) | |||
2363 | } | 2356 | } |
2364 | 2357 | ||
2365 | if (fatal) { | 2358 | if (fatal) { |
2366 | brcms_c_fatal_error(wlc_hw->wlc); /* big hammer */ | 2359 | brcms_fatal_error(wlc_hw->wlc->wl); /* big hammer */ |
2367 | break; | 2360 | break; |
2368 | } else | 2361 | } else |
2369 | W_REG(®s->intctrlregs[idx].intstatus, | 2362 | W_REG(®s->intctrlregs[idx].intstatus, |
@@ -8397,8 +8390,7 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded) | |||
8397 | printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n", | 8390 | printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n", |
8398 | __func__, wlc_hw->sih->chip, | 8391 | __func__, wlc_hw->sih->chip, |
8399 | wlc_hw->sih->chiprev); | 8392 | wlc_hw->sih->chiprev); |
8400 | /* big hammer */ | 8393 | brcms_fatal_error(wlc_hw->wlc->wl); |
8401 | brcms_init(wlc->wl); | ||
8402 | } | 8394 | } |
8403 | 8395 | ||
8404 | /* gptimer timeout */ | 8396 | /* gptimer timeout */ |
@@ -8419,7 +8411,7 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded) | |||
8419 | return wlc->macintstatus != 0; | 8411 | return wlc->macintstatus != 0; |
8420 | 8412 | ||
8421 | fatal: | 8413 | fatal: |
8422 | brcms_init(wlc->wl); | 8414 | brcms_fatal_error(wlc_hw->wlc->wl); |
8423 | return wlc->macintstatus != 0; | 8415 | return wlc->macintstatus != 0; |
8424 | } | 8416 | } |
8425 | 8417 | ||