aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-14 20:45:59 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-14 20:45:59 -0500
commitf6f223039c0d0683bdea1eabd35b309e10311a60 (patch)
tree890e07acf8c18ddc2994ebc0a0bdcdda38b0dcc6 /drivers/net/wireless/libertas/main.c
parentb3b3f04fb587ecb61b5baa6c1c5f0e666fd12d73 (diff)
parent42c4568a4ace0adc27a9d6f02936e2047ba6fc7e (diff)
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 60bde1233a30..cd8ed7fdafad 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -536,31 +536,14 @@ static int lbs_thread(void *data)
536 if (priv->cmd_timed_out && priv->cur_cmd) { 536 if (priv->cmd_timed_out && priv->cur_cmd) {
537 struct cmd_ctrl_node *cmdnode = priv->cur_cmd; 537 struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
538 538
539 if (++priv->nr_retries > 3) { 539 lbs_pr_info("Timeout submitting command 0x%04x\n",
540 lbs_pr_info("Excessive timeouts submitting " 540 le16_to_cpu(cmdnode->cmdbuf->command));
541 "command 0x%04x\n", 541 lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
542 le16_to_cpu(cmdnode->cmdbuf->command)); 542 if (priv->reset_card)
543 lbs_complete_command(priv, cmdnode, -ETIMEDOUT); 543 priv->reset_card(priv);
544 priv->nr_retries = 0;
545 if (priv->reset_card)
546 priv->reset_card(priv);
547 } else {
548 priv->cur_cmd = NULL;
549 priv->dnld_sent = DNLD_RES_RECEIVED;
550 lbs_pr_info("requeueing command 0x%04x due "
551 "to timeout (#%d)\n",
552 le16_to_cpu(cmdnode->cmdbuf->command),
553 priv->nr_retries);
554
555 /* Stick it back at the _top_ of the pending queue
556 for immediate resubmission */
557 list_add(&cmdnode->list, &priv->cmdpendingq);
558 }
559 } 544 }
560 priv->cmd_timed_out = 0; 545 priv->cmd_timed_out = 0;
561 546
562
563
564 if (!priv->fw_ready) 547 if (!priv->fw_ready)
565 continue; 548 continue;
566 549
@@ -732,7 +715,7 @@ done:
732 * This function handles the timeout of command sending. 715 * This function handles the timeout of command sending.
733 * It will re-send the same command again. 716 * It will re-send the same command again.
734 */ 717 */
735static void command_timer_fn(unsigned long data) 718static void lbs_cmd_timeout_handler(unsigned long data)
736{ 719{
737 struct lbs_private *priv = (struct lbs_private *)data; 720 struct lbs_private *priv = (struct lbs_private *)data;
738 unsigned long flags; 721 unsigned long flags;
@@ -851,7 +834,7 @@ static int lbs_init_adapter(struct lbs_private *priv)
851 834
852 mutex_init(&priv->lock); 835 mutex_init(&priv->lock);
853 836
854 setup_timer(&priv->command_timer, command_timer_fn, 837 setup_timer(&priv->command_timer, lbs_cmd_timeout_handler,
855 (unsigned long)priv); 838 (unsigned long)priv);
856 setup_timer(&priv->auto_deepsleep_timer, auto_deepsleep_timer_fn, 839 setup_timer(&priv->auto_deepsleep_timer, auto_deepsleep_timer_fn,
857 (unsigned long)priv); 840 (unsigned long)priv);