xref: /titanic_41/usr/src/uts/common/io/mwl/mwl_reg.h (revision d8d810637042c2a73a269f125dee75e8ed1421d1)
1*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
2*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Use is subject to license terms.
4*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
5*d8d81063Sfei feng - Sun Microsystems - Beijing China 
6*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
7*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting
8*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Copyright (c) 2007-2009 Marvell Semiconductor, Inc.
9*d8d81063Sfei feng - Sun Microsystems - Beijing China  * All rights reserved.
10*d8d81063Sfei feng - Sun Microsystems - Beijing China  *
11*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Redistribution and use in source and binary forms, with or without
12*d8d81063Sfei feng - Sun Microsystems - Beijing China  * modification, are permitted provided that the following conditions
13*d8d81063Sfei feng - Sun Microsystems - Beijing China  * are met:
14*d8d81063Sfei feng - Sun Microsystems - Beijing China  * 1. Redistributions of source code must retain the above copyright
15*d8d81063Sfei feng - Sun Microsystems - Beijing China  *    notice, this list of conditions and the following disclaimer,
16*d8d81063Sfei feng - Sun Microsystems - Beijing China  *    without modification.
17*d8d81063Sfei feng - Sun Microsystems - Beijing China  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18*d8d81063Sfei feng - Sun Microsystems - Beijing China  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
19*d8d81063Sfei feng - Sun Microsystems - Beijing China  *    redistribution must be conditioned upon including a substantially
20*d8d81063Sfei feng - Sun Microsystems - Beijing China  *    similar Disclaimer requirement for further binary redistribution.
21*d8d81063Sfei feng - Sun Microsystems - Beijing China  *
22*d8d81063Sfei feng - Sun Microsystems - Beijing China  * NO WARRANTY
23*d8d81063Sfei feng - Sun Microsystems - Beijing China  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24*d8d81063Sfei feng - Sun Microsystems - Beijing China  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25*d8d81063Sfei feng - Sun Microsystems - Beijing China  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
26*d8d81063Sfei feng - Sun Microsystems - Beijing China  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
27*d8d81063Sfei feng - Sun Microsystems - Beijing China  * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
28*d8d81063Sfei feng - Sun Microsystems - Beijing China  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29*d8d81063Sfei feng - Sun Microsystems - Beijing China  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30*d8d81063Sfei feng - Sun Microsystems - Beijing China  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31*d8d81063Sfei feng - Sun Microsystems - Beijing China  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32*d8d81063Sfei feng - Sun Microsystems - Beijing China  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33*d8d81063Sfei feng - Sun Microsystems - Beijing China  * THE POSSIBILITY OF SUCH DAMAGES.
34*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
35*d8d81063Sfei feng - Sun Microsystems - Beijing China 
36*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
37*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Definitions for the Marvell Wireless LAN controller Hardware Access Layer.
38*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
39*d8d81063Sfei feng - Sun Microsystems - Beijing China 
40*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifndef _MWL_REG_H
41*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	_MWL_REG_H
42*d8d81063Sfei feng - Sun Microsystems - Beijing China 
43*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifdef __cplusplus
44*d8d81063Sfei feng - Sun Microsystems - Beijing China extern "C" {
45*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
46*d8d81063Sfei feng - Sun Microsystems - Beijing China 
47*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MWL_MBSS_SUPPORT		/* enable multi-bss support */
48*d8d81063Sfei feng - Sun Microsystems - Beijing China 
49*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
50*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Host/Firmware Interface definitions.
51*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
52*d8d81063Sfei feng - Sun Microsystems - Beijing China 
53*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
54*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Define total number of TX queues in the shared memory.
55*d8d81063Sfei feng - Sun Microsystems - Beijing China  * This count includes the EDCA queues, Block Ack queues, and HCCA queues
56*d8d81063Sfei feng - Sun Microsystems - Beijing China  * In addition to this, there could be a management packet queue some
57*d8d81063Sfei feng - Sun Microsystems - Beijing China  * time in the future
58*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
59*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	NUM_EDCA_QUEUES		4
60*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	NUM_HCCA_QUEUES		0
61*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	NUM_BA_QUEUES		0
62*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	NUM_MGMT_QUEUES		0
63*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	NUM_ACK_EVENT_QUEUE	1
64*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	TOTAL_TX_QUEUES		\
65*d8d81063Sfei feng - Sun Microsystems - Beijing China 	(NUM_EDCA_QUEUES +	\
66*d8d81063Sfei feng - Sun Microsystems - Beijing China 	NUM_HCCA_QUEUES +	\
67*d8d81063Sfei feng - Sun Microsystems - Beijing China 	NUM_BA_QUEUES +		\
68*d8d81063Sfei feng - Sun Microsystems - Beijing China 	NUM_MGMT_QUEUES +	\
69*d8d81063Sfei feng - Sun Microsystems - Beijing China 	NUM_ACK_EVENT_QUEUE)
70*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MAX_TXWCB_QUEUES	TOTAL_TX_QUEUES - NUM_ACK_EVENT_QUEUE
71*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MAX_RXWCB_QUEUES	1
72*d8d81063Sfei feng - Sun Microsystems - Beijing China 
73*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
74*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Firmware download support.
75*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
76*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FW_DOWNLOAD_BLOCK_SIZE	256
77*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FW_CHECK_USECS		(5*1000) /* 5ms */
78*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FW_MAX_NUM_CHECKS	200
79*d8d81063Sfei feng - Sun Microsystems - Beijing China 
80*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MWL_ANT_INFO_SUPPORT /* per-antenna data in rx descriptor */
81*d8d81063Sfei feng - Sun Microsystems - Beijing China 
82*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_TSF_LOW	0xa600 /* TSF lo */
83*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_TSF_HIGH	0xa604 /* TSF hi */
84*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_CHIP_REV	0xa814 /* chip rev */
85*d8d81063Sfei feng - Sun Microsystems - Beijing China 
86*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
87*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Map to 0x80000000 (Bus control) on BAR0
88*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
89*d8d81063Sfei feng - Sun Microsystems - Beijing China /* From host to ARM */
90*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_H2A_INTERRUPT_EVENTS		0x00000C18
91*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_H2A_INTERRUPT_CAUSE		0x00000C1C
92*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_H2A_INTERRUPT_MASK		0x00000C20
93*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_H2A_INTERRUPT_CLEAR_SEL	0x00000C24
94*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_H2A_INTERRUPT_STATUS_MASK	0x00000C28
95*d8d81063Sfei feng - Sun Microsystems - Beijing China /* From ARM to host */
96*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_A2H_INTERRUPT_EVENTS		0x00000C2C
97*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_A2H_INTERRUPT_CAUSE		0x00000C30
98*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_A2H_INTERRUPT_MASK		0x00000C34
99*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_A2H_INTERRUPT_CLEAR_SEL	0x00000C38
100*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_A2H_INTERRUPT_STATUS_MASK	0x00000C3C
101*d8d81063Sfei feng - Sun Microsystems - Beijing China 
102*d8d81063Sfei feng - Sun Microsystems - Beijing China 
103*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Map to 0x80000000 on BAR1 */
104*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_GEN_PTR		0x00000C10
105*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_INT_CODE		0x00000C14
106*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_SCRATCH		0x00000C40
107*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_FW_PRESENT		0x0000BFFC
108*d8d81063Sfei feng - Sun Microsystems - Beijing China 
109*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_REG_PROMISCUOUS		0xA300
110*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Bit definitio for MACREG_REG_A2H_INTERRUPT_CAUSE (A2HRIC) */
111*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_TX_DONE	0x00000001 /* bit 0 */
112*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_RX_RDY	0x00000002 /* bit 1 */
113*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_OPC_DONE	0x00000004 /* bit 2 */
114*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_MAC_EVENT	0x00000008 /* bit 3 */
115*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_RX_PROBLEM	0x00000010 /* bit 4 */
116*d8d81063Sfei feng - Sun Microsystems - Beijing China 
117*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_RADIO_OFF	0x00000020 /* bit 5 */
118*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_RADIO_ON	0x00000040 /* bit 6 */
119*d8d81063Sfei feng - Sun Microsystems - Beijing China 
120*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_RADAR_DETECT	0x00000080 /* bit 7 */
121*d8d81063Sfei feng - Sun Microsystems - Beijing China 
122*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_ICV_ERROR	0x00000100 /* bit 8 */
123*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_MIC_ERROR	0x00000200 /* bit 9 */
124*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_QUEUE_EMPTY	0x00004000
125*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_QUEUE_FULL	0x00000800
126*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_CHAN_SWITCH	0x00001000
127*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_TX_WATCHDOG	0x00002000
128*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_BA_WATCHDOG	0x00000400
129*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREQ_A2HRIC_BIT_TX_ACK	0x00008000
130*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ISR_SRC_BITS	((MACREG_A2HRIC_BIT_RX_RDY)	| \
131*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_TX_DONE)	| \
132*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_OPC_DONE)	| \
133*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_MAC_EVENT)	| \
134*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_MIC_ERROR)	| \
135*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_ICV_ERROR)	| \
136*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_RADAR_DETECT)| \
137*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_CHAN_SWITCH)	| \
138*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_TX_WATCHDOG)	| \
139*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_QUEUE_EMPTY)	| \
140*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREG_A2HRIC_BIT_BA_WATCHDOG)	| \
141*d8d81063Sfei feng - Sun Microsystems - Beijing China 			(MACREQ_A2HRIC_BIT_TX_ACK))
142*d8d81063Sfei feng - Sun Microsystems - Beijing China 
143*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_A2HRIC_BIT_MASK	ISR_SRC_BITS
144*d8d81063Sfei feng - Sun Microsystems - Beijing China 
145*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Bit definitio for MACREG_REG_H2A_INTERRUPT_CAUSE (H2ARIC) */
146*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_H2ARIC_BIT_PPA_READY	0x00000001 /* bit 0 */
147*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_H2ARIC_BIT_DOOR_BELL	0x00000002 /* bit 1 */
148*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ISR_RESET			(1<<15)
149*d8d81063Sfei feng - Sun Microsystems - Beijing China 
150*d8d81063Sfei feng - Sun Microsystems - Beijing China /* INT code register event definition */
151*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MACREG_INT_CODE_CMD_FINISHED	0x00000005
152*d8d81063Sfei feng - Sun Microsystems - Beijing China 
153*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
154*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Define OpMode for SoftAP/Station mode
155*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
156*d8d81063Sfei feng - Sun Microsystems - Beijing China 
157*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
158*d8d81063Sfei feng - Sun Microsystems - Beijing China  * The following mode signature has to be written to PCI scratch register#0
159*d8d81063Sfei feng - Sun Microsystems - Beijing China  * right after successfully downloading the last block of firmware and
160*d8d81063Sfei feng - Sun Microsystems - Beijing China  * before waiting for firmware ready signature
161*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
162*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_STA_MODE		0x5A
163*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_SOFTAP_MODE		0xA5
164*d8d81063Sfei feng - Sun Microsystems - Beijing China 
165*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_STA_FWRDY_SIGNATURE	0xF0F1F2F4
166*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_SOFTAP_FWRDY_SIGNATURE	0xF1F2F4A5
167*d8d81063Sfei feng - Sun Microsystems - Beijing China 
168*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_CODE_DNLD			0x0001
169*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_GET_HW_SPEC			0x0003
170*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_HW_SPEC			0x0004
171*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_MAC_MULTICAST_ADR		0x0010
172*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_802_11_GET_STAT		0x0014
173*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_MAC_REG_ACCESS		0x0019
174*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_BBP_REG_ACCESS		0x001a
175*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_RF_REG_ACCESS		0x001b
176*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_802_11_RADIO_CONTROL	0x001c
177*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_802_11_RF_TX_POWER		0x001e
178*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_802_11_RF_ANTENNA		0x0020
179*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_BEACON			0x0100
180*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_AID			0x010d
181*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_RF_CHANNEL		0x010a
182*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_INFRA_MODE		0x010e
183*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_G_PROTECT_FLAG		0x010f
184*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_802_11_RTS_THSD		0x0113
185*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_802_11_SET_SLOT		0x0114
186*d8d81063Sfei feng - Sun Microsystems - Beijing China 
187*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_802_11H_DETECT_RADAR	0x0120
188*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_WMM_MODE		0x0123
189*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_HT_GUARD_INTERVAL		0x0124
190*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_FIXED_RATE		0x0126
191*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_LINKADAPT_CS_MODE	0x0129
192*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_MAC_ADDR		0x0202
193*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_RATE_ADAPT_MODE		0x0203
194*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_GET_WATCHDOG_BITMAP		0x0205
195*d8d81063Sfei feng - Sun Microsystems - Beijing China 
196*d8d81063Sfei feng - Sun Microsystems - Beijing China /* SoftAP command code */
197*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_BSS_START			0x1100
198*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_NEW_STN			0x1111
199*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_KEEP_ALIVE		0x1112
200*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_APMODE			0x1114
201*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_SWITCH_CHANNEL		0x1121
202*d8d81063Sfei feng - Sun Microsystems - Beijing China 
203*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
204*d8d81063Sfei feng - Sun Microsystems - Beijing China  * @HWENCR@
205*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Command to update firmware encryption keys.
206*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
207*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_UPDATE_ENCRYPTION		0x1122
208*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
209*d8d81063Sfei feng - Sun Microsystems - Beijing China  * @11E-BA@
210*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Command to create/destroy block ACK
211*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
212*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_BASTREAM			0x1125
213*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_RIFS			0x1126
214*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_N_PROTECT_FLAG		0x1131
215*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_N_PROTECT_OPMODE	0x1132
216*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_OPTIMIZATION_LEVEL	0x1133
217*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_GET_CALTABLE		0x1134
218*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_MIMOPSHT		0x1135
219*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_GET_BEACON			0x1138
220*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_REGION_CODE		0x1139
221*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_POWERSAVESTATION	0x1140
222*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_TIM			0x1141
223*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_GET_TIM			0x1142
224*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_GET_SEQNO			0x1143
225*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_DWDS_ENABLE			0x1144
226*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_AMPDU_RETRY_RATEDROP_MODE	0x1145
227*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_CFEND_ENABLE		0x1146
228*d8d81063Sfei feng - Sun Microsystems - Beijing China 
229*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
230*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Define general result code for each command
231*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
232*d8d81063Sfei feng - Sun Microsystems - Beijing China /* RESULT OK */
233*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_RESULT_OK		0x0000
234*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Genenral error */
235*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_RESULT_ERROR		0x0001
236*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Command is not valid */
237*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_RESULT_NOT_SUPPORT	0x0002
238*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Command is pending (will be processed) */
239*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_RESULT_PENDING		0x0003
240*d8d81063Sfei feng - Sun Microsystems - Beijing China /* System is busy (command ignored) */
241*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_RESULT_BUSY		0x0004
242*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Data buffer is not big enough */
243*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_RESULT_PARTIAL_DATA	0x0005
244*d8d81063Sfei feng - Sun Microsystems - Beijing China 
245*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_CMD_SET_EDCA_PARAMS	0x0115
246*d8d81063Sfei feng - Sun Microsystems - Beijing China 
247*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
248*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Definition of action or option for each command
249*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
250*d8d81063Sfei feng - Sun Microsystems - Beijing China 
251*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
252*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Define general purpose action
253*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
254*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_GEN_READ	0x0000
255*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_GEN_WRITE	0x0001
256*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_GEN_GET	0x0000
257*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_GEN_SET	0x0001
258*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_GEN_OFF	0x0000
259*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_GEN_ON	0x0001
260*d8d81063Sfei feng - Sun Microsystems - Beijing China 
261*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_DIFF_CHANNEL	0x0002
262*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_GEN_SET_LIST	0x0002
263*d8d81063Sfei feng - Sun Microsystems - Beijing China 
264*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Define action or option for HostCmd_FW_USE_FIXED_RATE */
265*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_USE_FIXED_RATE	0x0001
266*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_NOT_USE_FIXED_RATE	0x0002
267*d8d81063Sfei feng - Sun Microsystems - Beijing China 
268*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Define action or option for HostCmd_CMD_802_11_SET_WEP */
269*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_ADD		0x0002
270*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_REMOVE	0x0004
271*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HostCmd_ACT_USE_DEFAULT	0x0008
272*d8d81063Sfei feng - Sun Microsystems - Beijing China 
273*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
274*d8d81063Sfei feng - Sun Microsystems - Beijing China  * PUBLIC DEFINITIONS
275*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
276*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	RATE_INDEX_MAX_ARRAY	14
277*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	WOW_MAX_STATION		32
278*d8d81063Sfei feng - Sun Microsystems - Beijing China 
279*d8d81063Sfei feng - Sun Microsystems - Beijing China 
280*d8d81063Sfei feng - Sun Microsystems - Beijing China #pragma pack(1)
281*d8d81063Sfei feng - Sun Microsystems - Beijing China 
282*d8d81063Sfei feng - Sun Microsystems - Beijing China struct mwl_ant_info {
283*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		rssi_a;	/* RSSI for antenna A */
284*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		rssi_b;	/* RSSI for antenna B */
285*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		rssi_c;	/* RSSI for antenna C */
286*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		rsvd1;	/* Reserved */
287*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		nf_a;	/* Noise floor for antenna A */
288*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		nf_b;	/* Noise floor for antenna B */
289*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		nf_c;	/* Noise floor for antenna C */
290*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		rsvd2;	/* Reserved */
291*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		nf;	/* Noise floor */
292*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		rsvd3[3]; /* Reserved - To make word aligned */
293*d8d81063Sfei feng - Sun Microsystems - Beijing China };
294*d8d81063Sfei feng - Sun Microsystems - Beijing China 
295*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
296*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Hardware tx/rx descriptors.
297*d8d81063Sfei feng - Sun Microsystems - Beijing China  *
298*d8d81063Sfei feng - Sun Microsystems - Beijing China  * NB: tx descriptor size must match f/w expected size
299*d8d81063Sfei feng - Sun Microsystems - Beijing China  * because f/w prefetch's the next descriptor linearly
300*d8d81063Sfei feng - Sun Microsystems - Beijing China  * and doesn't chase the next pointer.
301*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
302*d8d81063Sfei feng - Sun Microsystems - Beijing China struct mwl_txdesc {
303*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	Status;
304*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_IDLE		0x00000000
305*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_USED		0x00000001
306*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_OK		0x00000001
307*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_OK_RETRY	0x00000002
308*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_OK_MORE_RETRY	0x00000004
309*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_MULTICAST_TX	0x00000008
310*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_BROADCAST_TX	0x00000010
311*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_FAILED_LINK_ERROR		0x00000020
312*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_FAILED_EXCEED_LIMIT		0x00000040
313*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_FAILED_XRETRY	EAGLE_TXD_STATUS_FAILED_EXCEED_LIMIT
314*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_FAILED_AGING	0x00000080
315*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_STATUS_FW_OWNED	0x80000000
316*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		DataRate;
317*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		TxPriority;
318*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	QosCtrl;
319*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	PktPtr;
320*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	PktLen;
321*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		DestAddr[6];
322*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	pPhysNext;
323*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	SapPktInfo;
324*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_BONLY	1
325*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_GONLY	2
326*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_BG	3
327*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_NONLY	4
328*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_BN	5
329*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_GN	6
330*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_BGN	7
331*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_AONLY	8
332*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_AG	10
333*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_MODE_AN	12
334*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Format;
335*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_FORMAT	0x0001	/* frame format/rate */
336*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_FORMAT_LEGACY	0x0000	/* legacy rate frame */
337*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_FORMAT_HT	0x0001	/* HT rate frame */
338*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_GI		0x0002	/* guard interval */
339*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_GI_SHORT	0x0002	/* short guard interval */
340*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_GI_LONG	0x0000	/* long guard interval */
341*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_CHW		0x0004	/* channel width */
342*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_CHW_20	0x0000	/* 20MHz channel width */
343*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_CHW_40	0x0004	/* 40MHz channel width */
344*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_RATE		0x01f8	/* tx rate (legacy)/ MCS */
345*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_RATE_S	3
346*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_ADV		0x0600	/* advanced coding */
347*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_ADV_S		9
348*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_ADV_NONE	0x0000
349*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_ADV_LDPC	0x0200
350*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_ADV_RS	0x0400
351*d8d81063Sfei feng - Sun Microsystems - Beijing China /* NB: 3 is reserved */
352*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_ANTENNA	0x1800	/* antenna select */
353*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_ANTENNA_S	11
354*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_EXTCHAN	0x6000	/* extension channel */
355*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_EXTCHAN_S	13
356*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_EXTCHAN_HI	0x0000	/* above */
357*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_EXTCHAN_LO	0x2000	/* below */
358*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_PREAMBLE	0x8000
359*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_PREAMBLE_SHORT 0x8000	/* short preamble */
360*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_PREAMBLE_LONG 0x0000	/* long preamble */
361*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	pad;		/* align to 4-byte boundary */
362*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_FIXED_RATE	0x0100	/* get tx rate from Format */
363*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_TXD_DONT_AGGR	0x0200	/* don't aggregate frame */
364*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	ack_wcb_addr;
365*d8d81063Sfei feng - Sun Microsystems - Beijing China };
366*d8d81063Sfei feng - Sun Microsystems - Beijing China 
367*d8d81063Sfei feng - Sun Microsystems - Beijing China struct mwl_rxdesc {
368*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* control element */
369*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		RxControl;
370*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_CTRL_DRIVER_OWN	0x00
371*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_CTRL_OS_OWN		0x04
372*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_CTRL_DMA_OWN		0x80
373*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* received signal strengt indication */
374*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		RSSI;
375*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* status field w/ USED bit */
376*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Status;
377*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_IDLE		0x00
378*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_OK		0x01
379*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_MULTICAST_RX	0x02
380*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_BROADCAST_RX	0x04
381*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_FRAGMENT_RX	0x08
382*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_GENERAL_DECRYPT_ERR	0xff
383*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_DECRYPT_ERR_MASK	0x80
384*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_TKIP_MIC_DECRYPT_ERR	0x02
385*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_WEP_ICV_DECRYPT_ERR	0x04
386*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EAGLE_RXD_STATUS_TKIP_ICV_DECRYPT_ERR	0x08
387*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* channel # pkt received on */
388*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Channel;
389*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* total length of received data */
390*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	PktLen;
391*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* not used */
392*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		SQ2;
393*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* received data rate */
394*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Rate;
395*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* physical address of payload data */
396*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	pPhysBuffData;
397*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* physical address of next RX desc */
398*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	pPhysNext;
399*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* received QosCtrl field variable */
400*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	QosCtrl;
401*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* like name states */
402*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	HtSig2;
403*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifdef MWL_ANT_INFO_SUPPORT
404*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* antenna info */
405*d8d81063Sfei feng - Sun Microsystems - Beijing China 	struct mwl_ant_info ai;
406*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
407*d8d81063Sfei feng - Sun Microsystems - Beijing China };
408*d8d81063Sfei feng - Sun Microsystems - Beijing China #pragma pack()
409*d8d81063Sfei feng - Sun Microsystems - Beijing China 
410*d8d81063Sfei feng - Sun Microsystems - Beijing China 
411*d8d81063Sfei feng - Sun Microsystems - Beijing China 
412*d8d81063Sfei feng - Sun Microsystems - Beijing China // =============================================================================
413*d8d81063Sfei feng - Sun Microsystems - Beijing China //			HOST COMMAND DEFINITIONS
414*d8d81063Sfei feng - Sun Microsystems - Beijing China // =============================================================================
415*d8d81063Sfei feng - Sun Microsystems - Beijing China 
416*d8d81063Sfei feng - Sun Microsystems - Beijing China //
417*d8d81063Sfei feng - Sun Microsystems - Beijing China // Definition of data structure for each command
418*d8d81063Sfei feng - Sun Microsystems - Beijing China //
419*d8d81063Sfei feng - Sun Microsystems - Beijing China // Define general data structure
420*d8d81063Sfei feng - Sun Microsystems - Beijing China #pragma pack(1)
421*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
422*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Cmd;
423*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Length;
424*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifdef MWL_MBSS_SUPPORT
425*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		SeqNum;
426*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		MacId;
427*d8d81063Sfei feng - Sun Microsystems - Beijing China #else
428*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	SeqNum;
429*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
430*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Result;
431*d8d81063Sfei feng - Sun Microsystems - Beijing China } FWCmdHdr;
432*d8d81063Sfei feng - Sun Microsystems - Beijing China 
433*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
434*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
435*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		annex;
436*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		index;
437*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		len;
438*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Reserverd;
439*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	CAL_TBL_SIZE	160
440*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t	calTbl[CAL_TBL_SIZE];
441*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_GET_CALTABLE;
442*d8d81063Sfei feng - Sun Microsystems - Beijing China 
443*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
444*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
445*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* version of the HW */
446*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Version;
447*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* host interface */
448*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		HostIf;
449*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Max. number of WCB FW can handle */
450*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	NumOfWCB;
451*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* MaxNbr of MC addresses FW can handle */
452*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	NumOfMCastAddr;
453*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* MAC address programmed in HW */
454*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		PermanentAddr[6];
455*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	RegionCode;
456*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Number of antenna used */
457*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	NumberOfAntenna;
458*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* 4 byte of FW release number */
459*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	FWReleaseNumber;
460*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	WcbBase0;
461*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	RxPdWrPtr;
462*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	RxPdRdPtr;
463*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	ulFwAwakeCookie;
464*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	WcbBase1[3];
465*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_GET_HW_SPEC;
466*d8d81063Sfei feng - Sun Microsystems - Beijing China 
467*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
468*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
469*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* HW revision */
470*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Version;
471*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Host interface */
472*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		HostIf;
473*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Max. number of Multicast address FW can handle */
474*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	NumOfMCastAdr;
475*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* MAC address */
476*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		PermanentAddr[6];
477*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Region Code */
478*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	RegionCode;
479*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* 4 byte of FW release number */
480*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	FWReleaseNumber;
481*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Firmware awake cookie */
482*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	ulFwAwakeCookie;
483*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Device capabilities (see above) */
484*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	DeviceCaps;
485*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Rx shared memory queue */
486*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	RxPdWrPtr;
487*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* TX queues in WcbBase array */
488*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	NumTxQueues;
489*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* TX WCB Rings */
490*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	WcbBase[MAX_TXWCB_QUEUES];
491*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	Flags;
492*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	SET_HW_SPEC_DISABLEMBSS		0x08
493*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	SET_HW_SPEC_HOSTFORM_BEACON	0x10
494*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	SET_HW_SPEC_HOSTFORM_PROBERESP	0x20
495*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	SET_HW_SPEC_HOST_POWERSAVE	0x40
496*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	SET_HW_SPEC_HOSTENCRDECR_MGMT	0x80
497*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	TxWcbNumPerQueue;
498*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	TotalRxWcb;
499*d8d81063Sfei feng - Sun Microsystems - Beijing China }HostCmd_DS_SET_HW_SPEC;
500*d8d81063Sfei feng - Sun Microsystems - Beijing China 
501*d8d81063Sfei feng - Sun Microsystems - Beijing China // used for stand alone bssid sets/clears
502*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
503*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
504*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifdef MWL_MBSS_SUPPORT
505*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	MacType;
506*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	WL_MAC_TYPE_PRIMARY_CLIENT	0
507*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	WL_MAC_TYPE_SECONDARY_CLIENT	1
508*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	WL_MAC_TYPE_PRIMARY_AP		2
509*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	WL_MAC_TYPE_SECONDARY_AP	3
510*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
511*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		MacAddr[6];
512*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_SET_MAC,
513*d8d81063Sfei feng - Sun Microsystems - Beijing China 	HostCmd_FW_SET_BSSID,
514*d8d81063Sfei feng - Sun Microsystems - Beijing China 	HostCmd_FW_SET_MAC;
515*d8d81063Sfei feng - Sun Microsystems - Beijing China 
516*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
517*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	LegacyRateBitMap;
518*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	HTRateBitMap;
519*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	CapInfo;
520*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	HTCapabilitiesInfo;
521*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		MacHTParamInfo;
522*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Rev;
523*d8d81063Sfei feng - Sun Microsystems - Beijing China 	struct {
524*d8d81063Sfei feng - Sun Microsystems - Beijing China 		uint8_t		ControlChan;
525*d8d81063Sfei feng - Sun Microsystems - Beijing China 		uint8_t		AddChan;
526*d8d81063Sfei feng - Sun Microsystems - Beijing China 		uint16_t	OpMode;
527*d8d81063Sfei feng - Sun Microsystems - Beijing China 		uint16_t	stbc;
528*d8d81063Sfei feng - Sun Microsystems - Beijing China 	} AddHtInfo;
529*d8d81063Sfei feng - Sun Microsystems - Beijing China } PeerInfo_t;
530*d8d81063Sfei feng - Sun Microsystems - Beijing China 
531*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
532*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
533*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	AID;
534*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		MacAddr[6];
535*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	StnId;
536*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
537*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Reserved;
538*d8d81063Sfei feng - Sun Microsystems - Beijing China 	PeerInfo_t	PeerInfo;
539*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Qosinfo;
540*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		isQosSta;
541*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	FwStaPtr;
542*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_SET_NEW_STN;
543*d8d81063Sfei feng - Sun Microsystems - Beijing China 
544*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Define data structure for HostCmd_CMD_802_11_RF_ANTENNA */
545*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct _HostCmd_DS_802_11_RF_ANTENNA {
546*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
547*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
548*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* Number of antennas or 0xffff(diversity) */
549*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	AntennaMode;
550*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_802_11_RF_ANTENNA;
551*d8d81063Sfei feng - Sun Microsystems - Beijing China 
552*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Define data structure for HostCmd_CMD_802_11_RADIO_CONTROL */
553*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
554*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
555*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
556*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/*
557*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 *  @bit0: 1/0, on/off
558*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 *  @bit1: 1/0, long/short
559*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 *  @bit2: 1/0,auto/fix
560*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 */
561*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Control;
562*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	RadioOn;
563*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_802_11_RADIO_CONTROL;
564*d8d81063Sfei feng - Sun Microsystems - Beijing China 
565*d8d81063Sfei feng - Sun Microsystems - Beijing China /* for HostCmd_CMD_SET_WMM_MODE */
566*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
567*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
568*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* 0->unset, 1->set */
569*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
570*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_SetWMMMode;
571*d8d81063Sfei feng - Sun Microsystems - Beijing China 
572*d8d81063Sfei feng - Sun Microsystems - Beijing China /* bits 0-5 specify frequency band */
573*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FREQ_BAND_2DOT4GHZ	0x0001
574*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FREQ_BAND_4DOT9GHZ	0x0002	/* XXX not implemented */
575*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FREQ_BAND_5GHZ		0x0004
576*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FREQ_BAND_5DOT2GHZ	0x0008	/* XXX not implemented */
577*d8d81063Sfei feng - Sun Microsystems - Beijing China /* bits 6-10 specify channel width */
578*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	CH_AUTO_WIDTH		0x0000	/* XXX not used? */
579*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	CH_10_MHz_WIDTH		0x0040
580*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	CH_20_MHz_WIDTH		0x0080
581*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	CH_40_MHz_WIDTH		0x0100
582*d8d81063Sfei feng - Sun Microsystems - Beijing China /* bits 11-12 specify extension channel */
583*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EXT_CH_NONE		0x0000	/* no extension channel */
584*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EXT_CH_ABOVE_CTRL_CH	0x0800	/* extension channel above */
585*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EXT_CH_AUTO		0x1000	/* XXX not used? */
586*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	EXT_CH_BELOW_CTRL_CH	0x1800	/* extension channel below */
587*d8d81063Sfei feng - Sun Microsystems - Beijing China /* bits 13-31 are reserved */
588*d8d81063Sfei feng - Sun Microsystems - Beijing China 
589*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FIXED_RATE_WITH_AUTO_RATE_DROP		0
590*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	FIXED_RATE_WITHOUT_AUTORATE_DROP	1
591*d8d81063Sfei feng - Sun Microsystems - Beijing China 
592*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	LEGACY_RATE_TYPE			0
593*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	HT_RATE_TYPE				1
594*d8d81063Sfei feng - Sun Microsystems - Beijing China 
595*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	RETRY_COUNT_VALID			0
596*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	RETRY_COUNT_INVALID			1
597*d8d81063Sfei feng - Sun Microsystems - Beijing China 
598*d8d81063Sfei feng - Sun Microsystems - Beijing China // Define data structure for HostCmd_CMD_802_11_RF_CHANNEL
599*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
600*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
601*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
602*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		CurrentChannel;	/* channel # */
603*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	ChannelFlags;	/* see below */
604*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_SET_RF_CHANNEL;
605*d8d81063Sfei feng - Sun Microsystems - Beijing China 
606*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	TX_POWER_LEVEL_TOTAL	8
607*d8d81063Sfei feng - Sun Microsystems - Beijing China 
608*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Define data structure for HostCmd_CMD_802_11_RF_TX_POWER */
609*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
610*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
611*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
612*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	SupportTxPowerLevel;
613*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	CurrentTxPowerLevel;
614*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Reserved;
615*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	PowerLevelList[TX_POWER_LEVEL_TOTAL];
616*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_802_11_RF_TX_POWER;
617*d8d81063Sfei feng - Sun Microsystems - Beijing China 
618*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
619*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/*
620*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 * lower rate after the retry count
621*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 * 0: legacy, 1: HT
622*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 */
623*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	FixRateType;
624*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/*
625*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 *  0: retry count is not valid
626*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 *  1: use retry count specified
627*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 */
628*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	RetryCountValid;
629*d8d81063Sfei feng - Sun Microsystems - Beijing China } FIX_RATE_FLAG;
630*d8d81063Sfei feng - Sun Microsystems - Beijing China 
631*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef  struct {
632*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FIX_RATE_FLAG	FixRateTypeFlags;
633*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* legacy rate(not index) or an MCS code */
634*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	FixedRate;
635*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	RetryCount;
636*d8d81063Sfei feng - Sun Microsystems - Beijing China } FIXED_RATE_ENTRY;
637*d8d81063Sfei feng - Sun Microsystems - Beijing China 
638*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef  struct {
639*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
640*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/*
641*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 * HostCmd_ACT_GEN_GET			0x0000
642*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 * HostCmd_ACT_GEN_SET 			0x0001
643*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 * HostCmd_ACT_NOT_USE_FIXED_RATE	0x0002
644*d8d81063Sfei feng - Sun Microsystems - Beijing China 	 */
645*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	Action;
646*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* use fixed rate specified but firmware can drop */
647*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	AllowRateDrop;
648*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	EntryCount;
649*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FIXED_RATE_ENTRY FixedRateTable[4];
650*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		MulticastRate;
651*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		MultiRateTxType;
652*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		ManagementRate;
653*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_USE_FIXED_RATE;
654*d8d81063Sfei feng - Sun Microsystems - Beijing China 
655*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Define data structure for HostCmd_CMD_SET_RATE_ADAPT_MODE */
656*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
657*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
658*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
659*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	RateAdaptMode;
660*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_SET_RATE_ADAPT_MODE;
661*d8d81063Sfei feng - Sun Microsystems - Beijing China 
662*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
663*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
664*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t	OptLevel;
665*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_SET_OPTIMIZATION_LEVEL;
666*d8d81063Sfei feng - Sun Microsystems - Beijing China 
667*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
668*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
669*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	regionCode;
670*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_SET_REGIONCODE_INFO;
671*d8d81063Sfei feng - Sun Microsystems - Beijing China 
672*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
673*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
674*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;	/* 0: Get. 1:Set */
675*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	Option;	/* 0: default. 1:Aggressive */
676*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	Threshold;	/* Range 0-200, default 8 */
677*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_AMPDU_RETRY_RATEDROP_MODE;
678*d8d81063Sfei feng - Sun Microsystems - Beijing China 
679*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
680*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
681*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	Enable;	/* 0 -- Disable. or 1 -- Enable */
682*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_CFEND_ENABLE;
683*d8d81063Sfei feng - Sun Microsystems - Beijing China 
684*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
685*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
686*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	Enable;	/* FALSE: Disable or TRUE: Enable */
687*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_BSS_START;
688*d8d81063Sfei feng - Sun Microsystems - Beijing China 
689*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
690*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
691*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_SET_INFRA_MODE;
692*d8d81063Sfei feng - Sun Microsystems - Beijing China 
693*d8d81063Sfei feng - Sun Microsystems - Beijing China /* used for AID sets/clears */
694*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
695*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
696*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	AssocID;
697*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		MacAddr[6]; /* AP's Mac Address(BSSID) */
698*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	GProtection;
699*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		ApRates[RATE_INDEX_MAX_ARRAY];
700*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_SET_AID;
701*d8d81063Sfei feng - Sun Microsystems - Beijing China 
702*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
703*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
704*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
705*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Threshold;
706*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_802_11_RTS_THSD;
707*d8d81063Sfei feng - Sun Microsystems - Beijing China 
708*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Define data structure for HostCmd_CMD_SET_LINKADAPT_CS_MODE */
709*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
710*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
711*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Action;
712*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	CSMode;
713*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_DS_SET_LINKADAPT_CS_MODE;
714*d8d81063Sfei feng - Sun Microsystems - Beijing China 
715*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
716*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
717*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	ActionType; /* ENCR_ACTION_TYPE */
718*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	DataLength; /* size of the data buffer attached */
719*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifdef MWL_MBSS_SUPPORT
720*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t	macaddr[6];
721*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
722*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t	ActionData[1];
723*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_UPDATE_ENCRYPTION;
724*d8d81063Sfei feng - Sun Microsystems - Beijing China 
725*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
726*d8d81063Sfei feng - Sun Microsystems - Beijing China  * @HWENCR@
727*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Hardware Encryption related data structures and constant definitions.
728*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Note that all related changes are marked with the @HWENCR@ tag.
729*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
730*d8d81063Sfei feng - Sun Microsystems - Beijing China 
731*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MAX_ENCR_KEY_LENGTH	16	/* max 128 bits - depends on type */
732*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	MIC_KEY_LENGTH		8	/* size of Tx/Rx MIC key - 8 bytes */
733*d8d81063Sfei feng - Sun Microsystems - Beijing China 
734*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_TYPE_ID_WEP	0x00	/* Key type is WEP */
735*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_TYPE_ID_TKIP	0x01	/* Key type is TKIP */
736*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_TYPE_ID_AES	0x02	/* Key type is AES-CCMP	*/
737*d8d81063Sfei feng - Sun Microsystems - Beijing China 
738*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
739*d8d81063Sfei feng - Sun Microsystems - Beijing China  * flags used in structure - same as driver EKF_XXX flags
740*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
741*d8d81063Sfei feng - Sun Microsystems - Beijing China /* indicate key is in use */
742*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_INUSE		0x00000001
743*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Group key for RX only */
744*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_RXGROUPKEY	0x00000002
745*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Group key for TX */
746*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_TXGROUPKEY	0x00000004
747*d8d81063Sfei feng - Sun Microsystems - Beijing China /* pairwise */
748*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_PAIRWISE		0x00000008
749*d8d81063Sfei feng - Sun Microsystems - Beijing China /* only used for RX */
750*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_RXONLY		0x00000010
751*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
752*d8d81063Sfei feng - Sun Microsystems - Beijing China  * These flags are new additions - for hardware encryption commands only
753*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
754*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Key is for Authenticator */
755*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_AUTHENTICATOR	0x00000020
756*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Sequence counters valid */
757*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_TSC_VALID		0x00000040
758*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Tx key for WEP */
759*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_WEP_TXKEY		0x01000000
760*d8d81063Sfei feng - Sun Microsystems - Beijing China /* Tx/Rx MIC keys are valid */
761*d8d81063Sfei feng - Sun Microsystems - Beijing China #define	ENCR_KEY_FLAG_MICKEY_VALID	0x02000000
762*d8d81063Sfei feng - Sun Microsystems - Beijing China 
763*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
764*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Key material definitions (for WEP, TKIP, & AES-CCMP)
765*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
766*d8d81063Sfei feng - Sun Microsystems - Beijing China 
767*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
768*d8d81063Sfei feng - Sun Microsystems - Beijing China  * WEP Key material definition
769*d8d81063Sfei feng - Sun Microsystems - Beijing China  * ----------------------------
770*d8d81063Sfei feng - Sun Microsystems - Beijing China  * WEPKey	--> An array of 'MAX_ENCR_KEY_LENGTH' bytes.
771*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Note that we do not support 152bit WEP keys
772*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
773*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
774*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* WEP key material (max 128bit) */
775*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t	KeyMaterial[MAX_ENCR_KEY_LENGTH];
776*d8d81063Sfei feng - Sun Microsystems - Beijing China } WEP_TYPE_KEY;
777*d8d81063Sfei feng - Sun Microsystems - Beijing China 
778*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
779*d8d81063Sfei feng - Sun Microsystems - Beijing China  * TKIP Key material definition
780*d8d81063Sfei feng - Sun Microsystems - Beijing China  * ----------------------------
781*d8d81063Sfei feng - Sun Microsystems - Beijing China  * This structure defines TKIP key material. Note that
782*d8d81063Sfei feng - Sun Microsystems - Beijing China  * the TxMicKey and RxMicKey may or may not be valid.
783*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
784*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
785*d8d81063Sfei feng - Sun Microsystems - Beijing China  * TKIP Sequence counter - 24 bits
786*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Incremented on each fragment MPDU
787*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
788*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
789*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	low;
790*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	high;
791*d8d81063Sfei feng - Sun Microsystems - Beijing China } ENCR_TKIPSEQCNT;
792*d8d81063Sfei feng - Sun Microsystems - Beijing China 
793*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
794*d8d81063Sfei feng - Sun Microsystems - Beijing China  * TKIP Key material. Key type (group or pairwise key) is
795*d8d81063Sfei feng - Sun Microsystems - Beijing China  * determined by flags in KEY_PARAM_SET structure
796*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
797*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
798*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		KeyMaterial[MAX_ENCR_KEY_LENGTH];
799*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		TkipTxMicKey[MIC_KEY_LENGTH];
800*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		TkipRxMicKey[MIC_KEY_LENGTH];
801*d8d81063Sfei feng - Sun Microsystems - Beijing China 	ENCR_TKIPSEQCNT	TkipRsc;
802*d8d81063Sfei feng - Sun Microsystems - Beijing China 	ENCR_TKIPSEQCNT	TkipTsc;
803*d8d81063Sfei feng - Sun Microsystems - Beijing China } TKIP_TYPE_KEY;
804*d8d81063Sfei feng - Sun Microsystems - Beijing China 
805*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
806*d8d81063Sfei feng - Sun Microsystems - Beijing China  * AES-CCMP Key material definition
807*d8d81063Sfei feng - Sun Microsystems - Beijing China  * --------------------------------
808*d8d81063Sfei feng - Sun Microsystems - Beijing China  * This structure defines AES-CCMP key material.
809*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
810*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
811*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* AES Key material */
812*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t	KeyMaterial[MAX_ENCR_KEY_LENGTH];
813*d8d81063Sfei feng - Sun Microsystems - Beijing China } AES_TYPE_KEY;
814*d8d81063Sfei feng - Sun Microsystems - Beijing China 
815*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
816*d8d81063Sfei feng - Sun Microsystems - Beijing China  * UPDATE_ENCRYPTION command action type.
817*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
818*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef enum {
819*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* request to enable/disable HW encryption */
820*d8d81063Sfei feng - Sun Microsystems - Beijing China 	EncrActionEnableHWEncryption,
821*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* request to set encryption key */
822*d8d81063Sfei feng - Sun Microsystems - Beijing China 	EncrActionTypeSetKey,
823*d8d81063Sfei feng - Sun Microsystems - Beijing China 	/* request to remove one or more keys */
824*d8d81063Sfei feng - Sun Microsystems - Beijing China 	EncrActionTypeRemoveKey,
825*d8d81063Sfei feng - Sun Microsystems - Beijing China 	EncrActionTypeSetGroupKey
826*d8d81063Sfei feng - Sun Microsystems - Beijing China } ENCR_ACTION_TYPE;
827*d8d81063Sfei feng - Sun Microsystems - Beijing China 
828*d8d81063Sfei feng - Sun Microsystems - Beijing China /*
829*d8d81063Sfei feng - Sun Microsystems - Beijing China  * Encryption key definition.
830*d8d81063Sfei feng - Sun Microsystems - Beijing China  * --------------------------
831*d8d81063Sfei feng - Sun Microsystems - Beijing China  * This structure provides all required/essential
832*d8d81063Sfei feng - Sun Microsystems - Beijing China  * information about the key being set/removed.
833*d8d81063Sfei feng - Sun Microsystems - Beijing China  */
834*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
835*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	Length;		/* Total length of this structure */
836*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	KeyTypeId;	/* Key type - WEP, TKIP or AES-CCMP */
837*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	KeyInfo;	/* key flags */
838*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	KeyIndex; 	/* For WEP only - actual key index */
839*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint16_t	KeyLen;		/* Size of the key */
840*d8d81063Sfei feng - Sun Microsystems - Beijing China 	union {				/* Key material (variable size array) */
841*d8d81063Sfei feng - Sun Microsystems - Beijing China 		WEP_TYPE_KEY	WepKey;
842*d8d81063Sfei feng - Sun Microsystems - Beijing China 		TKIP_TYPE_KEY	TkipKey;
843*d8d81063Sfei feng - Sun Microsystems - Beijing China 		AES_TYPE_KEY	AesKey;
844*d8d81063Sfei feng - Sun Microsystems - Beijing China 	} Key;
845*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifdef MWL_MBSS_SUPPORT
846*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t	Macaddr[6];
847*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
848*d8d81063Sfei feng - Sun Microsystems - Beijing China } KEY_PARAM_SET;
849*d8d81063Sfei feng - Sun Microsystems - Beijing China 
850*d8d81063Sfei feng - Sun Microsystems - Beijing China 
851*d8d81063Sfei feng - Sun Microsystems - Beijing China typedef struct {
852*d8d81063Sfei feng - Sun Microsystems - Beijing China 	FWCmdHdr	CmdHdr;
853*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	ActionType;	/* ENCR_ACTION_TYPE */
854*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint32_t	DataLength;	/* size of the data buffer attached */
855*d8d81063Sfei feng - Sun Microsystems - Beijing China 	KEY_PARAM_SET	KeyParam;
856*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifndef MWL_MBSS_SUPPORT
857*d8d81063Sfei feng - Sun Microsystems - Beijing China 	uint8_t		Macaddr[8];
858*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
859*d8d81063Sfei feng - Sun Microsystems - Beijing China } HostCmd_FW_UPDATE_ENCRYPTION_SET_KEY;
860*d8d81063Sfei feng - Sun Microsystems - Beijing China #pragma pack()
861*d8d81063Sfei feng - Sun Microsystems - Beijing China 
862*d8d81063Sfei feng - Sun Microsystems - Beijing China #ifdef __cplusplus
863*d8d81063Sfei feng - Sun Microsystems - Beijing China }
864*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif
865*d8d81063Sfei feng - Sun Microsystems - Beijing China 
866*d8d81063Sfei feng - Sun Microsystems - Beijing China #endif /* _MWL_REG_H */
867