linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iwl3945 rfkill regression
@ 2008-01-22 20:04 drago01
  2008-01-22 20:07 ` [ipw3945-devel] " Winkler, Tomas
  0 siblings, 1 reply; 26+ messages in thread
From: drago01 @ 2008-01-22 20:04 UTC (permalink / raw)
  To: ipw3945-devel; +Cc: linux-wireless, Zhu Yi, Cahill, Ben M

Hi,
Hi recent updates to wireless-2.6 / iwlwifi (1.2.22->1.2.23) broke
rfkill in a weird way for me.
What happens:
When I switch off the card using the hw rfkill switch (while
acciotated) I get this in dmesg:
iwl3945: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
wlan0: disassociate(reason=3)
wlan0: disassociate(reason=3)
iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
iwl3945: MAC is in deep sleep!
iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
iwl3945: MAC is in deep sleep!
iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
iwl3945: MAC is in deep sleep!
iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
ACPI: PCI interrupt for device 0000:07:00.0 disabled

Notice the last line (interupt gets disabled). When this happens there
is no way to get the card back up other then reloading the module.
Earlier version (1.2.22) was working fine I could switch the switch
on/off without having an suchs kind of issues.
I have not tryed to find out which patch broke it yet, but I suspect
the suspend / resume rfkill fix mighr be the culprit.

If any more tests / information is needed feel free to ask.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-22 20:04 iwl3945 rfkill regression drago01
@ 2008-01-22 20:07 ` Winkler, Tomas
  2008-01-22 20:12   ` drago01
  0 siblings, 1 reply; 26+ messages in thread
From: Winkler, Tomas @ 2008-01-22 20:07 UTC (permalink / raw)
  To: drago01, ipw3945-devel; +Cc: Cahill, Ben M, Zhu, Yi, linux-wireless



>-----Original Message-----
>From: ipw3945-devel-bounces@lists.sourceforge.net
[mailto:ipw3945-devel-
>bounces@lists.sourceforge.net] On Behalf Of drago01
>Sent: Tuesday, January 22, 2008 10:05 PM
>To: ipw3945-devel
>Cc: Cahill, Ben M; Zhu, Yi; linux-wireless
>Subject: [ipw3945-devel] iwl3945 rfkill regression
>
>Hi,
>Hi recent updates to wireless-2.6 / iwlwifi (1.2.22->1.2.23) broke
>rfkill in a weird way for me.
>What happens:
>When I switch off the card using the hw rfkill switch (while
>acciotated) I get this in dmesg:
>iwl3945: Radio Frequency Kill Switch is On:
>Kill switch must be turned off for wireless networking to work.
>wlan0: disassociate(reason=3)
>wlan0: disassociate(reason=3)
>iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
>iwl3945: MAC is in deep sleep!
>iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
>iwl3945: MAC is in deep sleep!
>iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
>iwl3945: MAC is in deep sleep!
>iwl3945: WARNING: Requesting MAC access during RFKILL wakes up NIC
>ACPI: PCI interrupt for device 0000:07:00.0 disabled
>
>Notice the last line (interupt gets disabled). When this happens there
>is no way to get the card back up other then reloading the module.
>Earlier version (1.2.22) was working fine I could switch the switch
>on/off without having an suchs kind of issues.
>I have not tryed to find out which patch broke it yet, but I suspect
>the suspend / resume rfkill fix mighr be the culprit.
>
>If any more tests / information is needed feel free to ask.
>
I believe it's delaying uCode load to mac_start - still need to be
polished. 

Tomas


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  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
  0 siblings, 2 replies; 26+ messages in thread
From: drago01 @ 2008-01-22 20:12 UTC (permalink / raw)
  To: Winkler, Tomas; +Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless

On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com> wrote:
>
> I believe it's delaying uCode load to mac_start - still need to be
> polished.

ok, thx for the quick reply.
If you have any potential fixes I would be happy to test them ;)

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-22 20:12   ` drago01
@ 2008-01-22 20:15     ` Winkler, Tomas
  2008-01-22 20:21     ` Winkler, Tomas
  1 sibling, 0 replies; 26+ messages in thread
From: Winkler, Tomas @ 2008-01-22 20:15 UTC (permalink / raw)
  To: drago01; +Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless



>-----Original Message-----
>From: drago01 [mailto:drago01@gmail.com]
>Sent: Tuesday, January 22, 2008 10:12 PM
>To: Winkler, Tomas
>Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
>
>On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
wrote:
>>
>> I believe it's delaying uCode load to mac_start - still need to be
>> polished.
>
>ok, thx for the quick reply.
>If you have any potential fixes I would be happy to test them ;)

Unfortunately not this time.
Tomas


^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ipw3945-devel] iwl3945 rfkill regression
  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
  1 sibling, 1 reply; 26+ messages in thread
From: Winkler, Tomas @ 2008-01-22 20:21 UTC (permalink / raw)
  To: drago01; +Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless



