diff options
author | chunfan chen <jeffc@marvell.com> | 2016-01-13 01:26:55 -0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-01-29 11:20:40 +0200 |
commit | 8de00f1b1c7f37e523430efba8e4257b2761df7c (patch) | |
tree | ecdb19c03efe125788a2627eeee01df86f8cdd24 /drivers/net/wireless/marvell/mwifiex/sta_cmd.c | |
parent | 7d7f07d8c5d35ebfb207650b0dbcf437dad76bab (diff) | |
download | lwn-8de00f1b1c7f37e523430efba8e4257b2761df7c.tar.gz lwn-8de00f1b1c7f37e523430efba8e4257b2761df7c.zip |
mwifiex: report wakeup reason to cfg80211
This patch adds code to report wakeup reason to cfg80211
when system is resumed.
Signed-off-by: chunfan chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/sta_cmd.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 60f3ded747c9..30f152601c57 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -1813,6 +1813,22 @@ static int mwifiex_cmd_sdio_rx_aggr_cfg(struct host_cmd_ds_command *cmd, return 0; } +/* This function prepares command to get HS wakeup reason. + * + * Preparation includes - + * - Setting command ID, action and proper size + * - Ensuring correct endian-ness + */ +static int mwifiex_cmd_get_wakeup_reason(struct mwifiex_private *priv, + struct host_cmd_ds_command *cmd) +{ + cmd->command = cpu_to_le16(HostCmd_CMD_HS_WAKEUP_REASON); + cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_wakeup_reason) + + S_DS_GEN); + + return 0; +} + /* * This function prepares the commands before sending them to the firmware. * @@ -2067,6 +2083,9 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no, ret = mwifiex_cmd_sdio_rx_aggr_cfg(cmd_ptr, cmd_action, data_buf); break; + case HostCmd_CMD_HS_WAKEUP_REASON: + ret = mwifiex_cmd_get_wakeup_reason(priv, cmd_ptr); + break; case HostCmd_CMD_MC_POLICY: ret = mwifiex_cmd_set_mc_policy(priv, cmd_ptr, cmd_action, data_buf); |