aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/dev.h
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2009-09-30 23:04:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:43 -0400
commit4912545472d71e3dd546b18b397aec4c89fd7403 (patch)
treeb7b0d520cdbee35303caf69881f7898e38966bc7 /drivers/net/wireless/libertas/dev.h
parent125b181aec7a67c71234284ecf6d9c729d05deda (diff)
libertas: Add auto deep sleep support for SD8385/SD8686/SD8688
Add timer based auto deep sleep feature in libertas driver which can be configured using iwconfig command. This is tested on SD8688, SD8686 cards with firmware versions 10.38.1.p25, 9.70.4.p0 respectively on 32-bit and 64-bit platforms. Tests have been done for USB/CS cards to make sure that the patch won't break USB/CS code. We didn't test the if_spi driver. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/dev.h')
-rw-r--r--drivers/net/wireless/libertas/dev.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index d3b69a4b4b5e..0018df14fad9 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -129,6 +129,20 @@ struct lbs_private {
129 u32 bbp_offset; 129 u32 bbp_offset;
130 u32 rf_offset; 130 u32 rf_offset;
131 131
132 /** Deep sleep flag */
133 int is_deep_sleep;
134 /** Auto deep sleep enabled flag */
135 int is_auto_deep_sleep_enabled;
136 /** Device wakeup required flag */
137 int wakeup_dev_required;
138 /** Auto deep sleep flag*/
139 int is_activity_detected;
140 /** Auto deep sleep timeout (in miliseconds) */
141 int auto_deep_sleep_timeout;
142
143 /** Deep sleep wait queue */
144 wait_queue_head_t ds_awake_q;
145
132 /* Download sent: 146 /* Download sent:
133 bit0 1/0=data_sent/data_tx_done, 147 bit0 1/0=data_sent/data_tx_done,
134 bit1 1/0=cmd_sent/cmd_tx_done, 148 bit1 1/0=cmd_sent/cmd_tx_done,
@@ -154,6 +168,9 @@ struct lbs_private {
154 /** Hardware access */ 168 /** Hardware access */
155 int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb); 169 int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb);
156 void (*reset_card) (struct lbs_private *priv); 170 void (*reset_card) (struct lbs_private *priv);
171 int (*enter_deep_sleep) (struct lbs_private *priv);
172 int (*exit_deep_sleep) (struct lbs_private *priv);
173 int (*reset_deep_sleep_wakeup) (struct lbs_private *priv);
157 174
158 /* Wake On LAN */ 175 /* Wake On LAN */
159 uint32_t wol_criteria; 176 uint32_t wol_criteria;
@@ -204,6 +221,7 @@ struct lbs_private {
204 221
205 /** Timers */ 222 /** Timers */
206 struct timer_list command_timer; 223 struct timer_list command_timer;
224 struct timer_list auto_deepsleep_timer;
207 int nr_retries; 225 int nr_retries;
208 int cmd_timed_out; 226 int cmd_timed_out;
209 227