summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/if_sdio.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-04-28 12:37:46 -0700
committerJohn W. Linville <linville@tuxdriver.com>2010-04-28 16:49:23 -0400
commitca962557c2f2aa14f8032006ce17ebb4ff73db55 (patch)
tree2535cea967c6c8efc8280f064fda9236c7b63814 /drivers/net/wireless/libertas/if_sdio.c
parent446cfaa412beef0dd6cb0edf3b4eaed34d824537 (diff)
downloadlinux-stable-ca962557c2f2aa14f8032006ce17ebb4ff73db55.tar.gz
linux-stable-ca962557c2f2aa14f8032006ce17ebb4ff73db55.tar.bz2
linux-stable-ca962557c2f2aa14f8032006ce17ebb4ff73db55.zip
libertas: fix 8686 firmware loading regression
The 'ready' condition was incorrectly evaluated which sometimes lead to failures loading the second-stage firmware on 8686 devices. (This was introduced in "libertas: consolidate SDIO firmware wait code". -- JWL) Signed-off-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 68cc407054e3..094176e92ebe 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -323,7 +323,9 @@ static int if_sdio_wait_status(struct if_sdio_card *card, const u8 condition)
timeout = jiffies + HZ;
while (1) {
status = sdio_readb(card->func, IF_SDIO_STATUS, &ret);
- if (ret || (status & condition))
+ if (ret)
+ return ret;
+ if ((status & condition) == condition)
break;
if (time_after(jiffies, timeout))
return -ETIMEDOUT;