>-----Original Message-----
>From: drago01 [mailto:drago01@gmail.com]
>Sent: Tuesday, January 22, 2008 10:12 PM
>To: Winkler, Tomas
>Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
>
>On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
wrote:
>>
>> I believe it's delaying uCode load to mac_start - still need to be
>> polished.
>
>ok, thx for the quick reply.
>If you have any potential fixes I would be happy to test them ;)

Can you get me the sequence it is happening? RF kill switch is off
before you power up the laptop or after, during association or in
unassociated state..etc
Thanks

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-22 20:21     ` Winkler, Tomas
@ 2008-01-22 20:24       ` drago01
  2008-01-22 20:29         ` Winkler, Tomas
  2008-01-26 19:00         ` drago01
  0 siblings, 2 replies; 26+ messages in thread
From: drago01 @ 2008-01-22 20:24 UTC (permalink / raw)
  To: Winkler, Tomas; +Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless

On Jan 22, 2008 9:21 PM, Winkler, Tomas <tomas.winkler@intel.com> wrote:
>
>
> >-----Original Message-----
> >From: drago01 [mailto:drago01@gmail.com]
> >Sent: Tuesday, January 22, 2008 10:12 PM
> >To: Winkler, Tomas
>
> >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
> >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
> >
> >On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
> wrote:
> >>
> >> I believe it's delaying uCode load to mac_start - still need to be
> >> polished.
> >
> >ok, thx for the quick reply.
> >If you have any potential fixes I would be happy to test them ;)
>
> Can you get me the sequence it is happening? RF kill switch is off
> before you power up the laptop or after, during association or in
> unassociated state..etc
> Thanks

I boot with rf kill off = device on
acciotate using NM
kill the card by pressing the rfkill (ie. setting it to on)
card is dead (like described in my first mail), until I relaod the module
the rfkill switch  does not have any effect at this time.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ipw3945-devel] iwl3945 rfkill regression
  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
  1 sibling, 2 replies; 26+ messages in thread
From: Winkler, Tomas @ 2008-01-22 20:29 UTC (permalink / raw)
  To: drago01; +Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless



>-----Original Message-----
>From: drago01 [mailto:drago01@gmail.com]
>Sent: Tuesday, January 22, 2008 10:24 PM
>To: Winkler, Tomas
>Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
>
>On Jan 22, 2008 9:21 PM, Winkler, Tomas <tomas.winkler@intel.com>
wrote:
>>
>>
>> >-----Original Message-----
>> >From: drago01 [mailto:drago01@gmail.com]
>> >Sent: Tuesday, January 22, 2008 10:12 PM
>> >To: Winkler, Tomas
>>
>> >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>> >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
>> >
>> >On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
>> wrote:
>> >>
>> >> I believe it's delaying uCode load to mac_start - still need to be
>> >> polished.
>> >
>> >ok, thx for the quick reply.
>> >If you have any potential fixes I would be happy to test them ;)
>>
>> Can you get me the sequence it is happening? RF kill switch is off
>> before you power up the laptop or after, during association or in
>> unassociated state..etc
>> Thanks
>
>I boot with rf kill off = device on
>acciotate using NM
>kill the card by pressing the rfkill (ie. setting it to on)
>card is dead (like described in my first mail), until I relaod the
module
>the rfkill switch  does not have any effect at this time.

Okay thanks, I'll try to look at it tomorrow
Tomas
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-22 20:29         ` Winkler, Tomas
@ 2008-01-22 20:32           ` drago01
  2008-01-25 19:04           ` drago01
  1 sibling, 0 replies; 26+ messages in thread
From: drago01 @ 2008-01-22 20:32 UTC (permalink / raw)
  To: Winkler, Tomas; +Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless

On Jan 22, 2008 9:29 PM, Winkler, Tomas <tomas.winkler@intel.com> wrote:
>
>
> >-----Original Message-----
> >From: drago01 [mailto:drago01@gmail.com]
>
> >Sent: Tuesday, January 22, 2008 10:24 PM
> >To: Winkler, Tomas
> >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
> >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
> >
> >On Jan 22, 2008 9:21 PM, Winkler, Tomas <tomas.winkler@intel.com>
> wrote:
> >>
> >>
> >> >-----Original Message-----
> >> >From: drago01 [mailto:drago01@gmail.com]
> >> >Sent: Tuesday, January 22, 2008 10:12 PM
> >> >To: Winkler, Tomas
> >>
> >> >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
> >> >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
> >> >
> >> >On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
> >> wrote:
> >> >>
> >> >> I believe it's delaying uCode load to mac_start - still need to be
> >> >> polished.
> >> >
> >> >ok, thx for the quick reply.
> >> >If you have any potential fixes I would be happy to test them ;)
> >>
> >> Can you get me the sequence it is happening? RF kill switch is off
> >> before you power up the laptop or after, during association or in
> >> unassociated state..etc
> >> Thanks
> >
> >I boot with rf kill off = device on
> >acciotate using NM
> >kill the card by pressing the rfkill (ie. setting it to on)
> >card is dead (like described in my first mail), until I relaod the
> module
> >the rfkill switch  does not have any effect at this time.
>
> Okay thanks, I'll try to look at it tomorrow
> Tomas

OK, thx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-22 20:29         ` Winkler, Tomas
  2008-01-22 20:32           ` drago01
@ 2008-01-25 19:04           ` drago01
  1 sibling, 0 replies; 26+ messages in thread
