brcmsmac: don't start device when RfKill is engaged

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>
This commit is contained in:
Piotr Haber 2012-09-19 22:21:15 +02:00 committed by John W. Linville
parent 816432922b
commit 82d8eba358
1 changed files with 4 additions and 1 deletions

View File

@ -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);