Attachment 'lmac_longbow.h'
Download 1 /************************************************************************
2 * This is the LMAC API interface header file for STLC4560. *
3 * Copyright (C) 2007 Conexant Systems, Inc. *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License *
6 * as published by the Free Software Foundation; either version 2 *
7 * of the License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.*
16 *************************************************************************/
17
18
19
20 #ifndef __lmac_h__
21 #define __lmac_h__
22
23 #define LM_TOP_VARIANT 0x0506
24 #define LM_BOTTOM_VARIANT 0x0506
25
26 /*
27 * LMAC - UMAC interface definition:
28 */
29
30 #define LM_FLAG_CONTROL 0x8000
31 #define LM_FLAG_ALIGN 0x4000
32
33 #define LM_CTRL_OPSET 0x0001
34
35 #define LM_OUT_PROMISC 0x0001
36 #define LM_OUT_TIMESTAMP 0x0002
37 #define LM_OUT_SEQNR 0x0004
38 #define LM_OUT_BURST 0x0010
39 #define LM_OUT_NOCANCEL 0x0020
40 #define LM_OUT_CLEARTIM 0x0040
41 #define LM_OUT_HITCHHIKE 0x0080
42 #define LM_OUT_COMPRESS 0x0100
43 #define LM_OUT_CONCAT 0x0200
44 #define LM_OUT_PCS_ACCEPT 0x0400
45 #define LM_OUT_WAITEOSP 0x0800
46
47
48 #define LM_ALOFT_SP 0x10
49 #define LM_ALOFT_CTS 0x20
50 #define LM_ALOFT_RTS 0x40
51 #define LM_ALOFT_MASK 0x1f
52 #define LM_ALOFT_RATE 0x0f
53
54 #define LM_IN_FCS_GOOD 0x0001
55 #define LM_IN_MATCH_MAC 0x0002
56 #define LM_IN_MCBC 0x0004
57 #define LM_IN_BEACON 0x0008
58 #define LM_IN_MATCH_BSS 0x0010
59 #define LM_IN_BCAST_BSS 0x0020
60 #define LM_IN_DATA 0x0040
61 #define LM_IN_TRUNCATED 0x0080
62
63 #define LM_IN_TRANSPARENT 0x0200
64
65 #define LM_QUEUE_BEACON 0
66 #define LM_QUEUE_SCAN 1
67 #define LM_QUEUE_MGT 2
68 #define LM_QUEUE_MCBC 3
69 #define LM_QUEUE_DATA 4
70 #define LM_QUEUE_DATA0 4
71 #define LM_QUEUE_DATA1 5
72 #define LM_QUEUE_DATA2 6
73 #define LM_QUEUE_DATA3 7
74
75 #define LM_SETUP_INFRA 0x0001
76 #define LM_SETUP_IBSS 0x0002
77 #define LM_SETUP_TRANSPARENT 0x0008
78 #define LM_SETUP_PROMISCUOUS 0x0010
79 #define LM_SETUP_HIBERNATE 0x0020
80 #define LM_SETUP_NOACK 0x0040
81 #define LM_SETUP_RX_DISABLED 0x0080
82
83 #define LM_ANTENNA_0 0
84 #define LM_ANTENNA_1 1
85 #define LM_ANTENNA_DIVERSITY 2
86
87 #define LM_TX_FAILED 0x0001
88 #define LM_TX_PSM 0x0002
89 #define LM_TX_PSM_CANCELLED 0x0004
90
91 #define LM_SCAN_EXIT 0x0001
92 #define LM_SCAN_TRAP 0x0002
93 #define LM_SCAN_ACTIVE 0x0004
94 #define LM_SCAN_FILTER 0x0008
95
96 #define LM_PSM 0x0001
97 #define LM_PSM_DTIM 0x0002
98 #define LM_PSM_MCBC 0x0004
99 #define LM_PSM_CHECKSUM 0x0008
100 #define LM_PSM_SKIP_MORE_DATA 0x0010
101 #define LM_PSM_BEACON_TIMEOUT 0x0020
102 #define LM_PSM_HFOSLEEP 0x0040
103 #define LM_PSM_AUTOSWITCH_SLEEP 0x0080
104 #define LM_PSM_LPIT 0x0100
105 #define LM_PSM_BF_UCAST_SKIP 0x0200
106 #define LM_PSM_BF_MCAST_SKIP 0x0400
107
108 //hfosleep
109 #define LM_PSM_SLEEP_OPTION_MASK (LM_PSM_AUTOSWITCH_SLEEP | LM_PSM_HFOSLEEP)
110 #define LM_PSM_SLEEP_OPTION_SHIFT 6
111 //hfosleepend
112 #define LM_PSM_BF_OPTION_MASK (LM_PSM_BF_MCAST_SKIP | LM_PSM_BF_UCAST_SKIP)
113 #define LM_PSM_BF_OPTION_SHIFT 9
114
115
116 #define LM_PRIVACC_WEP 0x01
117 #define LM_PRIVACC_TKIP 0x02
118 #define LM_PRIVACC_MICHAEL 0x04
119 #define LM_PRIVACC_CCX_KP 0x08
120 #define LM_PRIVACC_CCX_MIC 0x10
121 #define LM_PRIVACC_AES_CCMP 0x20
122
123 /* size of s_lm_descr in words */
124 #define LM_DESCR_SIZE_WORDS 11
125
126 #ifndef __ASSEMBLER__
127
128 enum
129 {
130 LM_MODE_CLIENT = 0,
131 LM_MODE_AP
132 };
133
134 struct s_lm_descr
135 {
136 uint16_t modes;
137 uint16_t flags;
138 uint32_t buffer_start;
139 uint32_t buffer_end;
140 uint8_t header;
141 uint8_t trailer;
142 uint8_t tx_queues;
143 uint8_t tx_depth;
144 uint8_t privacy;
145 uint8_t rx_keycache;
146 uint8_t tim_size;
147 uint8_t pad1;
148 uint8_t rates[16];
149 uint32_t link;
150 uint16_t mtu;
151 };
152
153
154 struct s_lm_control
155 {
156 uint16_t flags;
157 uint16_t length;
158 uint32_t handle;
159 uint16_t oid;
160 uint16_t pad;
161 /* uint8_t data[]; */
162 };
163
164 enum
165 {
166 LM_PRIV_NONE = 0,
167 LM_PRIV_WEP,
168 LM_PRIV_TKIP,
169 LM_PRIV_TKIPMICHAEL,
170 LM_PRIV_CCX_WEPMIC,
171 LM_PRIV_CCX_KPMIC,
172 LM_PRIV_CCX_KP,
173 LM_PRIV_AES_CCMP
174 };
175
176 enum
177 {
178 LM_DECRYPT_NONE,
179 LM_DECRYPT_OK,
180 LM_DECRYPT_NOKEY,
181 LM_DECRYPT_NOMICHAEL,
182 LM_DECRYPT_NOCKIPMIC,
183 LM_DECRYPT_FAIL_WEP,
184 LM_DECRYPT_FAIL_TKIP,
185 LM_DECRYPT_FAIL_MICHAEL,
186 LM_DECRYPT_FAIL_CKIPKP,
187 LM_DECRYPT_FAIL_CKIPMIC,
188 LM_DECRYPT_FAIL_AESCCMP
189 };
190
191 struct s_lm_data_out
192 {
193 uint16_t flags;
194 uint16_t length;
195 uint32_t handle;
196 uint16_t aid;
197 uint8_t rts_retries;
198 uint8_t retries;
199 uint8_t aloft[8];
200 uint8_t aloft_ctrl;
201 uint8_t crypt_offset;
202 uint8_t keytype;
203 uint8_t keylen;
204 uint8_t key[16];
205 uint8_t queue;
206 uint8_t backlog;
207 uint16_t durations[4];
208 uint8_t antenna;
209 uint8_t cts;
210 int16_t power;
211 uint8_t pad[2];
212 /*uint8_t data[];*/
213 };
214
215 #define LM_RCPI_INVALID (0xff)
216
217 struct s_lm_data_in
218 {
219 uint16_t flags;
220 uint16_t length;
221 uint16_t frequency;
222 uint8_t antenna;
223 uint8_t rate;
224 uint8_t rcpi;
225 uint8_t sq;
226 uint8_t decrypt;
227 uint8_t rssi_raw;
228 uint32_t clock[2];
229 /*uint8_t data[];*/
230 };
231
232 union u_lm_data
233 {
234 struct s_lm_data_out out;
235 struct s_lm_data_in in;
236 };
237
238 enum
239 {
240 LM_OID_SETUP = 0,
241 LM_OID_SCAN = 1,
242 LM_OID_TRAP = 2,
243 LM_OID_EDCF = 3,
244 LM_OID_KEYCACHE = 4,
245 LM_OID_PSM = 6,
246 LM_OID_TXCANCEL = 7,
247 LM_OID_TX = 8,
248 LM_OID_BURST = 9,
249 LM_OID_STATS = 10,
250 LM_OID_LED = 13,
251 LM_OID_TIMER = 15,
252 LM_OID_NAV = 20,
253 LM_OID_PCS = 22,
254 LM_OID_BT_BALANCER = 28,
255 LM_OID_GROUP_ADDRESS_TABLE = 30,
256 LM_OID_ARPTABLE = 31,
257 LM_OID_BT_OPTIONS = 35
258 };
259
260 enum
261 {
262 LM_FRONTEND_UNKNOWN = 0,
263 LM_FRONTEND_DUETTE3,
264 LM_FRONTEND_DUETTE2,
265 LM_FRONTEND_FRISBEE,
266 LM_FRONTEND_CROSSBOW,
267 LM_FRONTEND_LONGBOW
268 };
269
270
271 #define INVALID_LPF_BANDWIDTH 0xffff
272 #define INVALID_OSC_START_DELAY 0xffff
273
274 struct s_lmo_setup
275 {
276 uint16_t flags;
277 uint8_t macaddr[6];
278 uint8_t bssid[6];
279 uint8_t antenna;
280 uint8_t rx_align;
281 uint32_t rx_buffer;
282 uint16_t rx_mtu;
283 uint16_t frontend;
284 uint16_t timeout;
285 uint16_t truncate;
286 uint32_t bratemask;
287 uint8_t sbss_offset;
288 uint8_t mcast_window;
289 uint8_t rx_rssi_threshold;
290 uint8_t rx_ed_threshold;
291 uint32_t ref_clock;
292 uint16_t lpf_bandwidth;
293 uint16_t osc_start_delay;
294 };
295
296
297 struct s_lmo_scan
298 {
299 uint16_t flags;
300 uint16_t dwell;
301 uint8_t channel[292];
302 uint32_t bratemask;
303 uint8_t aloft[8];
304 uint8_t rssical[8];
305 };
306
307
308 enum
309 {
310 LM_TRAP_SCAN = 0,
311 LM_TRAP_TIMER,
312 LM_TRAP_BEACON_TX,
313 LM_TRAP_FAA_RADIO_ON,
314 LM_TRAP_FAA_RADIO_OFF,
315 LM_TRAP_RADAR,
316 LM_TRAP_NO_BEACON,
317 LM_TRAP_TBTT,
318 LM_TRAP_SCO_ENTER,
319 LM_TRAP_SCO_EXIT
320 };
321
322 struct s_lmo_trap
323 {
324 uint16_t event;
325 uint16_t frequency;
326 };
327
328 struct s_lmo_timer
329 {
330 uint32_t interval;
331 };
332
333 struct s_lmo_nav
334 {
335 uint32_t period;
336 };
337
338
339 struct s_lmo_edcf_queue;
340
341 struct s_lmo_edcf
342 {
343 uint8_t flags;
344 uint8_t slottime;
345 uint8_t sifs;
346 uint8_t eofpad;
347 struct s_lmo_edcf_queue
348 {
349 uint8_t aifs;
350 uint8_t pad0;
351 uint16_t cwmin;
352 uint16_t cwmax;
353 uint16_t txop;
354 } queues[8];
355 uint8_t mapping[4];
356 uint16_t maxburst;
357 uint16_t round_trip_delay;
358 };
359
360 struct s_lmo_keycache
361 {
362 uint8_t entry;
363 uint8_t keyid;
364 uint8_t address[6];
365 uint8_t pad[2];
366 uint8_t keytype;
367 uint8_t keylen;
368 uint8_t key[24];
369 };
370
371
372 struct s_lm_interval;
373
374 struct s_lmo_psm
375 {
376 uint16_t flags;
377 uint16_t aid;
378 struct s_lm_interval
379 {
380 uint16_t interval;
381 uint16_t periods;
382 } intervals[4];
383 // uint16_t pad;
384 uint8_t beacon_rcpi_skip_max;
385 uint8_t rcpi_delta_threshold;
386 uint8_t nr;
387 uint8_t exclude[1];
388 };
389
390 #define MC_FILTER_ADDRESS_NUM 4
391
392 struct s_lmo_group_address_table
393 {
394 uint16_t filter_enable;
395 uint16_t num_address;
396 uint8_t macaddr_list[MC_FILTER_ADDRESS_NUM][6];
397 };
398
399 struct s_lmo_txcancel
400 {
401 uint32_t address[1];
402 };
403
404
405 struct s_lmo_tx
406 {
407 uint8_t flags;
408 uint8_t retries;
409 uint8_t rcpi;
410 uint8_t sq;
411 uint16_t seqctrl;
412 uint8_t antenna;
413 uint8_t pad;
414 };
415
416 struct s_lmo_burst
417 {
418 uint8_t flags;
419 uint8_t queue;
420 uint8_t backlog;
421 uint8_t pad;
422 uint16_t durations[32];
423 };
424
425 struct s_lmo_stats
426 {
427 uint32_t valid;
428 uint32_t fcs;
429 uint32_t abort;
430 uint32_t phyabort;
431 uint32_t rts_success;
432 uint32_t rts_fail;
433 uint32_t timestamp;
434 uint32_t time_tx;
435 uint32_t noisefloor;
436 uint32_t sample_noise[8];
437 uint32_t sample_cca;
438 uint32_t sample_tx;
439 };
440
441
442 struct s_lmo_led
443 {
444 uint16_t flags;
445 uint16_t mask[2];
446 uint16_t delay/*[2]*/;
447 };
448
449
450 struct s_lmo_bt_balancer
451 {
452 uint16_t prio_thresh;
453 uint16_t acl_thresh;
454 };
455
456
457 struct s_lmo_arp_table
458 {
459 uint16_t filter_enable;
460 uint32_t ipaddr;
461 };
462
463 #endif /* __ASSEMBLER__ */
464
465 #endif /* __lmac_h__ */
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.- [get | view] (2008-09-17 13:34:00, 600.9 KB) [[attachment:STSW45x0C_LMAC_API_ED1P4.pdf]]
- [get | view] (2008-09-17 13:33:01, 9.6 KB) [[attachment:lmac_longbow.h]]
You are not allowed to attach a file to this page.