All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Tomas Winkler <tomasw@gmail.com>
Cc: drago01 <drago01@gmail.com>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Zhu, Yi" <yi.zhu@intel.com>,
	"Cahill, Ben M" <ben.m.cahill@intel.com>,
	ipw3945-devel <ipw3945-devel@lists.sourceforge.net>
Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
Date: Wed, 19 Mar 2008 10:15:04 -0400	[thread overview]
Message-ID: <1205936104.26119.9.camel@localhost.localdomain> (raw)
In-Reply-To: <1ba2fa240803181635o6cc264f4s578bbca7e4561c0e@mail.gmail.com>

On Wed, 2008-03-19 at 01:35 +0200, Tomas Winkler wrote:
> On Wed, Mar 19, 2008 at 1:10 AM, drago01 <drago01@gmail.com> wrote:
> >
> > On Wed, Mar 19, 2008 at 12:07 AM, Tomas Winkler <tomasw@gmail.com> wrote:
> >  > On Wed, Mar 19, 2008 at 12:06 AM, Chatre, Reinette
> >  >
> >  > <reinette.chatre@intel.com> wrote:
> >  >  >
> >  >
> >  >
> >  > > On Tuesday, March 18, 2008 2:47 PM, drago01  wrote:
> >  >  >
> >  >  >  >>  Please note that the driver loads/unloads the firmware during
> >  >  >  >>  interface up/down. That means that the host will not receive rfkill
> >  >  >  >>  events while the interface is down as there is no firmware to deal
> >  >  >  >> with these events.
> >  >  >  >>
> >  >  >  >>  Reinette
> >  >  >  >>
> >  >  >  >
> >  >  >  > OK that makes sense.
> >  >  >  > So a solution would be to not unload the firmware on down when the hw
> >  >  >  > rfkill is on. Is this a acceptable one or are they other (better
> >  >  >  > solutions). I can't think of any. And userspace cannot do anything
> >  >  >  > because bringing the device up and down again to look for the rfkill
> >  >  >  > status would be racy.
> >  >  >
> >  >  >  Having the firmware unloaded when the interface is down is a requirement
> >  >  >  for powersaving. We do not want the device to consume power when it is
> >  >  >  not used. The rfkill status should always be reported accurately when
> >  >  >  the interface is up. If it is not then it is a bug.
> >  >
> >  >  We will catch the HW rfkill event after loading the uCode so there is
> >  >  no problem with this.
> >  >  Not sure where should be the SW rfkill state stored.
> >
> >  yeah, but the ucode will be loaded when the device is brought back up,
> >  which does not happen in NM's case.
> >
> 
> You mean that NM doesn't have any notification that the radio was enabled again?

Well, NM would only be able to get that notification via HAL, which
would get the notification via the kernel RFKill layer or the input
layer.  In the case of iwlwifi, that even must come through the kernel
rfkill layer, however the driver decides to post that event.

> This one is tricky with 3945...the trivial question is why NM disables
> the device?

Because when the device is down (!IFF_UP), then the device is supposed
to enter the deepest power saving mode that it supports.  That's the
same for ethernet drivers and wireless drivers.  I think it's pretty
much up to the driver/ucode to track rfkill state across up/down/etc.

If 3945 can only detect the rfkill change when the ucode is loaded, then
we have a problem.

I'm not opposed to changing NetworkManager to keep the device up, but
just setting the TX power to 'off', though we must keep in mind that the
device is (a) not in a lowest power mode because RX circuits can still
be on, and (b) not all drivers probably respect WEXT txpower.  I don't
care about (b) at all, those drivers just have to get fixed.  But (a)
worries me since we don't have any API for inactive power saving modes
right now _other_ than !IFF_UP.  We will drain more power than setting
the device !IFF_UP.

Dan

> In 4965 there is an interrupt announcing rkfil, in 3965 it's event
> from firmware. There was portably a good reason why the interrupt was
> added :)
> 
> Sorry no solution for now.
> 
> Tomas


  parent reply	other threads:[~2008-03-19 19:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22 20:04 iwl3945 rfkill regression drago01
2008-01-22 20:07 ` [ipw3945-devel] " Winkler, Tomas
2008-01-22 20:12   ` drago01
2008-01-22 20:15     ` Winkler, Tomas
2008-01-22 20:21     ` Winkler, Tomas
2008-01-22 20:24       ` drago01
2008-01-22 20:29         ` Winkler, Tomas
2008-01-22 20:32           ` drago01
2008-01-25 19:04           ` drago01
2008-01-26 19:00         ` drago01
2008-01-26 22:11           ` Tomas Winkler
2008-02-13  7:42             ` drago01
2008-02-13 16:48               ` Chatre, Reinette
2008-03-18 19:32                 ` drago01
2008-03-18 21:26                   ` Chatre, Reinette
2008-03-18 21:46                     ` drago01
2008-03-18 22:06                       ` Chatre, Reinette
     [not found]                         ` <f6ca9fed0803181520h197dbe53ia4afa125cba2f467@mail.gmail.com>
     [not found]                           ` <D936D925018D154694D8A362EEB0892003F2D621@orsmsx416.amr.corp.intel.com>
2008-03-18 23:01                             ` drago01
2008-03-18 23:07                         ` Tomas Winkler
2008-03-18 23:10                           ` drago01
2008-03-18 23:35                             ` Tomas Winkler
2008-03-18 23:40                               ` drago01
2008-03-18 23:56                                 ` Tomas Winkler
2008-03-19 14:15                               ` Dan Williams [this message]
2008-04-23 19:26                                 ` Dan Williams
2008-04-23 19:37                                   ` Dan Williams

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=1205936104.26119.9.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=ben.m.cahill@intel.com \
    --cc=drago01@gmail.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=tomasw@gmail.com \
    --cc=yi.zhu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.