aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-10-21 10:16:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-08 15:54:18 -0500
commita8bc4917ed6bd6101569630708baaac14504ab8c (patch)
tree90e0736ca0107a8583b1416711f4f1f8c961c866 /drivers/net
parent43ac09722f8e8f69cb528877c4b853cf9b96d9d7 (diff)
brcm80211: smac: bugfix for tx mute in brcms_b_init()
Transmit can only be muted if the mac core is enabled. When brcms_b_init() is called, the mac core is suspended. Brcms_b_init() calls a transmit mute function that requires an enabled mac core. This code path is never taken, but would have been taken in subsequent patches. Reviewed-by: Alwin Beukers <alwin@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@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')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 2fecf06b078a..8eb665ee974a 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -2452,6 +2452,7 @@ static void brcms_b_tx_fifo_resume(struct brcms_hardware *wlc_hw,
2452 } 2452 }
2453} 2453}
2454 2454
2455/* precondition: requires the mac core to be enabled */
2455static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool on, u32 flags) 2456static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool on, u32 flags)
2456{ 2457{
2457 static const u8 null_ether_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; 2458 static const u8 null_ether_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
@@ -3354,8 +3355,7 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc)
3354} 3355}
3355 3356
3356void 3357void
3357static brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec, 3358static brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec) {
3358 bool mute) {
3359 u32 macintmask; 3359 u32 macintmask;
3360 bool fastclk; 3360 bool fastclk;
3361 struct brcms_c_info *wlc = wlc_hw->wlc; 3361 struct brcms_c_info *wlc = wlc_hw->wlc;
@@ -3380,10 +3380,6 @@ static brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec,
3380 /* core-specific initialization */ 3380 /* core-specific initialization */
3381 brcms_b_coreinit(wlc); 3381 brcms_b_coreinit(wlc);
3382 3382
3383 /* suspend the tx fifos and mute the phy for preism cac time */
3384 if (mute)
3385 brcms_b_mute(wlc_hw, ON, PHY_MUTE_FOR_PREISM);
3386
3387 /* band-specific inits */ 3383 /* band-specific inits */
3388 brcms_b_bsinit(wlc, chanspec); 3384 brcms_b_bsinit(wlc, chanspec);
3389 3385
@@ -8261,7 +8257,7 @@ void brcms_c_init(struct brcms_c_info *wlc)
8261{ 8257{
8262 struct d11regs __iomem *regs; 8258 struct d11regs __iomem *regs;
8263 u16 chanspec; 8259 u16 chanspec;
8264 bool mute = false; 8260 bool mute_tx = false;
8265 8261
8266 BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); 8262 BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
8267 8263
@@ -8277,7 +8273,7 @@ void brcms_c_init(struct brcms_c_info *wlc)
8277 else 8273 else
8278 chanspec = brcms_c_init_chanspec(wlc); 8274 chanspec = brcms_c_init_chanspec(wlc);
8279 8275
8280 brcms_b_init(wlc->hw, chanspec, mute); 8276 brcms_b_init(wlc->hw, chanspec);
8281 8277
8282 /* update beacon listen interval */ 8278 /* update beacon listen interval */
8283 brcms_c_bcn_li_upd(wlc); 8279 brcms_c_bcn_li_upd(wlc);
@@ -8343,6 +8339,10 @@ void brcms_c_init(struct brcms_c_info *wlc)
8343 /* ..now really unleash hell (allow the MAC out of suspend) */ 8339 /* ..now really unleash hell (allow the MAC out of suspend) */
8344 brcms_c_enable_mac(wlc); 8340 brcms_c_enable_mac(wlc);
8345 8341
8342 /* suspend the tx fifos and mute the phy for preism cac time */
8343 if (mute_tx)
8344 brcms_b_mute(wlc->hw, ON, PHY_MUTE_FOR_PREISM);
8345
8346 /* clear tx flow control */ 8346 /* clear tx flow control */
8347 brcms_c_txflowcontrol_reset(wlc); 8347 brcms_c_txflowcontrol_reset(wlc);
8348 8348