nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 #ifndef STRUCTS_COMMON_H
2 #define STRUCTS_COMMON_H
3  
4 /*************
5 *
6 * IMPORTANT: this file was just copied from the bcm-pubic repo!
7 *
8 *************/
9  
10 #include <types.h>
11  
12 #ifndef PAD
13 #define _PADLINE(line) pad ## line
14 #define _XSTR(line) _PADLINE(line)
15 #define PAD _XSTR(__LINE__)
16 #endif
17  
18 struct phytbl_info {
19 const void *tbl_ptr;
20 uint32 tbl_len;
21 uint32 tbl_id;
22 uint32 tbl_offset;
23 uint32 tbl_width;
24 };
25  
26 struct wl_rxsts {
27 uint8 PAD[8];
28 uint16 chanspec;
29 uint16 datarate;
30 uint8 PAD1[12];
31 uint16 unkn1; /* ??? */
32 uint16 unkn2; /* increases over time */
33 uint8 PAD2[4];
34 uint8 rssi;
35 } __attribute__((packed));
36  
37 struct wlc_txh_info {
38 uint8 PAD[80];
39 } __attribute__((packed));
40  
41 struct osl_info {
42 unsigned int pktalloced;
43 int PAD[1];
44 void *callback_when_dropped;
45 unsigned int bustype;
46 } __attribute__((packed));
47  
48 /* CHECKED */
49 typedef struct sk_buff {
50 struct sk_buff *unkn; /* 0x00 */
51 struct sk_buff *head; /* 0x04 */
52 void *data; /* 0x08 */
53 short len; /* 0x0c */
54 short PAD; /* 0x0e */
55 int PAD; /* 0x10 */
56 short PAD; /* 0x14 */
57 struct sk_buff *prev; /* 0x16 */
58 short PAD; /* 0x1a */
59 int PAD; /* 0x1c */
60 int PAD; /* 0x20 */
61 int PAD; /* 0x24 */
62 void *scb; /* 0x28 */
63 } __attribute__((packed)) sk_buff;
64  
65 struct tunables {
66 char gap[62];
67 short somebnd; // @ 0x38
68 short rxbnd; // @ 0x40
69 };
70  
71 typedef void (*initfn_t)(void *);
72 typedef void (*chansetfn_t)(void *, unsigned hosrt);
73 typedef int (*longtrnfn_t)(void *, int);
74 typedef void (*txiqccgetfn_t)(void *, uint16 *, uint16 *);
75 typedef void (*txiqccmimogetfn_t)(void *, uint16 *, uint16 *, uint16 *, uint16 *);
76 typedef void (*txiqccsetfn_t)(void *, uint16, uint16);
77 typedef void (*txiqccmimosetfn_t)(void *, uint16, uint16, uint16, uint16);
78 typedef uint16 (*txloccgetfn_t)(void *);
79 typedef void (*txloccsetfn_t)(void *pi, uint16 didq);
80 typedef void (*txloccmimosetfn_t)(void *pi, uint16 diq0, uint16 diq1);
81 typedef void (*txloccmimogetfn_t)(void *, uint16 *, uint16 *);
82 typedef void (*radioloftgetfn_t)(void *, uint8 *, uint8 *, uint8 *, uint8 *);
83 typedef void (*radioloftsetfn_t)(void *, uint8, uint8, uint8, uint8);
84 typedef void (*radioloftmimogetfn_t)(void *, uint8 *, uint8 *, uint8 *, uint8 *, uint8 *, uint8 *, uint8 *, uint8 *);
85 typedef void (*radioloftmimosetfn_t)(void *, uint8, uint8, uint8, uint8, uint8, uint8, uint8, uint8);
86 typedef int32 (*rxsigpwrfn_t)(void *, int32);
87 typedef void (*detachfn_t)(void *);
88 typedef int (*txcorepwroffsetfn_t)(void *, void *);
89 typedef void (*settxpwrctrlfn_t)(void *, uint16);
90 typedef uint16 (*gettxpwrctrlfn_t)(void *);
91 typedef void (*settxpwrbyindexfn_t)(void *, int);
92 typedef bool (*ishwtxpwrctrlfn_t)(void *);
93 typedef void (*phywatchdogfn_t)(void *);
94 typedef void (*btcadjustfn_t)(void *, bool);
95 typedef uint16 (*tssicalsweepfn_t)(void *, int8 *, uint8 *);
96 typedef void (*switchradiofn_t)(void *, bool);
97 typedef void (*anacorefn_t)(void *, bool);
98 typedef void (*phywritetablefn_t)(void *pi, const void *pti);
99 typedef void (*phyreadtablefn_t)(void *pi, void *pti);
100 typedef void (*calibmodesfn_t)(void *pi, uint mode);
101 typedef void (*lowpowerbeaconmodefn_t)(void *pi, int lowpower_beacon_mode);
102 typedef bool (*fcbsinitfn_t)(void *pi, int chanidx, unsigned short chanspec);
103 typedef bool (*fcbsinitprefn_t)(void *pi, int chanidx);
104 typedef bool (*fcbsinitpostfn_t)(void *pi, int chanidx);
105 typedef bool (*fcbsfn_t)(void *pi, int chanidx);
106 typedef bool (*fcbsprefn_t)(void *pi, int chanidx);
107 typedef bool (*fcbspostfn_t)(void *pi, int chanidx);
108 typedef void (*fcbsreadtblfn_t) (void *pi, uint32 id, uint32 len, uint32 offset, uint32 width, void *data);
109 typedef uint8 (*lpcgetminidx_t)(void);
110 typedef void (*lpcsetmode_t)(void *pi, bool enable);
111 typedef uint8 (*lpcgetpwros_t)(uint8 index);
112 typedef uint8 (*lpcgettxcpwrval_t)(uint16 phytxctrlword);
113 typedef void (*lpcsettxcpwrval_t)(uint16 *phytxctrlword, uint8 txcpwrval);
114 typedef uint8 (*lpccalcpwroffset_t) (uint8 total_offset, uint8 rate_offset);
115 typedef uint8 (*lpcgetpwridx_t) (uint8 pwr_offset);
116 typedef uint8 * (*lpcgetpwrlevelptr_t) (void);
117  
118 struct phy_func_ptr {
119 initfn_t init;
120 initfn_t calinit;
121 chansetfn_t chanset;
122 initfn_t txpwrrecalc;
123 longtrnfn_t longtrn;
124 txiqccgetfn_t txiqccget;
125 txiqccmimogetfn_t txiqccmimoget;
126 txiqccsetfn_t txiqccset;
127 txiqccmimosetfn_t txiqccmimoset;
128 txloccgetfn_t txloccget;
129 txloccsetfn_t txloccset;
130 txloccmimogetfn_t txloccmimoget;
131 txloccmimosetfn_t txloccmimoset;
132 radioloftgetfn_t radioloftget;
133 radioloftsetfn_t radioloftset;
134 radioloftmimogetfn_t radioloftmimoget;
135 radioloftmimosetfn_t radioloftmimoset;
136 initfn_t carrsuppr;
137 rxsigpwrfn_t rxsigpwr;
138 detachfn_t detach;
139 txcorepwroffsetfn_t txcorepwroffsetget;
140 txcorepwroffsetfn_t txcorepwroffsetset;
141 settxpwrctrlfn_t settxpwrctrl;
142 gettxpwrctrlfn_t gettxpwrctrl;
143 ishwtxpwrctrlfn_t ishwtxpwrctrl;
144 settxpwrbyindexfn_t settxpwrbyindex;
145 btcadjustfn_t phybtcadjust;
146 phywatchdogfn_t phywatchdog;
147 tssicalsweepfn_t tssicalsweep;
148 switchradiofn_t switchradio;
149 anacorefn_t anacore;
150 phywritetablefn_t phywritetable;
151 phyreadtablefn_t phyreadtable;
152 calibmodesfn_t calibmodes;
153 lpcgetminidx_t lpcgetminidx;
154 lpcgetpwros_t lpcgetpwros;
155 lpcgettxcpwrval_t lpcgettxcpwrval;
156 lpcsettxcpwrval_t lpcsettxcpwrval;
157 lpcsetmode_t lpcsetmode;
158 };
159 typedef struct phy_func_ptr phy_func_ptr_t;
160  
161 struct phy_info {
162 int PAD; // 0x000
163 int PAD; // 0x004
164 int PAD; // 0x008
165 int PAD; // 0x00c
166 int PAD; // 0x010
167 int PAD; // 0x014
168 int PAD; // 0x018
169 int PAD; // 0x01c
170 int PAD; // 0x020
171 int PAD; // 0x024
172 int PAD; // 0x028
173 int PAD; // 0x02c
174 int PAD; // 0x030
175 int PAD; // 0x034
176 void *sh; // 0x038
177 struct phy_func_ptr pi_fptr; // 0x03c - 0xd4
178 int PAD; // 0x0d8
179 int PAD; // 0x0dc
180 int PAD; // 0x0e0
181 int PAD; // 0x0e4
182 volatile struct d11regs *regs; // 0x0e8
183 int PAD; // 0x0ec
184 int PAD; // 0x0f0
185 short PAD; // 0x0f4
186 short radio_chanspec; // 0x0f6
187 int PAD; // 0x0f8
188 int PAD; // 0x0fc
189 int PAD; // 0x100
190 int PAD; // 0x104
191 };
192  
193 struct wlc_hwband {
194 int bandtype; /* 0x00 */
195 int bandunit; /* 0x04 */
196 char mhfs; /* 0x05 */
197 char PAD[10]; /* 0x06 */
198 char bandhw_stf_ss_mode; /* 0x13 */
199 short CWmin; /* 0x14 */
200 short CWmax; /* 0x16 */
201 int core_flags; /* 0x18 */
202 short phytype; /* 0x1C */
203 short phyrev; /* 0x1E */
204 short radioid; /* 0x20 */
205 short radiorev; /* 0x22 */
206 struct phy_info *pi; /* 0x24 */
207 char abgphy_encore; /* 0x25 */
208 };
209  
210 struct wlc_hw_info {
211 struct wlc_info *wlc; /* 0x00 */
212 int PAD[4]; /* 0x04 */
213 struct dma_info *di[6]; /* 0x14 - only 4 bytes */
214 int PAD[17];
215 char PAD[2];
216 char ucode_loaded;
217 char PAD;
218 int PAD;
219 int sih; /* 0x78 */
220 int vars; /* 0x7C */
221 int vars_size; /* 0x80 */
222 int PAD; /* 0x84 */
223 struct d11regs* regs; /* 0x88 CHECKED */
224 // int physhim; /* 0x88 */
225 int phy_sh; /* 0x8C */
226 int PAD; /* 0x90 */
227 struct wlc_hwband *band; /* 0x94 CHECKED */
228 int PAD[5]; /* 0x98 */
229 char up; /* 0x98 */
230 char PAD; /* 0x9a */
231 int PAD[19]; /* 0x9c */
232 int maccontrol;
233 int PAD[18];
234 sk_buff *some_skbuff_ptr; // @ 0x134
235  
236 };
237  
238 #define HNDRTE_DEV_NAME_MAX 16
239  
240 typedef struct hndrte_dev {
241 char name[HNDRTE_DEV_NAME_MAX];
242 struct hndrte_devfuncs *funcs;
243 uint32 devid;
244 void *softc; /* Software context */
245 uint32 flags; /* RTEDEVFLAG_XXXX */
246 struct hndrte_dev *next;
247 struct hndrte_dev *chained;
248 void *pdev;
249 } hndrte_dev;
250  
251 struct hndrte_devfuncs {
252 void *(*probe)(struct hndrte_dev *dev, void *regs, uint bus,
253 uint16 device, uint coreid, uint unit);
254 int (*open)(struct hndrte_dev *dev);
255 int (*close)(struct hndrte_dev *dev);
256 int (*xmit)(struct hndrte_dev *src, struct hndrte_dev *dev, void *lb);
257 int (*recv)(struct hndrte_dev *src, struct hndrte_dev *dev, void *pkt);
258 int (*ioctl)(struct hndrte_dev *dev, uint32 cmd, void *buffer, int len,
259 int *used, int *needed, int set);
260 void (*txflowcontrol) (struct hndrte_dev *dev, bool state, int prio);
261 void (*poll)(struct hndrte_dev *dev);
262 int (*xmit_ctl)(struct hndrte_dev *src, struct hndrte_dev *dev, void *lb);
263 int (*xmit2)(struct hndrte_dev *src, struct hndrte_dev *dev, void *lb, int8 ch);
264 };
265  
266 /**
267 * Name might be inaccurate
268 */
269 /*
270 struct device {
271 char name[16]; // 0x000
272 void *init_function; // 0x010
273 int PAD; // 0x014
274 void *some_device_info; // 0x018
275 int PAD; // 0x01c
276 int PAD; // 0x020
277 struct device *chained; // 0x024
278 };
279 */
280  
281 /**
282 * Name might be inaccurate
283 */
284 struct wl_info {
285 int unit;
286 void *pub;
287 struct wlc_info *wlc;
288 struct wlc_hw_info *wlc_hw;
289 struct hndrte_dev *dev;
290 };
291  
292 /**
293 * Name might be inaccurate
294 */
295 struct sdiox_info {
296 int unit;
297 void *something;
298 void *sdio; // sdio_info struct
299 void *osh;
300 void *device_address;
301 } __attribute__((packed));
302  
303 struct wlcband {
304 int bandtype; /* 0x000 */
305 int bandunit; /* 0x004 */
306 short phytype; /* 0x008 */
307 short phyrev; /* 0x00A */
308 short radioid; /* 0x00C */
309 short radiorev; /* 0x00E */
310 void *pi; /* 0x010 */
311 char abgphy_encore; /* 0x014 */
312 char gmode; /* 0x015 */
313 char PAD;
314 char PAD;
315 struct scb *hwrs_scb; /* CHECKED */
316 int defrateset;
317 int rspec_override;
318 int mrspec_override;
319 char band_stf_ss_mode;
320 char band_stf_stbc_tx;
321 int hw_rateset;
322 char basic_rate;
323 } __attribute__((packed));
324  
325 struct wlc_info {
326 struct wlc_pub *pub; /* 0x000 */
327 struct osl_info *osh; /* 0x004 */
328 struct wl_info *wl; /* 0x008 */
329 volatile struct d11regs *regs; /* 0x00C */
330 struct wlc_hw_info *hw; /* 0x010 */
331 int PAD; /* 0x014 */
332 int PAD; /* 0x018 */
333 void *core; /* 0x01C */
334 struct wlcband *band; /* 0x020 */
335 int PAD; /* 0x024 */
336 struct wlcband *bandstate[2]; /* 0x028 */
337 int PAD; /* 0x030 */
338 int PAD; /* 0x034 */
339 int PAD; /* 0x038 */
340 int PAD; /* 0x03C */
341 int PAD; /* 0x040 */
342 int PAD; /* 0x044 */
343 int PAD; /* 0x048 */
344 int PAD; /* 0x04C */
345 int PAD; /* 0x050 */
346 int PAD; /* 0x054 */
347 int PAD; /* 0x058 */
348 int PAD; /* 0x05C */
349 int PAD; /* 0x060 */
350 int PAD; /* 0x064 */
351 int PAD; /* 0x068 */
352 int PAD; /* 0x06C */
353 int PAD; /* 0x070 */
354 int PAD; /* 0x074 */
355 int PAD; /* 0x078 */
356 int PAD; /* 0x07C */
357 int PAD; /* 0x080 */
358 int PAD; /* 0x084 */
359 int PAD; /* 0x088 */
360 int PAD; /* 0x08C */
361 int PAD; /* 0x090 */
362 int PAD; /* 0x094 */
363 int PAD; /* 0x098 */
364 int PAD; /* 0x09C */
365 int PAD; /* 0x0A0 */
366 int PAD; /* 0x0A4 */
367 int PAD; /* 0x0A8 */
368 int PAD; /* 0x0AC */
369 int PAD; /* 0x0B0 */
370 int PAD; /* 0x0B4 */
371 int PAD; /* 0x0B8 */
372 int PAD; /* 0x0BC */
373 int PAD; /* 0x0C0 */
374 int PAD; /* 0x0C4 */
375 int PAD; /* 0x0C8 */
376 int PAD; /* 0x0CC */
377 int PAD; /* 0x0D0 */
378 int PAD; /* 0x0D4 */
379 int PAD; /* 0x0D8 */
380 int PAD; /* 0x0DC */
381 int PAD; /* 0x0E0 */
382 int PAD; /* 0x0E4 */
383 int PAD; /* 0x0E8 */
384 int PAD; /* 0x0EC */
385 int PAD; /* 0x0F0 */
386 int PAD; /* 0x0F4 */
387 int PAD; /* 0x0F8 */
388 int PAD; /* 0x0FC */
389 int PAD; /* 0x100 */
390 int PAD; /* 0x104 */
391 int PAD; /* 0x108 */
392 int PAD; /* 0x10C */
393 int PAD; /* 0x110 */
394 int PAD; /* 0x114 */
395 int PAD; /* 0x118 */
396 int PAD; /* 0x11C */
397 int PAD; /* 0x120 */
398 int PAD; /* 0x124 */
399 int PAD; /* 0x128 */
400 int PAD; /* 0x12C */
401 int PAD; /* 0x130 */
402 int PAD; /* 0x134 */
403 int PAD; /* 0x138 */
404 int PAD; /* 0x13C */
405 int PAD; /* 0x140 */
406 int PAD; /* 0x144 */
407 int PAD; /* 0x148 */
408 int PAD; /* 0x14C */
409 int PAD; /* 0x150 */
410 int PAD; /* 0x154 */
411 int PAD; /* 0x158 */
412 void *cmi; /* 0x15C */
413 int PAD; /* 0x160 */
414 int PAD; /* 0x164 */
415 int PAD; /* 0x168 */
416 int PAD; /* 0x16C */
417 int PAD; /* 0x170 */
418 int PAD; /* 0x174 */
419 int PAD; /* 0x178 */
420 int PAD; /* 0x17C */
421 int PAD; /* 0x180 */
422 int PAD; /* 0x184 */
423 int PAD; /* 0x188 */
424 int PAD; /* 0x18C */
425 int PAD; /* 0x190 */
426 int PAD; /* 0x194 */
427 int PAD; /* 0x198 */
428 int PAD; /* 0x19C */
429 int PAD; /* 0x1A0 */
430 int PAD; /* 0x1A4 */
431 int PAD; /* 0x1A8 */
432 int PAD; /* 0x1AC */
433 int PAD; /* 0x1B0 */
434 int PAD; /* 0x1B4 */
435 int PAD; /* 0x1B8 */
436 int PAD; /* 0x1BC */
437 int PAD; /* 0x1C0 */
438 int PAD; /* 0x1C4 */
439 short PAD; /* 0x1C8 */
440 char bandlocked; /* 0x1CA */
441 char field_1CB; /* 0x1CB */
442 int PAD; /* 0x1CC */
443 int PAD; /* 0x1D0 */
444 int PAD; /* 0x1D4 */
445 int PAD; /* 0x1D8 */
446 int PAD; /* 0x1DC */
447 int PAD; /* 0x1E0 */
448 int PAD; /* 0x1E4 */
449 int PAD; /* 0x1E8 */
450 int PAD; /* 0x1EC */
451 int PAD; /* 0x1F0 */
452 int PAD; /* 0x1F4 */
453 int PAD; /* 0x1F8 */
454 int PAD; /* 0x1FC */
455 int PAD; /* 0x200 */
456 int PAD; /* 0x204 */
457 int monitor; /* 0x208 CHECKED */
458 int PAD; /* 0x20C */
459 int PAD; /* 0x210 */
460 int PAD; /* 0x214 */
461 int PAD; /* 0x218 */
462 int PAD; /* 0x21C */
463 int PAD; /* 0x220 */
464 int PAD; /* 0x224 */
465 short PAD; /* 0x228 */
466 short wme_dp; /* 0x22A */
467 int PAD; /* 0x22C */
468 int PAD; /* 0x230 */
469 int PAD; /* 0x234 */
470 int PAD; /* 0x238 */
471 int PAD; /* 0x23C */
472 int PAD; /* 0x240 */
473 int PAD; /* 0x244 */
474 int PAD; /* 0x248 */
475 unsigned short tx_prec_map; /* 0x24C */
476 short PAD; /* 0x24E */
477 int PAD; /* 0x250 */
478 int PAD; /* 0x254 */
479 int PAD; /* 0x258 */
480 int PAD; /* 0x25C */
481 int PAD; /* 0x260 */
482 int PAD; /* 0x264 */
483 int PAD; /* 0x268 */
484 int PAD; /* 0x26C */
485 int PAD; /* 0x270 */
486 int PAD; /* 0x274 */
487 int PAD; /* 0x278 */
488 void *eventq; /* 0x27C CHECKED */
489 int PAD; /* 0x280 */
490 int PAD; /* 0x284 */
491 int PAD; /* 0x288 */
492 int PAD; /* 0x28C */
493 int PAD; /* 0x290 */
494 int PAD; /* 0x294 */
495 int PAD; /* 0x298 */
496 int PAD; /* 0x29C */
497 int PAD; /* 0x2A0 */
498 int PAD; /* 0x2A4 */
499 int PAD; /* 0x2A8 */
500 int PAD; /* 0x2AC */
501 int PAD; /* 0x2B0 */
502 int PAD; /* 0x2B4 */
503 int PAD; /* 0x2B8 */
504 int PAD; /* 0x2BC */
505 int PAD; /* 0x2C0 */
506 int PAD; /* 0x2C4 */
507 int PAD; /* 0x2C8 */
508 int PAD; /* 0x2CC */
509 int PAD; /* 0x2D0 */
510 int PAD; /* 0x2D4 */
511 int PAD; /* 0x2D8 */
512 int PAD; /* 0x2DC */
513 int PAD; /* 0x2E0 */
514 int PAD; /* 0x2E4 */
515 int PAD; /* 0x2E8 */
516 int PAD; /* 0x2EC */
517 int PAD; /* 0x2F0 */
518 int PAD; /* 0x2F4 */
519 int PAD; /* 0x2F8 */
520 int PAD; /* 0x2FC */
521 int PAD; /* 0X300 */
522 int PAD; /* 0X304 */
523 int PAD; /* 0X308 */
524 int PAD; /* 0X30C */
525 int PAD; /* 0X310 */
526 int PAD; /* 0X314 */
527 int PAD; /* 0X318 */
528 int PAD; /* 0X31C */
529 int PAD; /* 0X320 */
530 int PAD; /* 0X324 */
531 int PAD; /* 0X328 */
532 int PAD; /* 0X32C */
533 int PAD; /* 0X330 */
534 int PAD; /* 0X334 */
535 int PAD; /* 0X338 */
536 int PAD; /* 0X33C */
537 int PAD; /* 0X340 */
538 int PAD; /* 0X344 */
539 int PAD; /* 0X348 */
540 int PAD; /* 0X34C */
541 int PAD; /* 0X350 */
542 int PAD; /* 0X354 */
543 int PAD; /* 0X358 */
544 int PAD; /* 0X35C */
545 int PAD; /* 0X360 */
546 short *field_364; /* 0X364 */
547 int PAD; /* 0X368 */
548 int PAD; /* 0X36C */
549 int PAD; /* 0X370 */
550 int PAD; /* 0X374 */
551 int PAD; /* 0X378 */
552 int PAD; /* 0X37C */
553 int PAD; /* 0X380 */
554 int PAD; /* 0X384 */
555 int PAD; /* 0X388 */
556 int PAD; /* 0X38C */
557 int PAD; /* 0X390 */
558 int PAD; /* 0X394 */
559 int PAD; /* 0X398 */
560 int PAD; /* 0X39C */
561 int PAD; /* 0X3A0 */
562 int PAD; /* 0X3A4 */
563 int PAD; /* 0X3A8 */
564 int PAD; /* 0X3AC */
565 int PAD; /* 0X3B0 */
566 int PAD; /* 0X3B4 */
567 int PAD; /* 0X3B8 */
568 int PAD; /* 0X3BC */
569 int PAD; /* 0X3C0 */
570 int PAD; /* 0X3C4 */
571 int PAD; /* 0X3C8 */
572 int PAD; /* 0X3CC */
573 int PAD; /* 0X3D0 */
574 int PAD; /* 0X3D4 */
575 int PAD; /* 0X3D8 */
576 int PAD; /* 0X3DC */
577 int PAD; /* 0X3E0 */
578 int PAD; /* 0X3E4 */
579 int PAD; /* 0X3E8 */
580 int PAD; /* 0X3EC */
581 int PAD; /* 0X3F0 */
582 int PAD; /* 0X3F4 */
583 int PAD; /* 0X3F8 */
584 int PAD; /* 0X3FC */
585 int PAD; /* 0X400 */
586 int PAD; /* 0X404 */
587 int PAD; /* 0X408 */
588 int PAD; /* 0X40C */
589 int PAD; /* 0X410 */
590 int PAD; /* 0X414 */
591 int PAD; /* 0X418 */
592 int PAD; /* 0X41C */
593 int PAD; /* 0X420 */
594 int PAD; /* 0X424 */
595 int PAD; /* 0X428 */
596 int PAD; /* 0X42C */
597 int PAD; /* 0X430 */
598 int PAD; /* 0X434 */
599 int PAD; /* 0X438 */
600 int PAD; /* 0X43C */
601 int PAD; /* 0X440 */
602 int PAD; /* 0X444 */
603 int PAD; /* 0X448 */
604 int PAD; /* 0X44C */
605 int PAD; /* 0X450 */
606 int PAD; /* 0X454 */
607 int PAD; /* 0X458 */
608 int PAD; /* 0X45C */
609 int PAD; /* 0X460 */
610 int PAD; /* 0X464 */
611 int PAD; /* 0X468 */
612 int PAD; /* 0X46C */
613 int PAD; /* 0X470 */
614 int PAD; /* 0X474 */
615 int PAD; /* 0X478 */
616 int PAD; /* 0X47C */
617 int PAD; /* 0X480 */
618 int PAD; /* 0X484 */
619 int PAD; /* 0X488 */
620 int PAD; /* 0X48C */
621 int PAD; /* 0X490 */
622 int PAD; /* 0X494 */
623 int PAD; /* 0X498 */
624 int PAD; /* 0X49C */
625 int PAD; /* 0X4A0 */
626 int PAD; /* 0X4A4 */
627 int PAD; /* 0X4A8 */
628 int PAD; /* 0X4AC */
629 int PAD; /* 0X4B0 */
630 int PAD; /* 0X4B4 */
631 int PAD; /* 0X4B8 */
632 int PAD; /* 0X4BC */
633 int PAD; /* 0X4C0 */
634 int PAD; /* 0X4C4 */
635 int PAD; /* 0X4C8 */
636 int PAD; /* 0X4CC */
637 int PAD; /* 0X4D0 */
638 int PAD; /* 0X4D4 */
639 int PAD; /* 0X4D8 */
640 int PAD; /* 0X4DC */
641 int PAD; /* 0X4E0 */
642 int PAD; /* 0X4E4 */
643 int PAD; /* 0X4E8 */
644 int PAD; /* 0X4EC */
645 int PAD; /* 0X4F0 */
646 int PAD; /* 0X4F4 */
647 int PAD; /* 0X4F8 */
648 int PAD; /* 0X4FC */
649 int PAD; /* 0X500 */
650 int PAD; /* 0X504 */
651 int PAD; /* 0X508 */
652 int PAD; /* 0X50C */
653 short some_chanspec; /* 0X510 */
654 short PAD; /* 0X512 */
655 int PAD; /* 0X514 */
656 int PAD; /* 0X518 */
657 int PAD; /* 0X51C */
658 int PAD; /* 0X520 */
659 int PAD; /* 0X524 */
660 int PAD; /* 0X528 */
661 int PAD; /* 0X52C */
662 int PAD; /* 0X530 */
663 int PAD; /* 0X534 */
664 int PAD; /* 0X538 */
665 int PAD; /* 0X53C */
666 int PAD; /* 0X540 */
667 int PAD; /* 0X544 */
668 int PAD; /* 0X548 */
669 int PAD; /* 0X54C */
670 int PAD; /* 0X550 */
671 int PAD; /* 0X554 */
672 int PAD; /* 0X558 */
673 int PAD; /* 0X55C */
674 int PAD; /* 0X560 */
675 int PAD; /* 0X564 */
676 int PAD; /* 0X568 */
677 int PAD; /* 0X56C */
678 int PAD; /* 0X570 */
679 int PAD; /* 0X574 */
680 int PAD; /* 0X578 */
681 int PAD; /* 0X57C */
682 int PAD; /* 0X580 */
683 int PAD; /* 0X584 */
684 int PAD; /* 0X588 */
685 int PAD; /* 0X58C */
686 int PAD; /* 0X590 */
687 int PAD; /* 0X594 */
688 int PAD; /* 0X598 */
689 int PAD; /* 0X59C */
690 int PAD; /* 0X5A0 */
691 int PAD; /* 0X5A4 */
692 int PAD; /* 0X5A8 */
693 int PAD; /* 0X5AC */
694 int PAD; /* 0X5B0 */
695 int PAD; /* 0X5B4 */
696 int PAD; /* 0X5B8 */
697 int PAD; /* 0X5BC */
698 int PAD; /* 0X5C0 */
699 int PAD; /* 0X5C4 */
700 int PAD; /* 0X5C8 */
701 int PAD; /* 0X5CC */
702 int PAD; /* 0X5D0 */
703 int PAD; /* 0X5D4 */
704 int PAD; /* 0X5D8 */
705 int PAD; /* 0X5DC */
706 int PAD; /* 0X5E0 */
707 int PAD; /* 0X5E4 */
708 void *active_queue; /* 0X5E8 */
709 int PAD; /* 0X5EC */
710 int PAD; /* 0X5F0 */
711 int PAD; /* 0X5F4 */
712 int PAD; /* 0X5F8 */
713 int PAD; /* 0X5FC */
714 };
715  
716 /* partly CHECKED */
717 struct wlc_pub {
718 struct wlc_info *wlc; /* 0x000 */
719 int PAD; /* 0x004 */
720 int PAD; /* 0x008 */
721 int PAD; /* 0x00C */
722 int PAD; /* 0x010 */
723 int PAD; /* 0x014 */
724 int PAD; /* 0x018 */
725 struct tunables *tunables; /* 0x01C */
726 int PAD; /* 0x020 */
727 char up_maybe; /* 0x024 */
728 char field_25; /* 0x025 */
729 char field_26; /* 0x026 */
730 char field_27; /* 0x027 */
731 int PAD; /* 0x028 */
732 int PAD; /* 0x02C */
733 int field_30; /* 0x030 */
734 int PAD; /* 0x034 */
735 int PAD; /* 0x038 */
736 int PAD; /* 0x03C */
737 int PAD; /* 0x040 */
738 char PAD; /* 0x044 */
739 char PAD; /* 0x045 */
740 char field_46; /* 0x046 */
741 char PAD; /* 0x047 */
742 int PAD; /* 0x048 */
743 char associated; /* 0x04C */
744 char PAD; /* 0x04D */
745 char PAD; /* 0x04E */
746 char PAD; /* 0x04F */
747 int PAD; /* 0x050 */
748 char gap2[147];
749 char is_amsdu; // @ 0xe7
750 } __attribute__((packed));
751  
752 struct wlc_bsscfg {
753 void *wlc; /* 0x000 */
754 char associated; /* 0x004 */
755 char PAD; /* 0x005 */
756 char PAD; /* 0x006 */
757 char PAD; /* 0x007 */
758 int PAD; /* 0x008 */
759 int PAD; /* 0x00C */
760 int PAD; /* 0x010 */
761 int PAD; /* 0x014 */
762 int PAD; /* 0x018 */
763 int PAD; /* 0x01C */
764 int PAD; /* 0x020 */
765 int PAD; /* 0x024 */
766 int PAD; /* 0x028 */
767 int PAD; /* 0x02C */
768 int PAD; /* 0x030 */
769 int PAD; /* 0x034 */
770 int PAD; /* 0x038 */
771 int PAD; /* 0x03C */
772 int PAD; /* 0x040 */
773 int PAD; /* 0x044 */
774 int PAD; /* 0x048 */
775 int PAD; /* 0x04C */
776 int PAD; /* 0x050 */
777 int PAD; /* 0x054 */
778 int PAD; /* 0x058 */
779 int PAD; /* 0x05C */
780 int PAD; /* 0x060 */
781 int PAD; /* 0x064 */
782 int PAD; /* 0x068 */
783 int PAD; /* 0x06C */
784 int PAD; /* 0x070 */
785 int PAD; /* 0x074 */
786 int PAD; /* 0x078 */
787 int PAD; /* 0x07C */
788 int PAD; /* 0x080 */
789 int PAD; /* 0x084 */
790 int PAD; /* 0x088 */
791 int PAD; /* 0x08C */
792 int PAD; /* 0x090 */
793 int PAD; /* 0x094 */
794 int PAD; /* 0x098 */
795 int PAD; /* 0x09C */
796 int PAD; /* 0x0A0 */
797 int PAD; /* 0x0A4 */
798 int PAD; /* 0x0A8 */
799 int PAD; /* 0x0AC */
800 int PAD; /* 0x0B0 */
801 int PAD; /* 0x0B4 */
802 int PAD; /* 0x0B8 */
803 int PAD; /* 0x0BC */
804 int PAD; /* 0x0C0 */
805 int PAD; /* 0x0C4 */
806 int PAD; /* 0x0C8 */
807 int PAD; /* 0x0CC */
808 int PAD; /* 0x0D0 */
809 int PAD; /* 0x0D4 */
810 int PAD; /* 0x0D8 */
811 int PAD; /* 0x0DC */
812 int PAD; /* 0x0E0 */
813 int PAD; /* 0x0E4 */
814 int PAD; /* 0x0E8 */
815 int PAD; /* 0x0EC */
816 int PAD; /* 0x0F0 */
817 int PAD; /* 0x0F4 */
818 int PAD; /* 0x0F8 */
819 int PAD; /* 0x0FC */
820 int PAD; /* 0x100 */
821 int PAD; /* 0x104 */
822 int PAD; /* 0x108 */
823 int PAD; /* 0x10C */
824 int PAD; /* 0x110 */
825 int PAD; /* 0x114 */
826 int PAD; /* 0x118 */
827 int PAD; /* 0x11C */
828 int PAD; /* 0x120 */
829 int PAD; /* 0x124 */
830 int PAD; /* 0x128 */
831 int PAD; /* 0x12C */
832 int PAD; /* 0x130 */
833 int PAD; /* 0x134 */
834 int PAD; /* 0x138 */
835 int PAD; /* 0x13C */
836 int PAD; /* 0x140 */
837 int PAD; /* 0x144 */
838 int PAD; /* 0x148 */
839 int PAD; /* 0x14C */
840 int PAD; /* 0x150 */
841 int PAD; /* 0x154 */
842 int PAD; /* 0x158 */
843 int PAD; /* 0x15C */
844 int PAD; /* 0x160 */
845 int PAD; /* 0x164 */
846 int PAD; /* 0x168 */
847 int PAD; /* 0x16C */
848 int PAD; /* 0x170 */
849 int PAD; /* 0x174 */
850 int PAD; /* 0x178 */
851 int PAD; /* 0x17C */
852 int PAD; /* 0x180 */
853 int PAD; /* 0x184 */
854 int PAD; /* 0x188 */
855 int PAD; /* 0x18C */
856 int PAD; /* 0x190 */
857 int PAD; /* 0x194 */
858 int PAD; /* 0x198 */
859 int PAD; /* 0x19C */
860 int PAD; /* 0x1A0 */
861 int PAD; /* 0x1A4 */
862 int PAD; /* 0x1A8 */
863 int PAD; /* 0x1AC */
864 int PAD; /* 0x1B0 */
865 int PAD; /* 0x1B4 */
866 int PAD; /* 0x1B8 */
867 int PAD; /* 0x1BC */
868 int PAD; /* 0x1C0 */
869 int PAD; /* 0x1C4 */
870 int PAD; /* 0x1C8 */
871 int PAD; /* 0x1CC */
872 int PAD; /* 0x1D0 */
873 int PAD; /* 0x1D4 */
874 int PAD; /* 0x1D8 */
875 int PAD; /* 0x1DC */
876 int PAD; /* 0x1E0 */
877 int PAD; /* 0x1E4 */
878 int PAD; /* 0x1E8 */
879 int PAD; /* 0x1EC */
880 int PAD; /* 0x1F0 */
881 int PAD; /* 0x1F4 */
882 int PAD; /* 0x1F8 */
883 int PAD; /* 0x1FC */
884 int PAD; /* 0x200 */
885 int PAD; /* 0x204 */
886 int PAD; /* 0x208 */
887 int PAD; /* 0x20C */
888 int PAD; /* 0x210 */
889 int PAD; /* 0x214 */
890 int PAD; /* 0x218 */
891 int PAD; /* 0x21C */
892 int PAD; /* 0x220 */
893 int PAD; /* 0x224 */
894 int PAD; /* 0x228 */
895 int PAD; /* 0x22C */
896 int PAD; /* 0x230 */
897 int PAD; /* 0x234 */
898 int PAD; /* 0x238 */
899 int PAD; /* 0x23C */
900 int PAD; /* 0x240 */
901 int PAD; /* 0x244 */
902 int PAD; /* 0x248 */
903 int PAD; /* 0x24C */
904 int PAD; /* 0x250 */
905 int PAD; /* 0x254 */
906 int PAD; /* 0x258 */
907 int PAD; /* 0x25C */
908 int PAD; /* 0x260 */
909 int PAD; /* 0x264 */
910 int PAD; /* 0x268 */
911 int PAD; /* 0x26C */
912 int PAD; /* 0x270 */
913 int PAD; /* 0x274 */
914 int PAD; /* 0x278 */
915 int PAD; /* 0x27C */
916 int PAD; /* 0x280 */
917 int PAD; /* 0x284 */
918 int PAD; /* 0x288 */
919 int PAD; /* 0x28C */
920 int PAD; /* 0x290 */
921 int PAD; /* 0x294 */
922 int PAD; /* 0x298 */
923 int PAD; /* 0x29C */
924 int PAD; /* 0x2A0 */
925 int PAD; /* 0x2A4 */
926 int PAD; /* 0x2A8 */
927 int PAD; /* 0x2AC */
928 int PAD; /* 0x2B0 */
929 int PAD; /* 0x2B4 */
930 int PAD; /* 0x2B8 */
931 int PAD; /* 0x2BC */
932 int PAD; /* 0x2C0 */
933 int PAD; /* 0x2C4 */
934 int PAD; /* 0x2C8 */
935 int PAD; /* 0x2CC */
936 int PAD; /* 0x2D0 */
937 int PAD; /* 0x2D4 */
938 int PAD; /* 0x2D8 */
939 int PAD; /* 0x2DC */
940 int PAD; /* 0x2E0 */
941 int PAD; /* 0x2E4 */
942 int PAD; /* 0x2E8 */
943 int PAD; /* 0x2EC */
944 int PAD; /* 0x2F0 */
945 int PAD; /* 0x2F4 */
946 int PAD; /* 0x2F8 */
947 int PAD; /* 0x2FC */
948 int PAD; /* 0X300 */
949 int PAD; /* 0X304 */
950 int PAD; /* 0X308 */
951 int PAD; /* 0X30C */
952 int PAD; /* 0X310 */
953 int PAD; /* 0X314 */
954 int PAD; /* 0X318 */
955 int PAD; /* 0X31C */
956 int PAD; /* 0X320 */
957 int PAD; /* 0X324 */
958 int PAD; /* 0X328 */
959 int PAD; /* 0X32C */
960 int PAD; /* 0X330 */
961 int PAD; /* 0X334 */
962 int PAD; /* 0X338 */
963 int PAD; /* 0X33C */
964 int PAD; /* 0X340 */
965 int PAD; /* 0X344 */
966 int PAD; /* 0X348 */
967 int PAD; /* 0X34C */
968 int PAD; /* 0X350 */
969 int PAD; /* 0X354 */
970 int PAD; /* 0X358 */
971 int PAD; /* 0X35C */
972 int PAD; /* 0X360 */
973 int PAD; /* 0X364 */
974 int PAD; /* 0X368 */
975 int PAD; /* 0X36C */
976 int PAD; /* 0X370 */
977 int PAD; /* 0X374 */
978 int PAD; /* 0X378 */
979 int PAD; /* 0X37C */
980 int PAD; /* 0X380 */
981 int PAD; /* 0X384 */
982 int PAD; /* 0X388 */
983 int PAD; /* 0X38C */
984 int PAD; /* 0X390 */
985 int PAD; /* 0X394 */
986 int PAD; /* 0X398 */
987 int PAD; /* 0X39C */
988 int PAD; /* 0X3A0 */
989 int PAD; /* 0X3A4 */
990 int PAD; /* 0X3A8 */
991 int PAD; /* 0X3AC */
992 int PAD; /* 0X3B0 */
993 int PAD; /* 0X3B4 */
994 int PAD; /* 0X3B8 */
995 int PAD; /* 0X3BC */
996 int PAD; /* 0X3C0 */
997 int PAD; /* 0X3C4 */
998 int PAD; /* 0X3C8 */
999 int PAD; /* 0X3CC */
1000 int PAD; /* 0X3D0 */
1001 int PAD; /* 0X3D4 */
1002 int PAD; /* 0X3D8 */
1003 int PAD; /* 0X3DC */
1004 int PAD; /* 0X3E0 */
1005 int PAD; /* 0X3E4 */
1006 int PAD; /* 0X3E8 */
1007 int PAD; /* 0X3EC */
1008 int PAD; /* 0X3F0 */
1009 int PAD; /* 0X3F4 */
1010 int PAD; /* 0X3F8 */
1011 int PAD; /* 0X3FC */
1012 int PAD; /* 0X400 */
1013 int PAD; /* 0X404 */
1014 int PAD; /* 0X408 */
1015 int PAD; /* 0X40C */
1016 int PAD; /* 0X410 */
1017 int PAD; /* 0X414 */
1018 int PAD; /* 0X418 */
1019 int PAD; /* 0X41C */
1020 int PAD; /* 0X420 */
1021 int PAD; /* 0X424 */
1022 int PAD; /* 0X428 */
1023 int PAD; /* 0X42C */
1024 int PAD; /* 0X430 */
1025 int PAD; /* 0X434 */
1026 int PAD; /* 0X438 */
1027 int PAD; /* 0X43C */
1028 int PAD; /* 0X440 */
1029 int PAD; /* 0X444 */
1030 int PAD; /* 0X448 */
1031 int PAD; /* 0X44C */
1032 int PAD; /* 0X450 */
1033 int PAD; /* 0X454 */
1034 int PAD; /* 0X458 */
1035 int PAD; /* 0X45C */
1036 int PAD; /* 0X460 */
1037 int PAD; /* 0X464 */
1038 int PAD; /* 0X468 */
1039 int PAD; /* 0X46C */
1040 int PAD; /* 0X470 */
1041 int PAD; /* 0X474 */
1042 int PAD; /* 0X478 */
1043 int PAD; /* 0X47C */
1044 int PAD; /* 0X480 */
1045 int PAD; /* 0X484 */
1046 int PAD; /* 0X488 */
1047 int PAD; /* 0X48C */
1048 int PAD; /* 0X490 */
1049 int PAD; /* 0X494 */
1050 int PAD; /* 0X498 */
1051 int PAD; /* 0X49C */
1052 int PAD; /* 0X4A0 */
1053 int PAD; /* 0X4A4 */
1054 int PAD; /* 0X4A8 */
1055 int PAD; /* 0X4AC */
1056 int PAD; /* 0X4B0 */
1057 int PAD; /* 0X4B4 */
1058 int PAD; /* 0X4B8 */
1059 int PAD; /* 0X4BC */
1060 int PAD; /* 0X4C0 */
1061 int PAD; /* 0X4C4 */
1062 int PAD; /* 0X4C8 */
1063 int PAD; /* 0X4CC */
1064 int PAD; /* 0X4D0 */
1065 int PAD; /* 0X4D4 */
1066 int PAD; /* 0X4D8 */
1067 int PAD; /* 0X4DC */
1068 int PAD; /* 0X4E0 */
1069 int PAD; /* 0X4E4 */
1070 int PAD; /* 0X4E8 */
1071 int PAD; /* 0X4EC */
1072 int PAD; /* 0X4F0 */
1073 int PAD; /* 0X4F4 */
1074 int PAD; /* 0X4F8 */
1075 int PAD; /* 0X4FC */
1076 int PAD; /* 0X500 */
1077 int PAD; /* 0X504 */
1078 int PAD; /* 0X508 */
1079 int PAD; /* 0X50C */
1080 int PAD; /* 0X510 */
1081 int PAD; /* 0X514 */
1082 int PAD; /* 0X518 */
1083 int PAD; /* 0X51C */
1084 int PAD; /* 0X520 */
1085 int PAD; /* 0X524 */
1086 int PAD; /* 0X528 */
1087 int PAD; /* 0X52C */
1088 int PAD; /* 0X530 */
1089 int PAD; /* 0X534 */
1090 int PAD; /* 0X538 */
1091 int PAD; /* 0X53C */
1092 int PAD; /* 0X540 */
1093 short PAD; /* 0X544 */
1094 short field_546; /* 0X546 */
1095 int PAD; /* 0X548 */
1096 int PAD; /* 0X54C */
1097 int PAD; /* 0X550 */
1098 int PAD; /* 0X554 */
1099 int PAD; /* 0X558 */
1100 int PAD; /* 0X55C */
1101 int PAD; /* 0X560 */
1102 int PAD; /* 0X564 */
1103 int PAD; /* 0X568 */
1104 int PAD; /* 0X56C */
1105 int PAD; /* 0X570 */
1106 int PAD; /* 0X574 */
1107 int PAD; /* 0X578 */
1108 int PAD; /* 0X57C */
1109 int PAD; /* 0X580 */
1110 int PAD; /* 0X584 */
1111 } __attribute__((packed));
1112  
1113 // Checked
1114 struct wlc_event_msg {
1115 uint16 flag1;
1116 uint16 flag2;
1117 uint32 event_type;
1118 uint32 status;
1119 uint32 reason;
1120 uint32 auth_type;
1121 uint32 datalen;
1122 int PAD;
1123 int PAD;
1124 int PAD;
1125 } __attribute__((packed));
1126  
1127 // Checked
1128 struct wlc_event {
1129 struct wlc_event_msg event;
1130 int PAD;
1131 int PAD;
1132 int PAD;
1133 int PAD;
1134 int PAD;
1135 void *data; /* 0x038 */
1136 int PAD;
1137 } __attribute__((packed));
1138  
1139 struct scb {
1140 int PAD;
1141 int PAD;
1142 int PAD;
1143 int PAD;
1144 void *bsscfg;
1145 } __attribute__((packed));
1146  
1147 struct hnddma_pub {
1148 void *di_fn; /* DMA function pointers */
1149 unsigned int txavail; /* # free tx descriptors */
1150 unsigned int dmactrlflags; /* dma control flags */
1151 /* rx error counters */
1152 unsigned int rxgiants; /* rx giant frames */
1153 unsigned int rxnobuf; /* rx out of dma descriptors */
1154 /* tx error counters */
1155 unsigned int txnobuf; /* tx out of dma descriptors */
1156 } __attribute__((packed));
1157  
1158 struct dma_info {
1159 struct hnddma_pub hnddma; /* exported structure */
1160 int msg_level; /* message level pointer */
1161 int something;
1162 char name[8]; /* callers name for diag msgs */
1163 void *osh;
1164 void *sih;
1165 bool dma64; /* this dma engine is operating in 64-bit mode */
1166 bool addrext; /* this dma engine supports DmaExtendedAddrChanges */
1167 char gap2[2];
1168 void *txregs; /* 64-bit dma tx engine registers */
1169 void *rxregs; /* 64-bit dma rx engine registers */
1170 void *txd; /* pointer to dma64 tx descriptor ring */
1171 void *rxd; /* pointer to dma64 rx descriptor ring */
1172 short dmadesc_align; /* alignment requirement for dma descriptors */
1173 short ntxd; /* # tx descriptors tunable */
1174 short txin; /* index of next descriptor to reclaim */
1175 short txout; /* index of next descriptor to post */
1176 void **txp; /* pointer to parallel array of pointers to packets */
1177 void *tx_dmah; /* DMA MAP meta-data handle */
1178 int txp_dmah;
1179 int txdpa; /* Aligned physical address of descriptor ring */
1180 int txdpaorig; /* Original physical address of descriptor ring */
1181 short txdalign; /* #bytes added to alloc'd mem to align txd */
1182 int txdalloc; /* #bytes allocated for the ring */
1183 int xmtptrbase; /* When using unaligned descriptors, the ptr register
1184 * is not just an index, it needs all 13 bits to be
1185 * an offset from the addr register.
1186 */
1187 short PAD;
1188 short nrxd;
1189 short rxin;
1190 short rxout;
1191 short PAD;
1192 void **rxp;
1193 int PAD;
1194 int PAD;
1195 int rxdpa;
1196 short rxdalign;
1197 short PAD;
1198 int PAD;
1199 int PAD;
1200 int PAD;
1201 int rxbufsize; /* rx buffer size in bytes, not including the extra headroom */
1202 int rxextrahdrroom; /* extra rx headroom. */
1203  
1204 } __attribute__((packed));
1205  
1206 struct intctrlregs {
1207 unsigned int intstatus;
1208 unsigned int intmask;
1209 };
1210  
1211 /* read: 32-bit register that can be read as 32-bit or as 2 16-bit
1212 * write: only low 16b-it half can be written
1213 */
1214 union pmqreg {
1215 unsigned int pmqhostdata; /* read only! */
1216 struct {
1217 unsigned short pmqctrlstatus; /* read/write */
1218 unsigned short PAD;
1219 } w;
1220 };
1221  
1222 /* dma registers per channel(xmt or rcv) */
1223 struct dma64regs {
1224 unsigned int control; /* enable, et al */
1225 unsigned int ptr; /* last descriptor posted to chip */
1226 unsigned int addrlow; /* desc ring base address low 32-bits (8K aligned) */
1227 unsigned int addrhigh; /* desc ring base address bits 63:32 (8K aligned) */
1228 unsigned int status0; /* current descriptor, xmt state */
1229 unsigned int status1; /* active descriptor, xmt error */
1230 };
1231  
1232 /* 4byte-wide pio register set per channel(xmt or rcv) */
1233 struct pio4regs {
1234 unsigned int fifocontrol;
1235 unsigned int fifodata;
1236 };
1237  
1238 struct fifo64 {
1239 struct dma64regs dmaxmt; /* dma tx */
1240 struct pio4regs piotx; /* pio tx */
1241 struct dma64regs dmarcv; /* dma rx */
1242 struct pio4regs piorx; /* pio rx */
1243 };
1244  
1245 struct dma32diag { /* diag access */
1246 unsigned int fifoaddr; /* diag address */
1247 unsigned int fifodatalow; /* low 32bits of data */
1248 unsigned int fifodatahigh; /* high 32bits of data */
1249 unsigned int pad; /* reserved */
1250 };
1251  
1252 /*
1253 * Host Interface Registers
1254 */
1255 struct d11regs {
1256 /* Device Control ("semi-standard host registers") */
1257 unsigned int PAD[3]; /* 0x0 - 0x8 */
1258 unsigned int biststatus; /* 0xC */
1259 unsigned int biststatus2; /* 0x10 */
1260 unsigned int PAD; /* 0x14 */
1261 unsigned int gptimer; /* 0x18 */
1262 unsigned int usectimer; /* 0x1c *//* for corerev >= 26 */
1263  
1264 /* Interrupt Control *//* 0x20 */
1265 struct intctrlregs intctrlregs[8];
1266  
1267 unsigned int PAD[40]; /* 0x60 - 0xFC */
1268  
1269 unsigned int intrcvlazy[4]; /* 0x100 - 0x10C */
1270  
1271 unsigned int PAD[4]; /* 0x110 - 0x11c */
1272  
1273 unsigned int maccontrol; /* 0x120 */
1274 unsigned int maccommand; /* 0x124 */
1275 unsigned int macintstatus; /* 0x128 */
1276 unsigned int macintmask; /* 0x12C */
1277  
1278 /* Transmit Template Access */
1279 unsigned int tplatewrptr; /* 0x130 */
1280 unsigned int tplatewrdata; /* 0x134 */
1281 unsigned int PAD[2]; /* 0x138 - 0x13C */
1282  
1283 /* PMQ registers */
1284 union pmqreg pmqreg; /* 0x140 */
1285 unsigned int pmqpatl; /* 0x144 */
1286 unsigned int pmqpath; /* 0x148 */
1287 unsigned int PAD; /* 0x14C */
1288  
1289 unsigned int chnstatus; /* 0x150 */
1290 unsigned int psmdebug; /* 0x154 */
1291 unsigned int phydebug; /* 0x158 */
1292 unsigned int machwcap; /* 0x15C */
1293  
1294 /* Extended Internal Objects */
1295 unsigned int objaddr; /* 0x160 */
1296 unsigned int objdata; /* 0x164 */
1297 unsigned int PAD[2]; /* 0x168 - 0x16c */
1298  
1299 unsigned int frmtxstatus; /* 0x170 */
1300 unsigned int frmtxstatus2; /* 0x174 */
1301 unsigned int PAD[2]; /* 0x178 - 0x17c */
1302  
1303 /* TSF host access */
1304 unsigned int tsf_timerlow; /* 0x180 */
1305 unsigned int tsf_timerhigh; /* 0x184 */
1306 unsigned int tsf_cfprep; /* 0x188 */
1307 unsigned int tsf_cfpstart; /* 0x18c */
1308 unsigned int tsf_cfpmaxdur32; /* 0x190 */
1309 unsigned int PAD[3]; /* 0x194 - 0x19c */
1310  
1311 unsigned int maccontrol1; /* 0x1a0 */
1312 unsigned int machwcap1; /* 0x1a4 */
1313 unsigned int PAD[14]; /* 0x1a8 - 0x1dc */
1314  
1315 /* Clock control and hardware workarounds*/
1316 unsigned int clk_ctl_st; /* 0x1e0 */
1317 unsigned int hw_war;
1318 unsigned int d11_phypllctl; /* the phypll request/avail bits are
1319 * moved to clk_ctl_st
1320 */
1321 unsigned int PAD[5]; /* 0x1ec - 0x1fc */
1322  
1323 /* 0x200-0x37F dma/pio registers */
1324 struct fifo64 fifo64regs[6];
1325  
1326 /* FIFO diagnostic port access */
1327 struct dma32diag dmafifo; /* 0x380 - 0x38C */
1328  
1329 unsigned int aggfifocnt; /* 0x390 */
1330 unsigned int aggfifodata; /* 0x394 */
1331 unsigned int PAD[16]; /* 0x398 - 0x3d4 */
1332 unsigned short radioregaddr; /* 0x3d8 */
1333 unsigned short radioregdata; /* 0x3da */
1334  
1335 /*
1336 * time delay between the change on rf disable input and
1337 * radio shutdown
1338 */
1339 unsigned int rfdisabledly; /* 0x3DC */
1340  
1341 /* PHY register access */
1342 unsigned short phyversion; /* 0x3e0 - 0x0 */
1343 unsigned short phybbconfig; /* 0x3e2 - 0x1 */
1344 unsigned short phyadcbias; /* 0x3e4 - 0x2 Bphy only */
1345 unsigned short phyanacore; /* 0x3e6 - 0x3 pwwrdwn on aphy */
1346 unsigned short phyrxstatus0; /* 0x3e8 - 0x4 */
1347 unsigned short phyrxstatus1; /* 0x3ea - 0x5 */
1348 unsigned short phycrsth; /* 0x3ec - 0x6 */
1349 unsigned short phytxerror; /* 0x3ee - 0x7 */
1350 unsigned short phychannel; /* 0x3f0 - 0x8 */
1351 unsigned short PAD[1]; /* 0x3f2 - 0x9 */
1352 unsigned short phytest; /* 0x3f4 - 0xa */
1353 unsigned short phy4waddr; /* 0x3f6 - 0xb */
1354 unsigned short phy4wdatahi; /* 0x3f8 - 0xc */
1355 unsigned short phy4wdatalo; /* 0x3fa - 0xd */
1356 unsigned short phyregaddr; /* 0x3fc - 0xe */
1357 unsigned short phyregdata; /* 0x3fe - 0xf */
1358  
1359 /* IHR *//* 0x400 - 0x7FE */
1360  
1361 /* RXE Block */
1362 unsigned short PAD; /* SPR_RXE_0x00 0x400 */
1363 unsigned short PAD; /* SPR_RXE_Copy_Offset 0x402 */
1364 unsigned short PAD; /* SPR_RXE_Copy_Length 0x404 */
1365 unsigned short rcv_fifo_ctl; /* SPR_RXE_FIFOCTL0 0x406 */
1366 unsigned short PAD; /* SPR_RXE_FIFOCTL1 0x408 */
1367 unsigned short rcv_frm_cnt; /* SPR_Received_Frame_Count 0x40a */
1368 unsigned short PAD; /* SPR_RXE_0x0c 0x40c */
1369 unsigned short PAD; /* SPR_RXE_RXHDR_OFFSET 0x40e */
1370 unsigned short PAD; /* SPR_RXE_RXHDR_LEN 0x410 */
1371 unsigned short PAD; /* SPR_RXE_PHYRXSTAT0 0x412 */
1372 unsigned short rssi; /* SPR_RXE_PHYRXSTAT1 0x414 */
1373 unsigned short PAD; /* SPR_RXE_0x16 0x416 */
1374 unsigned short PAD; /* SPR_RXE_FRAMELEN 0x418 */
1375 unsigned short PAD; /* SPR_RXE_0x1a 0x41a */
1376 unsigned short PAD; /* SPR_RXE_ENCODING 0x41c */
1377 unsigned short PAD; /* SPR_RXE_0x1e 0x41e */
1378 unsigned short rcm_ctl; /* SPR_RCM_Control 0x420 */
1379 unsigned short rcm_mat_data; /* SPR_RCM_Match_Data 0x422 */
1380 unsigned short rcm_mat_mask; /* SPR_RCM_Match_Mask 0x424 */
1381 unsigned short rcm_mat_dly; /* SPR_RCM_Match_Delay 0x426 */
1382 unsigned short rcm_cond_mask_l; /* SPR_RCM_Condition_Mask_Low 0x428 */
1383 unsigned short rcm_cond_mask_h; /* SPR_RCM_Condition_Mask_High 0x42A */
1384 unsigned short rcm_cond_dly; /* SPR_RCM_Condition_Delay 0x42C */
1385 unsigned short PAD; /* SPR_RXE_0x2e 0x42E */
1386 unsigned short ext_ihr_addr; /* SPR_Ext_IHR_Address 0x430 */
1387 unsigned short ext_ihr_data; /* SPR_Ext_IHR_Data 0x432 */
1388 unsigned short rxe_phyrs_2; /* SPR_RXE_PHYRXSTAT2 0x434 */
1389 unsigned short rxe_phyrs_3; /* SPR_RXE_PHYRXSTAT3 0x436 */
1390 unsigned short phy_mode; /* SPR_PHY_Mode 0x438 */
1391 unsigned short rcmta_ctl; /* SPR_RCM_TA_Control 0x43a */
1392 unsigned short rcmta_size; /* SPR_RCM_TA_Size 0x43c */
1393 unsigned short rcmta_addr0; /* SPR_RCM_TA_Address_0 0x43e */
1394 unsigned short rcmta_addr1; /* SPR_RCM_TA_Address_1 0x440 */
1395 unsigned short rcmta_addr2; /* SPR_RCM_TA_Address_2 0x442 */
1396 unsigned short PAD[30]; /* SPR_RXE_0x44 ... 0x7e 0x444 */
1397  
1398  
1399 /* PSM Block *//* 0x480 - 0x500 */
1400  
1401 unsigned short PAD; /* SPR_MAC_MAX_NAP 0x480 */
1402 unsigned short psm_maccontrol_h; /* SPR_MAC_CTLHI 0x482 */
1403 unsigned short psm_macintstatus_l; /* SPR_MAC_IRQLO 0x484 */
1404 unsigned short psm_macintstatus_h; /* SPR_MAC_IRQHI 0x486 */
1405 unsigned short psm_macintmask_l; /* SPR_MAC_IRQMASKLO 0x488 */
1406 unsigned short psm_macintmask_h; /* SPR_MAC_IRQMASKHI 0x48A */
1407 unsigned short PAD; /* SPR_PSM_0x0c 0x48C */
1408 unsigned short psm_maccommand; /* SPR_MAC_CMD 0x48E */
1409 unsigned short psm_brc; /* SPR_BRC 0x490 */
1410 unsigned short psm_phy_hdr_param; /* SPR_PHY_HDR_Parameter 0x492 */
1411 unsigned short psm_postcard; /* SPR_Postcard 0x494 */
1412 unsigned short psm_pcard_loc_l; /* SPR_Postcard_Location_Low 0x496 */
1413 unsigned short psm_pcard_loc_h; /* SPR_Postcard_Location_High 0x498 */
1414 unsigned short psm_gpio_in; /* SPR_GPIO_IN 0x49A */
1415 unsigned short psm_gpio_out; /* SPR_GPIO_OUT 0x49C */
1416 unsigned short psm_gpio_oe; /* SPR_GPIO_OUTEN 0x49E */
1417  
1418 unsigned short psm_bred_0; /* SPR_BRED0 0x4A0 */
1419 unsigned short psm_bred_1; /* SPR_BRED1 0x4A2 */
1420 unsigned short psm_bred_2; /* SPR_BRED2 0x4A4 */
1421 unsigned short psm_bred_3; /* SPR_BRED3 0x4A6 */
1422 unsigned short psm_brcl_0; /* SPR_BRCL0 0x4A8 */
1423 unsigned short psm_brcl_1; /* SPR_BRCL1 0x4AA */
1424 unsigned short psm_brcl_2; /* SPR_BRCL2 0x4AC */
1425 unsigned short psm_brcl_3; /* SPR_BRCL3 0x4AE */
1426 unsigned short psm_brpo_0; /* SPR_BRPO0 0x4B0 */
1427 unsigned short psm_brpo_1; /* SPR_BRPO1 0x4B2 */
1428 unsigned short psm_brpo_2; /* SPR_BRPO2 0x4B4 */
1429 unsigned short psm_brpo_3; /* SPR_BRPO3 0x4B6 */
1430 unsigned short psm_brwk_0; /* SPR_BRWK0 0x4B8 */
1431 unsigned short psm_brwk_1; /* SPR_BRWK1 0x4BA */
1432 unsigned short psm_brwk_2; /* SPR_BRWK2 0x4BC */
1433 unsigned short psm_brwk_3; /* SPR_BRWK3 0x4BE */
1434  
1435 unsigned short psm_base_0; /* SPR_BASE0 - Offset Register 0 0x4C0 */
1436 unsigned short psm_base_1; /* SPR_BASE1 - Offset Register 1 0x4C2 */
1437 unsigned short psm_base_2; /* SPR_BASE2 - Offset Register 2 0x4C4 */
1438 unsigned short psm_base_3; /* SPR_BASE3 - Offset Register 3 0x4C6 */
1439 unsigned short psm_base_4; /* SPR_BASE4 - Offset Register 4 0x4C8 */
1440 unsigned short psm_base_5; /* SPR_BASE5 - Offset Register 5 0x4CA */
1441 unsigned short psm_base_6; /* SPR_BASE6 - Do not use (broken) 0x4CC */
1442 unsigned short psm_pc_reg_0; /* SPR_PSM_0x4e 0x4CE */
1443 unsigned short psm_pc_reg_1; /* SPR_PC0 - Link Register 0 0x4D0 */
1444 unsigned short psm_pc_reg_2; /* SPR_PC1 - Link Register 1 0x4D2 */
1445 unsigned short psm_pc_reg_3; /* SPR_PC2 - Link Register 2 0x4D4 */
1446 unsigned short PAD; /* SPR_PC2 - Link Register 6 0x4D6 */
1447 unsigned short PAD; /* SPR_PSM_COND - PSM external condition bits 0x4D8 */
1448 unsigned short PAD; /* SPR_PSM_0x5a ... 0x7e 0x4DA */
1449 unsigned short PAD; /* SPR_PSM_0x5c 0x4DC */
1450 unsigned short PAD; /* SPR_PSM_0x5e 0x4DE */
1451 unsigned short PAD; /* SPR_PSM_0x60 0x4E0 */
1452 unsigned short PAD; /* SPR_PSM_0x62 0x4E2 */
1453 unsigned short PAD; /* SPR_PSM_0x64 0x4E4 */
1454 unsigned short PAD; /* SPR_PSM_0x66 0x4E6 */
1455 unsigned short PAD; /* SPR_PSM_0x68 0x4E8 */
1456 unsigned short PAD; /* SPR_PSM_0x6a 0x4EA */
1457 unsigned short PAD; /* SPR_PSM_0x6c 0x4EC */
1458 unsigned short PAD; /* SPR_PSM_0x6e 0x4EE */
1459 unsigned short psm_corectlsts; /* SPR_PSM_0x70 0x4F0 *//* Corerev >= 13 */
1460 unsigned short PAD; /* SPR_PSM_0x72 0x4F2 */
1461 unsigned short PAD; /* SPR_PSM_0x74 0x4F4 */
1462 unsigned short PAD; /* SPR_PSM_0x76 0x4F6 */
1463 unsigned short PAD; /* SPR_PSM_0x78 0x4F8 */
1464 unsigned short PAD; /* SPR_PSM_0x7a 0x4FA */
1465 unsigned short PAD; /* SPR_PSM_0x7c 0x4FC */
1466 unsigned short PAD; /* SPR_PSM_0x7e 0x4FE */
1467  
1468 /* TXE0 Block *//* 0x500 - 0x580 */
1469 unsigned short txe_ctl; /* SPR_TXE0_CTL 0x500 */
1470 unsigned short txe_aux; /* SPR_TXE0_AUX 0x502 */
1471 unsigned short txe_ts_loc; /* SPR_TXE0_TS_LOC 0x504 */
1472 unsigned short txe_time_out; /* SPR_TXE0_TIMEOUT 0x506 */
1473 unsigned short txe_wm_0; /* SPR_TXE0_WM0 0x508 */
1474 unsigned short txe_wm_1; /* SPR_TXE0_WM1 0x50A */
1475 unsigned short txe_phyctl; /* SPR_TXE0_PHY_CTL 0x50C */
1476 unsigned short txe_status; /* SPR_TXE0_STATUS 0x50E */
1477 unsigned short txe_mmplcp0; /* SPR_TXE0_0x10 0x510 */
1478 unsigned short txe_mmplcp1; /* SPR_TXE0_0x12 0x512 */
1479 unsigned short txe_phyctl1; /* SPR_TXE0_0x14 0x514 */
1480  
1481 unsigned short PAD; /* SPR_TXE0_0x16 0x516 */
1482 unsigned short PAD; /* SPR_TX_STATUS0 0x518 */
1483 unsigned short PAD; /* SPR_TX_STATUS1 0x51a */
1484 unsigned short PAD; /* SPR_TX_STATUS2 0x51c */
1485 unsigned short PAD; /* SPR_TX_STATUS3 0x51e */
1486  
1487 /* Transmit control */
1488 unsigned short xmtfifodef; /* SPR_TXE0_FIFO_Def 0x520 */
1489 unsigned short xmtfifo_frame_cnt; /* SPR_TXE0_0x22 0x522 *//* Corerev >= 16 */
1490 unsigned short xmtfifo_byte_cnt; /* SPR_TXE0_0x24 0x524 *//* Corerev >= 16 */
1491 unsigned short xmtfifo_head; /* SPR_TXE0_0x26 0x526 *//* Corerev >= 16 */
1492 unsigned short xmtfifo_rd_ptr; /* SPR_TXE0_0x28 0x528 *//* Corerev >= 16 */
1493 unsigned short xmtfifo_wr_ptr; /* SPR_TXE0_0x2a 0x52A *//* Corerev >= 16 */
1494 unsigned short xmtfifodef1; /* SPR_TXE0_0x2c 0x52C *//* Corerev >= 16 */
1495  
1496 unsigned short PAD; /* SPR_TXE0_0x2e 0x52E */
1497 unsigned short PAD; /* SPR_TXE0_0x30 0x530 */
1498 unsigned short PAD; /* SPR_TXE0_0x32 0x532 */
1499 unsigned short PAD; /* SPR_TXE0_0x34 0x534 */
1500 unsigned short PAD; /* SPR_TXE0_0x36 0x536 */
1501 unsigned short PAD; /* SPR_TXE0_0x38 0x538 */
1502 unsigned short PAD; /* SPR_TXE0_0x3a 0x53A */
1503 unsigned short PAD; /* SPR_TXE0_0x3c 0x53C */
1504 unsigned short PAD; /* SPR_TXE0_0x3e 0x53E */
1505  
1506 unsigned short xmtfifocmd; /* SPR_TXE0_FIFO_CMD 0x540 */
1507 unsigned short xmtfifoflush; /* SPR_TXE0_FIFO_FLUSH 0x542 */
1508 unsigned short xmtfifothresh; /* SPR_TXE0_FIFO_THRES 0x544 */
1509 unsigned short xmtfifordy; /* SPR_TXE0_FIFO_RDY 0x546 */
1510 unsigned short xmtfifoprirdy; /* SPR_TXE0_FIFO_PRI_RDY 0x548 */
1511 unsigned short xmtfiforqpri; /* SPR_TXE0_FIFO_RQ_PRI 0x54A */
1512 unsigned short xmttplatetxptr; /* SPR_TXE0_Template_TX_Pointer 0x54C */
1513 unsigned short PAD; /* SPR_TXE0_0x4e 0x54E */
1514 unsigned short xmttplateptr; /* SPR_TXE0_Template_Pointer 0x550 */
1515 unsigned short smpl_clct_strptr; /* SPR_TXE0_0x52 0x552 *//* Corerev >= 22 */
1516 unsigned short smpl_clct_stpptr; /* SPR_TXE0_0x54 0x554 *//* Corerev >= 22 */
1517 unsigned short smpl_clct_curptr; /* SPR_TXE0_0x56 0x556 *//* Corerev >= 22 */
1518 unsigned short PAD; /* SPR_TXE0_0x58 0x558 */
1519 unsigned short PAD; /* SPR_TXE0_0x5a 0x55A */
1520 unsigned short PAD; /* SPR_TXE0_0x5c 0x55C */
1521 unsigned short PAD; /* SPR_TXE0_0x5e 0x55E */
1522 unsigned short xmttplatedatalo; /* SPR_TXE0_Template_Data_Low 0x560 */
1523 unsigned short xmttplatedatahi; /* SPR_TXE0_Template_Data_High 0x562 */
1524  
1525 unsigned short PAD; /* SPR_TXE0_0x64 0x564 */
1526 unsigned short PAD; /* SPR_TXE0_0x66 0x566 */
1527  
1528 unsigned short xmtsel; /* SPR_TXE0_SELECT 0x568 */
1529 unsigned short xmttxcnt; /* 0x56A */
1530 unsigned short xmttxshmaddr; /* 0x56C */
1531  
1532 unsigned short PAD[0x09]; /* 0x56E - 0x57E */
1533  
1534 /* TXE1 Block */
1535 unsigned short PAD[0x40]; /* 0x580 - 0x5FE */
1536  
1537 /* TSF Block */
1538 unsigned short PAD[0X02]; /* 0x600 - 0x602 */
1539 unsigned short tsf_cfpstrt_l; /* 0x604 */
1540 unsigned short tsf_cfpstrt_h; /* 0x606 */
1541 unsigned short PAD[0X05]; /* 0x608 - 0x610 */
1542 unsigned short tsf_cfppretbtt; /* 0x612 */
1543 unsigned short PAD[0XD]; /* 0x614 - 0x62C */
1544 unsigned short tsf_clk_frac_l; /* 0x62E */
1545 unsigned short tsf_clk_frac_h; /* 0x630 */
1546 unsigned short PAD[0X14]; /* 0x632 - 0x658 */
1547 unsigned short tsf_random; /* 0x65A */
1548 unsigned short PAD[0x05]; /* 0x65C - 0x664 */
1549 /* GPTimer 2 registers */
1550 unsigned short tsf_gpt2_stat; /* 0x666 */
1551 unsigned short tsf_gpt2_ctr_l; /* 0x668 */
1552 unsigned short tsf_gpt2_ctr_h; /* 0x66A */
1553 unsigned short tsf_gpt2_val_l; /* 0x66C */
1554 unsigned short tsf_gpt2_val_h; /* 0x66E */
1555 unsigned short tsf_gptall_stat; /* 0x670 */
1556 unsigned short PAD[0x07]; /* 0x672 - 0x67E */
1557  
1558 /* IFS Block */
1559 unsigned short ifs_sifs_rx_tx_tx; /* 0x680 */
1560 unsigned short ifs_sifs_nav_tx; /* 0x682 */
1561 unsigned short ifs_slot; /* 0x684 */
1562 unsigned short PAD; /* 0x686 */
1563 unsigned short ifs_ctl; /* 0x688 */
1564 unsigned short PAD[0x3]; /* 0x68a - 0x68F */
1565 unsigned short ifsstat; /* 0x690 */
1566 unsigned short ifsmedbusyctl; /* 0x692 */
1567 unsigned short iftxdur; /* 0x694 */
1568 unsigned short PAD[0x3]; /* 0x696 - 0x69b */
1569 /* EDCF support in dot11macs */
1570 unsigned short ifs_aifsn; /* 0x69c */
1571 unsigned short ifs_ctl1; /* 0x69e */
1572  
1573 /* slow clock registers */
1574 unsigned short scc_ctl; /* 0x6a0 */
1575 unsigned short scc_timer_l; /* 0x6a2 */
1576 unsigned short scc_timer_h; /* 0x6a4 */
1577 unsigned short scc_frac; /* 0x6a6 */
1578 unsigned short scc_fastpwrup_dly; /* 0x6a8 */
1579 unsigned short scc_per; /* 0x6aa */
1580 unsigned short scc_per_frac; /* 0x6ac */
1581 unsigned short scc_cal_timer_l; /* 0x6ae */
1582 unsigned short scc_cal_timer_h; /* 0x6b0 */
1583 unsigned short PAD; /* 0x6b2 */
1584  
1585 unsigned short PAD[0x26];
1586  
1587 /* NAV Block */
1588 unsigned short nav_ctl; /* 0x700 */
1589 unsigned short navstat; /* 0x702 */
1590 unsigned short PAD[0x3e]; /* 0x702 - 0x77E */
1591  
1592 /* WEP/PMQ Block *//* 0x780 - 0x7FE */
1593 unsigned short PAD[0x20]; /* 0x780 - 0x7BE */
1594  
1595 unsigned short wepctl; /* 0x7C0 */
1596 unsigned short wepivloc; /* 0x7C2 */
1597 unsigned short wepivkey; /* 0x7C4 */
1598 unsigned short wepwkey; /* 0x7C6 */
1599  
1600 unsigned short PAD[4]; /* 0x7C8 - 0x7CE */
1601 unsigned short pcmctl; /* 0X7D0 */
1602 unsigned short pcmstat; /* 0X7D2 */
1603 unsigned short PAD[6]; /* 0x7D4 - 0x7DE */
1604  
1605 unsigned short pmqctl; /* 0x7E0 */
1606 unsigned short pmqstatus; /* 0x7E2 */
1607 unsigned short pmqpat0; /* 0x7E4 */
1608 unsigned short pmqpat1; /* 0x7E6 */
1609 unsigned short pmqpat2; /* 0x7E8 */
1610  
1611 unsigned short pmqdat; /* 0x7EA */
1612 unsigned short pmqdator; /* 0x7EC */
1613 unsigned short pmqhst; /* 0x7EE */
1614 unsigned short pmqpath0; /* 0x7F0 */
1615 unsigned short pmqpath1; /* 0x7F2 */
1616 unsigned short pmqpath2; /* 0x7F4 */
1617 unsigned short pmqdath; /* 0x7F6 */
1618  
1619 unsigned short PAD[0x04]; /* 0x7F8 - 0x7FE */
1620  
1621 /* SHM *//* 0x800 - 0xEFE */
1622 unsigned short PAD[0x380]; /* 0x800 - 0xEFE */
1623 } __attribute__((packed));
1624  
1625 /*== maccontrol register ==*/
1626 #define MCTL_GMODE (1U << 31)
1627 #define MCTL_DISCARD_PMQ (1 << 30)
1628 #define MCTL_WAKE (1 << 26)
1629 #define MCTL_HPS (1 << 25)
1630 #define MCTL_PROMISC (1 << 24)
1631 #define MCTL_KEEPBADFCS (1 << 23)
1632 #define MCTL_KEEPCONTROL (1 << 22)
1633 #define MCTL_PHYLOCK (1 << 21)
1634 #define MCTL_BCNS_PROMISC (1 << 20)
1635 #define MCTL_LOCK_RADIO (1 << 19)
1636 #define MCTL_AP (1 << 18)
1637 #define MCTL_INFRA (1 << 17)
1638 #define MCTL_BIGEND (1 << 16)
1639 #define MCTL_GPOUT_SEL_MASK (3 << 14)
1640 #define MCTL_GPOUT_SEL_SHIFT 14
1641 #define MCTL_EN_PSMDBG (1 << 13)
1642 #define MCTL_IHR_EN (1 << 10)
1643 #define MCTL_SHM_UPPER (1 << 9)
1644 #define MCTL_SHM_EN (1 << 8)
1645 #define MCTL_PSM_JMP_0 (1 << 2)
1646 #define MCTL_PSM_RUN (1 << 1)
1647 #define MCTL_EN_MAC (1 << 0)
1648  
1649  
1650 struct ethernet_header {
1651 uint8 dst[6];
1652 uint8 src[6];
1653 uint16 type;
1654 } __attribute__((packed));
1655  
1656 struct ipv6_header {
1657 uint32 version_traffic_class_flow_label;
1658 uint16 payload_length;
1659 uint8 next_header;
1660 uint8 hop_limit;
1661 uint8 src_ip[16];
1662 uint8 dst_ip[16];
1663 } __attribute__((packed));
1664  
1665 struct ip_header {
1666 uint8 version_ihl;
1667 uint8 dscp_ecn;
1668 uint16 total_length;
1669 uint16 identification;
1670 uint16 flags_fragment_offset;
1671 uint8 ttl;
1672 uint8 protocol;
1673 uint16 header_checksum;
1674 union {
1675 uint32 integer;
1676 uint8 array[4];
1677 } src_ip;
1678 union {
1679 uint32 integer;
1680 uint8 array[4];
1681 } dst_ip;
1682 } __attribute__((packed));
1683  
1684 struct udp_header {
1685 uint16 src_port;
1686 uint16 dst_port;
1687 union {
1688 uint16 length; /* UDP: length of UDP header and payload */
1689 uint16 checksum_coverage; /* UDPLITE: checksum_coverage */
1690 } len_chk_cov;
1691 uint16 checksum;
1692 } __attribute__((packed));
1693  
1694 struct ethernet_ip_udp_header {
1695 struct ethernet_header ethernet;
1696 struct ip_header ip;
1697 struct udp_header udp;
1698 } __attribute__((packed));
1699  
1700 typedef void (*to_fun_t)(void *arg);
1701  
1702 typedef struct _ctimeout {
1703 struct _ctimeout *next;
1704 uint32 ms;
1705 to_fun_t fun;
1706 void *arg;
1707 bool expired;
1708 } ctimeout_t;
1709  
1710  
1711 struct hndrte_timer
1712 {
1713 uint32 *context; /* first field so address of context is timer struct ptr */
1714 void *data;
1715 void (*mainfn)(struct hndrte_timer *);
1716 void (*auxfn)(void *context);
1717 ctimeout_t t;
1718 int interval;
1719 int set;
1720 int periodic;
1721 bool _freedone;
1722 } __attribute__((packed));
1723  
1724 /*
1725 struct bdc_ethernet_ip_udp_header {
1726 struct bdc_header bdc;
1727 struct ethernet_header ethernet;
1728 struct ip_header ip;
1729 struct udp_header udp;
1730 } __attribute__((packed));
1731  
1732 struct bdc_ethernet_ipv6_udp_header {
1733 struct bdc_header bdc;
1734 struct ethernet_header ethernet;
1735 struct ipv6_header ipv6;
1736 struct udp_header udp;
1737 uint8 payload[1];
1738 } __attribute__((packed));
1739 */
1740  
1741 struct nexmon_header {
1742 uint32 hooked_fct;
1743 uint32 args[3];
1744 uint8 payload[1];
1745 } __attribute__((packed));
1746  
1747 #endif /*STRUCTS_COMMON_H */