From: drago01 @ 2008-01-25 19:04 UTC (permalink / raw)
  To: Winkler, Tomas; +Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless

On Jan 22, 2008 9:29 PM, Winkler, Tomas <tomas.winkler@intel.com> wrote:
>
>
> >-----Original Message-----
> >From: drago01 [mailto:drago01@gmail.com]
>
> >Sent: Tuesday, January 22, 2008 10:24 PM
> >To: Winkler, Tomas
> >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
> >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
> >
> >On Jan 22, 2008 9:21 PM, Winkler, Tomas <tomas.winkler@intel.com>
> wrote:
> >>
> >>
> >> >-----Original Message-----
> >> >From: drago01 [mailto:drago01@gmail.com]
> >> >Sent: Tuesday, January 22, 2008 10:12 PM
> >> >To: Winkler, Tomas
> >>
> >> >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
> >> >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
> >> >
> >> >On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
> >> wrote:
> >> >>
> >> >> I believe it's delaying uCode load to mac_start - still need to be
> >> >> polished.
> >> >
> >> >ok, thx for the quick reply.
> >> >If you have any potential fixes I would be happy to test them ;)
> >>
> >> Can you get me the sequence it is happening? RF kill switch is off
> >> before you power up the laptop or after, during association or in
> >> unassociated state..etc
> >> Thanks
> >
> >I boot with rf kill off = device on
> >acciotate using NM
> >kill the card by pressing the rfkill (ie. setting it to on)
> >card is dead (like described in my first mail), until I relaod the
> module
> >the rfkill switch  does not have any effect at this time.
>
> Okay thanks, I'll try to look at it tomorrow

Any updates? Can this patch be reerted until the regressions are sorted out?

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-22 20:24       ` drago01
  2008-01-22 20:29         ` Winkler, Tomas
@ 2008-01-26 19:00         ` drago01
  2008-01-26 22:11           ` Tomas Winkler
  1 sibling, 1 reply; 26+ messages in thread
From: drago01 @ 2008-01-26 19:00 UTC (permalink / raw)
  To: Winkler, Tomas
  Cc: ipw3945-devel, Cahill, Ben M, Zhu, Yi, linux-wireless,
	Dan Williams

On Jan 22, 2008 9:24 PM, drago01 <drago01@gmail.com> wrote:
> On Jan 22, 2008 9:21 PM, Winkler, Tomas <tomas.winkler@intel.com> wrote:
> >
> >
> > >-----Original Message-----
> > >From: drago01 [mailto:drago01@gmail.com]
> > >Sent: Tuesday, January 22, 2008 10:12 PM
> > >To: Winkler, Tomas
> >
> > >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
> > >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
> > >
> > >On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
> > wrote:
> > >>
> > >> I believe it's delaying uCode load to mac_start - still need to be
> > >> polished.
> > >
> > >ok, thx for the quick reply.
> > >If you have any potential fixes I would be happy to test them ;)
> >
> > Can you get me the sequence it is happening? RF kill switch is off
> > before you power up the laptop or after, during association or in
> > unassociated state..etc
> > Thanks
>
> I boot with rf kill off = device on
> acciotate using NM
> kill the card by pressing the rfkill (ie. setting it to on)
> card is dead (like described in my first mail), until I relaod the module
> the rfkill switch  does not have any effect at this time.
>

OK, I investigated a bit and it seems to be the "disable interrupt
when device goes down" is the problem.
In my case NetworkManager detected the rfkill and brought the device
down, which caused the interrupt to be disabled. Now after pressing
the rfkill again nothing happend. But if I bring the device back up
the interrupt is enabled again and rfkill and the card is back to
live.
So in short disabling the interrupt in mac_stop breaks the hw rfkill
while the interface is down.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-26 19:00         ` drago01
@ 2008-01-26 22:11           ` Tomas Winkler
  2008-02-13  7:42             ` drago01
  0 siblings, 1 reply; 26+ messages in thread
From: Tomas Winkler @ 2008-01-26 22:11 UTC (permalink / raw)
  To: drago01; +Cc: Dan Williams, linux-wireless, Zhu, Yi, Cahill, Ben M,
	ipw3945-devel

On Jan 26, 2008 9:00 PM, drago01 <drago01@gmail.com> wrote:
> On Jan 22, 2008 9:24 PM, drago01 <drago01@gmail.com> wrote:
> > On Jan 22, 2008 9:21 PM, Winkler, Tomas <tomas.winkler@intel.com> wrote:
> > >
> > >
> > > >-----Original Message-----
> > > >From: drago01 [mailto:drago01@gmail.com]
> > > >Sent: Tuesday, January 22, 2008 10:12 PM
> > > >To: Winkler, Tomas
> > >
> > > >Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
> > > >Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
> > > >
> > > >On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
> > > wrote:
> > > >>
> > > >> I believe it's delaying uCode load to mac_start - still need to be
> > > >> polished.
> > > >
> > > >ok, thx for the quick reply.
> > > >If you have any potential fixes I would be happy to test them ;)
> > >
> > > Can you get me the sequence it is happening? RF kill switch is off
> > > before you power up the laptop or after, during association or in
> > > unassociated state..etc
> > > Thanks
> >
> > I boot with rf kill off = device on
> > acciotate using NM
> > kill the card by pressing the rfkill (ie. setting it to on)
> > card is dead (like described in my first mail), until I relaod the module
> > the rfkill switch  does not have any effect at this time.
> >
>
> OK, I investigated a bit and it seems to be the "disable interrupt
> when device goes down" is the problem.
> In my case NetworkManager detected the rfkill and brought the device
> down, which caused the interrupt to be disabled. Now after pressing
> the rfkill again nothing happend. But if I bring the device back up
> the interrupt is enabled again and rfkill and the card is back to
> live.
> So in short disabling the interrupt in mac_stop breaks the hw rfkill
> while the interface is down.
>

Thanks for investigating this, still didn't have to time to dig into it.
Tomas

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-01-26 22:11           ` Tomas Winkler
@ 2008-02-13  7:42             ` drago01
  2008-02-13 16:48               ` Chatre, Reinette
  0 siblings, 1 reply; 26+ messages in thread
