From: Dan Williams <dcbw@redhat.com>
To: Bing Zhao <bzhao@marvell.com>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] libertas: fix power save issue in libertas_sdio module
Date: Wed, 11 Feb 2009 13:14:34 -0500 [thread overview]
Message-ID: <1234376074.2648.21.camel@localhost> (raw)
In-Reply-To: <FE3F06125A99254E8D92161AA4569C6F0626BE76@sc-exch02.marvell.com>
On Tue, 2009-02-10 at 20:57 -0800, Bing Zhao wrote:
> Hi,
>
> This is to fix an issue in IEEE power save mode in libertas_sdio module.
> The patch (below) was generated by git-format-patch command against
> "linux-2.6" git tree.
>
> Please review and your feedbacks are welcome.
>
> Thanks,
>
> Bing
>
> -----------------------------------------------------------------------
> From 4a925690dc76965bf7173bfc0198112093bf131e Mon Sep 17 00:00:00 2001
> From: Bing Zhao <bzhao@marvell.com>
> Date: Wed, 4 Feb 2009 22:22:39 -0800
> 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.
>
> Signed-off-by: Bing Zhao <bzhao@marvell.com>
Good catch, thanks!
Acked-by: Dan Williams <dcbw@redhat.com>
> ---
> drivers/net/wireless/libertas/defs.h | 1 +
> drivers/net/wireless/libertas/if_sdio.c | 6 ++++++
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/defs.h
> b/drivers/net/wireless/libertas/defs.h
> index c364e4c..10a43c5 100644
> --- a/drivers/net/wireless/libertas/defs.h
> +++ b/drivers/net/wireless/libertas/defs.h
> @@ -263,6 +263,7 @@ static inline void lbs_deb_hex(unsigned int grp,
> const char *prompt, u8 *buf, in
>
> #define CMD_F_HOSTCMD (1 << 0)
> #define FW_CAPINFO_WPA (1 << 0)
> +#define FW_CAPINFO_PS (1 << 1)
> #define FW_CAPINFO_FIRMWARE_UPGRADE (1 << 13)
> #define FW_CAPINFO_BOOT2_UPGRADE (1<<14)
> #define FW_CAPINFO_PERSISTENT_CONFIG (1<<15)
> diff --git a/drivers/net/wireless/libertas/if_sdio.c
> b/drivers/net/wireless/libertas/if_sdio.c
> index 4519d73..9878368 100644
> --- a/drivers/net/wireless/libertas/if_sdio.c
> +++ b/drivers/net/wireless/libertas/if_sdio.c
> @@ -209,6 +209,9 @@ static int if_sdio_handle_event(struct if_sdio_card
> *card,
> event = sdio_readb(card->func, IF_SDIO_EVENT, &ret);
> if (ret)
> goto out;
> +
> + /* right shift 3 bits to get the event id */
> + event >>= 3;
> } else {
> if (size < 4) {
> lbs_deb_sdio("event packet too small (%d
> bytes)\n",
> @@ -921,6 +924,9 @@ static int if_sdio_probe(struct sdio_func *func,
> if (ret)
> goto err_activate_card;
>
> + if (priv->fwcapinfo & FW_CAPINFO_PS)
> + priv->ps_supported = 1;
> +
> out:
> lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
>
prev parent reply other threads:[~2009-02-11 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 4:57 [PATCH] libertas: fix power save issue in libertas_sdio module Bing Zhao
2009-02-11 18:14 ` Dan Williams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234376074.2648.21.camel@localhost \
--to=dcbw@redhat.com \
--cc=bzhao@marvell.com \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).