diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-12 15:19:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:01 -0500 |
commit | 6ce4fd2a3a84e64a27c42aaa7de6e0e85dee3573 (patch) | |
tree | 4f9f5037a03aee5382af8cafb7d09699a658abb6 | |
parent | a27b9f96f21a2f15c423cca745f65de3db61e364 (diff) |
libertas: add lbs_host_sleep_cfg() command function
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/defs.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/host.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/hostcmd.h | 7 |
5 files changed, 38 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 8d8f9d9ba192..2d7b646557c8 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -111,6 +111,25 @@ out: | |||
111 | return ret; | 111 | return ret; |
112 | } | 112 | } |
113 | 113 | ||
114 | int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, | ||
115 | uint8_t gpio, uint8_t gap) | ||
116 | { | ||
117 | struct cmd_ds_host_sleep cmd_config; | ||
118 | int ret; | ||
119 | |||
120 | cmd_config.criteria = cpu_to_le32(criteria); | ||
121 | cmd_config.gpio = gpio; | ||
122 | cmd_config.gap = gap; | ||
123 | |||
124 | ret = lbs_cmd_with_response(priv, CMD_802_11_HOST_SLEEP_CFG, cmd_config); | ||
125 | if (ret) { | ||
126 | lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret); | ||
127 | return ret; | ||
128 | } | ||
129 | return ret; | ||
130 | } | ||
131 | EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg); | ||
132 | |||
114 | static int lbs_cmd_802_11_ps_mode(struct lbs_private *priv, | 133 | static int lbs_cmd_802_11_ps_mode(struct lbs_private *priv, |
115 | struct cmd_ds_command *cmd, | 134 | struct cmd_ds_command *cmd, |
116 | u16 cmd_action) | 135 | u16 cmd_action) |
diff --git a/drivers/net/wireless/libertas/cmd.h b/drivers/net/wireless/libertas/cmd.h index 80714b51285a..8d72c7e25250 100644 --- a/drivers/net/wireless/libertas/cmd.h +++ b/drivers/net/wireless/libertas/cmd.h | |||
@@ -35,4 +35,7 @@ int lbs_set_channel(struct lbs_private *priv, u8 channel); | |||
35 | 35 | ||
36 | int lbs_mesh_config(struct lbs_private *priv, int enable); | 36 | int lbs_mesh_config(struct lbs_private *priv, int enable); |
37 | 37 | ||
38 | int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, | ||
39 | uint8_t gpio, uint8_t gap); | ||
40 | |||
38 | #endif /* _LBS_CMD_H */ | 41 | #endif /* _LBS_CMD_H */ |
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h index 9b98ae720bc0..3053cc2160bc 100644 --- a/drivers/net/wireless/libertas/defs.h +++ b/drivers/net/wireless/libertas/defs.h | |||
@@ -141,6 +141,13 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in | |||
141 | #define LBS_UPLD_SIZE 2312 | 141 | #define LBS_UPLD_SIZE 2312 |
142 | #define DEV_NAME_LEN 32 | 142 | #define DEV_NAME_LEN 32 |
143 | 143 | ||
144 | /* Wake criteria for HOST_SLEEP_CFG command */ | ||
145 | #define EHS_WAKE_ON_BROADCAST_DATA 0x0001 | ||
146 | #define EHS_WAKE_ON_UNICAST_DATA 0x0002 | ||
147 | #define EHS_WAKE_ON_MAC_EVENT 0x0004 | ||
148 | #define EHS_WAKE_ON_MULTICAST_DATA 0x0008 | ||
149 | #define EHS_REMOVE_WAKEUP 0xFFFFFFFF | ||
150 | |||
144 | /** Misc constants */ | 151 | /** Misc constants */ |
145 | /* This section defines 802.11 specific contants */ | 152 | /* This section defines 802.11 specific contants */ |
146 | 153 | ||
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h index 64178cff2f47..fe000813f8d2 100644 --- a/drivers/net/wireless/libertas/host.h +++ b/drivers/net/wireless/libertas/host.h | |||
@@ -73,6 +73,8 @@ | |||
73 | #define CMD_802_11_SET_AFC 0x003c | 73 | #define CMD_802_11_SET_AFC 0x003c |
74 | #define CMD_802_11_GET_AFC 0x003d | 74 | #define CMD_802_11_GET_AFC 0x003d |
75 | #define CMD_802_11_AD_HOC_STOP 0x0040 | 75 | #define CMD_802_11_AD_HOC_STOP 0x0040 |
76 | #define CMD_802_11_HOST_SLEEP_CFG 0x0043 | ||
77 | #define CMD_802_11_HOST_SLEEP_ACTIVATE 0x0045 | ||
76 | #define CMD_802_11_BEACON_STOP 0x0049 | 78 | #define CMD_802_11_BEACON_STOP 0x0049 |
77 | #define CMD_802_11_MAC_ADDRESS 0x004d | 79 | #define CMD_802_11_MAC_ADDRESS 0x004d |
78 | #define CMD_802_11_LED_GPIO_CTRL 0x004e | 80 | #define CMD_802_11_LED_GPIO_CTRL 0x004e |
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h index aab5d64f32d8..aa4cea040143 100644 --- a/drivers/net/wireless/libertas/hostcmd.h +++ b/drivers/net/wireless/libertas/hostcmd.h | |||
@@ -540,6 +540,13 @@ struct MrvlIEtype_keyParamSet { | |||
540 | u8 key[32]; | 540 | u8 key[32]; |
541 | }; | 541 | }; |
542 | 542 | ||
543 | struct cmd_ds_host_sleep { | ||
544 | struct cmd_header hdr; | ||
545 | __le32 criteria; | ||
546 | uint8_t gpio; | ||
547 | uint8_t gap; | ||
548 | } __attribute__ ((packed)); | ||
549 | |||
543 | struct cmd_ds_802_11_key_material { | 550 | struct cmd_ds_802_11_key_material { |
544 | __le16 action; | 551 | __le16 action; |
545 | struct MrvlIEtype_keyParamSet keyParamSet[2]; | 552 | struct MrvlIEtype_keyParamSet keyParamSet[2]; |