Skip to content

Commit

Permalink
brcmsmac: don't start device when RfKill is engaged
Browse files Browse the repository at this point in the history
This patch fixes a bug when device is being started
while RfKill switch is engaged, leading to hang
due to partial initialization of hardware.

Tested-by: <dragonn@op.pl>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Piotr Haber authored and John W. Linville committed Sep 24, 2012
1 parent 8164329 commit 82d8eba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ static int brcms_ops_start(struct ieee80211_hw *hw)
wl->mute_tx = true;

if (!wl->pub->up)
err = brcms_up(wl);
if (!blocked)
err = brcms_up(wl);
else
err = -ERFKILL;
else
err = -ENODEV;
spin_unlock_bh(&wl->lock);
Expand Down

0 comments on commit 82d8eba

Please sign in to comment.