[PATCH 1/2] libertas: add ability to power off card on suspend

Daniel Drake dsd at laptop.org
Tue Aug 2 06:54:07 EDT 2011

On 2 August 2011 11:27, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
> Could be usefull if it's not possible to keep power on the card
> when host goes into suspend.

If it's not possible to keep power during suspend, then I don't see
why you need to explicitly turn it off on the way down.

If power can be maintained, this is going to confuse userspace. If the
network interface is up while you go into suspend, this code would
kick in and power down the device. Then, during resume, it would power
it up again. During this whole time, the network interface has
remained UP, so userspace isn't aware that anything has happened. But,
since the hardware has been powered off and on again, it has lost all
state (association, encryption keys, etc).

The way we handle this in libertas_sdio is that if we don't want the
card powered during suspend, we ask the MMC layer to remove the
device. This causes the remove function to be run, and the interface
disappears. During resume, it gets probed again from scratch, which
then prompts userspace into deciding which network to connect to,
reprogramming keys, etc.


More information about the libertas-dev mailing list