From: drago01 @ 2008-02-13  7:42 UTC (permalink / raw)
  To: Tomas Winkler
  Cc: Dan Williams, linux-wireless, Zhu, Yi, Cahill, Ben M,
	ipw3945-devel

Tomas Winkler wrote:
> On Jan 26, 2008 9:00 PM, drago01 <drago01@gmail.com> wrote:
>   
>> On Jan 22, 2008 9:24 PM, drago01 <drago01@gmail.com> wrote:
>>     
>>> On Jan 22, 2008 9:21 PM, Winkler, Tomas <tomas.winkler@intel.com> wrote:
>>>       
>>>>         
>>>>> -----Original Message-----
>>>>> From: drago01 [mailto:drago01@gmail.com]
>>>>> Sent: Tuesday, January 22, 2008 10:12 PM
>>>>> To: Winkler, Tomas
>>>>>           
>>>>> Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>>>>> Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
>>>>>
>>>>> On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
>>>>>           
>>>> wrote:
>>>>         
>>>>>> I believe it's delaying uCode load to mac_start - still need to be
>>>>>> polished.
>>>>>>             
>>>>> ok, thx for the quick reply.
>>>>> If you have any potential fixes I would be happy to test them ;)
>>>>>           
>>>> Can you get me the sequence it is happening? RF kill switch is off
>>>> before you power up the laptop or after, during association or in
>>>> unassociated state..etc
>>>> Thanks
>>>>         
>>> I boot with rf kill off = device on
>>> acciotate using NM
>>> kill the card by pressing the rfkill (ie. setting it to on)
>>> card is dead (like described in my first mail), until I relaod the module
>>> the rfkill switch  does not have any effect at this time.
>>>
>>>       
>> OK, I investigated a bit and it seems to be the "disable interrupt
>> when device goes down" is the problem.
>> In my case NetworkManager detected the rfkill and brought the device
>> down, which caused the interrupt to be disabled. Now after pressing
>> the rfkill again nothing happend. But if I bring the device back up
>> the interrupt is enabled again and rfkill and the card is back to
>> live.
>> So in short disabling the interrupt in mac_stop breaks the hw rfkill
>> while the interface is down.
>>
>>     
>
> Thanks for investigating this, still didn't have to time to dig into it.
>
>   
ping?


