Commit 8538823f authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller

libertas: discard DEFER responses to commands; let the timeout trigger

When the firmware returns 0x0004, it wants us to try again later. We can
achieve that simply by throwing out the response and letting the command
timeout code kick in.
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7003b078
...@@ -665,6 +665,16 @@ int lbs_process_rx_command(struct lbs_private *priv) ...@@ -665,6 +665,16 @@ int lbs_process_rx_command(struct lbs_private *priv)
goto done; goto done;
} }
if (resp->result == cpu_to_le16(0x0004)) {
/* 0x0004 means -EAGAIN. Drop the response, let it time out
and be resubmitted */
lbs_pr_info("Firmware returns DEFER to command %x. Will let it time out...\n",
le16_to_cpu(resp->command));
spin_unlock_irqrestore(&priv->driver_lock, flags);
ret = -1;
goto done;
}
/* Now we got response from FW, cancel the command timer */ /* Now we got response from FW, cancel the command timer */
del_timer(&priv->command_timer); del_timer(&priv->command_timer);
priv->cmd_timed_out = 0; priv->cmd_timed_out = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment