From: "Arend van Spriel" <arend@broadcom.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
"Roland Vossen" <rvossen@broadcom.com>,
"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 08/15] brcm80211: smac: indicate severe problems to Mac80211
Date: Tue, 18 Oct 2011 14:03:04 +0200 [thread overview]
Message-ID: <1318939391-19495-9-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1318939391-19495-1-git-send-email-arend@broadcom.com>
From: Roland Vossen <rvossen@broadcom.com>
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>
---
.../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 8 ++++++++
.../net/wireless/brcm80211/brcmsmac/mac80211_if.h | 1 +
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 538b504..7a24a83 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)
return 0;
}
+void brcms_fatal_error(struct brcms_info *wl)
+{
+ wiphy_err(wl->wlc->wiphy, "wl%d: fatal error, reinitializing\n",
+ wl->wlc->pub->unit);
+ brcms_reset(wl);
+ ieee80211_restart_hw(wl->pub->ieee_hw);
+}
+
/*
* These are interrupt on/off entry points. Disable interrupts
* 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 177f0e4..5c279c0 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);
extern void brcms_msleep(struct brcms_info *wl, uint ms);
extern void brcms_dpc(unsigned long data);
extern void brcms_timer(struct brcms_timer *t);
+extern void brcms_fatal_error(struct brcms_info *wl);
#endif /* _BRCM_MAC80211_IF_H_ */
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 84f32b6..2e1a20b 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)
wlc_phy_antsel_type_set(wlc_hw->band->pi, antsel_type);
}
-static void brcms_c_fatal_error(struct brcms_c_info *wlc)
-{
- wiphy_err(wlc->wiphy, "wl%d: fatal error, reinitializing\n",
- wlc->pub->unit);
- brcms_init(wlc->wl);
-}
-
static void brcms_b_fifoerrors(struct brcms_hardware *wlc_hw)
{
bool fatal = false;
@@ -2363,7 +2356,7 @@ static void brcms_b_fifoerrors(struct brcms_hardware *wlc_hw)
}
if (fatal) {
- brcms_c_fatal_error(wlc_hw->wlc); /* big hammer */
+ brcms_fatal_error(wlc_hw->wlc->wl); /* big hammer */
break;
} else
W_REG(®s->intctrlregs[idx].intstatus,
@@ -8397,8 +8390,7 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded)
printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n",
__func__, wlc_hw->sih->chip,
wlc_hw->sih->chiprev);
- /* big hammer */
- brcms_init(wlc->wl);
+ brcms_fatal_error(wlc_hw->wlc->wl);
}
/* gptimer timeout */
@@ -8419,7 +8411,7 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded)
return wlc->macintstatus != 0;
fatal:
- brcms_init(wlc->wl);
+ brcms_fatal_error(wlc_hw->wlc->wl);
return wlc->macintstatus != 0;
}
--
1.7.4.1
next prev parent reply other threads:[~2011-10-18 12:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 12:02 [PATCH 00/15] brcm80211: cleanup work on community feedback Arend van Spriel
2011-10-18 12:02 ` [PATCH 01/15] brcm80211: cleanup defines in main.c Arend van Spriel
2011-10-18 12:02 ` [PATCH 02/15] brcm80211: removed duplicate defines Arend van Spriel
2011-10-18 12:02 ` [PATCH 03/15] brcm80211: smac: drop "40MHz intolerant" flag from HT capability info Arend van Spriel
2011-10-18 12:03 ` [PATCH 04/15] brcm80211: smac: removed support for SROM rev < 8 Arend van Spriel
2011-10-18 12:03 ` [PATCH 05/15] brcm80211: fmac: annotated little endian struct with _le Arend van Spriel
2011-10-18 12:03 ` [PATCH 06/15] brmc80211: fmac: reworked next_bss() Arend van Spriel
2011-10-18 12:03 ` [PATCH 07/15] brcm80211: fmac: changed two scan related structures Arend van Spriel
2011-10-18 12:03 ` Arend van Spriel [this message]
2011-10-18 12:03 ` [PATCH 09/15] brcm80211: smac: remove obsolete srom variables from n-phy Arend van Spriel
2011-10-18 12:03 ` [PATCH 10/15] brcm80211: smac: avoid sprom endianess conversions for crc8 check Arend van Spriel
2011-10-18 12:03 ` [PATCH 11/15] brcm80211: smac: some local function made static in main.c Arend van Spriel
2011-10-18 12:03 ` [PATCH 12/15] brcm80211: smac: remove phy api bypass in rate.h Arend van Spriel
2011-10-18 12:03 ` [PATCH 13/15] brcm80211: util: move brcmu_pktfrombuf() function to brcmfmac Arend van Spriel
2011-10-18 12:03 ` [PATCH 14/15] brcm80211: util: remove function brcmu_format_hex() from brcmutil Arend van Spriel
2011-10-18 12:03 ` [PATCH 15/15] brcm80211: fmac: use sk_buff list for handling frames in receive path Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318939391-19495-9-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rvossen@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox