[PATCH] libertas: fix power save issue in libertas_sdio module

Dan Williams dcbw at redhat.com
Wed Feb 11 13:12:49 EST 2009


On Wed, 2009-02-11 at 10:47 +0100, Sven Neumann wrote:
> Hi,
> 
> On Tue, 2009-02-10 at 20:57 -0800, Bing Zhao wrote:
> 
> > Subject: [PATCH] libertas: fix power save issue in libertas_sdio module
> > 
> > The problem: "iwconfig ethX power on" returns error
> > 
> > The cause: "ps_supported" flag was never set for SD8385/8686
> > 
> > The fix: check firmware capabilities returned by GET_HW_SPEC command.
> > Set "ps_supported" to 1 if FW_CAPINFO_PS bit is on. This fix applies
> > to SDIO interface only.
> 
> Your patch also introduces a bitshift in if_sdio_handle_event() in the
> code branch for (card->model == 0x04). Is this intentional?

After a little archaeology, I believe this change is correct.

Historically, the vendor drivers always shifted the "EventCause" from
the interface-specific code to the right by 3 (>> SBI_EVENT_CAUSE_SHIFT)
in wlan_process_event() in wlan_cmdresp.c.  We got rid of this because
nothing used the lower 3 bits of the half-shifted event anyway once it
got assigned to adapter->EventCause, so why not do any necessary
shifting in the interface drivers to make things simpler...

But it looks like that got overlooked when adding the sd8385 support;
other references I can find (Motorola A980) indicate that the event
value is read from the scratch register without shifts, but then is
shifted in wlan_process_event() anyway.

Dan





More information about the libertas-dev mailing list