^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ipw3945-devel] iwl3945 rfkill regression
  2008-02-13  7:42             ` drago01
@ 2008-02-13 16:48               ` Chatre, Reinette
  2008-03-18 19:32                 ` drago01
  0 siblings, 1 reply; 26+ messages in thread
From: Chatre, Reinette @ 2008-02-13 16:48 UTC (permalink / raw)
  To: drago01, Tomas Winkler
  Cc: Dan Williams, linux-wireless, Zhu, Yi, Cahill, Ben M,
	ipw3945-devel

On Tuesday, February 12, 2008 11:42 PM, drago01  wrote:

> Tomas Winkler wrote:
>> On Jan 26, 2008 9:00 PM, drago01 <drago01@gmail.com> wrote:
>> 
>>> On Jan 22, 2008 9:24 PM, drago01 <drago01@gmail.com> wrote:
>>> 
>>>> On Jan 22, 2008 9:21 PM, Winkler, Tomas
> <tomas.winkler@intel.com> wrote:
>>>> 
>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: drago01 [mailto:drago01@gmail.com]
>>>>>> Sent: Tuesday, January 22, 2008 10:12 PM
>>>>>> To: Winkler, Tomas
>>>>>> 
>>>>>> Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>>>>>> Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
>>>>>> 
>>>>>> On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
>>>>>> 
>>>>> wrote:
>>>>> 
>>>>>>> I believe it's delaying uCode load to mac_start - still need to
>>>>>>> be polished. 
>>>>>>> 
>>>>>> ok, thx for the quick reply.
>>>>>> If you have any potential fixes I would be happy to test them ;)
>>>>>> 
>>>>> Can you get me the sequence it is happening? RF kill switch is off
>>>>> before you power up the laptop or after, during association or in
>>>>> unassociated state..etc Thanks
>>>>> 
>>>> I boot with rf kill off = device on
>>>> acciotate using NM
>>>> kill the card by pressing the rfkill (ie. setting it to on)
>>>> card is dead (like described in my first mail), until I relaod the
>>>> module the rfkill switch  does not have any effect at this time.
>>>> 
>>>> 
>>> OK, I investigated a bit and it seems to be the "disable interrupt
>>> when device goes down" is the problem.
>>> In my case NetworkManager detected the rfkill and brought the device
>>> down, which caused the interrupt to be disabled. Now after pressing
>>> the rfkill again nothing happend. But if I bring the device back up
>>> the interrupt is enabled again and rfkill and the card is back to
>>> live. So in short disabling the interrupt in mac_stop breaks the hw
>>> rfkill while the interface is down. 
>>> 
>>> 
>> 
>> Thanks for investigating this, still didn't have to time to dig into
>> it. 
>> 
>> 
> ping?

We are working on this.

Reinette

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-02-13 16:48               ` Chatre, Reinette
@ 2008-03-18 19:32                 ` drago01
  2008-03-18 21:26                   ` Chatre, Reinette
  0 siblings, 1 reply; 26+ messages in thread
From: drago01 @ 2008-03-18 19:32 UTC (permalink / raw)
  To: Chatre, Reinette
  Cc: Tomas Winkler, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

On Wed, Feb 13, 2008 at 5:48 PM, Chatre, Reinette
<reinette.chatre@intel.com> wrote:
>
> On Tuesday, February 12, 2008 11:42 PM, drago01  wrote:
>
>  > Tomas Winkler wrote:
>  >> On Jan 26, 2008 9:00 PM, drago01 <drago01@gmail.com> wrote:
>  >>
>  >>> On Jan 22, 2008 9:24 PM, drago01 <drago01@gmail.com> wrote:
>  >>>
>  >>>> On Jan 22, 2008 9:21 PM, Winkler, Tomas
>  > <tomas.winkler@intel.com> wrote:
>  >>>>
>  >>>>>
>  >>>>>> -----Original Message-----
>  >>>>>> From: drago01 [mailto:drago01@gmail.com]
>  >>>>>> Sent: Tuesday, January 22, 2008 10:12 PM
>  >>>>>> To: Winkler, Tomas
>  >>>>>>
>  >>>>>> Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>  >>>>>> Subject: Re: [ipw3945-devel] iwl3945 rfkill regression
>  >>>>>>
>  >>>>>> On Jan 22, 2008 9:07 PM, Winkler, Tomas <tomas.winkler@intel.com>
>  >>>>>>
>  >>>>> wrote:
>  >>>>>
>  >>>>>>> I believe it's delaying uCode load to mac_start - still need to
>  >>>>>>> be polished.
>  >>>>>>>
>  >>>>>> ok, thx for the quick reply.
>  >>>>>> If you have any potential fixes I would be happy to test them ;)
>  >>>>>>
>  >>>>> Can you get me the sequence it is happening? RF kill switch is off
>  >>>>> before you power up the laptop or after, during association or in
>  >>>>> unassociated state..etc Thanks
>  >>>>>
>  >>>> I boot with rf kill off = device on
>  >>>> acciotate using NM
>  >>>> kill the card by pressing the rfkill (ie. setting it to on)
>  >>>> card is dead (like described in my first mail), until I relaod the
>  >>>> module the rfkill switch  does not have any effect at this time.
>  >>>>
>  >>>>
>  >>> OK, I investigated a bit and it seems to be the "disable interrupt
>  >>> when device goes down" is the problem.
>  >>> In my case NetworkManager detected the rfkill and brought the device
>  >>> down, which caused the interrupt to be disabled. Now after pressing
>  >>> the rfkill again nothing happend. But if I bring the device back up
>  >>> the interrupt is enabled again and rfkill and the card is back to
>  >>> live. So in short disabling the interrupt in mac_stop breaks the hw
>  >>> rfkill while the interface is down.
>  >>>
>  >>>
>  >>
>  >> Thanks for investigating this, still didn't have to time to dig into
>  >> it.
>  >>
>  >>
>  > ping?
>
>  We are working on this.
>
>  Reinette
>

OK, it seems not to be the irq (only) seems to be something else too.
I tryed the attached patch (not to disable the irq in down when hw
rfkill is set) but it was still the same.
The driver does not update the sysfs file when the rfkill is back off
(device on), so hal and NM still think that the rfkill is on while its
off.

Patch (hack) tested:

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c
b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 093b863..70e5e25 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6545,6 +6545,9 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)

 	IWL_DEBUG_MAC80211("enter\n");

