linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Werner Almesberger <werner@openmoko.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: rfkill: how murderous can it be ?
Date: Mon, 12 Jan 2009 14:34:44 -0500	[thread overview]
Message-ID: <1231788884.28887.4.camel@localhost.localdomain> (raw)
In-Reply-To: <20090112191514.GA22112@almesberger.net>

On Mon, 2009-01-12 at 17:15 -0200, Werner Almesberger wrote:
> I'd like to restart a discussion from last year, namely how aggressive
> an rfkill implementation is allowed to be when it comes to destroying
> MAC state.
> 
> The design suggested in rfkill.txt and also implemented in the existing
> drivers basically assumes a simple on/off switch that cuts power to the
> transmitter but doesn't change anything else. The question is if this 
> is already the full extent to which rfkill is allowed to affect MAC
> state or if it could go further.
> 
> In the AR6k, we don't have such a simple switch for the transmitter. We
> can control what the transmitter does very indirectly by temporarily
> reconfiguring the MAC, but this creates a fair amount of complexity,
> which also seems to be at odds with the design of rfkill.
> 
> Alternatively, we could just power down the whole WLAN module. That is
> easily done and very reliable. However, MAC state (ESSID, keys, and a
> host of other settings) is obliterated if we do this. A watchful user 
> space (e.g., wpa_supplicant) could then restore the status quo ante.
> 
> Now the question is whether this is still in the spirit of the design 
> of rfkill of if it would take things too far.
> 
> It seems that there is no consensus on this issue yet. I started the 
> implementation with the assumption that rfkill should always behave as 
> if it only cut transmitter power, so no other state of the MAC is
> allowed to be lost. This is also what Henrique suggested I should do.
> 
> However, Andy and recently Michael suggested that, given that an
> interface that has no connectivity for an extended period of time is
> likely to get reconfigured anyway, it may be sufficient if rfkill 
> leaves things in a state that allows user space to restore 
> connectivity, without having to worry about details beyond that.

Yes.  You have no guarantees about how long the RF is down when the
switch is flipped or the checkbox ticked.  Instead of putting a bunch of
complexity in the kernel and drivers that *already* has to be in
userspace, just punt it out to userspace where it's already done and
works well.

If there are any latency issues with this, then we need to fix those
latency issues in wpa_supplicant, not put complex state handling into
the stack drivers for this.  Treat rfkill the same as suspend/resume
from a state perspective, because they really have the same
consequences: you have no idea where you are when you wake up, what has
happened since RF was turned off, and whether your AP is still around.
Better to make scanning and associate fast and foolproof, which has to
happen in userspace anyway.

Dan



  parent reply	other threads:[~2009-01-12 19:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 19:15 rfkill: how murderous can it be ? Werner Almesberger
2009-01-12 19:31 ` Hans Henry von Tresckow
2009-01-13 13:14   ` Henrique de Moraes Holschuh
2009-01-13 16:11     ` Werner Almesberger
2009-01-13 20:56       ` Henrique de Moraes Holschuh
2009-01-12 19:34 ` Dan Williams [this message]
2009-01-12 19:49   ` Michael Buesch
2009-01-12 21:13   ` Werner Almesberger
2009-01-13 15:17     ` Michael Buesch
2009-01-13  0:54 ` Matthew Garrett
2009-01-13 13:21   ` Henrique de Moraes Holschuh
2009-01-13 13:40     ` Johannes Berg
2009-01-15  2:16       ` 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=1231788884.28887.4.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=werner@openmoko.org \
    /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).