summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/if_cs.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-17 15:22:43 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:07:44 -0800
commit7003b078c82d141216deecef4de154711a107aab (patch)
treede77a9a0c8cdb792200ac757f7c454384c06128c /drivers/net/wireless/libertas/if_cs.c
parentac4cced6e850496b66c0825b7f74d51ef02c6371 (diff)
libertas: use priv->upld_buf for command responses
If we don't scribble over the command we sent, then we can retry it when the firmware responds with 0x0004 (which means -EAGAIN). Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_cs.c')
-rw-r--r--drivers/net/wireless/libertas/if_cs.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 58143637c737..4b5ab9a6b97b 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -647,7 +647,6 @@ static int if_cs_get_int_status(struct lbs_private *priv, u8 *ireg)
struct if_cs_card *card = (struct if_cs_card *)priv->card;
int ret = 0;
u16 int_cause;
- u8 *cmdbuf;
*ireg = 0;
lbs_deb_enter(LBS_DEB_CS);
@@ -679,14 +678,7 @@ sbi_get_int_status_exit:
/* Card has a command result for us */
if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) {
spin_lock(&priv->driver_lock);
- if (!priv->cur_cmd) {
- cmdbuf = priv->upld_buf;
- priv->hisregcpy &= ~IF_CS_C_S_RX_UPLD_RDY;
- } else {
- cmdbuf = (u8 *) priv->cur_cmd->cmdbuf;
- }
-
- ret = if_cs_receive_cmdres(priv, cmdbuf, &priv->upld_len);
+ ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len);
spin_unlock(&priv->driver_lock);
if (ret < 0)
lbs_pr_err("could not receive cmd from card\n");