aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmdresp.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2010-05-19 06:24:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-02 16:13:06 -0400
commit66fceb69b72ff7e9cd8da2ca70033982d5376e0e (patch)
treeaa91d0d6c1c9e620a9718798fe925ebc3bab3eb8 /drivers/net/wireless/libertas/cmdresp.c
parenta7da74fc88bff6f82f8255f2def49907f82f4c61 (diff)
libertas: Added callback functions to support SDIO suspend/resume.
In suspend() host sleep is activated using already configured host sleep parameters through wol command, and in resume() host sleep is cancelled. Earlier priv->fw_ready flag used to reset and set in suspend and resume handler respectively. Since after suspend only host goes into sleep state and firmware is always ready, those changes in flag state are removed. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 88f7131d66e9..d6c306353640 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -17,6 +17,7 @@
17#include "dev.h" 17#include "dev.h"
18#include "assoc.h" 18#include "assoc.h"
19#include "wext.h" 19#include "wext.h"
20#include "cmd.h"
20 21
21/** 22/**
22 * @brief This function handles disconnect event. it 23 * @brief This function handles disconnect event. it
@@ -341,32 +342,10 @@ done:
341 return ret; 342 return ret;
342} 343}
343 344
344static int lbs_send_confirmwake(struct lbs_private *priv)
345{
346 struct cmd_header cmd;
347 int ret = 0;
348
349 lbs_deb_enter(LBS_DEB_HOST);
350
351 cmd.command = cpu_to_le16(CMD_802_11_WAKEUP_CONFIRM);
352 cmd.size = cpu_to_le16(sizeof(cmd));
353 cmd.seqnum = cpu_to_le16(++priv->seqnum);
354 cmd.result = 0;
355
356 lbs_deb_hex(LBS_DEB_HOST, "wake confirm", (u8 *) &cmd,
357 sizeof(cmd));
358
359 ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &cmd, sizeof(cmd));
360 if (ret)
361 lbs_pr_alert("SEND_WAKEC_CMD: Host to Card failed for Confirm Wake\n");
362
363 lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
364 return ret;
365}
366
367int lbs_process_event(struct lbs_private *priv, u32 event) 345int lbs_process_event(struct lbs_private *priv, u32 event)
368{ 346{
369 int ret = 0; 347 int ret = 0;
348 struct cmd_header cmd;
370 349
371 lbs_deb_enter(LBS_DEB_CMD); 350 lbs_deb_enter(LBS_DEB_CMD);
372 351
@@ -410,7 +389,10 @@ int lbs_process_event(struct lbs_private *priv, u32 event)
410 if (priv->reset_deep_sleep_wakeup) 389 if (priv->reset_deep_sleep_wakeup)
411 priv->reset_deep_sleep_wakeup(priv); 390 priv->reset_deep_sleep_wakeup(priv);
412 priv->is_deep_sleep = 0; 391 priv->is_deep_sleep = 0;
413 lbs_send_confirmwake(priv); 392 lbs_cmd_async(priv, CMD_802_11_WAKEUP_CONFIRM, &cmd,
393 sizeof(cmd));
394 priv->is_host_sleep_activated = 0;
395 wake_up_interruptible(&priv->host_sleep_q);
414 break; 396 break;
415 397
416 case MACREG_INT_CODE_DEEP_SLEEP_AWAKE: 398 case MACREG_INT_CODE_DEEP_SLEEP_AWAKE: