linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Tim Gardner <timg@tpi.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] dell-laptop: Fix rfkill state setting
Date: Mon, 27 Jul 2009 16:23:56 +0100	[thread overview]
Message-ID: <20090727152356.GA8049@srcf.ucam.org> (raw)
In-Reply-To: <1248707418.8500.1.camel@johannes.local>

On Mon, Jul 27, 2009 at 05:10:18PM +0200, Johannes Berg wrote:

> Hmm. The previous code was
> 
> -       if (status & (1<<16))
> -               new_state = RFKILL_STATE_SOFT_BLOCKED;
> -
> -       if (status & (1<<bit))
> -               *state = new_state;
> -       else
> -               *state = RFKILL_STATE_UNBLOCKED;
> -
> -       return 0;
> 
> where new_state was initialised to RFKILL_STATE_HARD_BLOCKED.
> 
> So doesn't that mean that 1<<bit is the hard-block bit? Or was the
> previous code just bogus, but happened to work since rfkill didn't
> separate the hard/soft kill concepts?

The previous code may well have been bogus. The code is basically the 
only documentation I have here - bit 16 indicates that the switch is on 
(and thus everything else is hard blocked), while bits 17, 18 and 19 
indicate blocked wifi, bluetooth and wwan respectively. I'd assumed that 
those indicated that they were soft blocked independently of the 
hardware block state, but it may be that the hardware doesn't expose the 
soft state if the hard switch is blocking the devices.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

      parent reply	other threads:[~2009-07-27 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27 14:47 [PATCH] dell-laptop: Fix rfkill state setting Tim Gardner
2009-07-27 14:53 ` Matthew Garrett
2009-07-27 15:10 ` Johannes Berg
2009-07-27 15:19   ` Tim Gardner
2009-07-27 15:23   ` Matthew Garrett [this message]

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=20090727152356.GA8049@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=timg@tpi.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).