Is there an update documentation of newer firmware? I'm trying to solve a Power Save issue

Alberto Panizzo maramaopercheseimorto at gmail.com
Thu Jun 17 04:50:06 EDT 2010


Hi all,
I am working with an SD8686 based wifi chip module (WM-G-MR-09)
and the 2.6.34 kernel driver.
All that do not concern with PS (Power Save) mode goes well (apart
some rare watchdog timeout issues raised by Shriharsh Datar in
"Libertas: Timeout issue with iperf and ping").

First of all thanks a lot for your work on that driver!

When I try to send the wifi chip to Power Save through wext lbs_set_power
interface, it happen this: 
(wol criteria are defined and configured correctly as:
card->priv->wol_criteria = EHS_WAKE_ON_UNICAST_DATA |
		EHS_WAKE_ON_MULTICAST_DATA | EHS_WAKE_ON_BROADCAST_DATA|
		EHS_WAKE_ON_MAC_EVENT;
And a connection is established to a WEP network.)

[  118.471218] libertas host: PREP_CMD: command 0x0021
[  118.476097] libertas cmd: PS command:SubCode- Enter PS
[  118.481200] libertas host: QUEUE_CMD: inserted command 0x0021 into cmdpendingq
[  118.488421] libertas thread: 2: currenttxskb (null), dnld_send 0
[  118.494437] libertas host: PREP_CMD: wait for response
[  118.499545] libertas thread: 3: currenttxskb (null), dnld_sent 0
[  118.505536] libertas thread: 4: currenttxskb (null), dnld_sent 0
[  118.511511] libertas host: EXEC_NEXT_CMD: sending command 0x0021
[  118.517502] libertas cmd: DNLD_CMD: command 0x0021, seq 40, size 18
[  118.523783] libertas DNLD_CMD: 21 00 12 00 28 00 00 00 30 00 00 00 01 00 00 00 
[  118.531344] libertas DNLD_CMD: 00 00 
[  118.535320] libertas sdio: interrupt: 0x2                    <<<--- command is sent
[  118.539392] libertas thread: 1: currenttxskb (null), dnld_sent 0
[  118.545404] libertas sdio: interrupt: 0x1                    <<<--- there is a packet from card (1)
[  118.549520] libertas thread: sleeping, connect_status 0, psmode 1, psstate 0
[  118.556617] libertas sdio: packet of type 1 and size 22 bytes
[  118.562400] libertas thread: 2: currenttxskb (null), dnld_send 0
[  118.568411] libertas sdio: interrupt: 0x1                    <<<--- there is a packet from card (2)
[  118.572402] libertas thread: 3: currenttxskb (null), dnld_sent 0
[  118.578424] libertas thread: 4: currenttxskb (null), dnld_sent 0
[  118.584481] libertas cmd: CMD_RESP: response 0x8021, seq 40, size 18   <<--- processing packet (1)
[  118.590791] libertas CMD_RESP: 21 80 12 00 28 00 00 00 30 00 00 00 01 00 00 00 
[  118.598191] libertas CMD_RESP: 00 00 
[  118.601857] libertas host: CMD_RESP: PS_MODE cmd reply result 0x0, action 0x30
[  118.609031] libertas host: CMD_RESP: ENTER_PS command response
[  118.614957] libertas sdio: packet of type 3 and size 8 bytes           <<--- processing packet (2)
[  118.620578] libertas sdio: packet fragment (8 < 32)
[  118.625549] libertas sdio: interrupt: 0x1                    <<<--- there is a packet from card (3)
[  118.629719] libertas sdio: packet of type 3 and size 8 bytes           <<--- processing packet (3)
[  118.635372] libertas sdio: packet fragment (8 < 32)
[  118.640497] libertas cmd: EVENT: ps awake			<<<---- packet (2) is ps awake (ignored from the driver)
[  118.644521] libertas cmd: EVENT: ps sleep			<<<---- packet (3) is ps sleep -> send confirm!
[  118.648509] libertas host: sending lbs_ps_confirm_sleep
[  118.653727] libertas sleep confirm: 21 00 12 00 00 00 00 00 34 00 00 00 00 00 00 00 
[  118.661556] libertas sleep confirm: 00 00 			<<<---- confirm sent directly without the main thread
[  118.665795] libertas thread: 1: currenttxskb (null), dnld_sent 0
[  118.671765] libertas thread: sleeping, connect_status 0, psmode 1, psstate 3

