Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac4cced6 authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller
Browse files

libertas: reduce explicit references to priv->cur_cmd->cmdbuf



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: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4694961c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;