diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-17 20:22:43 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 23:07:44 (GMT) |
commit | 7003b078c82d141216deecef4de154711a107aab (patch) | |
tree | de77a9a0c8cdb792200ac757f7c454384c06128c /drivers/net/wireless/libertas/if_usb.c | |
parent | ac4cced6e850496b66c0825b7f74d51ef02c6371 (diff) | |
download | linux-fsl-qoriq-7003b078c82d141216deecef4de154711a107aab.tar.xz |
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_usb.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 3931fe6..7db8e6c 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c @@ -589,8 +589,6 @@ static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff, struct if_usb_card *cardp, struct lbs_private *priv) { - uint8_t *cmdbuf; - if (recvlength > LBS_CMD_BUFFER_SIZE) { lbs_deb_usbd(&cardp->udev->dev, "The receive buffer is too large\n"); @@ -602,19 +600,9 @@ static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff, BUG(); spin_lock(&priv->driver_lock); - /* take care of cur_cmd = NULL case by reading the - * data to clear the interrupt */ - if (!priv->cur_cmd) { - lbs_deb_hex(LBS_DEB_HOST, "Unsolicited CMD_RESP", - (void *) recvbuff + MESSAGE_HEADER_LEN, priv->upld_len); - cmdbuf = priv->upld_buf; - priv->hisregcpy &= ~MRVDRV_CMD_UPLD_RDY; - } else - cmdbuf = (uint8_t *) priv->cur_cmd->cmdbuf; - cardp->usb_int_cause |= MRVDRV_CMD_UPLD_RDY; priv->upld_len = (recvlength - MESSAGE_HEADER_LEN); - memcpy(cmdbuf, recvbuff + MESSAGE_HEADER_LEN, priv->upld_len); + memcpy(priv->upld_buf, recvbuff + MESSAGE_HEADER_LEN, priv->upld_len); kfree_skb(skb); lbs_interrupt(priv); |