2011-08-24 08:43:51

by Hao Han

[permalink] [raw]
Subject: force wifi radio to sleep immediately

Dear All,

I am currently working on a research project based on BCM4329 driver
on Nexus One. In the project, I am trying to control wifi radio to sleep
and wake up manually (i.e without setting PM_OFF, PM_FAST, or PM_MAX mode). I
have digged into the source code for a while, but till now I have no
idea how to do that. If possible, could anyone please tell me if there is
any function I can call to force wifi radio to sleep or wake up
immediately.

Any hint is appreciated. Thank you!

Best,
Hao


2011-08-26 09:00:04

by Hao Han

[permalink] [raw]
Subject: Re: force wifi radio to sleep immediately

Thank you very much. Another related question is:

When a wireless interface works in master mode with new firmware
"fw_bcm4329_apsta.bin" launched, is there any way to set power mode to
PM_OFF, PM_FAST, PM_MAX?

My ultimate goal is to let the interface to sleep even in master mode.
Right now, I try to use "dev_wlc_ioctl(dev, WLC_SET_PM, &pm,
sizeof(pm))", but it doesn't work.

BTW, my test device is Nexus One and the broadcom driver is BCM4329.

Best,
Hao

On Thu, Aug 25, 2011 at 6:38 PM, Arend van Spriel <[email protected]> wrote:
> On 08/24/2011 12:12 PM, Hao Han wrote:
>>
>> Thank you for your quick reply, Gr. AvS.
>>
>> According to my understanding, in power save mode (PSM), the station
>> will go to sleep immediately (i.e. maintaining a very low power) after
>> sending packet with pwr mgt bit in 802.11 mac header setting to 1.
>>
>> My question is if we can force the station to go to such a low power
>> level by calling some function.
>>
>> It seems to me that it costs extra time to disable/enable the radio,
>> right? I hope to do it very quickly.
>>
>> I appreicate your help!
>>
>> Best,
>> Hao
>
> I see. Your question is really about power save, which involves more that
> the radio. Power save is a process better left to the device so there is no
> interface in place to force that upon a driver/device.
>
> Gr. AvS
>
> --
> Almost nobody dances sober, unless they happen to be insane.
> -- H.P. Lovecraft --
>
>
>

2011-08-24 10:12:17

by Hao Han

[permalink] [raw]
Subject: Re: force wifi radio to sleep immediately

Thank you for your quick reply, Gr. AvS.

According to my understanding, in power save mode (PSM), the station
will go to sleep immediately (i.e. maintaining a very low power) after
sending packet with pwr mgt bit in 802.11 mac header setting to 1.

My question is if we can force the station to go to such a low power
level by calling some function.

It seems to me that it costs extra time to disable/enable the radio,
right? I hope to do it very quickly.

I appreicate your help!

Best,
Hao


On Wed, Aug 24, 2011 at 5:46 PM, Arend van Spriel <[email protected]> wrote:
> On 08/24/2011 10:43 AM, Hao Han wrote:
>>
>> Dear All,
>>
>> I am currently working on a research project based on BCM4329 driver
>> on Nexus One. In the project, I am trying to control wifi radio to sleep
>> and wake up manually (i.e without setting PM_OFF, PM_FAST, or PM_MAX
>> mode). I
>> have digged into the source code for a while, but till now I have no
>> idea how to do that. If possible, could anyone please tell me if there is
>> any function I can call to force wifi radio to sleep or wake up
>> immediately.
>>
>> Any hint is appreciated. Thank you!
>>
>> Best,
>> Hao
>> --
>
> Hi Hao,
>
> Could please elaborate on what 'wifi radio' means in your description. It
> makes me think about RFKILL, but that may not be the thing you are looking
> for. With it you can disable/enable the radio within the wireless chipset.
> The terms sleep and wakeup feel a little odd when talking about radios.
>
> Gr. AvS
>
> --
> Almost nobody dances sober, unless they happen to be insane.
> -- H.P. Lovecraft --
>
>
>

