mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jcm@jonmasters.org
To: linux-wireless@vger.kernel.org
Cc: Brett Rudley <brudley@broadcom.com>,
	Henry Ptasinski <henryp@broadcom.com>,
	Nohee Ko <noheek@broadcom.com>, Jon Masters <jcm@jonmasters.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] [staging] brcm80211: fix radio disabled on attempt to bring up interface
Date: Tue, 12 Oct 2010 04:29:58 -0400	[thread overview]
Message-ID: <1286872198-10664-1-git-send-email-jcm@jonmasters.org> (raw)

The brcm80211 driver does not correctly handle the case that the wireless
radio hardware is physically disabled during interface initialization. An
attempt is made to check whether the radio is disabled, and in the case
that it is, a background worker is setup to monitor for the radio coming
online, but the interface queues are incorrectly brought up anyway. The
value BCME_RADIOOFF should be returned in wlc_up in such error case.

Signed-off-by: Jon Masters <jcm@jonmasters.org>

diff -urNp brcm80211_orig/sys/wlc_mac80211.c brcm80211/sys/wlc_mac80211.c
--- brcm80211_orig/sys/wlc_mac80211.c	2010-10-12 04:18:07.940125220 -0400
+++ brcm80211/sys/wlc_mac80211.c	2010-10-12 04:19:19.814961117 -0400
@@ -2783,7 +2783,7 @@ int BCMINITFN(wlc_up) (wlc_info_t *wlc)
 
 	if (wlc->pub->radio_disabled) {
 		wlc_radio_monitor_start(wlc);
-		return 0;
+		return BCME_RADIOOFF;
 	}
 
 	/* wlc_bmac_up_prep has done wlc_corereset(). so clk is on, set it */

             reply	other threads:[~2010-10-12  8:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12  8:29 jcm [this message]
2010-10-12 18:34 ` Brett Rudley
2010-10-12 19:17   ` Jon Masters

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=1286872198-10664-1-git-send-email-jcm@jonmasters.org \
    --to=jcm@jonmasters.org \
    --cc=brudley@broadcom.com \
    --cc=henryp@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=noheek@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

all inboxes | Powered by JetHome®