aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-03-03 06:20:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-04 18:36:37 -0500
commit6305f498604df6c66bdb4cc533ce6332fa5ab61f (patch)
tree31b17cb19d71aa85e9f016cf58d84ac463d3cbe0 /drivers
parentc2f2d3a06f8b628d444cf4f396d6c6ddd47e1d1f (diff)
libertas: fix sanity check on sequence number in command response
Slightly more useful if we compare it against the sequence number of the command we have outstanding, rather than comparing the reply with itself. Doh. Pointed out by Sebastian Siewior Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 159216a91903..e2b0746c6cb9 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -572,9 +572,9 @@ int lbs_process_rx_command(struct lbs_private *priv)
572 respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies); 572 respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
573 lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len); 573 lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
574 574
575 if (resp->seqnum != resp->seqnum) { 575 if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
576 lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n", 576 lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
577 le16_to_cpu(resp->seqnum), le16_to_cpu(resp->seqnum)); 577 le16_to_cpu(resp->seqnum), le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
578 spin_unlock_irqrestore(&priv->driver_lock, flags); 578 spin_unlock_irqrestore(&priv->driver_lock, flags);
579 ret = -1; 579 ret = -1;
580 goto done; 580 goto done;