Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184075
b: refs/heads/master
c: 40e6fa8
h: refs/heads/master
i:
  184073: 07871a2
  184071: d165297
v: v3
  • Loading branch information
Holger Schurig authored and John W. Linville committed Feb 8, 2010
1 parent 9a08a68 commit 2c35e49
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85359499eec796e784e2f1e3d7bbb31d84dd4c2b
refs/heads/master: 40e6fa829a2544c9f8fd5a94844fe502334d6afc
5 changes: 0 additions & 5 deletions trunk/drivers/net/wireless/libertas/cmdresp.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,6 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
/* Now we got response from FW, cancel the command timer */
del_timer(&priv->command_timer);
priv->cmd_timed_out = 0;
if (priv->nr_retries) {
lbs_pr_info("Received result %x to command %x after %d retries\n",
result, curcmd, priv->nr_retries);
priv->nr_retries = 0;
}

/* Store the response code to cur_cmd_retcode. */
priv->cur_cmd_retcode = result;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/libertas/dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ struct lbs_private {
struct list_head cmdpendingq; /* pending command buffers */
wait_queue_head_t cmd_pending;
struct timer_list command_timer;
int nr_retries;
int cmd_timed_out;

/* Command responses sent from the hardware to the driver */
Expand Down
31 changes: 7 additions & 24 deletions trunk/drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,31 +533,14 @@ static int lbs_thread(void *data)
if (priv->cmd_timed_out && priv->cur_cmd) {
struct cmd_ctrl_node *cmdnode = priv->cur_cmd;

if (++priv->nr_retries > 3) {
lbs_pr_info("Excessive timeouts submitting "
"command 0x%04x\n",
le16_to_cpu(cmdnode->cmdbuf->command));
lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
priv->nr_retries = 0;
if (priv->reset_card)
priv->reset_card(priv);
} else {
priv->cur_cmd = NULL;
priv->dnld_sent = DNLD_RES_RECEIVED;
lbs_pr_info("requeueing command 0x%04x due "
"to timeout (#%d)\n",
le16_to_cpu(cmdnode->cmdbuf->command),
priv->nr_retries);

/* Stick it back at the _top_ of the pending queue
for immediate resubmission */
list_add(&cmdnode->list, &priv->cmdpendingq);
}
lbs_pr_info("Timeout submitting command 0x%04x\n",
le16_to_cpu(cmdnode->cmdbuf->command));
lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
if (priv->reset_card)
priv->reset_card(priv);
}
priv->cmd_timed_out = 0;



if (!priv->fw_ready)
continue;

Expand Down Expand Up @@ -729,7 +712,7 @@ static int lbs_setup_firmware(struct lbs_private *priv)
* This function handles the timeout of command sending.
* It will re-send the same command again.
*/
static void command_timer_fn(unsigned long data)
static void lbs_cmd_timeout_handler(unsigned long data)
{
struct lbs_private *priv = (struct lbs_private *)data;
unsigned long flags;
Expand Down Expand Up @@ -848,7 +831,7 @@ static int lbs_init_adapter(struct lbs_private *priv)

mutex_init(&priv->lock);

setup_timer(&priv->command_timer, command_timer_fn,
setup_timer(&priv->command_timer, lbs_cmd_timeout_handler,
(unsigned long)priv);
setup_timer(&priv->auto_deepsleep_timer, auto_deepsleep_timer_fn,
(unsigned long)priv);
Expand Down

0 comments on commit 2c35e49

Please sign in to comment.