100b3ed16SGreg Kroah-Hartman /* p80211types.h
200b3ed16SGreg Kroah-Hartman *
300b3ed16SGreg Kroah-Hartman * Macros, constants, types, and funcs for p80211 data types
400b3ed16SGreg Kroah-Hartman *
500b3ed16SGreg Kroah-Hartman * Copyright (C) 1999 AbsoluteValue Systems, Inc.  All Rights Reserved.
600b3ed16SGreg Kroah-Hartman * --------------------------------------------------------------------
700b3ed16SGreg Kroah-Hartman *
800b3ed16SGreg Kroah-Hartman * linux-wlan
900b3ed16SGreg Kroah-Hartman *
1000b3ed16SGreg Kroah-Hartman *   The contents of this file are subject to the Mozilla Public
1100b3ed16SGreg Kroah-Hartman *   License Version 1.1 (the "License"); you may not use this file
1200b3ed16SGreg Kroah-Hartman *   except in compliance with the License. You may obtain a copy of
1300b3ed16SGreg Kroah-Hartman *   the License at http://www.mozilla.org/MPL/
1400b3ed16SGreg Kroah-Hartman *
1500b3ed16SGreg Kroah-Hartman *   Software distributed under the License is distributed on an "AS
1600b3ed16SGreg Kroah-Hartman *   IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1700b3ed16SGreg Kroah-Hartman *   implied. See the License for the specific language governing
1800b3ed16SGreg Kroah-Hartman *   rights and limitations under the License.
1900b3ed16SGreg Kroah-Hartman *
2000b3ed16SGreg Kroah-Hartman *   Alternatively, the contents of this file may be used under the
2100b3ed16SGreg Kroah-Hartman *   terms of the GNU Public License version 2 (the "GPL"), in which
2200b3ed16SGreg Kroah-Hartman *   case the provisions of the GPL are applicable instead of the
2300b3ed16SGreg Kroah-Hartman *   above.  If you wish to allow the use of your version of this file
2400b3ed16SGreg Kroah-Hartman *   only under the terms of the GPL and not to allow others to use
2500b3ed16SGreg Kroah-Hartman *   your version of this file under the MPL, indicate your decision
2600b3ed16SGreg Kroah-Hartman *   by deleting the provisions above and replace them with the notice
2700b3ed16SGreg Kroah-Hartman *   and other provisions required by the GPL.  If you do not delete
2800b3ed16SGreg Kroah-Hartman *   the provisions above, a recipient may use your version of this
2900b3ed16SGreg Kroah-Hartman *   file under either the MPL or the GPL.
3000b3ed16SGreg Kroah-Hartman *
3100b3ed16SGreg Kroah-Hartman * --------------------------------------------------------------------
3200b3ed16SGreg Kroah-Hartman *
3300b3ed16SGreg Kroah-Hartman * Inquiries regarding the linux-wlan Open Source project can be
3400b3ed16SGreg Kroah-Hartman * made directly to:
3500b3ed16SGreg Kroah-Hartman *
3600b3ed16SGreg Kroah-Hartman * AbsoluteValue Systems Inc.
3700b3ed16SGreg Kroah-Hartman * info@linux-wlan.com
3800b3ed16SGreg Kroah-Hartman * http://www.linux-wlan.com
3900b3ed16SGreg Kroah-Hartman *
4000b3ed16SGreg Kroah-Hartman * --------------------------------------------------------------------
4100b3ed16SGreg Kroah-Hartman *
4200b3ed16SGreg Kroah-Hartman * Portions of the development of this software were funded by
4300b3ed16SGreg Kroah-Hartman * Intersil Corporation as part of PRISM(R) chipset product development.
4400b3ed16SGreg Kroah-Hartman *
4500b3ed16SGreg Kroah-Hartman * --------------------------------------------------------------------
4600b3ed16SGreg Kroah-Hartman *
4700b3ed16SGreg Kroah-Hartman * This file declares some of the constants and types used in various
4800b3ed16SGreg Kroah-Hartman * parts of the linux-wlan system.
4900b3ed16SGreg Kroah-Hartman *
5000b3ed16SGreg Kroah-Hartman * Notes:
5100b3ed16SGreg Kroah-Hartman *   - Constant values are always in HOST byte order.
5200b3ed16SGreg Kroah-Hartman *
5300b3ed16SGreg Kroah-Hartman * All functions and statics declared here are implemented in p80211types.c
5400b3ed16SGreg Kroah-Hartman *   --------------------------------------------------------------------
5500b3ed16SGreg Kroah-Hartman */
5600b3ed16SGreg Kroah-Hartman 
5700b3ed16SGreg Kroah-Hartman #ifndef _P80211TYPES_H
5800b3ed16SGreg Kroah-Hartman #define _P80211TYPES_H
5900b3ed16SGreg Kroah-Hartman 
6000b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
6100b3ed16SGreg Kroah-Hartman /* The following constants are indexes into the Mib Category List */
6200b3ed16SGreg Kroah-Hartman /* and the Message Category List */
6300b3ed16SGreg Kroah-Hartman 
6400b3ed16SGreg Kroah-Hartman /* Mib Category List */
6500b3ed16SGreg Kroah-Hartman #define P80211_MIB_CAT_DOT11SMT		1
6600b3ed16SGreg Kroah-Hartman #define P80211_MIB_CAT_DOT11MAC		2
6700b3ed16SGreg Kroah-Hartman #define P80211_MIB_CAT_DOT11PHY		3
6800b3ed16SGreg Kroah-Hartman 
6900b3ed16SGreg Kroah-Hartman #define P80211SEC_DOT11SMT		P80211_MIB_CAT_DOT11SMT
7000b3ed16SGreg Kroah-Hartman #define P80211SEC_DOT11MAC		P80211_MIB_CAT_DOT11MAC
7100b3ed16SGreg Kroah-Hartman #define P80211SEC_DOT11PHY		P80211_MIB_CAT_DOT11PHY
7200b3ed16SGreg Kroah-Hartman 
7300b3ed16SGreg Kroah-Hartman /* Message Category List */
7400b3ed16SGreg Kroah-Hartman #define P80211_MSG_CAT_DOT11REQ		1
7500b3ed16SGreg Kroah-Hartman #define P80211_MSG_CAT_DOT11IND		2
7600b3ed16SGreg Kroah-Hartman 
7700b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
7800b3ed16SGreg Kroah-Hartman /* p80211 enumeration constants.  The value to text mappings for */
7900b3ed16SGreg Kroah-Hartman /*  these is in p80211types.c.  These defines were generated */
8000b3ed16SGreg Kroah-Hartman /*  from the mappings. */
8100b3ed16SGreg Kroah-Hartman 
8200b3ed16SGreg Kroah-Hartman /* error codes for lookups */
8300b3ed16SGreg Kroah-Hartman 
8400b3ed16SGreg Kroah-Hartman #define P80211ENUM_truth_false			0
8500b3ed16SGreg Kroah-Hartman #define P80211ENUM_truth_true			1
8600b3ed16SGreg Kroah-Hartman #define P80211ENUM_ifstate_disable		0
8700b3ed16SGreg Kroah-Hartman #define P80211ENUM_ifstate_fwload		1
8800b3ed16SGreg Kroah-Hartman #define P80211ENUM_ifstate_enable		2
8900b3ed16SGreg Kroah-Hartman #define P80211ENUM_bsstype_infrastructure	1
9000b3ed16SGreg Kroah-Hartman #define P80211ENUM_bsstype_independent		2
9100b3ed16SGreg Kroah-Hartman #define P80211ENUM_bsstype_any			3
9200b3ed16SGreg Kroah-Hartman #define P80211ENUM_authalg_opensystem		1
9300b3ed16SGreg Kroah-Hartman #define P80211ENUM_authalg_sharedkey		2
9400b3ed16SGreg Kroah-Hartman #define P80211ENUM_scantype_active		1
9500b3ed16SGreg Kroah-Hartman #define P80211ENUM_resultcode_success		1
9600b3ed16SGreg Kroah-Hartman #define P80211ENUM_resultcode_invalid_parameters	2
9700b3ed16SGreg Kroah-Hartman #define P80211ENUM_resultcode_not_supported	3
9800b3ed16SGreg Kroah-Hartman #define P80211ENUM_resultcode_refused		6
9900b3ed16SGreg Kroah-Hartman #define P80211ENUM_resultcode_cant_set_readonly_mib	10
10000b3ed16SGreg Kroah-Hartman #define P80211ENUM_resultcode_implementation_failure	11
10100b3ed16SGreg Kroah-Hartman #define P80211ENUM_resultcode_cant_get_writeonly_mib	12
10200b3ed16SGreg Kroah-Hartman #define P80211ENUM_status_successful		0
10300b3ed16SGreg Kroah-Hartman #define P80211ENUM_status_unspec_failure	1
10400b3ed16SGreg Kroah-Hartman #define P80211ENUM_status_ap_full		17
10500b3ed16SGreg Kroah-Hartman #define P80211ENUM_msgitem_status_data_ok		0
10600b3ed16SGreg Kroah-Hartman #define P80211ENUM_msgitem_status_no_value		1
10700b3ed16SGreg Kroah-Hartman 
10800b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
10900b3ed16SGreg Kroah-Hartman /* p80211 max length constants for the different pascal strings. */
11000b3ed16SGreg Kroah-Hartman 
11100b3ed16SGreg Kroah-Hartman #define MAXLEN_PSTR6		(6)	/* pascal array of 6 bytes */
11200b3ed16SGreg Kroah-Hartman #define MAXLEN_PSTR14		(14)	/* pascal array of 14 bytes */
11300b3ed16SGreg Kroah-Hartman #define MAXLEN_PSTR32		(32)	/* pascal array of 32 bytes */
11400b3ed16SGreg Kroah-Hartman #define MAXLEN_PSTR255		(255)	/* pascal array of 255 bytes */
11500b3ed16SGreg Kroah-Hartman #define MAXLEN_MIBATTRIBUTE	(392)	/* maximum mibattribute */
11600b3ed16SGreg Kroah-Hartman 					/* where the size of the DATA itself */
11700b3ed16SGreg Kroah-Hartman 					/* is a DID-LEN-DATA triple */
11800b3ed16SGreg Kroah-Hartman 					/* with a max size of 4+4+384 */
11900b3ed16SGreg Kroah-Hartman 
12000b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
12100b3ed16SGreg Kroah-Hartman /* The following macro creates a name for an enum */
12200b3ed16SGreg Kroah-Hartman 
12300b3ed16SGreg Kroah-Hartman #define MKENUMNAME(name) p80211enum_ ## name
12400b3ed16SGreg Kroah-Hartman 
12500b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------
12600b3ed16SGreg Kroah-Hartman * The following constants and macros are used to construct and
12700b3ed16SGreg Kroah-Hartman * deconstruct the Data ID codes.  The coding is as follows:
12800b3ed16SGreg Kroah-Hartman *
12900b3ed16SGreg Kroah-Hartman *     ...rwtnnnnnnnniiiiiiggggggssssss      s - Section
13000b3ed16SGreg Kroah-Hartman *                                           g - Group
13100b3ed16SGreg Kroah-Hartman *                                           i - Item
13200b3ed16SGreg Kroah-Hartman *                                           n - Index
13300b3ed16SGreg Kroah-Hartman *                                           t - Table flag
13400b3ed16SGreg Kroah-Hartman *                                           w - Write flag
13500b3ed16SGreg Kroah-Hartman *                                           r - Read flag
13600b3ed16SGreg Kroah-Hartman *                                           . - Unused
13700b3ed16SGreg Kroah-Hartman */
13800b3ed16SGreg Kroah-Hartman 
13900b3ed16SGreg Kroah-Hartman #define P80211DID_LSB_SECTION		(0)
14000b3ed16SGreg Kroah-Hartman #define P80211DID_LSB_GROUP		(6)
14100b3ed16SGreg Kroah-Hartman #define P80211DID_LSB_ITEM		(12)
14200b3ed16SGreg Kroah-Hartman #define P80211DID_LSB_INDEX		(18)
14300b3ed16SGreg Kroah-Hartman #define P80211DID_LSB_ISTABLE		(26)
14400b3ed16SGreg Kroah-Hartman #define P80211DID_LSB_ACCESS		(27)
14500b3ed16SGreg Kroah-Hartman 
14600b3ed16SGreg Kroah-Hartman #define P80211DID_MASK_SECTION		(0x0000003fUL)
14700b3ed16SGreg Kroah-Hartman #define P80211DID_MASK_GROUP		(0x0000003fUL)
14800b3ed16SGreg Kroah-Hartman #define P80211DID_MASK_ITEM		(0x0000003fUL)
14900b3ed16SGreg Kroah-Hartman #define P80211DID_MASK_INDEX		(0x000000ffUL)
15000b3ed16SGreg Kroah-Hartman #define P80211DID_MASK_ISTABLE		(0x00000001UL)
15100b3ed16SGreg Kroah-Hartman #define P80211DID_MASK_ACCESS		(0x00000003UL)
15200b3ed16SGreg Kroah-Hartman 
153aaad4303SSolomon Peachy #define P80211DID_MK(a, m, l)	((((u32)(a)) & (m)) << (l))
15400b3ed16SGreg Kroah-Hartman 
15500b3ed16SGreg Kroah-Hartman #define P80211DID_MKSECTION(a)	P80211DID_MK(a, \
15600b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_SECTION, \
15700b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_SECTION)
15800b3ed16SGreg Kroah-Hartman #define P80211DID_MKGROUP(a)	P80211DID_MK(a, \
15900b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_GROUP, \
16000b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_GROUP)
16100b3ed16SGreg Kroah-Hartman #define P80211DID_MKITEM(a)	P80211DID_MK(a, \
16200b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_ITEM, \
16300b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_ITEM)
16400b3ed16SGreg Kroah-Hartman #define P80211DID_MKINDEX(a)	P80211DID_MK(a, \
16500b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_INDEX, \
16600b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_INDEX)
16700b3ed16SGreg Kroah-Hartman #define P80211DID_MKISTABLE(a)	P80211DID_MK(a, \
16800b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_ISTABLE, \
16900b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_ISTABLE)
17000b3ed16SGreg Kroah-Hartman 
17100b3ed16SGreg Kroah-Hartman #define P80211DID_MKID(s, g, i, n, t, a)	(P80211DID_MKSECTION(s) | \
17200b3ed16SGreg Kroah-Hartman 					P80211DID_MKGROUP(g) | \
17300b3ed16SGreg Kroah-Hartman 					P80211DID_MKITEM(i) | \
17400b3ed16SGreg Kroah-Hartman 					P80211DID_MKINDEX(n) | \
17500b3ed16SGreg Kroah-Hartman 					P80211DID_MKISTABLE(t) | \
17600b3ed16SGreg Kroah-Hartman 					(a))
17700b3ed16SGreg Kroah-Hartman 
178aaad4303SSolomon Peachy #define P80211DID_GET(a, m, l)	((((u32)(a)) >> (l)) & (m))
17900b3ed16SGreg Kroah-Hartman 
18000b3ed16SGreg Kroah-Hartman #define P80211DID_SECTION(a)	P80211DID_GET(a, \
18100b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_SECTION, \
18200b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_SECTION)
18300b3ed16SGreg Kroah-Hartman #define P80211DID_GROUP(a)	P80211DID_GET(a, \
18400b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_GROUP, \
18500b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_GROUP)
18600b3ed16SGreg Kroah-Hartman #define P80211DID_ITEM(a)	P80211DID_GET(a, \
18700b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_ITEM, \
18800b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_ITEM)
18900b3ed16SGreg Kroah-Hartman #define P80211DID_INDEX(a)	P80211DID_GET(a, \
19000b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_INDEX, \
19100b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_INDEX)
19200b3ed16SGreg Kroah-Hartman #define P80211DID_ISTABLE(a)	P80211DID_GET(a, \
19300b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_ISTABLE, \
19400b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_ISTABLE)
19500b3ed16SGreg Kroah-Hartman #define P80211DID_ACCESS(a)	P80211DID_GET(a, \
19600b3ed16SGreg Kroah-Hartman 					P80211DID_MASK_ACCESS, \
19700b3ed16SGreg Kroah-Hartman 					P80211DID_LSB_ACCESS)
19800b3ed16SGreg Kroah-Hartman 
19900b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
200d34602deSJustin P. Mattock /* The following structure types are used for the representation */
201aaad4303SSolomon Peachy /*  of ENUMint type metadata. */
20200b3ed16SGreg Kroah-Hartman 
203c4917864SSergio Paracuellos struct p80211enumpair {
204aaad4303SSolomon Peachy 	u32 val;
20500b3ed16SGreg Kroah-Hartman 	char *name;
206c4917864SSergio Paracuellos };
20700b3ed16SGreg Kroah-Hartman 
208aa97dc1aSSergio Paracuellos struct p80211enum {
209aaad4303SSolomon Peachy 	int nitems;
210c4917864SSergio Paracuellos 	struct p80211enumpair *list;
211aa97dc1aSSergio Paracuellos };
21200b3ed16SGreg Kroah-Hartman 
21300b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
21400b3ed16SGreg Kroah-Hartman /* The following structure types are used to store data items in */
21500b3ed16SGreg Kroah-Hartman /*  messages. */
21600b3ed16SGreg Kroah-Hartman 
21700b3ed16SGreg Kroah-Hartman /* Template pascal string */
218c529e31fSSergio Paracuellos struct p80211pstr {
219aaad4303SSolomon Peachy 	u8 len;
220c529e31fSSergio Paracuellos } __packed;
22100b3ed16SGreg Kroah-Hartman 
2223fd1e3fcSSergio Paracuellos struct p80211pstrd {
223aaad4303SSolomon Peachy 	u8 len;
224aaad4303SSolomon Peachy 	u8 data[0];
2253fd1e3fcSSergio Paracuellos } __packed;
22600b3ed16SGreg Kroah-Hartman 
22700b3ed16SGreg Kroah-Hartman /* Maximum pascal string */
22894a29147SSergio Paracuellos struct p80211pstr255 {
229aaad4303SSolomon Peachy 	u8 len;
230aaad4303SSolomon Peachy 	u8 data[MAXLEN_PSTR255];
23194a29147SSergio Paracuellos } __packed;
23200b3ed16SGreg Kroah-Hartman 
23300b3ed16SGreg Kroah-Hartman /* pascal string for macaddress and bssid */
2342816c008SSergio Paracuellos struct p80211pstr6 {
235aaad4303SSolomon Peachy 	u8 len;
236aaad4303SSolomon Peachy 	u8 data[MAXLEN_PSTR6];
2372816c008SSergio Paracuellos } __packed;
23800b3ed16SGreg Kroah-Hartman 
23900b3ed16SGreg Kroah-Hartman /* pascal string for channel list */
2405d005584SSergio Paracuellos struct p80211pstr14 {
241aaad4303SSolomon Peachy 	u8 len;
242aaad4303SSolomon Peachy 	u8 data[MAXLEN_PSTR14];
2435d005584SSergio Paracuellos } __packed;
24400b3ed16SGreg Kroah-Hartman 
24500b3ed16SGreg Kroah-Hartman /* pascal string for ssid */
246758f140dSSergio Paracuellos struct p80211pstr32 {
247aaad4303SSolomon Peachy 	u8 len;
248aaad4303SSolomon Peachy 	u8 data[MAXLEN_PSTR32];
249758f140dSSergio Paracuellos } __packed;
25000b3ed16SGreg Kroah-Hartman 
25100b3ed16SGreg Kroah-Hartman /* MAC address array */
25246c226d7SSergio Paracuellos struct p80211macarray {
253aaad4303SSolomon Peachy 	u32 cnt;
254aaad4303SSolomon Peachy 	u8 data[1][MAXLEN_PSTR6];
25546c226d7SSergio Paracuellos } __packed;
25600b3ed16SGreg Kroah-Hartman 
25700b3ed16SGreg Kroah-Hartman /* prototype template */
258356925c7SMoritz Muehlenhoff typedef struct p80211item {
259aaad4303SSolomon Peachy 	u32 did;
260aaad4303SSolomon Peachy 	u16 status;
261aaad4303SSolomon Peachy 	u16 len;
2627d3864d1SBas van den Berg } __packed p80211item_t;
26300b3ed16SGreg Kroah-Hartman 
26400b3ed16SGreg Kroah-Hartman /* prototype template w/ data item */
265356925c7SMoritz Muehlenhoff typedef struct p80211itemd {
266aaad4303SSolomon Peachy 	u32 did;
267aaad4303SSolomon Peachy 	u16 status;
268aaad4303SSolomon Peachy 	u16 len;
269aaad4303SSolomon Peachy 	u8 data[0];
2707d3864d1SBas van den Berg } __packed p80211itemd_t;
27100b3ed16SGreg Kroah-Hartman 
272aaad4303SSolomon Peachy /* message data item for int, BOUNDEDINT, ENUMINT */
273356925c7SMoritz Muehlenhoff typedef struct p80211item_uint32 {
274aaad4303SSolomon Peachy 	u32 did;
275aaad4303SSolomon Peachy 	u16 status;
276aaad4303SSolomon Peachy 	u16 len;
277aaad4303SSolomon Peachy 	u32 data;
2787d3864d1SBas van den Berg } __packed p80211item_uint32_t;
27900b3ed16SGreg Kroah-Hartman 
28000b3ed16SGreg Kroah-Hartman /* message data item for OCTETSTR, DISPLAYSTR */
281356925c7SMoritz Muehlenhoff typedef struct p80211item_pstr6 {
282aaad4303SSolomon Peachy 	u32 did;
283aaad4303SSolomon Peachy 	u16 status;
284aaad4303SSolomon Peachy 	u16 len;
2852816c008SSergio Paracuellos 	struct p80211pstr6 data;
2867d3864d1SBas van den Berg } __packed p80211item_pstr6_t;
28700b3ed16SGreg Kroah-Hartman 
28800b3ed16SGreg Kroah-Hartman /* message data item for OCTETSTR, DISPLAYSTR */
289356925c7SMoritz Muehlenhoff typedef struct p80211item_pstr14 {
290aaad4303SSolomon Peachy 	u32 did;
291aaad4303SSolomon Peachy 	u16 status;
292aaad4303SSolomon Peachy 	u16 len;
2935d005584SSergio Paracuellos 	struct p80211pstr14 data;
2947d3864d1SBas van den Berg } __packed p80211item_pstr14_t;
29500b3ed16SGreg Kroah-Hartman 
29600b3ed16SGreg Kroah-Hartman /* message data item for OCTETSTR, DISPLAYSTR */
297356925c7SMoritz Muehlenhoff typedef struct p80211item_pstr32 {
298aaad4303SSolomon Peachy 	u32 did;
299aaad4303SSolomon Peachy 	u16 status;
300aaad4303SSolomon Peachy 	u16 len;
301758f140dSSergio Paracuellos 	struct p80211pstr32 data;
3027d3864d1SBas van den Berg } __packed p80211item_pstr32_t;
30300b3ed16SGreg Kroah-Hartman 
30400b3ed16SGreg Kroah-Hartman /* message data item for OCTETSTR, DISPLAYSTR */
305356925c7SMoritz Muehlenhoff typedef struct p80211item_pstr255 {
306aaad4303SSolomon Peachy 	u32 did;
307aaad4303SSolomon Peachy 	u16 status;
308aaad4303SSolomon Peachy 	u16 len;
30994a29147SSergio Paracuellos 	struct p80211pstr255 data;
3107d3864d1SBas van den Berg } __packed p80211item_pstr255_t;
31100b3ed16SGreg Kroah-Hartman 
31200b3ed16SGreg Kroah-Hartman /* message data item for UNK 392, namely mib items */
313356925c7SMoritz Muehlenhoff typedef struct p80211item_unk392 {
314aaad4303SSolomon Peachy 	u32 did;
315aaad4303SSolomon Peachy 	u16 status;
316aaad4303SSolomon Peachy 	u16 len;
317aaad4303SSolomon Peachy 	u8 data[MAXLEN_MIBATTRIBUTE];
3187d3864d1SBas van den Berg } __packed p80211item_unk392_t;
31900b3ed16SGreg Kroah-Hartman 
32000b3ed16SGreg Kroah-Hartman /* message data item for UNK 1025, namely p2 pdas */
321356925c7SMoritz Muehlenhoff typedef struct p80211item_unk1024 {
322aaad4303SSolomon Peachy 	u32 did;
323aaad4303SSolomon Peachy 	u16 status;
324aaad4303SSolomon Peachy 	u16 len;
325aaad4303SSolomon Peachy 	u8 data[1024];
3267d3864d1SBas van den Berg } __packed p80211item_unk1024_t;
32700b3ed16SGreg Kroah-Hartman 
32800b3ed16SGreg Kroah-Hartman /* message data item for UNK 4096, namely p2 download chunks */
329356925c7SMoritz Muehlenhoff typedef struct p80211item_unk4096 {
330aaad4303SSolomon Peachy 	u32 did;
331aaad4303SSolomon Peachy 	u16 status;
332aaad4303SSolomon Peachy 	u16 len;
333aaad4303SSolomon Peachy 	u8 data[4096];
3347d3864d1SBas van den Berg } __packed p80211item_unk4096_t;
33500b3ed16SGreg Kroah-Hartman 
33600b3ed16SGreg Kroah-Hartman struct catlistitem;
33700b3ed16SGreg Kroah-Hartman 
33800b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
33900b3ed16SGreg Kroah-Hartman /* The following structure type is used to represent all of the */
34000b3ed16SGreg Kroah-Hartman /*  metadata items.  Some components may choose to use more, */
34100b3ed16SGreg Kroah-Hartman /*  less or different metadata items. */
34200b3ed16SGreg Kroah-Hartman 
343356925c7SMoritz Muehlenhoff typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf,
344356925c7SMoritz Muehlenhoff 				 char *textbuf);
345356925c7SMoritz Muehlenhoff typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf,
346356925c7SMoritz Muehlenhoff 				   char *textbuf);
347aaad4303SSolomon Peachy typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf);
34800b3ed16SGreg Kroah-Hartman 
34900b3ed16SGreg Kroah-Hartman /*----------------------------------------------------------------*/
35000b3ed16SGreg Kroah-Hartman /* Enumeration Lists */
35100b3ed16SGreg Kroah-Hartman /*  The following are the external declarations */
35200b3ed16SGreg Kroah-Hartman /*  for all enumerations  */
35300b3ed16SGreg Kroah-Hartman 
354aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(truth);
355aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(ifstate);
356aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(powermgmt);
357aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(bsstype);
358aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(authalg);
359aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(phytype);
360aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(temptype);
361aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(regdomain);
362aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(ccamode);
363aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(diversity);
364aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(scantype);
365aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(resultcode);
366aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(reason);
367aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(status);
368aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(msgcode);
369aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(msgitem_status);
37000b3ed16SGreg Kroah-Hartman 
371aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(lnxroam_reason);
37200b3ed16SGreg Kroah-Hartman 
373aa97dc1aSSergio Paracuellos extern struct p80211enum MKENUMNAME(p2preamble);
37400b3ed16SGreg Kroah-Hartman 
37500b3ed16SGreg Kroah-Hartman #endif /* _P80211TYPES_H */
376