diff options
author | Bing Zhao <bzhao@marvell.com> | 2009-02-05 01:22:39 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:51:38 -0500 |
commit | f5ac2b9eb58f5efad83f2d0e7fa464e8980ecfc9 (patch) | |
tree | efb94aef654467afa75b9ae021797aa57ecaa15c /drivers/net/wireless/libertas/if_sdio.c | |
parent | f11c179eea77b8afc2fb7cb4b9a8815b85e3c16f (diff) |
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>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_sdio.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_sdio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 4519d7314f47..987836865ea5 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, | |||
209 | event = sdio_readb(card->func, IF_SDIO_EVENT, &ret); | 209 | event = sdio_readb(card->func, IF_SDIO_EVENT, &ret); |
210 | if (ret) | 210 | if (ret) |
211 | goto out; | 211 | goto out; |
212 | |||
213 | /* right shift 3 bits to get the event id */ | ||
214 | event >>= 3; | ||
212 | } else { | 215 | } else { |
213 | if (size < 4) { | 216 | if (size < 4) { |
214 | lbs_deb_sdio("event packet too small (%d bytes)\n", | 217 | lbs_deb_sdio("event packet too small (%d bytes)\n", |
@@ -921,6 +924,9 @@ static int if_sdio_probe(struct sdio_func *func, | |||
921 | if (ret) | 924 | if (ret) |
922 | goto err_activate_card; | 925 | goto err_activate_card; |
923 | 926 | ||
927 | if (priv->fwcapinfo & FW_CAPINFO_PS) | ||
928 | priv->ps_supported = 1; | ||
929 | |||
924 | out: | 930 | out: |
925 | lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret); | 931 | lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret); |
926 | 932 | ||