Now the chip is supposed to be asleep.

Now trying to exit Power Save from software:

[  144.448399] libertas cmd: lbs_ps_wakeup: Sending EXIT Power State mode
[  144.454905] libertas host: PREP_CMD: command 0x0021
[  144.459935] libertas cmd: PS command:SubCode- Exit PS
[  144.464989] libertas host: QUEUE_CMD: inserted command 0x0021 into cmdpendingq
[  144.472179] libertas thread: 2: currenttxskb (null), dnld_send 0
[  144.478178] libertas host: PREP_CMD: wait for response
[  144.483311] libertas thread: 3: currenttxskb (null), dnld_sent 0
[  144.489278] libertas thread: 4: currenttxskb (null), dnld_sent 0
[  144.495294] libertas host: EXEC_NEXT_CMD: PS cmd, action 0x31
[  144.501003] libertas host: EXEC_NEXT_CMD: sending EXIT_PS
[  144.506390] libertas host: EXEC_NEXT_CMD: sending command 0x0021
[  144.512361] libertas cmd: DNLD_CMD: command 0x0021, seq 41, size 18
[  144.518613] libertas DNLD_CMD: 21 00 12 00 29 00 00 00 31 00 00 00 00 00 00 00 
[  144.526037] libertas DNLD_CMD: 00 00 
[  144.529795] libertas thread: 1: currenttxskb (null), dnld_sent 2
[  144.535794] libertas thread: sleeping, connect_status 0, psmode 0, psstate 1 

Waiting for a response and while waiting freezing the userspace......

[  147.522936] libertas: command 0x0021 timed out
[  147.527400] libertas thread: 2: currenttxskb (null), dnld_send 2
[  147.533402] libertas thread: 3: currenttxskb (null), dnld_sent 2
[  147.539366] libertas thread: 4: currenttxskb (null), dnld_sent 2
[  147.545392] libertas: Timeout submitting command 0x0021
[  147.550655] libertas host: PREP_CMD: command failed with return code -110
[  147.557461] libertas thread: 1: currenttxskb (null), dnld_sent 2
[  147.573066] libertas thread: sleeping, connect_status 0, psmode 0, psstate 1

Now all commands to the chip wifi goes to timeout.


If I try to do a ping from my machine to the device:

[ 1363.899994] libertas sdio: interrupt: 0x1
[ 1363.904206] libertas sdio: packet of type 3 and size 8 bytes
[ 1363.909868] libertas sdio: packet fragment (8 < 32)
[ 1363.914780] libertas thread: 2: currenttxskb (null), dnld_send 0
[ 1363.920780] libertas thread: 3: currenttxskb (null), dnld_sent 0
[ 1363.926820] libertas sdio: interrupt: 0x1
[ 1363.930815] libertas thread: 4: currenttxskb (null), dnld_sent 0
[ 1363.936876] libertas: EVENT: unknown event id 1		<<--- What is this event?
[ 1363.941475] libertas sdio: packet of type 3 and size 8 bytes
[ 1363.947132] libertas sdio: packet fragment (8 < 32)
[ 1363.951998] libertas thread: 1: currenttxskb (null), dnld_sent 0
[ 1363.958016] libertas thread: 2: currenttxskb (null), dnld_send 0
[ 1363.964009] libertas thread: 3: currenttxskb (null), dnld_sent 0
[ 1363.970023] libertas thread: 4: currenttxskb (null), dnld_sent 0
[ 1363.976014] libertas cmd: EVENT: host awake			<<--- The firmware sends host awake!
[ 1363.980216] libertas host: PREP_CMD: command 0x0044
[ 1363.985091] libertas host: QUEUE_CMD: inserted command 0x0044 into cmdpendingq
[ 1363.992266] libertas cmd: lbs_ps_wakeup: Sending EXIT Power State mode
[ 1363.998619] libertas host: PREP_CMD: command 0x0021
[ 1364.003644] libertas cmd: PS command:SubCode- Exit PS
[ 1364.008685] libertas host: QUEUE_CMD: inserted command 0x0021 into cmdpendingq
[ 1364.015889] libertas thread: 1: currenttxskb (null), dnld_sent 0
[ 1364.021856] libertas thread: 2: currenttxskb (null), dnld_send 0
[ 1364.027843] libertas thread: 3: currenttxskb (null), dnld_sent 0
[ 1364.033805] libertas thread: 4: currenttxskb (null), dnld_sent 0
[ 1364.039796] libertas host: EXEC_NEXT_CMD: PS cmd, action 0x31
[ 1364.045543] libertas host: EXEC_NEXT_CMD: sending EXIT_PS
[ 1364.050906] libertas host: EXEC_NEXT_CMD: sending command 0x0021
[ 1364.056897] libertas cmd: DNLD_CMD: command 0x0021, seq 42, size 18
[ 1364.063122] libertas DNLD_CMD: 21 00 12 00 2a 00 00 00 31 00 00 00 00 00 00 00 
[ 1364.070598] libertas DNLD_CMD: 00 00 
[ 1364.074496] libertas sdio: interrupt: 0x2			<<--- EXIT_PS receives feedback
[ 1364.078537] libertas thread: 1: currenttxskb (null), dnld_sent 2
[ 1364.084578] libertas thread: sleeping, connect_status 0, psmode 1, psstate 1
[ 1364.091613] libertas sdio: interrupt: 0x1
[ 1364.095834] libertas sdio: packet of type 1 and size 22 bytes
[ 1364.101679] libertas thread: 2: currenttxskb (null), dnld_send 0
[ 1364.107680] libertas thread: 3: currenttxskb (null), dnld_sent 0
[ 1364.113642] libertas thread: 4: currenttxskb (null), dnld_sent 0
[ 1364.119636] libertas cmd: CMD_RESP: response 0x8021, seq 42, size 18
[ 1364.125944] libertas CMD_RESP: 21 80 12 00 2a 00 00 00 31 00 00 00 00 00 00 00 
[ 1364.133343] libertas CMD_RESP: 00 00 
[ 1364.137012] libertas host: CMD_RESP: PS_MODE cmd reply result 0x0, action 0x31
[ 1364.144185] libertas host: CMD_RESP: EXIT_PS command response
[ 1364.149941] libertas host: EXEC_NEXT_CMD: sending command 0x0044
[ 1364.155939] libertas cmd: DNLD_CMD: command 0x0044, seq 41, size 8
[ 1364.162077] libertas DNLD_CMD: 44 00 08 00 29 00 00 00 
[ 1364.167452] libertas thread: 1: currenttxskb (null), dnld_sent 2
[ 1364.173577] libertas sdio: interrupt: 0x3
[ 1364.177611] libertas thread: sleeping, connect_status 0, psmode 1, psstate 0
[ 1364.184811] libertas sdio: packet of type 1 and size 12 bytes
[ 1364.190587] libertas thread: 2: currenttxskb (null), dnld_send 0
[ 1364.196597] libertas sdio: interrupt: 0x1
[ 1364.200698] libertas thread: 3: currenttxskb (null), dnld_sent 0
[ 1364.206724] libertas thread: 4: currenttxskb (null), dnld_sent 0
[ 1364.212721] libertas sdio: packet of type 0 and size 74 bytes
[ 1364.218656] libertas cmd: CMD_RESP: response 0x8044, seq 41, size 8
[ 1364.224883] libertas CMD_RESP: 44 80 08 00 29 00 00 00 
[ 1364.230186] libertas host: EXEC_NEXT_CMD: cmdpendingq empty, go back to PS_SLEEP

Now is started the dance made of wake, answer to ping and go back  to PS_SLEEP.

My questions are:
- From firmware v5 specs the firmware have a chance to abort the "go to PS_SLEEP
  state" sequence. That ps awake event is about this?
- But the ps awake event came always the command ENTER_PS is executed. May I am lacking
  on some configurations?
- Are there updated specifications fort the newer firmware? 
  I'm using: fw 9.70.3p36, cap 0x00000303

Thanks for any help or suggestions you can give me!

Best Regards,

-- 
Alberto!

        Be Persistent!
                - Greg Kroah-Hartman (FOSDEM 2010)




More information about the libertas-dev mailing list