Skip to content

Commit

Permalink
libertas: reduce explicit references to priv->cur_cmd->cmdbuf
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent 4694961 commit ac4cced
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/wireless/libertas/cmdresp.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,20 +639,20 @@ 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);

lbs_deb_host("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
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;
Expand Down

0 comments on commit ac4cced

Please sign in to comment.