libertas: reduce explicit references to priv->cur_cmd->cmdbuf
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 17 Dec 2007 20:12:49 +0000 (15:12 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:07:44 +0000 (15:07 -0800)
We have a local variable 'resp' which we use for this. So use it,
instead of typing the whole thing.

In preparation for actually using priv->upld_buf for the responses
instead...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmdresp.c

index 8f9eda4d1be10f366c41440cb1a0c930f07ee2ef..d305e982c502c8427410ace6ecacb375a352f905 100644 (file)
@@ -639,10 +639,10 @@ int lbs_process_rx_command(struct lbs_private *priv)
                goto done;
        }
 
-       curcmd = le16_to_cpu(priv->cur_cmd->cmdbuf->command);
-
        resp = priv->cur_cmd->cmdbuf;
 
+       curcmd = le16_to_cpu(resp->command);
+
        respcmd = le16_to_cpu(resp->command);
        result = le16_to_cpu(resp->result);
 
@@ -650,9 +650,9 @@ int lbs_process_rx_command(struct lbs_private *priv)
                     respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
        lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
 
-       if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
+       if (resp->seqnum != resp->seqnum) {
                lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
-                           le16_to_cpu(resp->seqnum), le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
+                           le16_to_cpu(resp->seqnum), le16_to_cpu(resp->seqnum));
                spin_unlock_irqrestore(&priv->driver_lock, flags);
                ret = -1;
                goto done;