linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Darren Salt <linux@youmustbejoking.demon.co.uk>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [rt2800pci] Problems with (and without) rfkill
Date: Sat, 1 Aug 2009 14:30:30 +0200	[thread overview]
Message-ID: <200908011430.30634.IvDoorn@gmail.com> (raw)
In-Reply-To: <5088EED148%linux@youmustbejoking.demon.co.uk>

Hi,

> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x
> index 8a22e65..f934325 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -380,7 +380,12 @@ static int rt2800pci_rfkill_poll(struct rt2x00_dev *rt2x00d
>         u32 reg;
>  
>         rt2x00pci_register_read(rt2x00dev, GPIO_CTRL_CFG, &reg);
> -       return rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2);
> +       /*return rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2);*/
> +       if (rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2)) {
> +               rt2x00_set_field32(&reg, GPIO_CTRL_CFG_BIT2, 0);
> +               rt2x00pci_register_write(rt2x00dev, GPIO_CTRL_CFG, reg);
> +       }
> +       return 0;       
>  }

Writing to the GPIO isn't the solution, the entire register is read-only, so
the chip will ignore it. The reason why the RFKILL bit is apparently set
while it shouldn't is that the device isn't initialized correctly and the
entire device isn't ready to handle anything at this time.

Ivo

      reply	other threads:[~2009-08-01 12:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 13:37 [rt2800pci] Problems with (and without) rfkill Darren Salt
2009-08-01 12:30 ` Ivo van Doorn [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=200908011430.30634.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@youmustbejoking.demon.co.uk \
    /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).