blob: 07c2297b89a2e41b47a29d309c8bd1efedefc533 [file] [log] [blame]
Luciano Coelhof5fc0f82009-08-06 16:25:28 +03001/*
2 * This file is part of wl1271
3 *
4 * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
5 * Copyright (C) 2008-2009 Nokia Corporation
6 *
7 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
Shahar Levi00d20102010-11-08 11:20:10 +000025#ifndef __WL12XX_H__
26#define __WL12XX_H__
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030027
28#include <linux/mutex.h>
29#include <linux/completion.h>
30#include <linux/spinlock.h>
31#include <linux/list.h>
32#include <linux/bitops.h>
33#include <net/mac80211.h>
34
Shahar Levi00d20102010-11-08 11:20:10 +000035#include "conf.h"
36#include "ini.h"
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +030037
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030038#define DRIVER_NAME "wl1271"
39#define DRIVER_PREFIX DRIVER_NAME ": "
40
41enum {
42 DEBUG_NONE = 0,
43 DEBUG_IRQ = BIT(0),
44 DEBUG_SPI = BIT(1),
45 DEBUG_BOOT = BIT(2),
46 DEBUG_MAILBOX = BIT(3),
Kalle Valoc8c90872010-02-18 13:25:53 +020047 DEBUG_TESTMODE = BIT(4),
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030048 DEBUG_EVENT = BIT(5),
49 DEBUG_TX = BIT(6),
50 DEBUG_RX = BIT(7),
51 DEBUG_SCAN = BIT(8),
52 DEBUG_CRYPT = BIT(9),
53 DEBUG_PSM = BIT(10),
54 DEBUG_MAC80211 = BIT(11),
55 DEBUG_CMD = BIT(12),
56 DEBUG_ACX = BIT(13),
Teemu Paasikivia3b8ea72010-03-18 12:26:41 +020057 DEBUG_SDIO = BIT(14),
Juuso Oikarinen14b228a2010-03-18 12:26:43 +020058 DEBUG_FILTERS = BIT(15),
Juuso Oikarinen5da11dc2010-03-26 12:53:24 +020059 DEBUG_ADHOC = BIT(16),
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030060 DEBUG_ALL = ~0,
61};
62
Eliad Peller17c17552010-12-12 12:15:35 +020063extern u32 wl12xx_debug_level;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030064
65#define DEBUG_DUMP_LIMIT 1024
66
67#define wl1271_error(fmt, arg...) \
Eliad Peller17c17552010-12-12 12:15:35 +020068 pr_err(DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030069
70#define wl1271_warning(fmt, arg...) \
Eliad Peller17c17552010-12-12 12:15:35 +020071 pr_warning(DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030072
73#define wl1271_notice(fmt, arg...) \
Eliad Peller17c17552010-12-12 12:15:35 +020074 pr_info(DRIVER_PREFIX fmt "\n", ##arg)
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030075
76#define wl1271_info(fmt, arg...) \
Eliad Peller17c17552010-12-12 12:15:35 +020077 pr_info(DRIVER_PREFIX fmt "\n", ##arg)
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030078
79#define wl1271_debug(level, fmt, arg...) \
80 do { \
Eliad Peller17c17552010-12-12 12:15:35 +020081 if (level & wl12xx_debug_level) \
82 pr_debug(DRIVER_PREFIX fmt "\n", ##arg); \
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030083 } while (0)
84
Eliad Peller17c17552010-12-12 12:15:35 +020085/* TODO: use pr_debug_hex_dump when it will be available */
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030086#define wl1271_dump(level, prefix, buf, len) \
87 do { \
Eliad Peller17c17552010-12-12 12:15:35 +020088 if (level & wl12xx_debug_level) \
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030089 print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \
90 DUMP_PREFIX_OFFSET, 16, 1, \
91 buf, \
92 min_t(size_t, len, DEBUG_DUMP_LIMIT), \
93 0); \
94 } while (0)
95
96#define wl1271_dump_ascii(level, prefix, buf, len) \
97 do { \
Eliad Peller17c17552010-12-12 12:15:35 +020098 if (level & wl12xx_debug_level) \
Luciano Coelhof5fc0f82009-08-06 16:25:28 +030099 print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \
100 DUMP_PREFIX_OFFSET, 16, 1, \
101 buf, \
102 min_t(size_t, len, DEBUG_DUMP_LIMIT), \
103 true); \
104 } while (0)
105
106#define WL1271_DEFAULT_RX_CONFIG (CFG_UNI_FILTER_EN | \
Juuso Oikarinenc87dec92009-10-08 21:56:31 +0300107 CFG_BSSID_FILTER_EN | \
108 CFG_MC_FILTER_EN)
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300109
110#define WL1271_DEFAULT_RX_FILTER (CFG_RX_RCTS_ACK | CFG_RX_PRSP_EN | \
111 CFG_RX_MGMT_EN | CFG_RX_DATA_EN | \
112 CFG_RX_CTL_EN | CFG_RX_BCN_EN | \
113 CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN)
114
115#define WL1271_FW_NAME "wl1271-fw.bin"
116#define WL1271_NVS_NAME "wl1271-nvs.bin"
Juuso Oikarinen152ee6e2010-02-18 13:25:42 +0200117
Juuso Oikarinen04e36fc2010-02-22 08:38:40 +0200118#define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff))
119#define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff))
120
Juuso Oikarinen7a557242010-09-27 12:42:07 +0200121#define WL1271_CIPHER_SUITE_GEM 0x00147201
122
Juuso Oikarinen259da432010-03-26 12:53:18 +0200123#define WL1271_BUSY_WORD_CNT 1
Juuso Oikarinen545f1da2009-10-08 21:56:23 +0300124#define WL1271_BUSY_WORD_LEN (WL1271_BUSY_WORD_CNT * sizeof(u32))
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300125
126#define WL1271_ELP_HW_STATE_ASLEEP 0
127#define WL1271_ELP_HW_STATE_IRQ 1
128
Juuso Oikarinend94cd292009-10-08 21:56:25 +0300129#define WL1271_DEFAULT_BEACON_INT 100
130#define WL1271_DEFAULT_DTIM_PERIOD 1
131
Juuso Oikarinenc87dec92009-10-08 21:56:31 +0300132#define ACX_TX_DESCRIPTORS 32
Juuso Oikarinenbe7078c2009-10-08 21:56:26 +0300133
Ido Yariv1f37cbc2010-09-30 13:28:27 +0200134#define WL1271_AGGR_BUFFER_SIZE (4 * PAGE_SIZE)
135
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300136enum wl1271_state {
137 WL1271_STATE_OFF,
138 WL1271_STATE_ON,
139 WL1271_STATE_PLT,
140};
141
142enum wl1271_partition_type {
143 PART_DOWN,
144 PART_WORK,
145 PART_DRPW,
146
147 PART_TABLE_LEN
148};
149
150struct wl1271_partition {
151 u32 size;
152 u32 start;
153};
154
155struct wl1271_partition_set {
156 struct wl1271_partition mem;
157 struct wl1271_partition reg;
Juuso Oikarinen451de972009-10-12 15:08:46 +0300158 struct wl1271_partition mem2;
159 struct wl1271_partition mem3;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300160};
161
162struct wl1271;
163
164/* FIXME: I'm not sure about this structure name */
165struct wl1271_chip {
166 u32 id;
167 char fw_ver[21];
168};
169
170struct wl1271_stats {
171 struct acx_statistics *fw_stats;
172 unsigned long fw_stats_update;
173
174 unsigned int retry_count;
175 unsigned int excessive_retries;
176};
177
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300178#define NUM_TX_QUEUES 4
179#define NUM_RX_PKT_DESC 8
180
181/* FW status registers */
182struct wl1271_fw_status {
Luciano Coelhod0f63b22009-10-15 10:33:29 +0300183 __le32 intr;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300184 u8 fw_rx_counter;
185 u8 drv_rx_counter;
186 u8 reserved;
187 u8 tx_results_counter;
Luciano Coelhod0f63b22009-10-15 10:33:29 +0300188 __le32 rx_pkt_descs[NUM_RX_PKT_DESC];
189 __le32 tx_released_blks[NUM_TX_QUEUES];
190 __le32 fw_localtime;
191 __le32 padding[2];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000192} __packed;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300193
194struct wl1271_rx_mem_pool_addr {
195 u32 addr;
196 u32 addr_extra;
197};
198
Teemu Paasikiviabb0b3b2009-10-13 12:47:50 +0300199struct wl1271_scan {
Juuso Oikarinen4fb26fa2010-05-24 11:18:20 +0300200 struct cfg80211_scan_request *req;
Luciano Coelho08688d62010-07-08 17:50:07 +0300201 bool *scanned_ch;
Juuso Oikarinen78abd322010-09-21 06:23:32 +0200202 bool failed;
Teemu Paasikiviabb0b3b2009-10-13 12:47:50 +0300203 u8 state;
204 u8 ssid[IW_ESSID_MAX_SIZE+1];
205 size_t ssid_len;
Teemu Paasikiviabb0b3b2009-10-13 12:47:50 +0300206};
207
Teemu Paasikivi8197b712010-02-22 08:38:23 +0200208struct wl1271_if_operations {
209 void (*read)(struct wl1271 *wl, int addr, void *buf, size_t len,
210 bool fixed);
211 void (*write)(struct wl1271 *wl, int addr, void *buf, size_t len,
212 bool fixed);
213 void (*reset)(struct wl1271 *wl);
214 void (*init)(struct wl1271 *wl);
Ohad Ben-Cohen2cc78ff2010-09-16 01:22:04 +0200215 int (*power)(struct wl1271 *wl, bool enable);
Teemu Paasikivi8197b712010-02-22 08:38:23 +0200216 struct device* (*dev)(struct wl1271 *wl);
217 void (*enable_irq)(struct wl1271 *wl);
218 void (*disable_irq)(struct wl1271 *wl);
219};
220
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300221struct wl1271 {
Teemu Paasikivi3b56dd62010-03-18 12:26:46 +0200222 struct platform_device *plat_dev;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300223 struct ieee80211_hw *hw;
224 bool mac80211_registered;
225
Teemu Paasikivi8197b712010-02-22 08:38:23 +0200226 void *if_priv;
227
228 struct wl1271_if_operations *if_ops;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300229
230 void (*set_power)(bool enable);
231 int irq;
Ohad Ben-Cohen15cea992010-09-16 01:31:51 +0200232 int ref_clock;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300233
234 spinlock_t wl_lock;
235
236 enum wl1271_state state;
237 struct mutex mutex;
238
Juuso Oikarinen830fb672009-12-11 15:41:06 +0200239#define WL1271_FLAG_STA_RATES_CHANGED (0)
240#define WL1271_FLAG_STA_ASSOCIATED (1)
Juuso Oikarinen71449f82009-12-11 15:41:07 +0200241#define WL1271_FLAG_JOINED (2)
242#define WL1271_FLAG_GPIO_POWER (3)
243#define WL1271_FLAG_TX_QUEUE_STOPPED (4)
Luciano Coelho08688d62010-07-08 17:50:07 +0300244#define WL1271_FLAG_IN_ELP (5)
245#define WL1271_FLAG_PSM (6)
246#define WL1271_FLAG_PSM_REQUESTED (7)
247#define WL1271_FLAG_IRQ_PENDING (8)
248#define WL1271_FLAG_IRQ_RUNNING (9)
249#define WL1271_FLAG_IDLE (10)
250#define WL1271_FLAG_IDLE_REQUESTED (11)
251#define WL1271_FLAG_PSPOLL_FAILURE (12)
Juuso Oikarinenc2c192a2010-07-27 03:30:09 +0300252#define WL1271_FLAG_STA_STATE_SENT (13)
Ido Yariva5225502010-10-12 14:49:10 +0200253#define WL1271_FLAG_FW_TX_BUSY (14)
Juuso Oikarinen830fb672009-12-11 15:41:06 +0200254 unsigned long flags;
255
Juuso Oikarinen451de972009-10-12 15:08:46 +0300256 struct wl1271_partition_set part;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300257
258 struct wl1271_chip chip;
259
260 int cmd_box_addr;
261 int event_box_addr;
262
263 u8 *fw;
264 size_t fw_len;
Juuso Oikarinen152ee6e2010-02-18 13:25:42 +0200265 struct wl1271_nvs_file *nvs;
Juuso Oikarinen02fabb02010-08-19 04:41:15 +0200266 size_t nvs_len;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300267
Juuso Oikarinend717fd62010-05-07 11:38:58 +0300268 s8 hw_pg_ver;
269
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300270 u8 bssid[ETH_ALEN];
271 u8 mac_addr[ETH_ALEN];
272 u8 bss_type;
Juuso Oikarinen5da11dc2010-03-26 12:53:24 +0200273 u8 set_bss_type;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300274 u8 ssid[IW_ESSID_MAX_SIZE + 1];
275 u8 ssid_len;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300276 int channel;
277
278 struct wl1271_acx_mem_map *target_mem_map;
279
280 /* Accounting for allocated / available TX blocks on HW */
281 u32 tx_blocks_freed[NUM_TX_QUEUES];
282 u32 tx_blocks_available;
Juuso Oikarinenffb591c2010-02-22 08:38:31 +0200283 u32 tx_results_count;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300284
285 /* Transmitted TX packets counter for chipset interface */
Juuso Oikarinenffb591c2010-02-22 08:38:31 +0200286 u32 tx_packets_count;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300287
288 /* Time-offset between host and chipset clocks */
Juuso Oikarinenac5e1e32010-02-22 08:38:38 +0200289 s64 time_offset;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300290
291 /* Session counter for the chipset */
292 int session_counter;
293
294 /* Frames scheduled for transmission, not handled yet */
295 struct sk_buff_head tx_queue;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300296
297 struct work_struct tx_work;
Juuso Oikarinenc87dec92009-10-08 21:56:31 +0300298
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300299 /* Pending TX frames */
Ido Yariv25eeb9e2010-10-12 16:20:06 +0200300 unsigned long tx_frames_map[BITS_TO_LONGS(ACX_TX_DESCRIPTORS)];
Juuso Oikarinenbe7078c2009-10-08 21:56:26 +0300301 struct sk_buff *tx_frames[ACX_TX_DESCRIPTORS];
Juuso Oikarinen781608c2010-05-24 11:18:17 +0300302 int tx_frames_cnt;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300303
Juuso Oikarinenac4e4ce2009-10-08 21:56:19 +0300304 /* Security sequence number counters */
305 u8 tx_security_last_seq;
Juuso Oikarinen04e36fc2010-02-22 08:38:40 +0200306 s64 tx_security_seq;
Juuso Oikarinenac4e4ce2009-10-08 21:56:19 +0300307
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300308 /* FW Rx counter */
309 u32 rx_counter;
310
311 /* Rx memory pool address */
312 struct wl1271_rx_mem_pool_addr rx_mem_pool_addr;
313
Ido Yariv1f37cbc2010-09-30 13:28:27 +0200314 /* Intermediate buffer, used for packet aggregation */
315 u8 *aggr_buf;
316
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300317 /* The target interrupt mask */
318 struct work_struct irq_work;
319
Juuso Oikarinen52b0e7a2010-09-21 06:23:31 +0200320 /* Hardware recovery work */
321 struct work_struct recovery_work;
322
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300323 /* The mbox event mask */
324 u32 event_mask;
325
326 /* Mailbox pointers */
327 u32 mbox_ptr[2];
328
329 /* Are we currently scanning */
Teemu Paasikiviabb0b3b2009-10-13 12:47:50 +0300330 struct wl1271_scan scan;
Juuso Oikarinen78abd322010-09-21 06:23:32 +0200331 struct delayed_work scan_complete_work;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300332
Juuso Oikarinen2f6724b2010-11-24 08:16:57 +0200333 /* probe-req template for the current AP */
334 struct sk_buff *probereq;
335
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300336 /* Our association ID */
337 u16 aid;
338
Shahar Levie8b03a22010-10-13 16:09:39 +0200339 /*
340 * currently configured rate set:
341 * bits 0-15 - 802.11abg rates
342 * bits 16-23 - 802.11n MCS index mask
343 * support only 1 stream, thus only 8 bits for the MCS rates (0-7).
344 */
Juuso Oikarinen830fb672009-12-11 15:41:06 +0200345 u32 sta_rate_set;
Juuso Oikarinend94cd292009-10-08 21:56:25 +0300346 u32 basic_rate_set;
Juuso Oikarinenebba60c2010-04-01 11:38:20 +0300347 u32 basic_rate;
Juuso Oikarinen830fb672009-12-11 15:41:06 +0200348 u32 rate_set;
Juuso Oikarinend94cd292009-10-08 21:56:25 +0300349
Juuso Oikarinen8a5a37a2009-10-08 21:56:24 +0300350 /* The current band */
351 enum ieee80211_band band;
352
Juuso Oikarinen60e84c22010-03-26 12:53:25 +0200353 /* Beaconing interval (needed for ad-hoc) */
354 u32 beacon_int;
355
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300356 /* Default key (for WEP) */
357 u32 default_key;
358
Juuso Oikarinen14b228a2010-03-18 12:26:43 +0200359 unsigned int filters;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300360 unsigned int rx_config;
361 unsigned int rx_filter;
362
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300363 struct completion *elp_compl;
Juuso Oikarinen37b70a82009-10-08 21:56:21 +0300364 struct delayed_work elp_work;
Juuso Oikarinen90494a92010-07-08 17:50:00 +0300365 struct delayed_work pspoll_work;
366
367 /* counter for ps-poll delivery failures */
368 int ps_poll_failures;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300369
Juuso Oikarinen19ad0712009-11-02 20:22:11 +0200370 /* retry counter for PSM entries */
371 u8 psm_entry_retry;
372
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300373 /* in dBm */
374 int power_level;
375
Juuso Oikarinen00236aed2010-04-09 11:07:30 +0300376 int rssi_thold;
377 int last_rssi_event;
378
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300379 struct wl1271_stats stats;
Eliad Peller7cb2cea2010-11-24 12:53:15 +0200380 struct dentry *rootdir;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300381
Juuso Oikarinen554d7202010-05-07 11:38:59 +0300382 __le32 buffer_32;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300383 u32 buffer_cmd;
Juuso Oikarinen545f1da2009-10-08 21:56:23 +0300384 u32 buffer_busyword[WL1271_BUSY_WORD_CNT];
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300385
386 struct wl1271_fw_status *fw_status;
387 struct wl1271_tx_hw_res_if *tx_res_if;
Juuso Oikarinenb771eee2009-10-08 21:56:34 +0300388
389 struct ieee80211_vif *vif;
Luciano Coelhod6e19d132009-10-12 15:08:43 +0300390
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +0300391 /* Current chipset configuration */
392 struct conf_drv_settings conf;
Juuso Oikarinen01c09162009-10-13 12:47:55 +0300393
Juuso Oikarinen7fc3a862010-03-18 12:26:32 +0200394 bool sg_enabled;
395
Juuso Oikarinen02fabb02010-08-19 04:41:15 +0200396 bool enable_11a;
397
Juuso Oikarinen01c09162009-10-13 12:47:55 +0300398 struct list_head list;
John W. Linvilleece550d2010-07-28 16:41:06 -0400399
400 /* Most recently reported noise in dBm */
401 s8 noise;
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300402};
403
404int wl1271_plt_start(struct wl1271 *wl);
405int wl1271_plt_stop(struct wl1271 *wl);
406
407#define JOIN_TIMEOUT 5000 /* 5000 milliseconds to join */
408
409#define SESSION_COUNTER_MAX 7 /* maximum value for the session counter */
410
411#define WL1271_DEFAULT_POWER_LEVEL 0
412
Juuso Oikarinen06f7bc72010-02-22 08:38:33 +0200413#define WL1271_TX_QUEUE_LOW_WATERMARK 10
414#define WL1271_TX_QUEUE_HIGH_WATERMARK 25
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300415
Juuso Oikarinen01ac17e2009-12-11 15:41:02 +0200416/* WL1271 needs a 200ms sleep after power on, and a 20ms sleep before power
417 on in case is has been shut down shortly before */
418#define WL1271_PRE_POWER_ON_SLEEP 20 /* in miliseconds */
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300419#define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */
420
Shahar Levie8b03a22010-10-13 16:09:39 +0200421/* Macros to handle wl1271.sta_rate_set */
422#define HW_BG_RATES_MASK 0xffff
423#define HW_HT_RATES_OFFSET 16
424
Luciano Coelhof5fc0f82009-08-06 16:25:28 +0300425#endif