+	if(!atomic_read(&priv->pci_dev->enable_cnt))
+		goto device_open;
+
 	if (pci_enable_device(priv->pci_dev)) {
 		IWL_ERROR("Fail to pci_enable_device\n");
 		return -ENODEV;
@@ -6559,6 +6562,7 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
 		goto out_disable_msi;
 	}

+device_open:
 	/* we should be verifying the device is ready to be opened */
 	mutex_lock(&priv->mutex);

@@ -6640,11 +6644,13 @@ static void iwl3945_mac_stop(struct ieee80211_hw *hw)

 	iwl3945_down(priv);

-	flush_workqueue(priv->workqueue);
-	free_irq(priv->pci_dev->irq, priv);
-	pci_disable_msi(priv->pci_dev);
-	pci_save_state(priv->pci_dev);
-	pci_disable_device(priv->pci_dev);
+	if(!test_bit(STATUS_RF_KILL_HW, &priv->status) &&
!test_bit(STATUS_IN_SUSPEND, &priv->status)) {
+		flush_workqueue(priv->workqueue);
+		free_irq(priv->pci_dev->irq, priv);
+		pci_disable_msi(priv->pci_dev);
+		pci_save_state(priv->pci_dev);
+		pci_disable_device(priv->pci_dev);
+	}

 	IWL_DEBUG_MAC80211("leave\n");
 }

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* RE: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 19:32                 ` drago01
@ 2008-03-18 21:26                   ` Chatre, Reinette
  2008-03-18 21:46                     ` drago01
  0 siblings, 1 reply; 26+ messages in thread
From: Chatre, Reinette @ 2008-03-18 21:26 UTC (permalink / raw)
  To: drago01
  Cc: Tomas Winkler, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

On Tuesday, March 18, 2008 12:32 PM, drago01  wrote:

> On Wed, Feb 13, 2008 at 5:48 PM, Chatre, Reinette
> <reinette.chatre@intel.com> wrote:
>> 
>> On Tuesday, February 12, 2008 11:42 PM, drago01  wrote:
>> 
>>  > Tomas Winkler wrote:
>>  >> On Jan 26, 2008 9:00 PM, drago01 <drago01@gmail.com> wrote:  >>
>>  >>> On Jan 22, 2008 9:24 PM, drago01 <drago01@gmail.com> wrote:  >>>
>>  >>>> On Jan 22, 2008 9:21 PM, Winkler, Tomas
>>  > <tomas.winkler@intel.com> wrote:
>>  >>>>
>>  >>>>>
>>  >>>>>> -----Original Message-----
>>  >>>>>> From: drago01 [mailto:drago01@gmail.com]
>>  >>>>>> Sent: Tuesday, January 22, 2008 10:12 PM
>>  >>>>>> To: Winkler, Tomas
>>  >>>>>>
>>  >>>>>> Cc: ipw3945-devel; Cahill, Ben M; Zhu, Yi; linux-wireless
>>  >>>>>> Subject: Re: [ipw3945-devel] iwl3945 rfkill regression 
>>  >>>>>> >>>>>> On Jan 22, 2008 9:07 PM, Winkler, Tomas
>>  <tomas.winkler@intel.com>  >>>>>> >>>>> wrote:
>>  >>>>>
>>  >>>>>>> I believe it's delaying uCode load to mac_start - still
>>  need to  >>>>>>> be polished. >>>>>>>
>>  >>>>>> ok, thx for the quick reply.
>>  >>>>>> If you have any potential fixes I would be happy to test
>>  them ;)  >>>>>> >>>>> Can you get me the sequence it is happening?
>>  RF kill switch is off >>>>> before you power up the laptop or
>>  after, during association or in >>>>> unassociated state..etc Thanks
>>  >>>>>
>>  >>>> I boot with rf kill off = device on
>>  >>>> acciotate using NM
>>  >>>> kill the card by pressing the rfkill (ie. setting it to on)
>>  >>>> card is dead (like described in my first mail), until I relaod
>>  the >>>> module the rfkill switch  does not have any effect at this
>>  time.  >>>> >>>>
>>  >>> OK, I investigated a bit and it seems to be the "disable
>>  interrupt >>> when device goes down" is the problem.
>>  >>> In my case NetworkManager detected the rfkill and brought the
>>  device >>> down, which caused the interrupt to be disabled. Now
>>  after pressing >>> the rfkill again nothing happend. But if I bring
>>  the device back up >>> the interrupt is enabled again and rfkill
>>  and the card is back to >>> live. So in short disabling the
>>  interrupt in mac_stop breaks the hw >>> rfkill while the interface
>>  is down. >>>
>>  >>>
>>  >>
>>  >> Thanks for investigating this, still didn't have to time to dig
>>  into  >> it. >>
>>  >>
>>  > ping?
>> 
>>  We are working on this.
>> 
>>  Reinette
>> 
> 
> OK, it seems not to be the irq (only) seems to be something else too.
> I tryed the attached patch (not to disable the irq in down when hw
> rfkill is set) but it was still the same.
> The driver does not update the sysfs file when the rfkill is back off
> (device on), so hal and NM still think that the rfkill is on while
> its off. 
> 
> Patch (hack) tested:
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index 093b863..70e5e25 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -6545,6 +6545,9 @@ static int iwl3945_mac_start(struct
> ieee80211_hw *hw) 
> 
> 	IWL_DEBUG_MAC80211("enter\n");
> 
> +	if(!atomic_read(&priv->pci_dev->enable_cnt))
> +		goto device_open;
> +
> 	if (pci_enable_device(priv->pci_dev)) {
> 		IWL_ERROR("Fail to pci_enable_device\n");
> 		return -ENODEV;
> @@ -6559,6 +6562,7 @@ static int iwl3945_mac_start(struct
> 		ieee80211_hw *hw) goto out_disable_msi;
> 	}
> 
> +device_open:
> 	/* we should be verifying the device is ready to be opened */
> mutex_lock(&priv->mutex); 
> 
> @@ -6640,11 +6644,13 @@ static void iwl3945_mac_stop(struct
> ieee80211_hw *hw) 
> 
> 	iwl3945_down(priv);
> 
> -	flush_workqueue(priv->workqueue);
> -	free_irq(priv->pci_dev->irq, priv);
> -	pci_disable_msi(priv->pci_dev);
> -	pci_save_state(priv->pci_dev);
> -	pci_disable_device(priv->pci_dev);
> +	if(!test_bit(STATUS_RF_KILL_HW, &priv->status) &&
> !test_bit(STATUS_IN_SUSPEND, &priv->status)) {
> +		flush_workqueue(priv->workqueue);
> +		free_irq(priv->pci_dev->irq, priv);
> +		pci_disable_msi(priv->pci_dev);
> +		pci_save_state(priv->pci_dev);
> +		pci_disable_device(priv->pci_dev);
> +	}
> 
> 	IWL_DEBUG_MAC80211("leave\n");
> }

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 21:26                   ` Chatre, Reinette
@ 2008-03-18 21:46                     ` drago01
  2008-03-18 22:06                       ` Chatre, Reinette
  0 siblings, 1 reply; 26+ messages in thread
