1dd1de37lin wang - Sun Microsystems - Beijing China/*
2c0c9348lin wang - Sun Microsystems - Beijing China * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3dd1de37lin wang - Sun Microsystems - Beijing China * Use is subject to license terms.
4dd1de37lin wang - Sun Microsystems - Beijing China */
5dd1de37lin wang - Sun Microsystems - Beijing China
6dd1de37lin wang - Sun Microsystems - Beijing China/*
7dd1de37lin wang - Sun Microsystems - Beijing China * Copyright (c) 2008 Atheros Communications Inc.
8dd1de37lin wang - Sun Microsystems - Beijing China *
9dd1de37lin wang - Sun Microsystems - Beijing China * Permission to use, copy, modify, and/or distribute this software for any
10dd1de37lin wang - Sun Microsystems - Beijing China * purpose with or without fee is hereby granted, provided that the above
11dd1de37lin wang - Sun Microsystems - Beijing China * copyright notice and this permission notice appear in all copies.
12dd1de37lin wang - Sun Microsystems - Beijing China *
13dd1de37lin wang - Sun Microsystems - Beijing China * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14dd1de37lin wang - Sun Microsystems - Beijing China * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15dd1de37lin wang - Sun Microsystems - Beijing China * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16dd1de37lin wang - Sun Microsystems - Beijing China * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17dd1de37lin wang - Sun Microsystems - Beijing China * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18dd1de37lin wang - Sun Microsystems - Beijing China * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19dd1de37lin wang - Sun Microsystems - Beijing China * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20dd1de37lin wang - Sun Microsystems - Beijing China */
21dd1de37lin wang - Sun Microsystems - Beijing China
22dd1de37lin wang - Sun Microsystems - Beijing China#ifndef	_ARN_HW_H
23dd1de37lin wang - Sun Microsystems - Beijing China#define	_ARN_HW_H
24dd1de37lin wang - Sun Microsystems - Beijing China
25dd1de37lin wang - Sun Microsystems - Beijing China#ifdef __cplusplus
26dd1de37lin wang - Sun Microsystems - Beijing Chinaextern "C" {
27dd1de37lin wang - Sun Microsystems - Beijing China#endif
28dd1de37lin wang - Sun Microsystems - Beijing China
29dd1de37lin wang - Sun Microsystems - Beijing China#pragma pack(1)
30dd1de37lin wang - Sun Microsystems - Beijing Chinastruct ar5416_desc {
31dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ds_link;
32dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ds_data;
33dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ds_ctl0;
34dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ds_ctl1;
35dd1de37lin wang - Sun Microsystems - Beijing China	union {
36dd1de37lin wang - Sun Microsystems - Beijing China		struct {
37dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl2;
38dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl3;
39dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl4;
40dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl5;
41dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl6;
42dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl7;
43dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl8;
44dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl9;
45dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl10;
46dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t ctl11;
47dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status0;
48dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status1;
49dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status2;
50dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status3;
51dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status4;
52dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status5;
53dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status6;
54dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status7;
55dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status8;
56dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status9;
57dd1de37lin wang - Sun Microsystems - Beijing China		} tx;
58dd1de37lin wang - Sun Microsystems - Beijing China		struct {
59dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status0;
60dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status1;
61dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status2;
62dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status3;
63dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status4;
64dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status5;
65dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status6;
66dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status7;
67dd1de37lin wang - Sun Microsystems - Beijing China			uint32_t status8;
68dd1de37lin wang - Sun Microsystems - Beijing China		} rx;
69dd1de37lin wang - Sun Microsystems - Beijing China	} u;
70dd1de37lin wang - Sun Microsystems - Beijing China};
71dd1de37lin wang - Sun Microsystems - Beijing China#pragma pack()
72dd1de37lin wang - Sun Microsystems - Beijing China
73dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416DESC(_ds)		((struct ar5416_desc *)(_ds))
74dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416DESC_CONST(_ds)	((const struct ar5416_desc *)(_ds))
75dd1de37lin wang - Sun Microsystems - Beijing China
76dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl2		u.tx.ctl2
77dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl3		u.tx.ctl3
78dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl4		u.tx.ctl4
79dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl5		u.tx.ctl5
80dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl6		u.tx.ctl6
81dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl7		u.tx.ctl7
82dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl8		u.tx.ctl8
83dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl9		u.tx.ctl9
84dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl10	u.tx.ctl10
85dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_ctl11	u.tx.ctl11
86dd1de37lin wang - Sun Microsystems - Beijing China
87dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus0	u.tx.status0
88dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus1	u.tx.status1
89dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus2	u.tx.status2
90dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus3	u.tx.status3
91dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus4	u.tx.status4
92dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus5	u.tx.status5
93dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus6	u.tx.status6
94dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus7	u.tx.status7
95dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus8	u.tx.status8
96dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_txstatus9	u.tx.status9
97dd1de37lin wang - Sun Microsystems - Beijing China
98dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus0	u.rx.status0
99dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus1	u.rx.status1
100dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus2	u.rx.status2
101dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus3	u.rx.status3
102dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus4	u.rx.status4
103dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus5	u.rx.status5
104dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus6	u.rx.status6
105dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus7	u.rx.status7
106dd1de37lin wang - Sun Microsystems - Beijing China#define	ds_rxstatus8	u.rx.status8
107dd1de37lin wang - Sun Microsystems - Beijing China
108dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_FrameLen	0x00000fff
109dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_VirtMoreFrag	0x00001000
110dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxCtlRsvd00	0x0000e000
111dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitPower	0x003f0000
112dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitPower_S	16
113dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSEnable	0x00400000
114dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_VEOL		0x00800000
115dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ClrDestMask	0x01000000
116dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxCtlRsvd01	0x1e000000
117dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxIntrReq	0x20000000
118dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DestIdxValid	0x40000000
119dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_CTSEnable	0x80000000
120dd1de37lin wang - Sun Microsystems - Beijing China
121dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_BufLen		0x00000fff
122dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxMore		0x00001000
123dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DestIdx		0x000fe000
124dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DestIdx_S		13
125dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_FrameType		0x00f00000
126dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_FrameType_S		20
127dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_NoAck		0x01000000
128dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_InsertTS		0x02000000
129dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_CorruptFCS		0x04000000
130dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ExtOnly		0x08000000
131dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ExtAndCtl		0x10000000
132dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_MoreAggr		0x20000000
133dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_IsAggr		0x40000000
134dd1de37lin wang - Sun Microsystems - Beijing China
135dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_BurstDur		0x00007fff
136dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_BurstDur_S		0
137dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DurUpdateEna		0x00008000
138dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries0	0x000f0000
139dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries0_S	16
140dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries1	0x00f00000
141dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries1_S	20
142dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries2	0x0f000000
143dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries2_S	24
144dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries3	0xf0000000
145dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitDataTries3_S	28
146dd1de37lin wang - Sun Microsystems - Beijing China
147dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate0		0x000000ff
148dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate0_S		0
149dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate1		0x0000ff00
150dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate1_S		8
151dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate2		0x00ff0000
152dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate2_S		16
153dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate3		0xff000000
154dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_XmitRate3_S		24
155dd1de37lin wang - Sun Microsystems - Beijing China
156dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur0		0x00007fff
157dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur0_S		0
158dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSCTSQual0		0x00008000
159dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur1		0x7fff0000
160dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur1_S		16
161dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSCTSQual1		0x80000000
162dd1de37lin wang - Sun Microsystems - Beijing China
163dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur2		0x00007fff
164dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur2_S		0
165dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSCTSQual2		0x00008000
166dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur3		0x7fff0000
167dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PacketDur3_S		16
168dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSCTSQual3		0x80000000
169dd1de37lin wang - Sun Microsystems - Beijing China
170dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_AggrLen		0x0000ffff
171dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_AggrLen_S		0
172dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxCtlRsvd60		0x00030000
173dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PadDelim		0x03fc0000
174dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PadDelim_S		18
175dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_EncrType		0x0c000000
176dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_EncrType_S		26
177dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxCtlRsvd61		0xf0000000
178dd1de37lin wang - Sun Microsystems - Beijing China
179dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_2040_0		0x00000001
180dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_GI0			0x00000002
181dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel0		0x0000001c
182dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel0_S		2
183dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_2040_1		0x00000020
184dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_GI1			0x00000040
185dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel1		0x00000380
186dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel1_S		7
187dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_2040_2		0x00000400
188dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_GI2			0x00000800
189dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel2		0x00007000
190dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel2_S		12
191dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_2040_3		0x00008000
192dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_GI3			0x00010000
193dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel3		0x000e0000
194dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ChainSel3_S		17
195dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSCTSRate		0x0ff00000
196dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSCTSRate_S		20
197dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxCtlRsvd70		0xf0000000
198dd1de37lin wang - Sun Microsystems - Beijing China
199dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt00		0x000000ff
200dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt00_S	0
201dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt01		0x0000ff00
202dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt01_S	8
203dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt02		0x00ff0000
204dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt02_S	16
205dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxStatusRsvd00	0x3f000000
206dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxBaStatus		0x40000000
207dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxStatusRsvd01	0x80000000
208dd1de37lin wang - Sun Microsystems - Beijing China
209dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_FrmXmitOK		0x00000001
210dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_ExcessiveRetries	0x00000002
211dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_FIFOUnderrun		0x00000004
212dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_Filtered		0x00000008
213dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSFailCnt		0x000000f0
214dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RTSFailCnt_S		4
215dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DataFailCnt		0x00000f00
216dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DataFailCnt_S	8
217dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_VirtRetryCnt		0x0000f000
218dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_VirtRetryCnt_S	12
219dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxDelimUnderrun	0x00010000
220dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxDataUnderrun	0x00020000
221dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DescCfgErr		0x00040000
222dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxTimerExpired	0x00080000
223dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxStatusRsvd10	0xfff00000
224dd1de37lin wang - Sun Microsystems - Beijing China
225dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_SendTimestamp	ds_txstatus2
226dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_BaBitmapLow		ds_txstatus3
227dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_BaBitmapHigh		ds_txstatus4
228dd1de37lin wang - Sun Microsystems - Beijing China
229dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt10		0x000000ff
230dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt10_S	0
231dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt11		0x0000ff00
232dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt11_S	8
233dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt12		0x00ff0000
234dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSIAnt12_S	16
235dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSICombined	0xff000000
236dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxRSSICombined_S	24
237dd1de37lin wang - Sun Microsystems - Beijing China
238dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxEVM0		ds_txstatus5
239dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxEVM1		ds_txstatus6
240dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxEVM2		ds_txstatus7
241dd1de37lin wang - Sun Microsystems - Beijing China
242dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxDone		0x00000001
243dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_SeqNum		0x00001ffe
244dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_SeqNum_S		1
245dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxStatusRsvd80	0x0001e000
246dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxOpExceeded		0x00020000
247dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxStatusRsvd81	0x001c0000
248dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_FinalTxIdx		0x00600000
249dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_FinalTxIdx_S		21
250dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxStatusRsvd82	0x01800000
251dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PowerMgmt		0x02000000
252dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_TxStatusRsvd83	0xfc000000
253dd1de37lin wang - Sun Microsystems - Beijing China
254dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxCTLRsvd00		0xffffffff
255dd1de37lin wang - Sun Microsystems - Beijing China
256dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_BufLen		0x00000fff
257dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxCtlRsvd00		0x00001000
258dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxIntrReq		0x00002000
259dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxCtlRsvd01		0xffffc000
260dd1de37lin wang - Sun Microsystems - Beijing China
261dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt00		0x000000ff
262dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt00_S	0
263dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt01		0x0000ff00
264dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt01_S	8
265dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt02		0x00ff0000
266dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt02_S	16
267dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRate		0xff000000
268dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRate_S		24
269dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxStatusRsvd00	0xff000000
270dd1de37lin wang - Sun Microsystems - Beijing China
271dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DataLen		0x00000fff
272dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxMore		0x00001000
273dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_NumDelim		0x003fc000
274dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_NumDelim_S		14
275dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxStatusRsvd10	0xff800000
276dd1de37lin wang - Sun Microsystems - Beijing China
277dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RcvTimestamp		ds_rxstatus2
278dd1de37lin wang - Sun Microsystems - Beijing China
279dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_GI			0x00000001
280dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_2040			0x00000002
281dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_Parallel40		0x00000004
282dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_Parallel40_S		2
283dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxStatusRsvd30	0x000000f8
284dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxAntenna		0xffffff00
285dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxAntenna_S		8
286dd1de37lin wang - Sun Microsystems - Beijing China
287dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt10		0x000000ff
288dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt10_S	0
289dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt11		0x0000ff00
290dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt11_S	8
291dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt12		0x00ff0000
292dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSIAnt12_S	16
293dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSICombined	0xff000000
294dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxRSSICombined_S	24
295dd1de37lin wang - Sun Microsystems - Beijing China
296dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxEVM0		ds_rxstatus4
297dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxEVM1		ds_rxstatus5
298dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxEVM2		ds_rxstatus6
299dd1de37lin wang - Sun Microsystems - Beijing China
300dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxDone		0x00000001
301dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxFrameOK		0x00000002
302dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_CRCErr		0x00000004
303dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DecryptCRCErr	0x00000008
304dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PHYErr		0x00000010
305dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_MichaelErr		0x00000020
306dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PreDelimCRCErr	0x00000040
307dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxStatusRsvd70	0x00000080
308dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxKeyIdxValid	0x00000100
309dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_KeyIdx		0x0000fe00
310dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_KeyIdx_S		9
311dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PHYErrCode		0x0000ff00
312dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PHYErrCode_S		8
313dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxMoreAggr		0x00010000
314dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxAggr		0x00020000
315dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_PostDelimCRCErr	0x00040000
316dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_RxStatusRsvd71	0x3ff80000
317dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_DecryptBusyErr	0x40000000
318dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_KeyMiss		0x80000000
319dd1de37lin wang - Sun Microsystems - Beijing China
320dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_MAGIC	0x19641014
321dd1de37lin wang - Sun Microsystems - Beijing China
322dd1de37lin wang - Sun Microsystems - Beijing China#define	RXSTATUS_RATE(ah, ads)	(AR_SREV_5416_V20_OR_LATER(ah) ?	\
323dd1de37lin wang - Sun Microsystems - Beijing China	MS(ads->ds_rxstatus0, AR_RxRate) :				\
324dd1de37lin wang - Sun Microsystems - Beijing China	(ads->ds_rxstatus3 >> 2) & 0xFF)
325dd1de37lin wang - Sun Microsystems - Beijing China
326dd1de37lin wang - Sun Microsystems - Beijing China#define	set11nTries(_series, _index)	\
327dd1de37lin wang - Sun Microsystems - Beijing China	(SM((_series)[_index].Tries, AR_XmitDataTries##_index))
328dd1de37lin wang - Sun Microsystems - Beijing China
329dd1de37lin wang - Sun Microsystems - Beijing China#define	set11nRate(_series, _index)	\
330dd1de37lin wang - Sun Microsystems - Beijing China	(SM((_series)[_index].Rate, AR_XmitRate##_index))
331dd1de37lin wang - Sun Microsystems - Beijing China
332dd1de37lin wang - Sun Microsystems - Beijing China#define	set11nPktDurRTSCTS(_series, _index)				\
333dd1de37lin wang - Sun Microsystems - Beijing China	(SM((_series)[_index].PktDuration, AR_PacketDur##_index) |	\
334dd1de37lin wang - Sun Microsystems - Beijing China	((_series)[_index].RateFlags & ATH9K_RATESERIES_RTS_CTS   ?	\
335dd1de37lin wang - Sun Microsystems - Beijing China	    AR_RTSCTSQual##_index : 0))
336dd1de37lin wang - Sun Microsystems - Beijing China
337dd1de37lin wang - Sun Microsystems - Beijing China#define	set11nRateFlags(_series, _index)				\
338dd1de37lin wang - Sun Microsystems - Beijing China	(((_series)[_index].RateFlags & ATH9K_RATESERIES_2040 ?		\
339dd1de37lin wang - Sun Microsystems - Beijing China	    AR_2040_##_index : 0)					\
340dd1de37lin wang - Sun Microsystems - Beijing China	|((_series)[_index].RateFlags & ATH9K_RATESERIES_HALFGI ?	\
341dd1de37lin wang - Sun Microsystems - Beijing China	    AR_GI##_index : 0)						\
342dd1de37lin wang - Sun Microsystems - Beijing China	|SM((_series)[_index].ChSel, AR_ChainSel##_index))
343dd1de37lin wang - Sun Microsystems - Beijing China
344dd1de37lin wang - Sun Microsystems - Beijing China#define	AR_SREV_9100(ah)	((ah->ah_macVersion) == AR_SREV_VERSION_9100)
345dd1de37lin wang - Sun Microsystems - Beijing China
346dd1de37lin wang - Sun Microsystems - Beijing China#define	INIT_CONFIG_STATUS	0x00000000
347dd1de37lin wang - Sun Microsystems - Beijing China#define	INIT_RSSI_THR		0x00000700
348dd1de37lin wang - Sun Microsystems - Beijing China#define	INIT_BCON_CNTRL_REG	0x00000000
349dd1de37lin wang - Sun Microsystems - Beijing China
350dd1de37lin wang - Sun Microsystems - Beijing China#define	MIN_TX_FIFO_THRESHOLD	0x1
351dd1de37lin wang - Sun Microsystems - Beijing China#define	MAX_TX_FIFO_THRESHOLD	((4096 / 64) - 1)
352dd1de37lin wang - Sun Microsystems - Beijing China#define	INIT_TX_FIFO_THRESHOLD	MIN_TX_FIFO_THRESHOLD
353dd1de37lin wang - Sun Microsystems - Beijing China
354dd1de37lin wang - Sun Microsystems - Beijing Chinastruct ar5416AniState {
355dd1de37lin wang - Sun Microsystems - Beijing China	struct ath9k_channel c;
356dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t noiseImmunityLevel;
357dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t spurImmunityLevel;
358dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t firstepLevel;
359dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ofdmWeakSigDetectOff;
360dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t cckWeakSigThreshold;
361dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t listenTime;
362dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ofdmTrigHigh;
363dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ofdmTrigLow;
364dd1de37lin wang - Sun Microsystems - Beijing China	int32_t cckTrigHigh;
365dd1de37lin wang - Sun Microsystems - Beijing China	int32_t cckTrigLow;
366dd1de37lin wang - Sun Microsystems - Beijing China	int32_t rssiThrLow;
367dd1de37lin wang - Sun Microsystems - Beijing China	int32_t rssiThrHigh;
368dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t noiseFloor;
369dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t txFrameCount;
370dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t rxFrameCount;
371dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t cycleCount;
372dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ofdmPhyErrCount;
373dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t cckPhyErrCount;
374dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ofdmPhyErrBase;
375dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t cckPhyErrBase;
376dd1de37lin wang - Sun Microsystems - Beijing China	int16_t pktRssi[2];
377dd1de37lin wang - Sun Microsystems - Beijing China	int16_t ofdmErrRssi[2];
378dd1de37lin wang - Sun Microsystems - Beijing China	int16_t cckErrRssi[2];
379dd1de37lin wang - Sun Microsystems - Beijing China};
380dd1de37lin wang - Sun Microsystems - Beijing China
381dd1de37lin wang - Sun Microsystems - Beijing China#define	HAL_PROCESS_ANI	0x00000001
382dd1de37lin wang - Sun Microsystems - Beijing China#define	DO_ANI(ah) \
383dd1de37lin wang - Sun Microsystems - Beijing China	((AH5416(ah)->ah_procPhyErr & HAL_PROCESS_ANI))
384dd1de37lin wang - Sun Microsystems - Beijing China
385dd1de37lin wang - Sun Microsystems - Beijing Chinastruct ar5416Stats {
386dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_niup;
387dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_nidown;
388dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_spurup;
389dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_spurdown;
390dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_ofdmon;
391dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_ofdmoff;
392dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_cckhigh;
393dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_ccklow;
394dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_stepup;
395dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_stepdown;
396dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_ofdmerrs;
397dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_cckerrs;
398dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_reset;
399dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_lzero;
400dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ast_ani_lneg;
401dd1de37lin wang - Sun Microsystems - Beijing China	struct ath9k_mib_stats ast_mibstats;
402dd1de37lin wang - Sun Microsystems - Beijing China	struct ath9k_node_stats ast_nodestats;
403dd1de37lin wang - Sun Microsystems - Beijing China};
404dd1de37lin wang - Sun Microsystems - Beijing China
405dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_OPFLAGS_11A		0x01
406dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_OPFLAGS_11G		0x02
407dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_OPFLAGS_N_5G_HT40	0x04
408dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_OPFLAGS_N_2G_HT40	0x08
409dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_OPFLAGS_N_5G_HT20	0x10
410dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_OPFLAGS_N_2G_HT20	0x20
411dd1de37lin wang - Sun Microsystems - Beijing China
412dd1de37lin wang - Sun Microsystems - Beijing China#define	EEP_RFSILENT_ENABLED		0x0001
413dd1de37lin wang - Sun Microsystems - Beijing China#define	EEP_RFSILENT_ENABLED_S		0
414dd1de37lin wang - Sun Microsystems - Beijing China#define	EEP_RFSILENT_POLARITY		0x0002
415dd1de37lin wang - Sun Microsystems - Beijing China#define	EEP_RFSILENT_POLARITY_S		1
416dd1de37lin wang - Sun Microsystems - Beijing China#define	EEP_RFSILENT_GPIO_SEL		0x001c
417dd1de37lin wang - Sun Microsystems - Beijing China#define	EEP_RFSILENT_GPIO_SEL_S		2
418dd1de37lin wang - Sun Microsystems - Beijing China
419dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_NO_BACK_VER		0x1
420dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_VER			0xE
421dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_VER_MINOR_MASK	0x0FFF
422dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_2		0x2
423dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_3		0x3
424dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_7		0x7
425dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_9		0x9
426dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_16		0x10
427dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_17		0x11
428dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_19		0x13
429c0c9348lin wang - Sun Microsystems - Beijing China/* 2.6.30 */
430c0c9348lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_20		0x14
431c0c9348lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_MINOR_VER_22		0x16
432dd1de37lin wang - Sun Microsystems - Beijing China
433dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_5G_CAL_PIERS		8
434dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_2G_CAL_PIERS		4
435dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_5G_20_TARGET_POWERS	8
436dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_5G_40_TARGET_POWERS	8
437dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_2G_CCK_TARGET_POWERS	3
438dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_2G_20_TARGET_POWERS	4
439dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_2G_40_TARGET_POWERS	4
440dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_CTLS			24
441dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_BAND_EDGES		8
442dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_PD_GAINS		4
443dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_PD_GAINS_IN_MASK		4
444dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_PD_GAIN_ICEPTS		5
445dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_MODAL_SPURS	5
446dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_MAX_RATE_POWER		63
447dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_NUM_PDADC_VALUES		128
448dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_BCHAN_UNUSED		0xFF
449dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_MAX_PWR_RANGE_IN_HALF_DB	64
450dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_MAX_CHAINS		3
451dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_PWR_TABLE_OFFSET		-5
452dd1de37lin wang - Sun Microsystems - Beijing China
453dd1de37lin wang - Sun Microsystems - Beijing China/* Rx gain type values */
454dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_RXGAIN_23DB_BACKOFF	0
455dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_RXGAIN_13DB_BACKOFF	1
456dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_RXGAIN_ORIG		2
457dd1de37lin wang - Sun Microsystems - Beijing China
458dd1de37lin wang - Sun Microsystems - Beijing China/* Tx gain type values */
459dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_TXGAIN_ORIGINAL	0
460dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP_TXGAIN_HIGH_POWER	1
461dd1de37lin wang - Sun Microsystems - Beijing China
462dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_START_LOC					64
463dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_NUM_2G_CAL_PIERS			3
464dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_NUM_2G_CCK_TARGET_POWERS	3
465dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_NUM_2G_20_TARGET_POWERS	3
466dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_NUM_2G_40_TARGET_POWERS	3
467dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_NUM_CTLS					12
468dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_NUM_BAND_EDGES				4
469dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_NUM_PD_GAINS				2
470dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_PD_GAINS_IN_MASK			4
471dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_PD_GAIN_ICEPTS				5
472dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEP4K_MAX_CHAINS					1
473dd1de37lin wang - Sun Microsystems - Beijing China
474dd1de37lin wang - Sun Microsystems - Beijing Chinaenum eeprom_param {
475fd7c598Richard Lowe	EEP_NFTHRESH_5 = 0,
476dd1de37lin wang - Sun Microsystems - Beijing China	EEP_NFTHRESH_2,
477dd1de37lin wang - Sun Microsystems - Beijing China	EEP_MAC_MSW,
478dd1de37lin wang - Sun Microsystems - Beijing China	EEP_MAC_MID,
479dd1de37lin wang - Sun Microsystems - Beijing China	EEP_MAC_LSW,
480dd1de37lin wang - Sun Microsystems - Beijing China	EEP_REG_0,
481dd1de37lin wang - Sun Microsystems - Beijing China	EEP_REG_1,
482dd1de37lin wang - Sun Microsystems - Beijing China	EEP_OP_CAP,
483dd1de37lin wang - Sun Microsystems - Beijing China	EEP_OP_MODE,
484dd1de37lin wang - Sun Microsystems - Beijing China	EEP_RF_SILENT,
485dd1de37lin wang - Sun Microsystems - Beijing China	EEP_OB_5,
486dd1de37lin wang - Sun Microsystems - Beijing China	EEP_DB_5,
487dd1de37lin wang - Sun Microsystems - Beijing China	EEP_OB_2,
488dd1de37lin wang - Sun Microsystems - Beijing China	EEP_DB_2,
489dd1de37lin wang - Sun Microsystems - Beijing China	EEP_MINOR_REV,
490dd1de37lin wang - Sun Microsystems - Beijing China	EEP_TX_MASK,
491dd1de37lin wang - Sun Microsystems - Beijing China	EEP_RX_MASK,
492dd1de37lin wang - Sun Microsystems - Beijing China	EEP_RXGAIN_TYPE,
493dd1de37lin wang - Sun Microsystems - Beijing China	EEP_TXGAIN_TYPE,
494c0c9348lin wang - Sun Microsystems - Beijing China	EEP_OL_PWRCTRL,
495c0c9348lin wang - Sun Microsystems - Beijing China	EEP_RC_CHAIN_MASK,
496c0c9348lin wang - Sun Microsystems - Beijing China	EEP_DAC_HPWR_5G,
497fd7c598Richard Lowe	EEP_FRAC_N_5G,
498fd7c598Richard Lowe	EEP_MAC_0 = AR_EEPROM_MAC(0),
499fd7c598Richard Lowe	EEP_MAC_1 = AR_EEPROM_MAC(1),
500fd7c598Richard Lowe	EEP_MAC_2 = AR_EEPROM_MAC(2)
501dd1de37lin wang - Sun Microsystems - Beijing China};
502dd1de37lin wang - Sun Microsystems - Beijing China
503dd1de37lin wang - Sun Microsystems - Beijing Chinaenum ar5416_rates {
504dd1de37lin wang - Sun Microsystems - Beijing China	rate6mb, rate9mb, rate12mb, rate18mb,
505dd1de37lin wang - Sun Microsystems - Beijing China	rate24mb, rate36mb, rate48mb, rate54mb,
506dd1de37lin wang - Sun Microsystems - Beijing China	rate1l, rate2l, rate2s, rate5_5l,
507dd1de37lin wang - Sun Microsystems - Beijing China	rate5_5s, rate11l, rate11s, rateXr,
508dd1de37lin wang - Sun Microsystems - Beijing China	rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3,
509dd1de37lin wang - Sun Microsystems - Beijing China	rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7,
510dd1de37lin wang - Sun Microsystems - Beijing China	rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3,
511dd1de37lin wang - Sun Microsystems - Beijing China	rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7,
512dd1de37lin wang - Sun Microsystems - Beijing China	rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm,
513dd1de37lin wang - Sun Microsystems - Beijing China	Ar5416RateSize
514dd1de37lin wang - Sun Microsystems - Beijing China};
515dd1de37lin wang - Sun Microsystems - Beijing China
516dd1de37lin wang - Sun Microsystems - Beijing Chinaenum ath9k_hal_freq_band {
517dd1de37lin wang - Sun Microsystems - Beijing China	ATH9K_HAL_FREQ_BAND_5GHZ = 0,
518dd1de37lin wang - Sun Microsystems - Beijing China	ATH9K_HAL_FREQ_BAND_2GHZ = 1
519dd1de37lin wang - Sun Microsystems - Beijing China};
520dd1de37lin wang - Sun Microsystems - Beijing China
521dd1de37lin wang - Sun Microsystems - Beijing China#pragma pack(1)
522c0c9348lin wang - Sun Microsystems - Beijing China/* 2.6.30 */
523dd1de37lin wang - Sun Microsystems - Beijing Chinastruct base_eep_header {
524dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t length;
525dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t checksum;
526dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t version;
527dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t opCapFlags;
528dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t eepMisc;
529dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t regDmn[2];
530dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t macAddr[6];
531dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t rxMask;
532dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txMask;
533dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t rfSilent;
534dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t blueToothOptions;
535dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t deviceCap;
536dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t binBuildNumber;
537dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t deviceType;
538dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t pwdclkind;
539dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t futureBase_1[2];
540dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t rxGainType;
541c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t dacHiPwrMode_5G;
542c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t openLoopPwrCntl;
543c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t dacLpMode;
544dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txGainType;
545c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t rcChainMask;
546c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t desiredScaleCCK;
547c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t power_table_offset;
548c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t frac_n_5g;
549c0c9348lin wang - Sun Microsystems - Beijing China	uint8_t futureBase_3[21];
550dd1de37lin wang - Sun Microsystems - Beijing China};
551dd1de37lin wang - Sun Microsystems - Beijing China
552dd1de37lin wang - Sun Microsystems - Beijing Chinastruct base_eep_header_4k {
553dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t length;
554dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t checksum;
555dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t version;
556dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t opCapFlags;
557dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t eepMisc;
558dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t regDmn[2];
559dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t macAddr[6];
560dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t rxMask;
561dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txMask;
562dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t rfSilent;
563dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t blueToothOptions;
564dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t deviceCap;
565dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t binBuildNumber;
566dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t deviceType;
567dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t futureBase[1];
568dd1de37lin wang - Sun Microsystems - Beijing China};
569dd1de37lin wang - Sun Microsystems - Beijing China
570dd1de37lin wang - Sun Microsystems - Beijing Chinastruct spur_chan {
571dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t spurChan;
572dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t spurRangeLow;
573dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t spurRangeHigh;
574dd1de37lin wang - Sun Microsystems - Beijing China};
575dd1de37lin wang - Sun Microsystems - Beijing China
576dd1de37lin wang - Sun Microsystems - Beijing Chinastruct modal_eep_header {
577dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t antCtrlChain[AR5416_MAX_CHAINS];
578dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t antCtrlCommon;
579dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t antennaGainCh[AR5416_MAX_CHAINS];
580dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t switchSettling;
581dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txRxAttenCh[AR5416_MAX_CHAINS];
582dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t rxTxMarginCh[AR5416_MAX_CHAINS];
583dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t adcDesiredSize;
584dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t pgaDesiredSize;
585dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t xlnaGainCh[AR5416_MAX_CHAINS];
586dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txEndToXpaOff;
587dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txEndToRxOn;
588dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txFrameToXpaOn;
589dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t thresh62;
590dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t noiseFloorThreshCh[AR5416_MAX_CHAINS];
591dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t xpdGain;
592dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t xpd;
593dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t iqCalICh[AR5416_MAX_CHAINS];
594dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t iqCalQCh[AR5416_MAX_CHAINS];
595dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t pdGainOverlap;
596dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ob;
597dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t db;
598dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t xpaBiasLvl;
599dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t pwrDecreaseFor2Chain;
600dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t pwrDecreaseFor3Chain;
601dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txFrameToDataStart;
602dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t txFrameToPaOn;
603dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ht40PowerIncForPdadc;
604dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t bswAtten[AR5416_MAX_CHAINS];
605dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t bswMargin[AR5416_MAX_CHAINS];
606dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t swSettleHt40;
607dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t xatten2Db[AR5416_MAX_CHAINS];
608dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t xatten2Margin[AR5416_MAX_CHAINS];
609dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ob_ch1;
610dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t db_ch1;
611dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t useAnt1:1,
612dd1de37lin wang - Sun Microsystems - Beijing China	    force_xpaon:1,
613dd1de37lin wang - Sun Microsystems - Beijing China	    local_bias:1,
614dd1de37lin wang - Sun Microsystems - Beijing China	    femBandSelectUsed:1, xlnabufin:1, xlnaisel:2, xlnabufmode:1;
615dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t futureModalar9280;
616dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t xpaBiasLvlFreq[3];
617dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t futureModal[6];
618dd1de37lin wang - Sun Microsystems - Beijing China
619dd1de37lin wang - Sun Microsystems - Beijing China	struct spur_chan spurChans[AR5416_EEPROM_MODAL_SPURS];
620dd1de37lin wang - Sun Microsystems - Beijing China};
621dd1de37lin wang - Sun Microsystems - Beijing China
622dd1de37lin wang - Sun Microsystems - Beijing Chinastruct modal_eep_4k_header {
623dd1de37lin wang - Sun Microsystems - Beijing China    uint32_t  antCtrlChain[AR5416_EEP4K_MAX_CHAINS];
624dd1de37lin wang - Sun Microsystems - Beijing China    uint32_t  antCtrlCommon;
625dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   antennaGainCh[AR5416_EEP4K_MAX_CHAINS];
626dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   switchSettling;
627dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   txRxAttenCh[AR5416_EEP4K_MAX_CHAINS];
628dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   rxTxMarginCh[AR5416_EEP4K_MAX_CHAINS];
629dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   adcDesiredSize;
630dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   pgaDesiredSize;
631dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   xlnaGainCh[AR5416_EEP4K_MAX_CHAINS];
632dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   txEndToXpaOff;
633dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   txEndToRxOn;
634dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   txFrameToXpaOn;
635dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   thresh62;
636dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   noiseFloorThreshCh[AR5416_EEP4K_MAX_CHAINS];
637dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   xpdGain;
638dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   xpd;
639dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   iqCalICh[AR5416_EEP4K_MAX_CHAINS];
640dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   iqCalQCh[AR5416_EEP4K_MAX_CHAINS];
641dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   pdGainOverlap;
642dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   ob_01;
643dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   db1_01;
644dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   xpaBiasLvl;
645dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   txFrameToDataStart;
646dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   txFrameToPaOn;
647dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   ht40PowerIncForPdadc;
648dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   bswAtten[AR5416_EEP4K_MAX_CHAINS];
649dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   bswMargin[AR5416_EEP4K_MAX_CHAINS];
650dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   swSettleHt40;
651dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   xatten2Db[AR5416_EEP4K_MAX_CHAINS];
652dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   xatten2Margin[AR5416_EEP4K_MAX_CHAINS];
653dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   db2_01;
654dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   version;
655dd1de37lin wang - Sun Microsystems - Beijing China    uint16_t  ob_234;
656dd1de37lin wang - Sun Microsystems - Beijing China    uint16_t  db1_234;
657dd1de37lin wang - Sun Microsystems - Beijing China    uint16_t  db2_234;
658dd1de37lin wang - Sun Microsystems - Beijing China    uint8_t   futureModal[4];
659dd1de37lin wang - Sun Microsystems - Beijing China
660dd1de37lin wang - Sun Microsystems - Beijing China    struct spur_chan spurChans[AR5416_EEPROM_MODAL_SPURS];
661dd1de37lin wang - Sun Microsystems - Beijing China};
662dd1de37lin wang - Sun Microsystems - Beijing China
663dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_data_per_freq {
664dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t pwrPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS];
665dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t vpdPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS];
666dd1de37lin wang - Sun Microsystems - Beijing China};
667dd1de37lin wang - Sun Microsystems - Beijing China
668dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_data_per_freq_4k {
669dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t pwrPdg[AR5416_EEP4K_NUM_PD_GAINS][AR5416_EEP4K_PD_GAIN_ICEPTS];
670dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t vpdPdg[AR5416_EEP4K_NUM_PD_GAINS][AR5416_EEP4K_PD_GAIN_ICEPTS];
671dd1de37lin wang - Sun Microsystems - Beijing China};
672dd1de37lin wang - Sun Microsystems - Beijing China
673dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_target_power_leg {
674dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t bChannel;
675dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t tPow2x[4];
676dd1de37lin wang - Sun Microsystems - Beijing China};
677dd1de37lin wang - Sun Microsystems - Beijing China
678dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_target_power_ht {
679dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t bChannel;
680dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t tPow2x[8];
681dd1de37lin wang - Sun Microsystems - Beijing China};
682dd1de37lin wang - Sun Microsystems - Beijing China
683dd1de37lin wang - Sun Microsystems - Beijing China#ifdef __BIG_ENDIAN_BITFIELD
684dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_ctl_edges {
685dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t bChannel;
686dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t flag:2, tPower:6;
687dd1de37lin wang - Sun Microsystems - Beijing China};
688dd1de37lin wang - Sun Microsystems - Beijing China#else
689dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_ctl_edges {
690dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t bChannel;
691dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t tPower:6, flag:2;
692dd1de37lin wang - Sun Microsystems - Beijing China};
693dd1de37lin wang - Sun Microsystems - Beijing China#endif
694dd1de37lin wang - Sun Microsystems - Beijing China
695dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_ctl_data {
696dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_ctl_edges
697dd1de37lin wang - Sun Microsystems - Beijing China	    ctlEdges[AR5416_MAX_CHAINS][AR5416_NUM_BAND_EDGES];
698dd1de37lin wang - Sun Microsystems - Beijing China};
699dd1de37lin wang - Sun Microsystems - Beijing China
700dd1de37lin wang - Sun Microsystems - Beijing Chinastruct cal_ctl_data_4k {
701dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_ctl_edges
702dd1de37lin wang - Sun Microsystems - Beijing China	ctlEdges[AR5416_EEP4K_MAX_CHAINS][AR5416_EEP4K_NUM_BAND_EDGES];
703dd1de37lin wang - Sun Microsystems - Beijing China};
704dd1de37lin wang - Sun Microsystems - Beijing China
705dd1de37lin wang - Sun Microsystems - Beijing Chinastruct ar5416_eeprom_def {
706dd1de37lin wang - Sun Microsystems - Beijing China	struct base_eep_header baseEepHeader;
707dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t custData[64];
708dd1de37lin wang - Sun Microsystems - Beijing China	struct modal_eep_header modalHeader[2];
709dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t calFreqPier5G[AR5416_NUM_5G_CAL_PIERS];
710dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t calFreqPier2G[AR5416_NUM_2G_CAL_PIERS];
711dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_data_per_freq
712dd1de37lin wang - Sun Microsystems - Beijing China	    calPierData5G[AR5416_MAX_CHAINS][AR5416_NUM_5G_CAL_PIERS];
713dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_data_per_freq
714dd1de37lin wang - Sun Microsystems - Beijing China	    calPierData2G[AR5416_MAX_CHAINS][AR5416_NUM_2G_CAL_PIERS];
715dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_leg
716dd1de37lin wang - Sun Microsystems - Beijing China	    calTargetPower5G[AR5416_NUM_5G_20_TARGET_POWERS];
717dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_ht
718dd1de37lin wang - Sun Microsystems - Beijing China	    calTargetPower5GHT20[AR5416_NUM_5G_20_TARGET_POWERS];
719dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_ht
720dd1de37lin wang - Sun Microsystems - Beijing China	    calTargetPower5GHT40[AR5416_NUM_5G_40_TARGET_POWERS];
721dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_leg
722dd1de37lin wang - Sun Microsystems - Beijing China	    calTargetPowerCck[AR5416_NUM_2G_CCK_TARGET_POWERS];
723dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_leg
724dd1de37lin wang - Sun Microsystems - Beijing China	    calTargetPower2G[AR5416_NUM_2G_20_TARGET_POWERS];
725dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_ht
726dd1de37lin wang - Sun Microsystems - Beijing China	    calTargetPower2GHT20[AR5416_NUM_2G_20_TARGET_POWERS];
727dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_ht
728dd1de37lin wang - Sun Microsystems - Beijing China	    calTargetPower2GHT40[AR5416_NUM_2G_40_TARGET_POWERS];
729dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ctlIndex[AR5416_NUM_CTLS];
730dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_ctl_data ctlData[AR5416_NUM_CTLS];
731dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t padding;
732dd1de37lin wang - Sun Microsystems - Beijing China};
733dd1de37lin wang - Sun Microsystems - Beijing China
734dd1de37lin wang - Sun Microsystems - Beijing Chinastruct ar5416_eeprom_4k {
735dd1de37lin wang - Sun Microsystems - Beijing China	struct base_eep_header_4k baseEepHeader;
736dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t custData[20];
737dd1de37lin wang - Sun Microsystems - Beijing China	struct modal_eep_4k_header modalHeader;
738dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t calFreqPier2G[AR5416_EEP4K_NUM_2G_CAL_PIERS];
739dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_data_per_freq_4k
740dd1de37lin wang - Sun Microsystems - Beijing China	calPierData2G[AR5416_EEP4K_MAX_CHAINS][AR5416_EEP4K_NUM_2G_CAL_PIERS];
741dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_leg
742dd1de37lin wang - Sun Microsystems - Beijing China	calTargetPowerCck[AR5416_EEP4K_NUM_2G_CCK_TARGET_POWERS];
743dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_leg
744dd1de37lin wang - Sun Microsystems - Beijing China	calTargetPower2G[AR5416_EEP4K_NUM_2G_20_TARGET_POWERS];
745dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_ht
746dd1de37lin wang - Sun Microsystems - Beijing China	calTargetPower2GHT20[AR5416_EEP4K_NUM_2G_20_TARGET_POWERS];
747dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_target_power_ht
748dd1de37lin wang - Sun Microsystems - Beijing China	calTargetPower2GHT40[AR5416_EEP4K_NUM_2G_40_TARGET_POWERS];
749dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ctlIndex[AR5416_EEP4K_NUM_CTLS];
750dd1de37lin wang - Sun Microsystems - Beijing China	struct cal_ctl_data_4k ctlData[AR5416_EEP4K_NUM_CTLS];
751dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t padding;
752dd1de37lin wang - Sun Microsystems - Beijing China};
753dd1de37lin wang - Sun Microsystems - Beijing China#pragma pack()
754dd1de37lin wang - Sun Microsystems - Beijing China
755dd1de37lin wang - Sun Microsystems - Beijing Chinastruct ar5416IniArray {
756dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ia_array;
757dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ia_rows;
758dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ia_columns;
759dd1de37lin wang - Sun Microsystems - Beijing China};
760dd1de37lin wang - Sun Microsystems - Beijing China
761dd1de37lin wang - Sun Microsystems - Beijing China#define	INIT_INI_ARRAY(iniarray, array, rows, columns) do {	\
762dd1de37lin wang - Sun Microsystems - Beijing China		(iniarray)->ia_array = (uint32_t *)(array);		\
763dd1de37lin wang - Sun Microsystems - Beijing China		(iniarray)->ia_rows = (rows);			\
764dd1de37lin wang - Sun Microsystems - Beijing China		(iniarray)->ia_columns = (columns);		\
765dd1de37lin wang - Sun Microsystems - Beijing China		_NOTE(CONSTCOND) \
766dd1de37lin wang - Sun Microsystems - Beijing China	} while (0)
767dd1de37lin wang - Sun Microsystems - Beijing China
768dd1de37lin wang - Sun Microsystems - Beijing China#define	INI_RA(iniarray, row, column) \
769dd1de37lin wang - Sun Microsystems - Beijing China	(((iniarray)->ia_array)[(row) *	((iniarray)->ia_columns) + (column)])
770dd1de37lin wang - Sun Microsystems - Beijing China
771dd1de37lin wang - Sun Microsystems - Beijing China#define	INIT_CAL(_perCal) do {				\
772dd1de37lin wang - Sun Microsystems - Beijing China		(_perCal)->calState = CAL_WAITING;	\
773dd1de37lin wang - Sun Microsystems - Beijing China		(_perCal)->calNext = NULL;		\
774dd1de37lin wang - Sun Microsystems - Beijing China	} while (0)
775dd1de37lin wang - Sun Microsystems - Beijing China
776dd1de37lin wang - Sun Microsystems - Beijing China#define	INSERT_CAL(_ahp, _perCal)					\
777dd1de37lin wang - Sun Microsystems - Beijing China	do {								\
778dd1de37lin wang - Sun Microsystems - Beijing China		if ((_ahp)->ah_cal_list_last == NULL) {			\
779dd1de37lin wang - Sun Microsystems - Beijing China			(_ahp)->ah_cal_list =				\
780dd1de37lin wang - Sun Microsystems - Beijing China				(_ahp)->ah_cal_list_last = (_perCal);	\
781dd1de37lin wang - Sun Microsystems - Beijing China			((_ahp)->ah_cal_list_last)->calNext = (_perCal); \
782dd1de37lin wang - Sun Microsystems - Beijing China		} else {						\
783dd1de37lin wang - Sun Microsystems - Beijing China			((_ahp)->ah_cal_list_last)->calNext = (_perCal); \
784dd1de37lin wang - Sun Microsystems - Beijing China			(_ahp)->ah_cal_list_last = (_perCal);		\
785dd1de37lin wang - Sun Microsystems - Beijing China			(_perCal)->calNext = (_ahp)->ah_cal_list;	\
786dd1de37lin wang - Sun Microsystems - Beijing China		}							\
787dd1de37lin wang - Sun Microsystems - Beijing China	} while (0)
788dd1de37lin wang - Sun Microsystems - Beijing China
789dd1de37lin wang - Sun Microsystems - Beijing Chinaenum hal_cal_types {
790dd1de37lin wang - Sun Microsystems - Beijing China	ADC_DC_INIT_CAL = 0x1,
791dd1de37lin wang - Sun Microsystems - Beijing China	ADC_GAIN_CAL = 0x2,
792dd1de37lin wang - Sun Microsystems - Beijing China	ADC_DC_CAL = 0x4,
793dd1de37lin wang - Sun Microsystems - Beijing China	IQ_MISMATCH_CAL = 0x8
794dd1de37lin wang - Sun Microsystems - Beijing China};
795dd1de37lin wang - Sun Microsystems - Beijing China
796dd1de37lin wang - Sun Microsystems - Beijing Chinaenum hal_cal_state {
797dd1de37lin wang - Sun Microsystems - Beijing China	CAL_INACTIVE,
798dd1de37lin wang - Sun Microsystems - Beijing China	CAL_WAITING,
799dd1de37lin wang - Sun Microsystems - Beijing China	CAL_RUNNING,
800dd1de37lin wang - Sun Microsystems - Beijing China	CAL_DONE
801dd1de37lin wang - Sun Microsystems - Beijing China};
802dd1de37lin wang - Sun Microsystems - Beijing China
803dd1de37lin wang - Sun Microsystems - Beijing China#define	MIN_CAL_SAMPLES		1
804dd1de37lin wang - Sun Microsystems - Beijing China#define	MAX_CAL_SAMPLES		64
805dd1de37lin wang - Sun Microsystems - Beijing China#define	INIT_LOG_COUNT		5
806dd1de37lin wang - Sun Microsystems - Beijing China#define	PER_MIN_LOG_COUNT	2
807dd1de37lin wang - Sun Microsystems - Beijing China#define	PER_MAX_LOG_COUNT	10
808dd1de37lin wang - Sun Microsystems - Beijing China
809dd1de37lin wang - Sun Microsystems - Beijing Chinastruct hal_percal_data {
810dd1de37lin wang - Sun Microsystems - Beijing China	enum hal_cal_types calType;
811dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t calNumSamples;
812dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t calCountMax;
813dd1de37lin wang - Sun Microsystems - Beijing China	void (*calCollect) (struct ath_hal *);
814dd1de37lin wang - Sun Microsystems - Beijing China	void (*calPostProc) (struct ath_hal *, uint8_t);
815dd1de37lin wang - Sun Microsystems - Beijing China};
816dd1de37lin wang - Sun Microsystems - Beijing China
817dd1de37lin wang - Sun Microsystems - Beijing Chinastruct hal_cal_list {
818dd1de37lin wang - Sun Microsystems - Beijing China	const struct hal_percal_data *calData;
819dd1de37lin wang - Sun Microsystems - Beijing China	enum hal_cal_state calState;
820dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list *calNext;
821dd1de37lin wang - Sun Microsystems - Beijing China};
822dd1de37lin wang - Sun Microsystems - Beijing China
823dd1de37lin wang - Sun Microsystems - Beijing China/*
824dd1de37lin wang - Sun Microsystems - Beijing China * Enum to indentify the eeprom mappings
825dd1de37lin wang - Sun Microsystems - Beijing China */
826dd1de37lin wang - Sun Microsystems - Beijing Chinaenum hal_eep_map {
827dd1de37lin wang - Sun Microsystems - Beijing China	EEP_MAP_DEFAULT = 0x0,
828dd1de37lin wang - Sun Microsystems - Beijing China	EEP_MAP_4KBITS,
829dd1de37lin wang - Sun Microsystems - Beijing China	EEP_MAP_MAX
830dd1de37lin wang - Sun Microsystems - Beijing China};
831dd1de37lin wang - Sun Microsystems - Beijing China
832dd1de37lin wang - Sun Microsystems - Beijing Chinastruct ath_hal_5416 {
833dd1de37lin wang - Sun Microsystems - Beijing China	struct ath_hal ah;
834dd1de37lin wang - Sun Microsystems - Beijing China	union {
835dd1de37lin wang - Sun Microsystems - Beijing China		struct ar5416_eeprom_def def;
836dd1de37lin wang - Sun Microsystems - Beijing China		struct ar5416_eeprom_4k map4k;
837dd1de37lin wang - Sun Microsystems - Beijing China	} ah_eeprom;
838dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416Stats ah_stats;
839dd1de37lin wang - Sun Microsystems - Beijing China	struct ath9k_tx_queue_info ah_txq[ATH9K_NUM_TX_QUEUES];
840dd1de37lin wang - Sun Microsystems - Beijing China
841dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ah_macaddr[IEEE80211_ADDR_LEN];
842dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ah_bssid[IEEE80211_ADDR_LEN];
843dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ah_bssidmask[IEEE80211_ADDR_LEN];
844dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t ah_assocId;
845dd1de37lin wang - Sun Microsystems - Beijing China
846dd1de37lin wang - Sun Microsystems - Beijing China	int16_t ah_curchanRadIndex;
847dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_maskReg;
848dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_txOkInterruptMask;
849dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_txErrInterruptMask;
850dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_txDescInterruptMask;
851dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_txEolInterruptMask;
852dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_txUrnInterruptMask;
853dd1de37lin wang - Sun Microsystems - Beijing China	boolean_t ah_chipFullSleep;
854dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_atimWindow;
855dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t ah_antennaSwitchSwap;
856dd1de37lin wang - Sun Microsystems - Beijing China	enum ath9k_power_mode ah_powerMode;
857dd1de37lin wang - Sun Microsystems - Beijing China	enum ath9k_ant_setting ah_diversityControl;
858dd1de37lin wang - Sun Microsystems - Beijing China
859dd1de37lin wang - Sun Microsystems - Beijing China	/* Calibration */
860dd1de37lin wang - Sun Microsystems - Beijing China	enum hal_cal_types ah_suppCals;
861dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list ah_iqCalData;
862dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list ah_adcGainCalData;
863dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list ah_adcDcCalInitData;
864dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list ah_adcDcCalData;
865dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list *ah_cal_list;
866dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list *ah_cal_list_last;
867dd1de37lin wang - Sun Microsystems - Beijing China	struct hal_cal_list *ah_cal_list_curr;
868dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalPowerMeasI ah_Meas0.unsign
869dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalPowerMeasQ ah_Meas1.unsign
870dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalIqCorrMeas ah_Meas2.sign
871dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcIOddPhase  ah_Meas0.unsign
872dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcIEvenPhase ah_Meas1.unsign
873dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcQOddPhase  ah_Meas2.unsign
874dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcQEvenPhase ah_Meas3.unsign
875dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcDcOffsetIOddPhase  ah_Meas0.sign
876dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcDcOffsetIEvenPhase ah_Meas1.sign
877dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcDcOffsetQOddPhase  ah_Meas2.sign
878dd1de37lin wang - Sun Microsystems - Beijing China#define	ah_totalAdcDcOffsetQEvenPhase ah_Meas3.sign
879dd1de37lin wang - Sun Microsystems - Beijing China	union {
880dd1de37lin wang - Sun Microsystems - Beijing China		uint32_t unsign[AR5416_MAX_CHAINS];
881dd1de37lin wang - Sun Microsystems - Beijing China		int32_t sign[AR5416_MAX_CHAINS];
882dd1de37lin wang - Sun Microsystems - Beijing China	} ah_Meas0;
883dd1de37lin wang - Sun Microsystems - Beijing China	union {
884dd1de37lin wang - Sun Microsystems - Beijing China		uint32_t unsign[AR5416_MAX_CHAINS];
885dd1de37lin wang - Sun Microsystems - Beijing China		int32_t sign[AR5416_MAX_CHAINS];
886dd1de37lin wang - Sun Microsystems - Beijing China	} ah_Meas1;
887dd1de37lin wang - Sun Microsystems - Beijing China	union {
888dd1de37lin wang - Sun Microsystems - Beijing China		uint32_t unsign[AR5416_MAX_CHAINS];
889dd1de37lin wang - Sun Microsystems - Beijing China		int32_t sign[AR5416_MAX_CHAINS];
890dd1de37lin wang - Sun Microsystems - Beijing China	} ah_Meas2;
891dd1de37lin wang - Sun Microsystems - Beijing China	union {
892dd1de37lin wang - Sun Microsystems - Beijing China		uint32_t unsign[AR5416_MAX_CHAINS];
893dd1de37lin wang - Sun Microsystems - Beijing China		int32_t sign[AR5416_MAX_CHAINS];
894dd1de37lin wang - Sun Microsystems - Beijing China	} ah_Meas3;
895dd1de37lin wang - Sun Microsystems - Beijing China	uint16_t ah_CalSamples;
896dd1de37lin wang - Sun Microsystems - Beijing China
897dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_staId1Defaults;
898dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_miscMode;
899dd1de37lin wang - Sun Microsystems - Beijing China	enum {
900dd1de37lin wang - Sun Microsystems - Beijing China		AUTO_32KHZ,
901dd1de37lin wang - Sun Microsystems - Beijing China		USE_32KHZ,
902dd1de37lin wang - Sun Microsystems - Beijing China		DONT_USE_32KHZ,
903dd1de37lin wang - Sun Microsystems - Beijing China	} ah_enable32kHzClock;
904dd1de37lin wang - Sun Microsystems - Beijing China
905dd1de37lin wang - Sun Microsystems - Beijing China	/* RF */
906dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_analogBank0Data;
907dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_analogBank1Data;
908dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_analogBank2Data;
909dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_analogBank3Data;
910dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_analogBank6Data;
911dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_analogBank6TPCData;
912dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_analogBank7Data;
913dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_addac5416_21;
914dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t *ah_bank6Temp;
915dd1de37lin wang - Sun Microsystems - Beijing China
916dd1de37lin wang - Sun Microsystems - Beijing China	int16_t ah_txPowerIndexOffset;
917dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_beaconInterval;
918dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_slottime;
919dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_acktimeout;
920dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_ctstimeout;
921dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_globaltxtimeout;
922dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ah_gBeaconRate;
923dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_gpioSelect;
924dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_polarity;
925dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_gpioBit;
926dd1de37lin wang - Sun Microsystems - Beijing China
927dd1de37lin wang - Sun Microsystems - Beijing China	/* ANI */
928dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_procPhyErr;
929dd1de37lin wang - Sun Microsystems - Beijing China	boolean_t ah_hasHwPhyCounters;
930dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_aniPeriod;
931dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416AniState *ah_curani;
932dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416AniState ah_ani[255];
933dd1de37lin wang - Sun Microsystems - Beijing China	int ah_totalSizeDesired[5];
934dd1de37lin wang - Sun Microsystems - Beijing China	int ah_coarseHigh[5];
935dd1de37lin wang - Sun Microsystems - Beijing China	int ah_coarseLow[5];
936dd1de37lin wang - Sun Microsystems - Beijing China	int ah_firpwr[5];
937dd1de37lin wang - Sun Microsystems - Beijing China	enum ath9k_ani_cmd ah_ani_function;
938dd1de37lin wang - Sun Microsystems - Beijing China
939dd1de37lin wang - Sun Microsystems - Beijing China	uint32_t ah_intrTxqs;
940dd1de37lin wang - Sun Microsystems - Beijing China	boolean_t ah_intrMitigation;
941dd1de37lin wang - Sun Microsystems - Beijing China	enum ath9k_ht_extprotspacing ah_extprotspacing;
942dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ah_txchainmask;
943dd1de37lin wang - Sun Microsystems - Beijing China	uint8_t ah_rxchainmask;
944dd1de37lin wang - Sun Microsystems - Beijing China
945dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniModes;
946dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniCommon;
947dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBank0;
948dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBB_RfGain;
949dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBank1;
950dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBank2;
951dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBank3;
952dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBank6;
953dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBank6TPC;
954dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniBank7;
955dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniAddac;
956dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniPcieSerdes;
957dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniModesAdditional;
958dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniModesRxGain;
959dd1de37lin wang - Sun Microsystems - Beijing China	struct ar5416IniArray ah_iniModesTxGain;
960dd1de37lin wang - Sun Microsystems - Beijing China	/* To indicate EEPROM mapping used */
961dd1de37lin wang - Sun Microsystems - Beijing China	enum hal_eep_map ah_eep_map;
962dd1de37lin wang - Sun Microsystems - Beijing China};
963dd1de37lin wang - Sun Microsystems - Beijing China#define	AH5416(_ah) ((struct ath_hal_5416 *)(_ah))
964dd1de37lin wang - Sun Microsystems - Beijing China
965dd1de37lin wang - Sun Microsystems - Beijing China#define	FREQ2FBIN(x, y) ((y) ? ((x) - 2300) : (((x) - 4800) / 5))
966dd1de37lin wang - Sun Microsystems - Beijing China
967dd1de37lin wang - Sun Microsystems - Beijing China#define	ar5416RfDetach(ah) do {					\
968dd1de37lin wang - Sun Microsystems - Beijing China		if (AH5416(ah)->ah_rfHal.rfDetach != NULL)	\
969dd1de37lin wang - Sun Microsystems - Beijing China			AH5416(ah)->ah_rfHal.rfDetach(ah);	\
970dd1de37lin wang - Sun Microsystems - Beijing China	} while (0)
971dd1de37lin wang - Sun Microsystems - Beijing China
972dd1de37lin wang - Sun Microsystems - Beijing China#define	ath9k_hw_use_flash(_ah)	\
973dd1de37lin wang - Sun Microsystems - Beijing China	(!(_ah->ah_flags & AH_USE_EEPROM))
974dd1de37lin wang - Sun Microsystems - Beijing China
975c0c9348lin wang - Sun Microsystems - Beijing China/* 2.6.30 */
976c0c9348lin wang - Sun Microsystems - Beijing China#define	AR5416_VER_MASK	(eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK)
977c0c9348lin wang - Sun Microsystems - Beijing China#define	OLC_FOR_AR9280_20_LATER	(AR_SREV_9280_20_OR_LATER(ah) && \
978c0c9348lin wang - Sun Microsystems - Beijing China	ath9k_hw_get_eeprom(ah, EEP_OL_PWRCTRL))
979dd1de37lin wang - Sun Microsystems - Beijing China
980dd1de37lin wang - Sun Microsystems - Beijing China#define	DO_DELAY(x) do {			\
981dd1de37lin wang - Sun Microsystems - Beijing China		if ((++(x) % 64) == 0)          \
982dd1de37lin wang - Sun Microsystems - Beijing China			drv_usecwait(1);	\
983dd1de37lin wang - Sun Microsystems - Beijing China	} while (0)
984dd1de37lin wang - Sun Microsystems - Beijing China
985dd1de37lin wang - Sun Microsystems - Beijing China#define	REG_WRITE_ARRAY(iniarray, column, regWr) do {                   \
986dd1de37lin wang - Sun Microsystems - Beijing China		int r;							\
987dd1de37lin wang - Sun Microsystems - Beijing China		for (r = 0; r < ((iniarray)->ia_rows); r++) {		\
988dd1de37lin wang - Sun Microsystems - Beijing China			REG_WRITE(ah, INI_RA((iniarray), (r), 0),	\
989dd1de37lin wang - Sun Microsystems - Beijing China			    INI_RA((iniarray), r, (column)));		\
990dd1de37lin wang - Sun Microsystems - Beijing China			DO_DELAY(regWr);				\
991dd1de37lin wang - Sun Microsystems - Beijing China		}							\
992dd1de37lin wang - Sun Microsystems - Beijing China	} while (0)
993dd1de37lin wang - Sun Microsystems - Beijing China
994dd1de37lin wang - Sun Microsystems - Beijing China#define	BASE_ACTIVATE_DELAY		100
995dd1de37lin wang - Sun Microsystems - Beijing China#define	RTC_PLL_SETTLE_DELAY		1000
996dd1de37lin wang - Sun Microsystems - Beijing China#define	COEF_SCALE_S			24
997dd1de37lin wang - Sun Microsystems - Beijing China#define	HT40_CHANNEL_CENTER_SHIFT	10
998dd1de37lin wang - Sun Microsystems - Beijing China
999dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_MAGIC_OFFSET	0x0
1000dd1de37lin wang - Sun Microsystems - Beijing China
1001dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_S			2
1002dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_OFFSET		0x2000
1003dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_START_ADDR	\
1004dd1de37lin wang - Sun Microsystems - Beijing China	(AR_SREV_9100(ah)) ? 0x1fff1000 : 0x503f1200
1005dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_MAX	0xae0
1006dd1de37lin wang - Sun Microsystems - Beijing China#define	ar5416_get_eep_ver(_ahp)	\
1007dd1de37lin wang - Sun Microsystems - Beijing China	(((_ahp)->ah_eeprom.def.baseEepHeader.version >> 12) & 0xF)
1008dd1de37lin wang - Sun Microsystems - Beijing China#define	ar5416_get_eep_rev(_ahp)	\
1009dd1de37lin wang - Sun Microsystems - Beijing China	(((_ahp)->ah_eeprom.def.baseEepHeader.version) & 0xFFF)
1010dd1de37lin wang - Sun Microsystems - Beijing China#define	ar5416_get_ntxchains(_txchainmask)	\
1011dd1de37lin wang - Sun Microsystems - Beijing China	(((_txchainmask >> 2) & 1) +	\
1012dd1de37lin wang - Sun Microsystems - Beijing China	((_txchainmask >> 1) & 1) + (_txchainmask & 1))
1013dd1de37lin wang - Sun Microsystems - Beijing China
1014dd1de37lin wang - Sun Microsystems - Beijing China/* EEPROM 4K bit map definations */
1015dd1de37lin wang - Sun Microsystems - Beijing China#define	ar5416_get_eep4k_ver(_ahp)   \
1016dd1de37lin wang - Sun Microsystems - Beijing China	(((_ahp)->ah_eeprom.map4k.baseEepHeader.version >> 12) & 0xF)
1017dd1de37lin wang - Sun Microsystems - Beijing China#define	ar5416_get_eep4k_rev(_ahp)   \
1018dd1de37lin wang - Sun Microsystems - Beijing China	(((_ahp)->ah_eeprom.map4k.baseEepHeader.version) & 0xFFF)
1019dd1de37lin wang - Sun Microsystems - Beijing China
1020dd1de37lin wang - Sun Microsystems - Beijing China#ifdef __BIG_ENDIAN
1021dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_MAGIC	0x5aa5
1022dd1de37lin wang - Sun Microsystems - Beijing China#else
1023dd1de37lin wang - Sun Microsystems - Beijing China#define	AR5416_EEPROM_MAGIC	0xa55a
1024dd1de37lin wang - Sun Microsystems - Beijing China#endif
1025dd1de37lin wang - Sun Microsystems - Beijing China
1026dd1de37lin wang - Sun Microsystems - Beijing China#define	ATH9K_POW_SM(_r, _s)		(((_r) & 0x3f) << (_s))
1027dd1de37lin wang - Sun Microsystems - Beijing China
1028dd1de37lin wang - Sun Microsystems - Beijing China#define	ATH9K_ANTENNA0_CHAINMASK	0x1
1029dd1de37lin wang - Sun Microsystems - Beijing China#define	ATH9K_ANTENNA1_CHAINMASK	0x2
1030dd1de37lin wang - Sun Microsystems - Beijing China
1031dd1de37lin wang - Sun Microsystems - Beijing China#define	ATH9K_NUM_DMA_DEBUG_REGS	8
1032dd1de37lin wang - Sun Microsystems - Beijing China#define	ATH9K_NUM_QUEUES		10
1033dd1de37lin wang - Sun Microsystems - Beijing China
1034dd1de37lin wang - Sun Microsystems - Beijing China#define	HAL_NOISE_IMMUNE_MAX		4
1035dd1de37lin wang - Sun Microsystems - Beijing China#define	HAL_SPUR_IMMUNE_MAX		7
1036dd1de37lin wang - Sun Microsystems - Beijing China#define	HAL_FIRST_STEP_MAX		2
1037