linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	John W Linville <linville@tuxdriver.com>,
	bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org
Subject: Re: [RFC] b43: A patch for control of the radio LED using rfkill
Date: Thu, 18 Sep 2008 22:09:22 +0200	[thread overview]
Message-ID: <200809182209.22992.IvDoorn@gmail.com> (raw)
In-Reply-To: <200809182034.00801.mb@bu3sch.de>

On Thursday 18 September 2008, Michael Buesch wrote:
> On Thursday 18 September 2008 20:23:21 Ivo van Doorn wrote:
> > On Thursday 18 September 2008, Michael Buesch wrote:
> > > On Thursday 18 September 2008 20:10:35 Ivo van Doorn wrote:
> > > > On Thursday 18 September 2008, Michael Buesch wrote:
> > > > > On Thursday 18 September 2008 19:48:27 Ivo van Doorn wrote:
> > > > > > Well no actually, when the radio state (software rfkill state in your words)
> > > > > 
> > > > > No, "radio state" is _not_ "software rfkill state" in my words.
> > > > > It's an independent state.
> > > > > The actual physical radio state is a combined state of the two sw and hw state bits.
> > > > > If either bit blocks the radio, it's physically blocked. We cannot toggle the hw bit
> > > > > from software.
> > > > 
> > > > Ah ok. In that case b43 should do:
> > > > 
> > > > send HW_BLOCK when the hardware rfkill state is set to block
> > > > send SOFT_BLOCK when the software rfkill state is set to block
> > > > 
> > > > But it shouldn't (and that change was the start of this discussion) send SOFT_BLOCK
> > > > when mac80211 disabled the radio.
> > > 
> > > I'm kind of confused. You say one thing and revert it right in the next sentence.
> > 
> > Ehm now you are confusing me.
> > You state that software rfkill state is not the state as requested by mac80211.
> 
> 
> Nono. I will try to explain it once again. It's really easy.
> 
> Think of b43 having two independent registers for rfkill. (the actual hardware
> is different, but that doesn't matter. It's a driver internal implementation detail).
> One of these registers is readonly and it does indicate the physical rfkill button state.
> If that register indicates BLOCK, we can't do anything about it. The radio is blocked.

Which qualifies for a HW_BLOCK signal

> However, we can still write to the second register and turn the radio off through
> that, too. We can also write to the second register to turn the radio on, _but_ it won't
> physically turn on until the physical button is pressed and the first register changes
> to Unblocked.

Since the hardware doesn't toggle this field when a key is pressed, it is more the state
of the radio as configured by mac80211. And thus shouldn't generate RFKILL events.

> So you say that rfkill should only be notified about changes in the first read-only
> hardware intication bit? If that's the case, it would be possible to turn the radio off
> through mac80211 calls (using the read-write register), but still have rfkill think it's
> unblocked.

Right. Because how I see the rfkill layer is that it doesn't represent the RADIO state
but the RFKILL state (and uses that to control the RADIO state).

Ivo

  parent reply	other threads:[~2008-09-18 20:09 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18  5:07 [RFC] b43: A patch for control of the radio LED using rfkill Larry Finger
2008-09-18 13:19 ` Ivo van Doorn
2008-09-18 13:47   ` Larry Finger
2008-09-18 13:53     ` Ivo van Doorn
2008-09-18 14:21       ` Henrique de Moraes Holschuh
2008-09-18 14:26         ` Ivo van Doorn
2008-09-18 14:52           ` Henrique de Moraes Holschuh
2008-09-18 15:19             ` [PATCH] rfkill: clarify usage of rfkill_force_state() and rfkill->get_state() Henrique de Moraes Holschuh
2008-09-18 15:24               ` Ivo van Doorn
2008-09-18 16:43                 ` Henrique de Moraes Holschuh
2008-09-18 16:45                   ` Johannes Berg
2008-09-18 17:32                     ` Ivo van Doorn
2008-09-18 17:52                       ` Johannes Berg
2008-09-18 18:12                         ` Ivo van Doorn
2008-09-18 17:40                   ` Ivo van Doorn
2008-09-18 17:41         ` [RFC] b43: A patch for control of the radio LED using rfkill Michael Buesch
2008-09-18 17:37       ` Michael Buesch
2008-09-18 17:48         ` Ivo van Doorn
2008-09-18 17:56           ` Michael Buesch
2008-09-18 18:10             ` Ivo van Doorn
2008-09-18 18:17               ` Michael Buesch
2008-09-18 18:23                 ` Ivo van Doorn
2008-09-18 18:34                   ` Michael Buesch
2008-09-18 18:36                     ` Johannes Berg
2008-09-18 19:23                     ` Henrique de Moraes Holschuh
2008-09-18 20:09                     ` Ivo van Doorn [this message]
2008-09-18 19:08           ` Henrique de Moraes Holschuh
2008-09-18 20:17             ` Ivo van Doorn
2008-09-18 20:28               ` Henrique de Moraes Holschuh
2008-09-18 20:42                 ` Ivo van Doorn
2008-09-18 17:34     ` Michael Buesch
2008-09-18 17:42       ` Ivo van Doorn
2008-09-18 17:49         ` Johannes Berg
2008-09-18 18:02           ` Ivo van Doorn
2008-09-18 19:50             ` Henrique de Moraes Holschuh
2008-09-18 17:53         ` Michael Buesch
2008-09-18 18:06           ` Ivo van Doorn
2008-09-18 14:10   ` Henrique de Moraes Holschuh
2008-09-18 14:24     ` Ivo van Doorn
2008-09-18 14:37       ` Henrique de Moraes Holschuh
2008-09-18 15:16         ` Ivo van Doorn
2008-09-18 16:08           ` Henrique de Moraes Holschuh
2008-09-18 16:51             ` Ivo van Doorn
2008-09-18 18:47               ` Henrique de Moraes Holschuh
2008-09-18 19:14                 ` Johannes Berg
2008-09-18 20:35                 ` Ivo van Doorn
2008-09-18 21:34                   ` Henrique de Moraes Holschuh
2008-09-18 17:44       ` Michael Buesch
2008-09-18 17:52         ` Ivo van Doorn
2008-09-18 17:54           ` Johannes Berg
2008-09-18 18:06             ` Ivo van Doorn
2008-09-18 18:13               ` Johannes Berg
2008-09-18 20:10               ` Henrique de Moraes Holschuh
2008-09-18 20:41                 ` Ivo van Doorn
2008-09-18 21:36                   ` Henrique de Moraes Holschuh
2008-09-19 17:02                     ` Ivo van Doorn
2008-09-20 13:10                       ` Henrique de Moraes Holschuh
2008-09-20 13:20                         ` Ivo van Doorn
2008-09-22  3:01                           ` Henrique de Moraes Holschuh
2008-09-22 21:16                             ` Michael Buesch
2008-09-18 17:31 ` Michael Buesch
2008-09-18 20:13   ` Henrique de Moraes Holschuh

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=200809182209.22992.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    /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).