diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2008-03-26 08:22:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-01 17:13:17 -0400 |
commit | f539f2efe9fdf9e7db2022a757190858576d34fd (patch) | |
tree | 9fa3aafbffe64122a7bcb8c7e2d8ae117ab65b8a /drivers/net/wireless/libertas/cmdresp.c | |
parent | 7460f5a69055357bf97f1890db547aba0c4bf2fa (diff) |
libertas: convert sleep/wake config direct commands
Confirm sleep event: they come very regularly, eventually several times per
second. Therefore we want to send the config command as fast as possible.
The old code pre-set the command in priv->lbs_ps_confirm_sleep. However, the
byte sequence to be sent to the hardware is the same for all interfaces. So
this patch make this an extern structure, initialized at module load time.
Config wake event: normal conversion to a direct command. However, I don't know
how to trigger a "HOST AWAKE" event from the firmware, so this part is
untested.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.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.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 8b5d1a55a0e9..e60d03bf8d11 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -548,21 +548,20 @@ done: | |||
548 | 548 | ||
549 | static int lbs_send_confirmwake(struct lbs_private *priv) | 549 | static int lbs_send_confirmwake(struct lbs_private *priv) |
550 | { | 550 | { |
551 | struct cmd_header *cmd = &priv->lbs_ps_confirm_wake; | 551 | struct cmd_header cmd; |
552 | int ret = 0; | 552 | int ret = 0; |
553 | 553 | ||
554 | lbs_deb_enter(LBS_DEB_HOST); | 554 | lbs_deb_enter(LBS_DEB_HOST); |
555 | 555 | ||
556 | cmd->command = cpu_to_le16(CMD_802_11_WAKEUP_CONFIRM); | 556 | cmd.command = cpu_to_le16(CMD_802_11_WAKEUP_CONFIRM); |
557 | cmd->size = cpu_to_le16(sizeof(*cmd)); | 557 | cmd.size = cpu_to_le16(sizeof(cmd)); |
558 | cmd->seqnum = cpu_to_le16(++priv->seqnum); | 558 | cmd.seqnum = cpu_to_le16(++priv->seqnum); |
559 | cmd->result = 0; | 559 | cmd.result = 0; |
560 | 560 | ||
561 | lbs_deb_host("SEND_WAKEC_CMD: before download\n"); | 561 | lbs_deb_hex(LBS_DEB_HOST, "wake confirm", (u8 *) &cmd, |
562 | sizeof(cmd)); | ||
562 | 563 | ||
563 | lbs_deb_hex(LBS_DEB_HOST, "wake confirm command", (void *)cmd, sizeof(*cmd)); | 564 | ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &cmd, sizeof(cmd)); |
564 | |||
565 | ret = priv->hw_host_to_card(priv, MVMS_CMD, (void *)cmd, sizeof(*cmd)); | ||
566 | if (ret) | 565 | if (ret) |
567 | lbs_pr_alert("SEND_WAKEC_CMD: Host to Card failed for Confirm Wake\n"); | 566 | lbs_pr_alert("SEND_WAKEC_CMD: Host to Card failed for Confirm Wake\n"); |
568 | 567 | ||