From: drago01 @ 2008-03-18 21:46 UTC (permalink / raw)
  To: Chatre, Reinette
  Cc: Tomas Winkler, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 21:46                     ` drago01
@ 2008-03-18 22:06                       ` Chatre, Reinette
       [not found]                         ` <f6ca9fed0803181520h197dbe53ia4afa125cba2f467@mail.gmail.com>
  2008-03-18 23:07                         ` Tomas Winkler
  0 siblings, 2 replies; 26+ messages in thread
From: Chatre, Reinette @ 2008-03-18 22:06 UTC (permalink / raw)
  To: drago01
  Cc: Tomas Winkler, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

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.

Reinette

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
       [not found]                           ` <D936D925018D154694D8A362EEB0892003F2D621@orsmsx416.amr.corp.intel.com>
@ 2008-03-18 23:01                             ` drago01
  0 siblings, 0 replies; 26+ messages in thread
From: drago01 @ 2008-03-18 23:01 UTC (permalink / raw)
  To: Chatre, Reinette; +Cc: Dan Williams, linux-wireless

On Tue, Mar 18, 2008 at 11:36 PM, Chatre, Reinette
<reinette.chatre@intel.com> wrote:
> On Tuesday, March 18, 2008 3:20 PM, drago01  wrote:
>
>  >
>  > The problem is that NetworkManager puts the interface down when it
>  > detects the rfkill. And because the firmware gets unloaded NM never
>  > brings the device up again because it will always think the rfkill is
>  > on.
>
>  oh, I see ... what implications do you see if we ask NetworkManager not
>  to bring the interface down when it detects the rfkill?

good question, Dan?
Would it work to just don't down the device on rfkill? (threat it as
down without really bringing the physical device down)

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 22:06                       ` Chatre, Reinette
       [not found]                         ` <f6ca9fed0803181520h197dbe53ia4afa125cba2f467@mail.gmail.com>
@ 2008-03-18 23:07                         ` Tomas Winkler
  2008-03-18 23:10                           ` drago01
  1 sibling, 1 reply; 26+ messages in thread
From: Tomas Winkler @ 2008-03-18 23:07 UTC (permalink / raw)
  To: Chatre, Reinette
  Cc: drago01, Dan Williams, linux-wireless, Zhu, Yi, Cahill, Ben M,
	ipw3945-devel

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.

>  Reinette
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 23:07                         ` Tomas Winkler
@ 2008-03-18 23:10                           ` drago01
  2008-03-18 23:35                             ` Tomas Winkler
  0 siblings, 1 reply; 26+ messages in thread
From: drago01 @ 2008-03-18 23:10 UTC (permalink / raw)
  To: Tomas Winkler
  Cc: Chatre, Reinette, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

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.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 23:10                           ` drago01
@ 2008-03-18 23:35                             ` Tomas Winkler
  2008-03-18 23:40                               ` drago01
  2008-03-19 14:15                               ` Dan Williams
  0 siblings, 2 replies; 26+ messages in thread
From: Tomas Winkler @ 2008-03-18 23:35 UTC (permalink / raw)
  To: drago01
  Cc: Chatre, Reinette, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

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?
This one is tricky with 3945...the trivial question is why NM disables
the device?
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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  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
  1 sibling, 1 reply; 26+ messages in thread
From: drago01 @ 2008-03-18 23:40 UTC (permalink / raw)
  To: Tomas Winkler
  Cc: Chatre, Reinette, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

On Wed, Mar 19, 2008 at 12:35 AM, Tomas Winkler <tomasw@gmail.com> 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?
yes

>  This one is tricky with 3945...the trivial question is why NM disables
>  the device?
Thats a question for Dan, maybe other devices/drivers just send an
event to userspace "please disable the radio" ?

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

OK, but aren't the interrupts disabled too on down? (don't have any
4965 hw to test with)

>  Sorry no solution for now.

ok, might be a way to solve it in userspace (not bringing down the device)

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 23:40                               ` drago01
@ 2008-03-18 23:56                                 ` Tomas Winkler
  0 siblings, 0 replies; 26+ messages in thread
From: Tomas Winkler @ 2008-03-18 23:56 UTC (permalink / raw)
  To: drago01
  Cc: Chatre, Reinette, Dan Williams, linux-wireless, Zhu, Yi,
	Cahill, Ben M, ipw3945-devel

On Wed, Mar 19, 2008 at 1:40 AM, drago01 <drago01@gmail.com> wrote:
>
> On Wed, Mar 19, 2008 at 12:35 AM, Tomas Winkler <tomasw@gmail.com> 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?
>  yes
>
>
>  >  This one is tricky with 3945...the trivial question is why NM disables
>  >  the device?
>  Thats a question for Dan, maybe other devices/drivers just send an
>  event to userspace "please disable the radio" ?
>
>
>  >  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 :)
>
>  OK, but aren't the interrupts disabled too on down? (don't have any
>  4965 hw to test with)

Should not be.

>
>  >  Sorry no solution for now.
>
>  ok, might be a way to solve it in userspace (not bringing down the device)

That  will probably work.. still need more investigation.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-18 23:35                             ` Tomas Winkler
  2008-03-18 23:40                               ` drago01
@ 2008-03-19 14:15                               ` Dan Williams
  2008-04-23 19:26                                 ` Dan Williams
  1 sibling, 1 reply; 26+ messages in thread
From: Dan Williams @ 2008-03-19 14:15 UTC (permalink / raw)
  To: Tomas Winkler
  Cc: drago01, Chatre, Reinette, linux-wireless, Zhu, Yi, Cahill, Ben M,
	ipw3945-devel

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


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-03-19 14:15                               ` Dan Williams
@ 2008-04-23 19:26                                 ` Dan Williams
  2008-04-23 19:37                                   ` Dan Williams
  0 siblings, 1 reply; 26+ messages in thread
From: Dan Williams @ 2008-04-23 19:26 UTC (permalink / raw)
  To: Tomas Winkler
  Cc: drago01, Chatre, Reinette, linux-wireless, Zhu, Yi, Cahill, Ben M,
	ipw3945-devel

On Wed, 2008-03-19 at 10:15 -0400, Dan Williams wrote:
> 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.

So I did this, but we need a few changes to HAL, because the rfkill bits
there aren't rich enough to distinguish between a hardware rfkill and a
software rfkill.  So when SIOCSIWTXPOW to 'off', all you can get out of
HAL is "I'm dead", which doesn't let you know whether you can turn the
radio back on with SIOCSIWTXPOW or whether there's a switch flipped
somewhere.

Dan

> 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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [ipw3945-devel] iwl3945 rfkill regression
  2008-04-23 19:26                                 ` Dan Williams
@ 2008-04-23 19:37                                   ` Dan Williams
  0 siblings, 0 replies; 26+ messages in thread
From: Dan Williams @ 2008-04-23 19:37 UTC (permalink / raw)
  To: Tomas Winkler
  Cc: drago01, Chatre, Reinette, linux-wireless, Zhu, Yi, Cahill, Ben M,
	ipw3945-devel

On Wed, 2008-04-23 at 15:26 -0400, Dan Williams wrote:
> On Wed, 2008-03-19 at 10:15 -0400, Dan Williams wrote:
> > 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.
> 
> So I did this, but we need a few changes to HAL, because the rfkill bits
> there aren't rich enough to distinguish between a hardware rfkill and a
> software rfkill.  So when SIOCSIWTXPOW to 'off', all you can get out of
> HAL is "I'm dead", which doesn't let you know whether you can turn the

Clarification: this behavior was seen on ipw2200.  Drivers/hardware that
use the kernels' rfkill framework may be different.

Dan

> radio back on with SIOCSIWTXPOW or whether there's a switch flipped
> somewhere.
> 
> Dan
> 
> > 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
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2008-04-23 19:41 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-04-23 19:26                                 ` Dan Williams
2008-04-23 19:37                                   ` Dan Williams

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