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