blob: 06e1643cc2954b7e242a1510a8e4d6ed54b79500 [file] [log] [blame]
Christian Lamparter32ddf072008-08-08 21:17:37 +02001#ifndef P54COMMON_H
2#define P54COMMON_H
Michael Wueff1a592007-09-25 18:11:01 -07003
4/*
5 * Common code specific definitions for mac80211 Prism54 drivers
6 *
7 * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
8 * Copyright (c) 2007, Christian Lamparter <chunkeey@web.de>
9 *
Christian Lamparter0fdd7c52008-10-15 03:55:37 +020010 * Based on:
11 * - the islsm (softmac prism54) driver, which is:
12 * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
13 *
14 * - LMAC API interface header file for STLC4560 (lmac_longbow.h)
15 * Copyright (C) 2007 Conexant Systems, Inc.
Michael Wueff1a592007-09-25 18:11:01 -070016 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 */
21
22struct bootrec {
23 __le32 code;
24 __le32 len;
Larry Finger1f1c0e32008-09-25 14:54:28 -050025 u32 data[10];
Michael Wueff1a592007-09-25 18:11:01 -070026} __attribute__((packed));
27
Christian Lamparter9e7f3f82008-10-18 23:18:01 +020028#define PDR_SYNTH_FRONTEND_MASK 0x0007
29#define PDR_SYNTH_IQ_CAL_MASK 0x0018
30#define PDR_SYNTH_IQ_CAL_PA_DETECTOR 0x0000
31#define PDR_SYNTH_IQ_CAL_DISABLED 0x0008
32#define PDR_SYNTH_IQ_CAL_ZIF 0x0010
33#define PDR_SYNTH_FAA_SWITCH_MASK 0x0020
34#define PDR_SYNTH_FAA_SWITCH_ENABLED 0x0001
35#define PDR_SYNTH_24_GHZ_MASK 0x0040
36#define PDR_SYNTH_24_GHZ_DISABLED 0x0040
37#define PDR_SYNTH_5_GHZ_MASK 0x0080
38#define PDR_SYNTH_5_GHZ_DISABLED 0x0080
39#define PDR_SYNTH_RX_DIV_MASK 0x0100
40#define PDR_SYNTH_RX_DIV_SUPPORTED 0x0100
41#define PDR_SYNTH_TX_DIV_MASK 0x0200
42#define PDR_SYNTH_TX_DIV_SUPPORTED 0x0200
43
Michael Wueff1a592007-09-25 18:11:01 -070044struct bootrec_exp_if {
45 __le16 role;
46 __le16 if_id;
47 __le16 variant;
48 __le16 btm_compat;
49 __le16 top_compat;
50} __attribute__((packed));
51
John W. Linville27df6052008-10-22 16:41:55 -040052#define BR_DESC_PRIV_CAP_WEP BIT(0)
53#define BR_DESC_PRIV_CAP_TKIP BIT(1)
54#define BR_DESC_PRIV_CAP_MICHAEL BIT(2)
55#define BR_DESC_PRIV_CAP_CCX_CP BIT(3)
56#define BR_DESC_PRIV_CAP_CCX_MIC BIT(4)
57#define BR_DESC_PRIV_CAP_AESCCMP BIT(5)
58
Christian Lamparter4e416a62008-09-01 22:48:41 +020059struct bootrec_desc {
60 __le16 modes;
61 __le16 flags;
62 __le32 rx_start;
63 __le32 rx_end;
64 u8 headroom;
65 u8 tailroom;
John W. Linville27df6052008-10-22 16:41:55 -040066 u8 tx_queues;
67 u8 tx_depth;
68 u8 privacy_caps;
69 u8 rx_keycache_size;
70 u8 time_size;
71 u8 padding;
Christian Lamparter4e416a62008-09-01 22:48:41 +020072 u8 rates[16];
Larry Finger2e20cc32008-10-09 17:38:52 -070073 u8 padding2[4];
74 __le16 rx_mtu;
Christian Lamparter4e416a62008-09-01 22:48:41 +020075} __attribute__((packed));
76
Michael Wueff1a592007-09-25 18:11:01 -070077#define BR_CODE_MIN 0x80000000
78#define BR_CODE_COMPONENT_ID 0x80000001
79#define BR_CODE_COMPONENT_VERSION 0x80000002
80#define BR_CODE_DEPENDENT_IF 0x80000003
81#define BR_CODE_EXPOSED_IF 0x80000004
82#define BR_CODE_DESCR 0x80000101
83#define BR_CODE_MAX 0x8FFFFFFF
84#define BR_CODE_END_OF_BRA 0xFF0000FF
85#define LEGACY_BR_CODE_END_OF_BRA 0xFFFFFFFF
86
John W. Linville27df6052008-10-22 16:41:55 -040087#define P54_HDR_FLAG_CONTROL BIT(15)
88#define P54_HDR_FLAG_CONTROL_OPSET (BIT(15) + BIT(0))
89
90#define P54_HDR_FLAG_DATA_ALIGN BIT(14)
91#define P54_HDR_FLAG_DATA_OUT_PROMISC BIT(0)
92#define P54_HDR_FLAG_DATA_OUT_TIMESTAMP BIT(1)
93#define P54_HDR_FLAG_DATA_OUT_SEQNR BIT(2)
94#define P54_HDR_FLAG_DATA_OUT_BIT3 BIT(3)
95#define P54_HDR_FLAG_DATA_OUT_BURST BIT(4)
96#define P54_HDR_FLAG_DATA_OUT_NOCANCEL BIT(5)
97#define P54_HDR_FLAG_DATA_OUT_CLEARTIM BIT(6)
98#define P54_HDR_FLAG_DATA_OUT_HITCHHIKE BIT(7)
99#define P54_HDR_FLAG_DATA_OUT_COMPRESS BIT(8)
100#define P54_HDR_FLAG_DATA_OUT_CONCAT BIT(9)
101#define P54_HDR_FLAG_DATA_OUT_PCS_ACCEPT BIT(10)
102#define P54_HDR_FLAG_DATA_OUT_WAITEOSP BIT(11)
103
104#define P54_HDR_FLAG_DATA_IN_FCS_GOOD BIT(0)
105#define P54_HDR_FLAG_DATA_IN_MATCH_MAC BIT(1)
106#define P54_HDR_FLAG_DATA_IN_MCBC BIT(2)
107#define P54_HDR_FLAG_DATA_IN_BEACON BIT(3)
108#define P54_HDR_FLAG_DATA_IN_MATCH_BSS BIT(4)
109#define P54_HDR_FLAG_DATA_IN_BCAST_BSS BIT(5)
110#define P54_HDR_FLAG_DATA_IN_DATA BIT(6)
111#define P54_HDR_FLAG_DATA_IN_TRUNCATED BIT(7)
112#define P54_HDR_FLAG_DATA_IN_BIT8 BIT(8)
113#define P54_HDR_FLAG_DATA_IN_TRANSPARENT BIT(9)
114
Michael Wueff1a592007-09-25 18:11:01 -0700115/* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */
116
117struct pda_entry {
118 __le16 len; /* includes both code and data */
119 __le16 code;
120 u8 data[0];
121} __attribute__ ((packed));
122
123struct eeprom_pda_wrap {
Johannes Berg8c282932008-02-29 13:56:33 +0100124 __le32 magic;
125 __le16 pad;
126 __le16 len;
127 __le32 arm_opcode;
Michael Wueff1a592007-09-25 18:11:01 -0700128 u8 data[0];
129} __attribute__ ((packed));
130
131struct pda_iq_autocal_entry {
132 __le16 freq;
133 __le16 iq_param[4];
134} __attribute__ ((packed));
135
136struct pda_channel_output_limit {
137 __le16 freq;
138 u8 val_bpsk;
139 u8 val_qpsk;
140 u8 val_16qam;
141 u8 val_64qam;
142 u8 rate_set_mask;
143 u8 rate_set_size;
144} __attribute__ ((packed));
145
146struct pda_pa_curve_data_sample_rev0 {
147 u8 rf_power;
148 u8 pa_detector;
149 u8 pcv;
150} __attribute__ ((packed));
151
152struct pda_pa_curve_data_sample_rev1 {
153 u8 rf_power;
154 u8 pa_detector;
155 u8 data_barker;
156 u8 data_bpsk;
157 u8 data_qpsk;
158 u8 data_16qam;
159 u8 data_64qam;
Christian Lamparter154e3af2008-08-23 22:15:25 +0200160} __attribute__ ((packed));
161
162struct p54_pa_curve_data_sample {
163 u8 rf_power;
164 u8 pa_detector;
165 u8 data_barker;
166 u8 data_bpsk;
167 u8 data_qpsk;
168 u8 data_16qam;
169 u8 data_64qam;
Michael Wueff1a592007-09-25 18:11:01 -0700170 u8 padding;
171} __attribute__ ((packed));
172
173struct pda_pa_curve_data {
174 u8 cal_method_rev;
175 u8 channels;
176 u8 points_per_channel;
177 u8 padding;
178 u8 data[0];
179} __attribute__ ((packed));
180
181/*
182 * this defines the PDR codes used to build PDAs as defined in document
183 * number 553155. The current implementation mirrors version 1.1 of the
184 * document and lists only PDRs supported by the ARM platform.
185 */
186
187/* common and choice range (0x0000 - 0x0fff) */
188#define PDR_END 0x0000
189#define PDR_MANUFACTURING_PART_NUMBER 0x0001
190#define PDR_PDA_VERSION 0x0002
191#define PDR_NIC_SERIAL_NUMBER 0x0003
192
193#define PDR_MAC_ADDRESS 0x0101
194#define PDR_REGULATORY_DOMAIN_LIST 0x0103
195#define PDR_TEMPERATURE_TYPE 0x0107
196
197#define PDR_PRISM_PCI_IDENTIFIER 0x0402
198
199/* ARM range (0x1000 - 0x1fff) */
200#define PDR_COUNTRY_INFORMATION 0x1000
201#define PDR_INTERFACE_LIST 0x1001
202#define PDR_HARDWARE_PLATFORM_COMPONENT_ID 0x1002
203#define PDR_OEM_NAME 0x1003
204#define PDR_PRODUCT_NAME 0x1004
205#define PDR_UTF8_OEM_NAME 0x1005
206#define PDR_UTF8_PRODUCT_NAME 0x1006
207#define PDR_COUNTRY_LIST 0x1007
208#define PDR_DEFAULT_COUNTRY 0x1008
209
210#define PDR_ANTENNA_GAIN 0x1100
211
212#define PDR_PRISM_INDIGO_PA_CALIBRATION_DATA 0x1901
213#define PDR_RSSI_LINEAR_APPROXIMATION 0x1902
214#define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS 0x1903
215#define PDR_PRISM_PA_CAL_CURVE_DATA 0x1904
216#define PDR_RSSI_LINEAR_APPROXIMATION_DUAL_BAND 0x1905
217#define PDR_PRISM_ZIF_TX_IQ_CALIBRATION 0x1906
218#define PDR_REGULATORY_POWER_LIMITS 0x1907
219#define PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED 0x1908
220#define PDR_RADIATED_TRANSMISSION_CORRECTION 0x1909
221#define PDR_PRISM_TX_IQ_CALIBRATION 0x190a
222
223/* reserved range (0x2000 - 0x7fff) */
224
225/* customer range (0x8000 - 0xffff) */
226#define PDR_BASEBAND_REGISTERS 0x8000
227#define PDR_PER_CHANNEL_BASEBAND_REGISTERS 0x8001
228
Christian Lamparter9e7f3f82008-10-18 23:18:01 +0200229/* PDR definitions for default country & country list */
230#define PDR_COUNTRY_CERT_CODE 0x80
231#define PDR_COUNTRY_CERT_CODE_REAL 0x00
232#define PDR_COUNTRY_CERT_CODE_PSEUDO 0x80
233#define PDR_COUNTRY_CERT_BAND 0x40
234#define PDR_COUNTRY_CERT_BAND_2GHZ 0x00
235#define PDR_COUNTRY_CERT_BAND_5GHZ 0x40
236#define PDR_COUNTRY_CERT_IODOOR 0x30
237#define PDR_COUNTRY_CERT_IODOOR_BOTH 0x00
238#define PDR_COUNTRY_CERT_IODOOR_INDOOR 0x20
239#define PDR_COUNTRY_CERT_IODOOR_OUTDOOR 0x30
240#define PDR_COUNTRY_CERT_INDEX 0x0F
241
Michael Wueff1a592007-09-25 18:11:01 -0700242/* stored in skb->cb */
243struct memrecord {
244 u32 start_addr;
245 u32 end_addr;
Michael Wueff1a592007-09-25 18:11:01 -0700246};
247
248struct p54_eeprom_lm86 {
Christian Lamparter64c354d2008-11-29 22:35:43 +0100249 union {
250 struct {
251 __le16 offset;
252 __le16 len;
253 u8 data[0];
254 } v1;
255 struct {
256 __le32 offset;
257 __le16 len;
258 u8 magic2;
259 u8 pad;
260 u8 magic[4];
261 u8 data[0];
262 } v2;
263 } __attribute__ ((packed));
Michael Wueff1a592007-09-25 18:11:01 -0700264} __attribute__ ((packed));
265
John W. Linville27df6052008-10-22 16:41:55 -0400266enum p54_rx_decrypt_status {
267 P54_DECRYPT_NONE = 0,
268 P54_DECRYPT_OK,
269 P54_DECRYPT_NOKEY,
270 P54_DECRYPT_NOMICHAEL,
271 P54_DECRYPT_NOCKIPMIC,
272 P54_DECRYPT_FAIL_WEP,
273 P54_DECRYPT_FAIL_TKIP,
Christian Lamparterffed7852008-11-14 19:41:22 +0100274 P54_DECRYPT_FAIL_MICHAEL,
John W. Linville27df6052008-10-22 16:41:55 -0400275 P54_DECRYPT_FAIL_CKIPKP,
276 P54_DECRYPT_FAIL_CKIPMIC,
277 P54_DECRYPT_FAIL_AESCCMP
278};
279
280struct p54_rx_data {
281 __le16 flags;
Michael Wueff1a592007-09-25 18:11:01 -0700282 __le16 len;
283 __le16 freq;
284 u8 antenna;
285 u8 rate;
286 u8 rssi;
287 u8 quality;
John W. Linville27df6052008-10-22 16:41:55 -0400288 u8 decrypt_status;
289 u8 rssi_raw;
Christian Lampartera0db6632008-09-06 02:56:04 +0200290 __le32 tsf32;
291 __le32 unalloc0;
Christian Lamparter19c19d52008-09-03 22:25:25 +0200292 u8 align[0];
Michael Wueff1a592007-09-25 18:11:01 -0700293} __attribute__ ((packed));
294
John W. Linville27df6052008-10-22 16:41:55 -0400295enum p54_trap_type {
296 P54_TRAP_SCAN = 0,
297 P54_TRAP_TIMER,
298 P54_TRAP_BEACON_TX,
299 P54_TRAP_FAA_RADIO_ON,
300 P54_TRAP_FAA_RADIO_OFF,
301 P54_TRAP_RADAR,
302 P54_TRAP_NO_BEACON,
303 P54_TRAP_TBTT,
304 P54_TRAP_SCO_ENTER,
305 P54_TRAP_SCO_EXIT
306};
307
308struct p54_trap {
309 __le16 event;
310 __le16 frequency;
Michael Wueff1a592007-09-25 18:11:01 -0700311} __attribute__ ((packed));
312
John W. Linville27df6052008-10-22 16:41:55 -0400313enum p54_frame_sent_status {
314 P54_TX_OK = 0,
315 P54_TX_FAILED,
316 P54_TX_PSM,
Christian Lamparterc772a082008-11-29 22:33:57 +0100317 P54_TX_PSM_CANCELLED = 4
John W. Linville27df6052008-10-22 16:41:55 -0400318};
319
320struct p54_frame_sent {
321 u8 status;
322 u8 tries;
323 u8 ack_rssi;
324 u8 quality;
325 __le16 seq;
326 u8 antenna;
327 u8 padding;
328} __attribute__ ((packed));
329
330enum p54_tx_data_crypt {
331 P54_CRYPTO_NONE = 0,
332 P54_CRYPTO_WEP,
333 P54_CRYPTO_TKIP,
334 P54_CRYPTO_TKIPMICHAEL,
335 P54_CRYPTO_CCX_WEPMIC,
336 P54_CRYPTO_CCX_KPMIC,
337 P54_CRYPTO_CCX_KP,
338 P54_CRYPTO_AESCCMP
339};
340
341struct p54_tx_data {
Michael Wueff1a592007-09-25 18:11:01 -0700342 u8 rateset[8];
John W. Linville27df6052008-10-22 16:41:55 -0400343 u8 rts_rate_idx;
344 u8 crypt_offset;
Christian Lamparteraaa15532008-08-09 19:20:47 -0500345 u8 key_type;
346 u8 key_len;
347 u8 key[16];
348 u8 hw_queue;
John W. Linville27df6052008-10-22 16:41:55 -0400349 u8 backlog;
350 __le16 durations[4];
Christian Lamparteraaa15532008-08-09 19:20:47 -0500351 u8 tx_antenna;
Michael Wueff1a592007-09-25 18:11:01 -0700352 u8 output_power;
Christian Lamparteraaa15532008-08-09 19:20:47 -0500353 u8 cts_rate;
354 u8 unalloc2[3];
Michael Wueff1a592007-09-25 18:11:01 -0700355 u8 align[0];
356} __attribute__ ((packed));
357
Christian Lamparter54fdb042008-12-13 14:14:20 +0100358/* unit is ms */
359#define P54_TX_FRAME_LIFETIME 2000
360#define P54_TX_TIMEOUT 4000
361#define P54_STATISTICS_UPDATE 5000
362
John W. Linville27df6052008-10-22 16:41:55 -0400363#define P54_FILTER_TYPE_NONE 0
364#define P54_FILTER_TYPE_STATION BIT(0)
365#define P54_FILTER_TYPE_IBSS BIT(1)
366#define P54_FILTER_TYPE_AP BIT(2)
367#define P54_FILTER_TYPE_TRANSPARENT BIT(3)
368#define P54_FILTER_TYPE_PROMISCUOUS BIT(4)
369#define P54_FILTER_TYPE_HIBERNATE BIT(5)
370#define P54_FILTER_TYPE_NOACK BIT(6)
371#define P54_FILTER_TYPE_RX_DISABLED BIT(7)
372
Christian Lamparter5e734442008-10-15 04:07:56 +0200373struct p54_setup_mac {
374 __le16 mac_mode;
Christian Lampartere0a58ea2008-09-03 22:25:20 +0200375 u8 mac_addr[ETH_ALEN];
376 u8 bssid[ETH_ALEN];
377 u8 rx_antenna;
378 u8 rx_align;
Christian Lamparter19c19d52008-09-03 22:25:25 +0200379 union {
380 struct {
381 __le32 basic_rate_mask;
382 u8 rts_rates[8];
383 __le32 rx_addr;
384 __le16 max_rx;
385 __le16 rxhw;
386 __le16 wakeup_timer;
387 __le16 unalloc0;
388 } v1 __attribute__ ((packed));
389 struct {
390 __le32 rx_addr;
391 __le16 max_rx;
392 __le16 rxhw;
393 __le16 timer;
Christian Lamparter5e734442008-10-15 04:07:56 +0200394 __le16 truncate;
395 __le32 basic_rate_mask;
396 u8 sbss_offset;
397 u8 mcast_window;
398 u8 rx_rssi_threshold;
399 u8 rx_ed_threshold;
400 __le32 ref_clock;
401 __le16 lpf_bandwidth;
402 __le16 osc_start_delay;
Christian Lamparter19c19d52008-09-03 22:25:25 +0200403 } v2 __attribute__ ((packed));
404 } __attribute__ ((packed));
Michael Wueff1a592007-09-25 18:11:01 -0700405} __attribute__ ((packed));
406
John W. Linville27df6052008-10-22 16:41:55 -0400407#define P54_SETUP_V1_LEN 40
408#define P54_SETUP_V2_LEN (sizeof(struct p54_setup_mac))
409
410#define P54_SCAN_EXIT BIT(0)
411#define P54_SCAN_TRAP BIT(1)
412#define P54_SCAN_ACTIVE BIT(2)
413#define P54_SCAN_FILTER BIT(3)
414
415struct p54_scan {
416 __le16 mode;
Christian Lamparter154e3af2008-08-23 22:15:25 +0200417 __le16 dwell;
Michael Wueff1a592007-09-25 18:11:01 -0700418 u8 padding1[20];
419 struct pda_iq_autocal_entry iq_autocal;
420 u8 pa_points_per_curve;
421 u8 val_barker;
422 u8 val_bpsk;
423 u8 val_qpsk;
424 u8 val_16qam;
425 u8 val_64qam;
Christian Lamparter19c19d52008-09-03 22:25:25 +0200426 struct p54_pa_curve_data_sample curve_data[8];
Christian Lamparter154e3af2008-08-23 22:15:25 +0200427 u8 dup_bpsk;
428 u8 dup_qpsk;
429 u8 dup_16qam;
430 u8 dup_64qam;
Christian Lamparter19c19d52008-09-03 22:25:25 +0200431 union {
432 struct {
433 __le16 rssical_mul;
434 __le16 rssical_add;
435 } v1 __attribute__ ((packed));
436
437 struct {
438 __le32 basic_rate_mask;
John W. Linville27df6052008-10-22 16:41:55 -0400439 u8 rts_rates[8];
Christian Lamparter19c19d52008-09-03 22:25:25 +0200440 __le16 rssical_mul;
441 __le16 rssical_add;
442 } v2 __attribute__ ((packed));
443 } __attribute__ ((packed));
Michael Wueff1a592007-09-25 18:11:01 -0700444} __attribute__ ((packed));
445
John W. Linville27df6052008-10-22 16:41:55 -0400446#define P54_SCAN_V1_LEN (sizeof(struct p54_scan)-12)
447#define P54_SCAN_V2_LEN (sizeof(struct p54_scan))
Christian Lamparter19c19d52008-09-03 22:25:25 +0200448
John W. Linville27df6052008-10-22 16:41:55 -0400449struct p54_led {
Michael Wueff1a592007-09-25 18:11:01 -0700450 __le16 mode;
451 __le16 led_temporary;
452 __le16 led_permanent;
453 __le16 duration;
454} __attribute__ ((packed));
455
Christian Lamparter0fdd7c52008-10-15 03:55:37 +0200456struct p54_edcf {
457 u8 flags;
Michael Wueff1a592007-09-25 18:11:01 -0700458 u8 slottime;
Christian Lamparter0fdd7c52008-10-15 03:55:37 +0200459 u8 sifs;
460 u8 eofpad;
461 struct p54_edcf_queue_param queue[8];
462 u8 mapping[4];
Michael Wueff1a592007-09-25 18:11:01 -0700463 __le16 frameburst;
Christian Lamparter0fdd7c52008-10-15 03:55:37 +0200464 __le16 round_trip_delay;
Michael Wueff1a592007-09-25 18:11:01 -0700465} __attribute__ ((packed));
466
Christian Lampartercc6de662008-09-06 02:56:23 +0200467struct p54_statistics {
468 __le32 rx_success;
469 __le32 rx_bad_fcs;
470 __le32 rx_abort;
471 __le32 rx_abort_phy;
472 __le32 rts_success;
473 __le32 rts_fail;
474 __le32 tsf32;
475 __le32 airtime;
476 __le32 noise;
John W. Linville27df6052008-10-22 16:41:55 -0400477 __le32 sample_noise[8];
478 __le32 sample_cca;
479 __le32 sample_tx;
Christian Lampartercc6de662008-09-06 02:56:23 +0200480} __attribute__ ((packed));
481
John W. Linville27df6052008-10-22 16:41:55 -0400482struct p54_xbow_synth {
Christian Lamparter1b997532008-09-06 14:25:58 +0200483 __le16 magic1;
484 __le16 magic2;
485 __le16 freq;
486 u32 padding[5];
487} __attribute__ ((packed));
488
John W. Linville27df6052008-10-22 16:41:55 -0400489struct p54_timer {
490 __le32 interval;
491} __attribute__ ((packed));
492
493struct p54_keycache {
494 u8 entry;
495 u8 key_id;
496 u8 mac[ETH_ALEN];
497 u8 padding[2];
498 u8 key_type;
499 u8 key_len;
500 u8 key[24];
501} __attribute__ ((packed));
502
503struct p54_burst {
504 u8 flags;
505 u8 queue;
506 u8 backlog;
507 u8 pad;
508 __le16 durations[32];
509} __attribute__ ((packed));
510
511struct p54_psm_interval {
512 __le16 interval;
513 __le16 periods;
514} __attribute__ ((packed));
515
516#define P54_PSM BIT(0)
517#define P54_PSM_DTIM BIT(1)
518#define P54_PSM_MCBC BIT(2)
519#define P54_PSM_CHECKSUM BIT(3)
520#define P54_PSM_SKIP_MORE_DATA BIT(4)
521#define P54_PSM_BEACON_TIMEOUT BIT(5)
522#define P54_PSM_HFOSLEEP BIT(6)
523#define P54_PSM_AUTOSWITCH_SLEEP BIT(7)
524#define P54_PSM_LPIT BIT(8)
525#define P54_PSM_BF_UCAST_SKIP BIT(9)
526#define P54_PSM_BF_MCAST_SKIP BIT(10)
527
528struct p54_psm {
529 __le16 mode;
530 __le16 aid;
531 struct p54_psm_interval intervals[4];
532 u8 beacon_rssi_skip_max;
533 u8 rssi_delta_threshold;
534 u8 nr;
535 u8 exclude[1];
536} __attribute__ ((packed));
537
538#define MC_FILTER_ADDRESS_NUM 4
539
540struct p54_group_address_table {
541 __le16 filter_enable;
542 __le16 num_address;
543 u8 mac_list[MC_FILTER_ADDRESS_NUM][ETH_ALEN];
544} __attribute__ ((packed));
545
546struct p54_txcancel {
547 __le32 req_id;
548} __attribute__ ((packed));
549
550struct p54_sta_unlock {
551 u8 addr[ETH_ALEN];
552 u16 padding;
553} __attribute__ ((packed));
554
555#define P54_TIM_CLEAR BIT(15)
Christian Lamparter9e7f3f82008-10-18 23:18:01 +0200556struct p54_tim {
John W. Linville27df6052008-10-22 16:41:55 -0400557 u8 count;
558 u8 padding[3];
559 __le16 entry[8];
560} __attribute__ ((packed));
561
562struct p54_cce_quiet {
563 __le32 period;
564} __attribute__ ((packed));
565
566struct p54_bt_balancer {
567 __le16 prio_thresh;
568 __le16 acl_thresh;
569} __attribute__ ((packed));
570
571struct p54_arp_table {
572 __le16 filter_enable;
573 u8 ipv4_addr[4];
574} __attribute__ ((packed));
575
Christian Lamparter32ddf072008-08-08 21:17:37 +0200576#endif /* P54COMMON_H */