linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: bcm43xx-dev@lists.berlios.de
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	John Linville <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] b43legacy: Change the hardware radio enable logic and cleanup code
Date: Fri, 21 Sep 2007 15:22:00 +0200	[thread overview]
Message-ID: <200709211522.01273.mb@bu3sch.de> (raw)
In-Reply-To: <46f319ef.8UBDQAjFjjfCblr5%Larry.Finger@lwfinger.net>

On Friday 21 September 2007 03:10:07 Larry Finger wrote:
> This change cleans up the radio-related messages in several ways.
> 
> (1) The state of the rfkill switch is assumed to be on, rather than
>     tested. Now, any user without such a switch will not see any
>     messages. For devices with such a switch, a message will be
>     logged only if the initial state is off, or if the switch is toggled.
> (2) The routine for testing the switch state is no longer inline.
> (3) The LED handling routine is simplified.
> (4) The "Radio turned off" message that has confused some users has been
>     changed to "Radio initialized".
> 
> This patch is patterned after a similar change to b43 by Michael Buesch.
> 
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>

> Index: wireless-dev/drivers/net/wireless/b43legacy/leds.c
> ===================================================================
> --- wireless-dev.orig/drivers/net/wireless/b43legacy/leds.c
> +++ wireless-dev/drivers/net/wireless/b43legacy/leds.c
> @@ -182,6 +182,7 @@ void b43legacy_leds_update(struct b43leg
>  	unsigned long interval = 0;
>  	u16 ledctl;
>  	unsigned long flags;
> +	bool radio_enabled = (phy->radio_on && dev->radio_hw_enable);

Just that you are aware of it:
This is a racy access to the radio_hw_enable variable, as we don't take
the mutex here (we can't and we don't want). But it's OK, since nobody
cares if the LED is racing for a second and displays the wrong state
for a second.
Same goes for the phy->radio_on access.

The patch is ACKed by me.

-- 
Greetings Michael.

  reply	other threads:[~2007-09-21 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-21  1:10 [PATCH] b43legacy: Change the hardware radio enable logic and cleanup code Larry Finger
2007-09-21 13:22 ` Michael Buesch [this message]
2007-09-21 15:54   ` Larry Finger
2007-09-22  7:05   ` Kalle Valo

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=200709211522.01273.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=Larry.Finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).