Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / drivers / net / wireless / libertas / types.h
blobf0d57958b34b141f5c6274ebf59d5f89bc9e56f5
1 /**
2 * This header file contains definition for global types
3 */
4 #ifndef _LBS_TYPES_H_
5 #define _LBS_TYPES_H_
7 #include <linux/if_ether.h>
8 #include <asm/byteorder.h>
10 struct ieeetypes_cfparamset {
11 u8 elementid;
12 u8 len;
13 u8 cfpcnt;
14 u8 cfpperiod;
15 __le16 cfpmaxduration;
16 __le16 cfpdurationremaining;
17 } __attribute__ ((packed));
20 struct ieeetypes_ibssparamset {
21 u8 elementid;
22 u8 len;
23 __le16 atimwindow;
24 } __attribute__ ((packed));
26 union IEEEtypes_ssparamset {
27 struct ieeetypes_cfparamset cfparamset;
28 struct ieeetypes_ibssparamset ibssparamset;
29 } __attribute__ ((packed));
31 struct ieeetypes_fhparamset {
32 u8 elementid;
33 u8 len;
34 __le16 dwelltime;
35 u8 hopset;
36 u8 hoppattern;
37 u8 hopindex;
38 } __attribute__ ((packed));
40 struct ieeetypes_dsparamset {
41 u8 elementid;
42 u8 len;
43 u8 currentchan;
44 } __attribute__ ((packed));
46 union ieeetypes_phyparamset {
47 struct ieeetypes_fhparamset fhparamset;
48 struct ieeetypes_dsparamset dsparamset;
49 } __attribute__ ((packed));
51 struct ieeetypes_assocrsp {
52 __le16 capability;
53 __le16 statuscode;
54 __le16 aid;
55 u8 iebuffer[1];
56 } __attribute__ ((packed));
58 /** TLV type ID definition */
59 #define PROPRIETARY_TLV_BASE_ID 0x0100
61 /* Terminating TLV type */
62 #define MRVL_TERMINATE_TLV_ID 0xffff
64 #define TLV_TYPE_SSID 0x0000
65 #define TLV_TYPE_RATES 0x0001
66 #define TLV_TYPE_PHY_FH 0x0002
67 #define TLV_TYPE_PHY_DS 0x0003
68 #define TLV_TYPE_CF 0x0004
69 #define TLV_TYPE_IBSS 0x0006
71 #define TLV_TYPE_DOMAIN 0x0007
73 #define TLV_TYPE_POWER_CAPABILITY 0x0021
75 #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
76 #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
77 #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
78 #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
79 #define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 5)
80 #define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 6)
81 #define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 7)
82 #define TLV_TYPE_LED_GPIO (PROPRIETARY_TLV_BASE_ID + 8)
83 #define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 9)
84 #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
85 #define TLV_TYPE_REASSOCAP (PROPRIETARY_TLV_BASE_ID + 11)
86 #define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 12)
87 #define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 13)
88 #define TLV_TYPE_BCASTPROBE (PROPRIETARY_TLV_BASE_ID + 14)
89 #define TLV_TYPE_NUMSSID_PROBE (PROPRIETARY_TLV_BASE_ID + 15)
90 #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
91 #define TLV_TYPE_CRYPTO_DATA (PROPRIETARY_TLV_BASE_ID + 17)
92 #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
93 #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
94 #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
95 #define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 23)
97 /** TLV related data structures*/
98 struct mrvlietypesheader {
99 __le16 type;
100 __le16 len;
101 } __attribute__ ((packed));
103 struct mrvlietypes_data {
104 struct mrvlietypesheader header;
105 u8 Data[1];
106 } __attribute__ ((packed));
108 struct mrvlietypes_ratesparamset {
109 struct mrvlietypesheader header;
110 u8 rates[1];
111 } __attribute__ ((packed));
113 struct mrvlietypes_ssidparamset {
114 struct mrvlietypesheader header;
115 u8 ssid[1];
116 } __attribute__ ((packed));
118 struct mrvlietypes_wildcardssidparamset {
119 struct mrvlietypesheader header;
120 u8 MaxSsidlength;
121 u8 ssid[1];
122 } __attribute__ ((packed));
124 struct chanscanmode {
125 #ifdef __BIG_ENDIAN_BITFIELD
126 u8 reserved_2_7:6;
127 u8 disablechanfilt:1;
128 u8 passivescan:1;
129 #else
130 u8 passivescan:1;
131 u8 disablechanfilt:1;
132 u8 reserved_2_7:6;
133 #endif
134 } __attribute__ ((packed));
136 struct chanscanparamset {
137 u8 radiotype;
138 u8 channumber;
139 struct chanscanmode chanscanmode;
140 __le16 minscantime;
141 __le16 maxscantime;
142 } __attribute__ ((packed));
144 struct mrvlietypes_chanlistparamset {
145 struct mrvlietypesheader header;
146 struct chanscanparamset chanscanparam[1];
147 } __attribute__ ((packed));
149 struct cfparamset {
150 u8 cfpcnt;
151 u8 cfpperiod;
152 __le16 cfpmaxduration;
153 __le16 cfpdurationremaining;
154 } __attribute__ ((packed));
156 struct ibssparamset {
157 __le16 atimwindow;
158 } __attribute__ ((packed));
160 struct mrvlietypes_ssparamset {
161 struct mrvlietypesheader header;
162 union {
163 struct cfparamset cfparamset[1];
164 struct ibssparamset ibssparamset[1];
165 } cf_ibss;
166 } __attribute__ ((packed));
168 struct fhparamset {
169 __le16 dwelltime;
170 u8 hopset;
171 u8 hoppattern;
172 u8 hopindex;
173 } __attribute__ ((packed));
175 struct dsparamset {
176 u8 currentchan;
177 } __attribute__ ((packed));
179 struct mrvlietypes_phyparamset {
180 struct mrvlietypesheader header;
181 union {
182 struct fhparamset fhparamset[1];
183 struct dsparamset dsparamset[1];
184 } fh_ds;
185 } __attribute__ ((packed));
187 struct mrvlietypes_rsnparamset {
188 struct mrvlietypesheader header;
189 u8 rsnie[1];
190 } __attribute__ ((packed));
192 struct mrvlietypes_tsftimestamp {
193 struct mrvlietypesheader header;
194 __le64 tsftable[1];
195 } __attribute__ ((packed));
197 /** Local Power capability */
198 struct mrvlietypes_powercapability {
199 struct mrvlietypesheader header;
200 s8 minpower;
201 s8 maxpower;
202 } __attribute__ ((packed));
204 /* used in CMD_802_11_SUBSCRIBE_EVENT for SNR, RSSI and Failure */
205 struct mrvlietypes_thresholds {
206 struct mrvlietypesheader header;
207 u8 value;
208 u8 freq;
209 } __attribute__ ((packed));
211 struct mrvlietypes_beaconsmissed {
212 struct mrvlietypesheader header;
213 u8 beaconmissed;
214 u8 reserved;
215 } __attribute__ ((packed));
217 struct mrvlietypes_numprobes {
218 struct mrvlietypesheader header;
219 __le16 numprobes;
220 } __attribute__ ((packed));
222 struct mrvlietypes_bcastprobe {
223 struct mrvlietypesheader header;
224 __le16 bcastprobe;
225 } __attribute__ ((packed));
227 struct mrvlietypes_numssidprobe {
228 struct mrvlietypesheader header;
229 __le16 numssidprobe;
230 } __attribute__ ((packed));
232 struct led_pin {
233 u8 led;
234 u8 pin;
235 } __attribute__ ((packed));
237 struct mrvlietypes_ledgpio {
238 struct mrvlietypesheader header;
239 struct led_pin ledpin[1];
240 } __attribute__ ((packed));
242 #endif