2011-08-24 09:46:57

by Arend van Spriel

[permalink] [raw]
Subject: Re: force wifi radio to sleep immediately

On 08/24/2011 10:43 AM, Hao Han wrote:
> Dear All,
>
> I am currently working on a research project based on BCM4329 driver
> on Nexus One. In the project, I am trying to control wifi radio to sleep
> and wake up manually (i.e without setting PM_OFF, PM_FAST, or PM_MAX mode). I
> have digged into the source code for a while, but till now I have no
> idea how to do that. If possible, could anyone please tell me if there is
> any function I can call to force wifi radio to sleep or wake up
> immediately.
>
> Any hint is appreciated. Thank you!
>
> Best,
> Hao
> --

Hi Hao,

Could please elaborate on what 'wifi radio' means in your description.
It makes me think about RFKILL, but that may not be the thing you are
looking for. With it you can disable/enable the radio within the
wireless chipset. The terms sleep and wakeup feel a little odd when
talking about radios.

Gr. AvS

--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --



2011-08-25 02:54:58

by Hao Han

[permalink] [raw]
Subject: Re: force wifi radio to sleep immediately

Is any way to force wifi to maintain at low power (sleep mode)
immediately? Turing on/off radio is too long for my project. Thanks!

Best,
Hao

On Wed, Aug 24, 2011 at 6:12 PM, Hao Han <[email protected]> wrote:
> Thank you for your quick reply, Gr. AvS.
>
> According to my understanding, in power save mode (PSM), the station
> will go to sleep immediately (i.e. maintaining a very low power) after
> sending packet with pwr mgt bit in 802.11 mac header setting to 1.
>
> My question is if we can force the station to go to such a low power
> level by calling some function.
>
> It seems to me that it costs extra time to disable/enable the radio,
> right? I hope to do it very quickly.
>
> I appreicate your help!
>
> Best,
> Hao
>
>
> On Wed, Aug 24, 2011 at 5:46 PM, Arend van Spriel <[email protected]> wrote:
>> On 08/24/2011 10:43 AM, Hao Han wrote:
>>>
>>> Dear All,
>>>
>>> I am currently working on a research project based on BCM4329 driver
>>> on Nexus One. In the project, I am trying to control wifi radio to sleep
>>> and wake up manually (i.e without setting PM_OFF, PM_FAST, or PM_MAX
>>> mode). I
>>> have digged into the source code for a while, but till now I have no
>>> idea how to do that. If possible, could anyone please tell me if there is
>>> any function I can call to force wifi radio to sleep or wake up
>>> immediately.
>>>
>>> Any hint is appreciated. Thank you!
>>>
>>> Best,
>>> Hao
>>> --
>>
>> Hi Hao,
>>
>> Could please elaborate on what 'wifi radio' means in your description. It
>> makes me think about RFKILL, but that may not be the thing you are looking
>> for. With it you can disable/enable the radio within the wireless chipset.
>> The terms sleep and wakeup feel a little odd when talking about radios.
>>
>> Gr. AvS
>>
>> --
>> Almost nobody dances sober, unless they happen to be insane.
>> -- H.P. Lovecraft --
>>
>>
>>
>

2011-08-25 10:38:18

by Arend van Spriel

[permalink] [raw]
Subject: Re: force wifi radio to sleep immediately

On 08/24/2011 12:12 PM, Hao Han wrote:
> Thank you for your quick reply, Gr. AvS.
>
> According to my understanding, in power save mode (PSM), the station
> will go to sleep immediately (i.e. maintaining a very low power) after
> sending packet with pwr mgt bit in 802.11 mac header setting to 1.
>
> My question is if we can force the station to go to such a low power
> level by calling some function.
>
> It seems to me that it costs extra time to disable/enable the radio,
> right? I hope to do it very quickly.
>
> I appreicate your help!
>
> Best,
> Hao

I see. Your question is really about power save, which involves more
that the radio. Power save is a process better left to the device so
there is no interface in place to force that upon a driver/device.

Gr. AvS

--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --