diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-17 15:22:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:44 -0500 |
commit | 7003b078c82d141216deecef4de154711a107aab (patch) | |
tree | de77a9a0c8cdb792200ac757f7c454384c06128c /drivers/net/wireless/libertas/if_sdio.c | |
parent | ac4cced6e850496b66c0825b7f74d51ef02c6371 (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_sdio.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_sdio.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 9225546b9d48..eed73204bcc9 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c | |||
@@ -136,12 +136,6 @@ static int if_sdio_handle_cmd(struct if_sdio_card *card, | |||
136 | 136 | ||
137 | spin_lock_irqsave(&card->priv->driver_lock, flags); | 137 | spin_lock_irqsave(&card->priv->driver_lock, flags); |
138 | 138 | ||
139 | if (!card->priv->cur_cmd) { | ||
140 | lbs_deb_sdio("discarding spurious response\n"); | ||
141 | ret = 0; | ||
142 | goto out; | ||
143 | } | ||
144 | |||
145 | if (size > LBS_CMD_BUFFER_SIZE) { | 139 | if (size > LBS_CMD_BUFFER_SIZE) { |
146 | lbs_deb_sdio("response packet too large (%d bytes)\n", | 140 | lbs_deb_sdio("response packet too large (%d bytes)\n", |
147 | (int)size); | 141 | (int)size); |
@@ -149,7 +143,7 @@ static int if_sdio_handle_cmd(struct if_sdio_card *card, | |||
149 | goto out; | 143 | goto out; |
150 | } | 144 | } |
151 | 145 | ||
152 | memcpy(card->priv->cur_cmd->cmdbuf, buffer, size); | 146 | memcpy(card->priv->upld_buf, buffer, size); |
153 | card->priv->upld_len = size; | 147 | card->priv->upld_len = size; |
154 | 148 | ||
155 | card->int_cause |= MRVDRV_CMD_UPLD_RDY; | 149 | card->int_cause |= MRVDRV_CMD_UPLD_RDY; |