summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/cmdresp.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-03-26 12:22:11 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2008-04-01 21:13:17 (GMT)
commitf539f2efe9fdf9e7db2022a757190858576d34fd (patch)
tree9fa3aafbffe64122a7bcb8c7e2d8ae117ab65b8a /drivers/net/wireless/libertas/cmdresp.c
parent7460f5a69055357bf97f1890db547aba0c4bf2fa (diff)
downloadlinux-fsl-qoriq-f539f2efe9fdf9e7db2022a757190858576d34fd.tar.xz
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.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 8b5d1a5..e60d03b 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -548,21 +548,20 @@ done:
static int lbs_send_confirmwake(struct lbs_private *priv)
{
- struct cmd_header *cmd = &priv->lbs_ps_confirm_wake;
+ struct cmd_header cmd;
int ret = 0;
lbs_deb_enter(LBS_DEB_HOST);
- cmd->command = cpu_to_le16(CMD_802_11_WAKEUP_CONFIRM);
- cmd->size = cpu_to_le16(sizeof(*cmd));
- cmd->seqnum = cpu_to_le16(++priv->seqnum);
- cmd->result = 0;
+ cmd.command = cpu_to_le16(CMD_802_11_WAKEUP_CONFIRM);
+ cmd.size = cpu_to_le16(sizeof(cmd));
+ cmd.seqnum = cpu_to_le16(++priv->seqnum);
+ cmd.result = 0;
- lbs_deb_host("SEND_WAKEC_CMD: before download\n");
+ lbs_deb_hex(LBS_DEB_HOST, "wake confirm", (u8 *) &cmd,
+ sizeof(cmd));
- lbs_deb_hex(LBS_DEB_HOST, "wake confirm command", (void *)cmd, sizeof(*cmd));
-
- ret = priv->hw_host_to_card(priv, MVMS_CMD, (void *)cmd, sizeof(*cmd));
+ ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &cmd, sizeof(cmd));
if (ret)
lbs_pr_alert("SEND_WAKEC_CMD: Host to Card failed for Confirm Wake\n");