LKML Archive on
help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <>
To: Alan Jenkins <>
Cc: linux-kernel <>,
Subject: Re: rfkill, stupid question #6
Date: Mon, 3 Nov 2008 17:06:17 -0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, 03 Nov 2008, Alan Jenkins wrote:
> I have one more question.  I read that if a STATE_SOFT_BLOCKED request
> is made when the hardware is in STATE_HARD_BLOCKED, the rfkill driver is
> expected to "double block".

If it can do so, yes.  It makes for marginally better use interaction.

> If the hard block is later cleared, the driver is expected to call
> rfkill_force_state(SOFT_BLOCKED).  The SOFT_BLOCKED state can then be
> cleared as normal.


> But if there is an UNBLOCK request in the double-blocked state, the
> rfkill core will reject it and preserve the  double-blocked state.  Is
> this intended, or a known issue?

It is intended.  The user wants to unblock the radio (not "prepare it to
unblock when I release the hardware rfkill line by doing something else"),
so we have to error it out.

And, frankly, I don't very much like the idea of the core returning a
-EPERM and yet having done a call toggle_radio(UNBLOCK).   Not to mention
it is yet another border condition for the hook API.

So, if something took the pains to cause a double block, we require
explicit unblocking AFTER the hardware rfkill lines are released (i.e. the
device goes from HARD to SOFT blocked).

BUT I don't feel strongly about it, so if someone wants to change that, I
won't stand in the way.

> Wouldn't it be simpler to use a bitmask so that the rfkill core can at
> least represent this double-blocked state?  I guess the problem would be
> how to shoehorn it into the sysfs interface.

The core doesn't care, and doesn't have to in order to implement such a
thing.  The drivers track it separately.

The two problems is that it can be REALLY confusing for the end user, and
that it requires a ABI change.  I don't know if it is worth it, I just know
I am not going to be the one doing it :-)

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2008-11-03 19:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 17:09 eeepc-laptop rfkill, stupid question #4 and 5 Alan Jenkins
2008-10-31 17:11 ` Matthew Garrett
2008-10-31 17:27   ` Alan Jenkins
2008-10-31 20:54     ` Alan Jenkins
2008-11-02  4:00       ` Henrique de Moraes Holschuh
2008-11-02 11:17         ` eeepc-laptop rfkill, stupid question #4 Alan Jenkins
2008-11-02 13:06           ` Matthew Garrett
2008-11-02 13:25             ` Alan Jenkins
2008-11-02 13:26               ` Matthew Garrett
2008-11-03 14:47               ` Henrique de Moraes Holschuh
2008-11-03 14:16             ` Henrique de Moraes Holschuh
2008-11-03 14:18               ` Matthew Garrett
2008-11-03 14:29                 ` Alan Jenkins
2008-11-03 14:51                   ` Henrique de Moraes Holschuh
2008-11-03 14:55                     ` Matthew Garrett
2008-11-03 15:02                       ` Henrique de Moraes Holschuh
2008-11-03 15:08                         ` Matthew Garrett
2008-11-03 16:33                           ` Henrique de Moraes Holschuh
2008-11-03 18:00                             ` rfkill, stupid question #6 Alan Jenkins
2008-11-03 19:06                               ` Henrique de Moraes Holschuh [this message]
2008-11-04 15:48                             ` eeepc-laptop rfkill, stupid question #4 Luiz Fernando N. Capitulino
2008-11-04 15:57                               ` Alan Jenkins
2008-11-02  3:46   ` eeepc-laptop rfkill, stupid question #4 and 5 Henrique de Moraes Holschuh
2008-11-02  9:21     ` Matthew Garrett

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: rfkill, stupid question #6' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).