Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
[deliverable/linux.git] / drivers / net / wireless / libertas / types.h
CommitLineData
8973a6e7
RD
1/*
2 * This header file contains definition for global types
3 */
10078321
HS
4#ifndef _LBS_TYPES_H_
5#define _LBS_TYPES_H_
876c9d3a
MT
6
7#include <linux/if_ether.h>
243e84e9 8#include <linux/ieee80211.h>
981f187b 9#include <asm/byteorder.h>
876c9d3a 10
75b6a61a
DW
11struct ieee_ie_header {
12 u8 id;
876c9d3a 13 u8 len;
ba2d3587 14} __packed;
75b6a61a
DW
15
16struct ieee_ie_cf_param_set {
17 struct ieee_ie_header header;
18
876c9d3a
MT
19 u8 cfpcnt;
20 u8 cfpperiod;
981f187b
DW
21 __le16 cfpmaxduration;
22 __le16 cfpdurationremaining;
ba2d3587 23} __packed;
876c9d3a
MT
24
25
5fd164e9 26struct ieee_ie_ibss_param_set {
75b6a61a
DW
27 struct ieee_ie_header header;
28
981f187b 29 __le16 atimwindow;
ba2d3587 30} __packed;
876c9d3a 31
5fd164e9
DW
32union ieee_ss_param_set {
33 struct ieee_ie_cf_param_set cf;
34 struct ieee_ie_ibss_param_set ibss;
ba2d3587 35} __packed;
876c9d3a 36
5fd164e9 37struct ieee_ie_fh_param_set {
75b6a61a
DW
38 struct ieee_ie_header header;
39
981f187b 40 __le16 dwelltime;
876c9d3a
MT
41 u8 hopset;
42 u8 hoppattern;
43 u8 hopindex;
ba2d3587 44} __packed;
876c9d3a 45
5fd164e9 46struct ieee_ie_ds_param_set {
75b6a61a
DW
47 struct ieee_ie_header header;
48
5fd164e9 49 u8 channel;
ba2d3587 50} __packed;
876c9d3a 51
5fd164e9
DW
52union ieee_phy_param_set {
53 struct ieee_ie_fh_param_set fh;
54 struct ieee_ie_ds_param_set ds;
ba2d3587 55} __packed;
876c9d3a 56
8973a6e7 57/* TLV type ID definition */
876c9d3a
MT
58#define PROPRIETARY_TLV_BASE_ID 0x0100
59
60/* Terminating TLV type */
61#define MRVL_TERMINATE_TLV_ID 0xffff
62
63#define TLV_TYPE_SSID 0x0000
64#define TLV_TYPE_RATES 0x0001
65#define TLV_TYPE_PHY_FH 0x0002
66#define TLV_TYPE_PHY_DS 0x0003
67#define TLV_TYPE_CF 0x0004
68#define TLV_TYPE_IBSS 0x0006
69
70#define TLV_TYPE_DOMAIN 0x0007
71
72#define TLV_TYPE_POWER_CAPABILITY 0x0021
73
74#define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
75#define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
76#define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
77#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
78#define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 5)
79#define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 6)
80#define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 7)
81#define TLV_TYPE_LED_GPIO (PROPRIETARY_TLV_BASE_ID + 8)
82#define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 9)
83#define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
84#define TLV_TYPE_REASSOCAP (PROPRIETARY_TLV_BASE_ID + 11)
85#define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 12)
86#define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 13)
87#define TLV_TYPE_BCASTPROBE (PROPRIETARY_TLV_BASE_ID + 14)
88#define TLV_TYPE_NUMSSID_PROBE (PROPRIETARY_TLV_BASE_ID + 15)
89#define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
90#define TLV_TYPE_CRYPTO_DATA (PROPRIETARY_TLV_BASE_ID + 17)
91#define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
92#define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
93#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
94#define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 23)
be0d76e4 95#define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
684d6b36
BZ
96#define TLV_TYPE_MESH_ID (PROPRIETARY_TLV_BASE_ID + 37)
97#define TLV_TYPE_OLD_MESH_ID (PROPRIETARY_TLV_BASE_ID + 291)
876c9d3a 98
8973a6e7 99/* TLV related data structures */
75b6a61a 100struct mrvl_ie_header {
981f187b
DW
101 __le16 type;
102 __le16 len;
ba2d3587 103} __packed;
876c9d3a 104
75b6a61a
DW
105struct mrvl_ie_data {
106 struct mrvl_ie_header header;
876c9d3a 107 u8 Data[1];
ba2d3587 108} __packed;
876c9d3a 109
75b6a61a
DW
110struct mrvl_ie_rates_param_set {
111 struct mrvl_ie_header header;
876c9d3a 112 u8 rates[1];
ba2d3587 113} __packed;
876c9d3a 114
75b6a61a
DW
115struct mrvl_ie_ssid_param_set {
116 struct mrvl_ie_header header;
876c9d3a 117 u8 ssid[1];
ba2d3587 118} __packed;
876c9d3a 119
75b6a61a
DW
120struct mrvl_ie_wildcard_ssid_param_set {
121 struct mrvl_ie_header header;
876c9d3a
MT
122 u8 MaxSsidlength;
123 u8 ssid[1];
ba2d3587 124} __packed;
876c9d3a
MT
125
126struct chanscanmode {
981f187b
DW
127#ifdef __BIG_ENDIAN_BITFIELD
128 u8 reserved_2_7:6;
129 u8 disablechanfilt:1;
130 u8 passivescan:1;
131#else
876c9d3a
MT
132 u8 passivescan:1;
133 u8 disablechanfilt:1;
134 u8 reserved_2_7:6;
981f187b 135#endif
ba2d3587 136} __packed;
876c9d3a
MT
137
138struct chanscanparamset {
139 u8 radiotype;
140 u8 channumber;
141 struct chanscanmode chanscanmode;
981f187b
DW
142 __le16 minscantime;
143 __le16 maxscantime;
ba2d3587 144} __packed;
876c9d3a 145
75b6a61a
DW
146struct mrvl_ie_chanlist_param_set {
147 struct mrvl_ie_header header;
876c9d3a 148 struct chanscanparamset chanscanparam[1];
ba2d3587 149} __packed;
876c9d3a 150
75b6a61a
DW
151struct mrvl_ie_cf_param_set {
152 struct mrvl_ie_header header;
876c9d3a
MT
153 u8 cfpcnt;
154 u8 cfpperiod;
981f187b
DW
155 __le16 cfpmaxduration;
156 __le16 cfpdurationremaining;
ba2d3587 157} __packed;
876c9d3a 158
75b6a61a
DW
159struct mrvl_ie_ds_param_set {
160 struct mrvl_ie_header header;
5fd164e9 161 u8 channel;
ba2d3587 162} __packed;
876c9d3a 163
75b6a61a
DW
164struct mrvl_ie_rsn_param_set {
165 struct mrvl_ie_header header;
876c9d3a 166 u8 rsnie[1];
ba2d3587 167} __packed;
876c9d3a 168
75b6a61a
DW
169struct mrvl_ie_tsf_timestamp {
170 struct mrvl_ie_header header;
876c9d3a 171 __le64 tsftable[1];
ba2d3587 172} __packed;
876c9d3a 173
be0d76e4
DW
174/* v9 and later firmware only */
175struct mrvl_ie_auth_type {
176 struct mrvl_ie_header header;
177 __le16 auth;
ba2d3587 178} __packed;
be0d76e4 179
8973a6e7 180/* Local Power capability */
75b6a61a
DW
181struct mrvl_ie_power_capability {
182 struct mrvl_ie_header header;
876c9d3a
MT
183 s8 minpower;
184 s8 maxpower;
ba2d3587 185} __packed;
876c9d3a 186
3a188649 187/* used in CMD_802_11_SUBSCRIBE_EVENT for SNR, RSSI and Failure */
75b6a61a
DW
188struct mrvl_ie_thresholds {
189 struct mrvl_ie_header header;
3a188649
HS
190 u8 value;
191 u8 freq;
ba2d3587 192} __packed;
876c9d3a 193
75b6a61a
DW
194struct mrvl_ie_beacons_missed {
195 struct mrvl_ie_header header;
876c9d3a
MT
196 u8 beaconmissed;
197 u8 reserved;
ba2d3587 198} __packed;
876c9d3a 199
75b6a61a
DW
200struct mrvl_ie_num_probes {
201 struct mrvl_ie_header header;
981f187b 202 __le16 numprobes;
ba2d3587 203} __packed;
876c9d3a 204
75b6a61a
DW
205struct mrvl_ie_bcast_probe {
206 struct mrvl_ie_header header;
981f187b 207 __le16 bcastprobe;
ba2d3587 208} __packed;
876c9d3a 209
75b6a61a
DW
210struct mrvl_ie_num_ssid_probe {
211 struct mrvl_ie_header header;
981f187b 212 __le16 numssidprobe;
ba2d3587 213} __packed;
876c9d3a
MT
214
215struct led_pin {
216 u8 led;
217 u8 pin;
ba2d3587 218} __packed;
876c9d3a 219
75b6a61a
DW
220struct mrvl_ie_ledgpio {
221 struct mrvl_ie_header header;
876c9d3a 222 struct led_pin ledpin[1];
ba2d3587 223} __packed;
876c9d3a 224
c5562e98
DW
225struct led_bhv {
226 uint8_t firmwarestate;
227 uint8_t led;
228 uint8_t ledstate;
229 uint8_t ledarg;
ba2d3587 230} __packed;
c5562e98
DW
231
232
75b6a61a
DW
233struct mrvl_ie_ledbhv {
234 struct mrvl_ie_header header;
c5562e98 235 struct led_bhv ledbhv[1];
ba2d3587 236} __packed;
c5562e98 237
8973a6e7
RD
238/*
239 * Meant to be packed as the value member of a struct ieee80211_info_element.
edaea5ce 240 * Note that the len member of the ieee80211_info_element varies depending on
8973a6e7
RD
241 * the mesh_id_len
242 */
edaea5ce 243struct mrvl_meshie_val {
2c706002 244 uint8_t oui[3];
edaea5ce
JC
245 uint8_t type;
246 uint8_t subtype;
247 uint8_t version;
248 uint8_t active_protocol_id;
249 uint8_t active_metric_id;
250 uint8_t mesh_capability;
251 uint8_t mesh_id_len;
243e84e9 252 uint8_t mesh_id[IEEE80211_MAX_SSID_LEN];
ba2d3587 253} __packed;
edaea5ce
JC
254
255struct mrvl_meshie {
2c706002 256 u8 id, len;
edaea5ce 257 struct mrvl_meshie_val val;
ba2d3587 258} __packed;
edaea5ce
JC
259
260struct mrvl_mesh_defaults {
261 __le32 bootflag;
262 uint8_t boottime;
263 uint8_t reserved;
264 __le16 channel;
265 struct mrvl_meshie meshie;
ba2d3587 266} __packed;
edaea5ce 267
10078321 268#endif
This page took 0.780956 seconds and 5 git commands to generate.