Re: Generic events for wake up from S1-S4

From: Luis R. Rodriguez
Date: Wed Jul 15 2009 - 11:52:14 EST


On Tue, Jul 14, 2009 at 4:53 PM, Pavel Machek<pavel@xxxxxx> wrote:
> On Tue 2009-07-14 15:11:45, Luis R. Rodriguez wrote:
>> I'm working on Wake-on-Wireless support for wireless right now [1].
>> Upon wake up I wanted to inform the kernel of the event which caused
>> the wake up but am not clear if there is a generic API for this. Mind
>> you, for WoW we'll need at least some AC power to the card so we'll
>> need to at least be in S3-Hot so we'll only need events for that for
>> now.
>>
>> Do we have some generic infrastructure to gather reasons for wake up
>> from S1-S4 and pass this to userspace yet?
>
> I do not think generic api exists...
>
> How does it work?

I tried to brain dump as much as I could on the WoW wiki page [1]. In
essence we send keep alive messages (null data frames) and since we're
in PS mode the AP buffers the frames for us. At least for Atheros
ath9k devices we don't have any option but to not process any frames
sent to us from the AP except for WoW hardware processing. For WoW we
have a few triggers, with user patterns we can customize a wakeup upon
ARP requests, for example, but right now I've only enabled and tested
Magic Packet.

> I thought that wifi stack is in software -> you need
> main cpu to run for wifi to work?

Yes, but we are not processing 802.11 frames for data processing and
sending them up to any higher layer, we're just doing raw hardware
pattern matching and event triggering. This of course also means
devices which do not a CPU or a CPU but no special WoW firmware that
you won't be able to use WPA for group key stuff for example for which
I do believe we do need the box's CPU. Which reminds me, maybe we
should not allow WoW for that case for now.

> ...and what are the applications?

Same as with Ethernet, only difference this is 802.11. Also not all
Ethernet drivers support WoL.

> I understand that WoL is useful for
> remote administration of connected desktops.

Sure, I for instance want to be able to use WoL and WoW to power up my
machines at home when I walk in and my Android associates to my AP.
Some devices may be connected through Ethernet some not.

>> [1] http://wireless.kernel.org/en/users/Documentation/WoW

Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/