aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-07-27 16:15:01 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-27 15:14:12 -0400
commit53800f5dbf4a62126e34605be7db89702d76dec6 (patch)
tree73d326dbcbf7d80cfba2d20587da236f9ab0b970 /drivers/net/wireless
parent0bb6408777227fcf5136e28aec29438606d5ac82 (diff)
libertas: convert DEEP_SLEEP timer to a direct command
Other uses were already used direct command paths. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/libertas/cmd.c4
-rw-r--r--drivers/net/wireless/libertas/main.c16
2 files changed, 8 insertions, 12 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 5c7bb3551fb5..f19a36fa57da 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1208,10 +1208,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1208 cmdptr->result = 0; 1208 cmdptr->result = 0;
1209 1209
1210 switch (cmd_no) { 1210 switch (cmd_no) {
1211 case CMD_802_11_DEEP_SLEEP:
1212 cmdptr->command = cpu_to_le16(CMD_802_11_DEEP_SLEEP);
1213 cmdptr->size = cpu_to_le16(sizeof(struct cmd_header));
1214 break;
1215 default: 1211 default:
1216 lbs_pr_err("PREP_CMD: unknown command 0x%04x\n", cmd_no); 1212 lbs_pr_err("PREP_CMD: unknown command 0x%04x\n", cmd_no);
1217 ret = -1; 1213 ret = -1;
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 6c0e814bbe60..2398fc5170ef 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -658,7 +658,6 @@ out:
658static void auto_deepsleep_timer_fn(unsigned long data) 658static void auto_deepsleep_timer_fn(unsigned long data)
659{ 659{
660 struct lbs_private *priv = (struct lbs_private *)data; 660 struct lbs_private *priv = (struct lbs_private *)data;
661 int ret;
662 661
663 lbs_deb_enter(LBS_DEB_CMD); 662 lbs_deb_enter(LBS_DEB_CMD);
664 663
@@ -666,14 +665,15 @@ static void auto_deepsleep_timer_fn(unsigned long data)
666 priv->is_activity_detected = 0; 665 priv->is_activity_detected = 0;
667 } else { 666 } else {
668 if (priv->is_auto_deep_sleep_enabled && 667 if (priv->is_auto_deep_sleep_enabled &&
669 (!priv->wakeup_dev_required) && 668 (!priv->wakeup_dev_required) &&
670 (priv->connect_status != LBS_CONNECTED)) { 669 (priv->connect_status != LBS_CONNECTED)) {
670 struct cmd_header cmd;
671
671 lbs_deb_main("Entering auto deep sleep mode...\n"); 672 lbs_deb_main("Entering auto deep sleep mode...\n");
672 ret = lbs_prepare_and_send_command(priv, 673 memset(&cmd, 0, sizeof(cmd));
673 CMD_802_11_DEEP_SLEEP, 0, 674 cmd.size = cpu_to_le16(sizeof(cmd));
674 0, 0, NULL); 675 lbs_cmd_async(priv, CMD_802_11_DEEP_SLEEP, &cmd,
675 if (ret) 676 sizeof(cmd));
676 lbs_pr_err("Enter Deep Sleep command failed\n");
677 } 677 }
678 } 678 }
679 mod_timer(&priv->auto_deepsleep_timer , jiffies + 679 mod_timer(&priv->auto_deepsleep_timer , jiffies +