Sergio Paracuellos | 0ae952e | 2016-09-25 15:35:08 +0200 | [diff] [blame] | 1 | /* |
| 2 | * p80211types.h |
| 3 | * |
| 4 | * Macros, constants, types, and funcs for p80211 data types |
| 5 | * |
| 6 | * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved. |
| 7 | * -------------------------------------------------------------------- |
| 8 | * |
| 9 | * linux-wlan |
| 10 | * |
| 11 | * The contents of this file are subject to the Mozilla Public |
| 12 | * License Version 1.1 (the "License"); you may not use this file |
| 13 | * except in compliance with the License. You may obtain a copy of |
| 14 | * the License at http://www.mozilla.org/MPL/ |
| 15 | * |
| 16 | * Software distributed under the License is distributed on an "AS |
| 17 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 18 | * implied. See the License for the specific language governing |
| 19 | * rights and limitations under the License. |
| 20 | * |
| 21 | * Alternatively, the contents of this file may be used under the |
| 22 | * terms of the GNU Public License version 2 (the "GPL"), in which |
| 23 | * case the provisions of the GPL are applicable instead of the |
| 24 | * above. If you wish to allow the use of your version of this file |
| 25 | * only under the terms of the GPL and not to allow others to use |
| 26 | * your version of this file under the MPL, indicate your decision |
| 27 | * by deleting the provisions above and replace them with the notice |
| 28 | * and other provisions required by the GPL. If you do not delete |
| 29 | * the provisions above, a recipient may use your version of this |
| 30 | * file under either the MPL or the GPL. |
| 31 | * |
| 32 | * -------------------------------------------------------------------- |
| 33 | * |
| 34 | * Inquiries regarding the linux-wlan Open Source project can be |
| 35 | * made directly to: |
| 36 | * |
| 37 | * AbsoluteValue Systems Inc. |
| 38 | * info@linux-wlan.com |
| 39 | * http://www.linux-wlan.com |
| 40 | * |
| 41 | * -------------------------------------------------------------------- |
| 42 | * |
| 43 | * Portions of the development of this software were funded by |
| 44 | * Intersil Corporation as part of PRISM(R) chipset product development. |
| 45 | * |
| 46 | * -------------------------------------------------------------------- |
| 47 | * |
| 48 | * This file declares some of the constants and types used in various |
| 49 | * parts of the linux-wlan system. |
| 50 | * |
| 51 | * Notes: |
| 52 | * - Constant values are always in HOST byte order. |
| 53 | * |
| 54 | * All functions and statics declared here are implemented in p80211types.c |
| 55 | * -------------------------------------------------------------------- |
| 56 | */ |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 57 | |
| 58 | #ifndef _P80211TYPES_H |
| 59 | #define _P80211TYPES_H |
| 60 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 61 | /*----------------------------------------------------------------*/ |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 62 | /* The following constants are indexes into the Mib Category List */ |
| 63 | /* and the Message Category List */ |
| 64 | |
| 65 | /* Mib Category List */ |
| 66 | #define P80211_MIB_CAT_DOT11SMT 1 |
| 67 | #define P80211_MIB_CAT_DOT11MAC 2 |
| 68 | #define P80211_MIB_CAT_DOT11PHY 3 |
| 69 | |
| 70 | #define P80211SEC_DOT11SMT P80211_MIB_CAT_DOT11SMT |
| 71 | #define P80211SEC_DOT11MAC P80211_MIB_CAT_DOT11MAC |
| 72 | #define P80211SEC_DOT11PHY P80211_MIB_CAT_DOT11PHY |
| 73 | |
| 74 | /* Message Category List */ |
| 75 | #define P80211_MSG_CAT_DOT11REQ 1 |
| 76 | #define P80211_MSG_CAT_DOT11IND 2 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 77 | |
| 78 | /*----------------------------------------------------------------*/ |
| 79 | /* p80211 enumeration constants. The value to text mappings for */ |
| 80 | /* these is in p80211types.c. These defines were generated */ |
| 81 | /* from the mappings. */ |
| 82 | |
| 83 | /* error codes for lookups */ |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 84 | |
| 85 | #define P80211ENUM_truth_false 0 |
| 86 | #define P80211ENUM_truth_true 1 |
| 87 | #define P80211ENUM_ifstate_disable 0 |
| 88 | #define P80211ENUM_ifstate_fwload 1 |
| 89 | #define P80211ENUM_ifstate_enable 2 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 90 | #define P80211ENUM_bsstype_infrastructure 1 |
| 91 | #define P80211ENUM_bsstype_independent 2 |
| 92 | #define P80211ENUM_bsstype_any 3 |
| 93 | #define P80211ENUM_authalg_opensystem 1 |
| 94 | #define P80211ENUM_authalg_sharedkey 2 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 95 | #define P80211ENUM_scantype_active 1 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 96 | #define P80211ENUM_resultcode_success 1 |
| 97 | #define P80211ENUM_resultcode_invalid_parameters 2 |
| 98 | #define P80211ENUM_resultcode_not_supported 3 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 99 | #define P80211ENUM_resultcode_refused 6 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 100 | #define P80211ENUM_resultcode_cant_set_readonly_mib 10 |
| 101 | #define P80211ENUM_resultcode_implementation_failure 11 |
| 102 | #define P80211ENUM_resultcode_cant_get_writeonly_mib 12 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 103 | #define P80211ENUM_status_successful 0 |
| 104 | #define P80211ENUM_status_unspec_failure 1 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 105 | #define P80211ENUM_status_ap_full 17 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 106 | #define P80211ENUM_msgitem_status_data_ok 0 |
| 107 | #define P80211ENUM_msgitem_status_no_value 1 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 108 | |
| 109 | /*----------------------------------------------------------------*/ |
| 110 | /* p80211 max length constants for the different pascal strings. */ |
| 111 | |
| 112 | #define MAXLEN_PSTR6 (6) /* pascal array of 6 bytes */ |
| 113 | #define MAXLEN_PSTR14 (14) /* pascal array of 14 bytes */ |
| 114 | #define MAXLEN_PSTR32 (32) /* pascal array of 32 bytes */ |
| 115 | #define MAXLEN_PSTR255 (255) /* pascal array of 255 bytes */ |
| 116 | #define MAXLEN_MIBATTRIBUTE (392) /* maximum mibattribute */ |
| 117 | /* where the size of the DATA itself */ |
| 118 | /* is a DID-LEN-DATA triple */ |
| 119 | /* with a max size of 4+4+384 */ |
| 120 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 121 | /*----------------------------------------------------------------*/ |
| 122 | /* The following macro creates a name for an enum */ |
| 123 | |
| 124 | #define MKENUMNAME(name) p80211enum_ ## name |
| 125 | |
| 126 | /*---------------------------------------------------------------- |
Sergio Paracuellos | 0ae952e | 2016-09-25 15:35:08 +0200 | [diff] [blame] | 127 | * The following constants and macros are used to construct and |
| 128 | * deconstruct the Data ID codes. The coding is as follows: |
| 129 | * |
| 130 | * ...rwtnnnnnnnniiiiiiggggggssssss s - Section |
| 131 | * g - Group |
| 132 | * i - Item |
| 133 | * n - Index |
| 134 | * t - Table flag |
| 135 | * w - Write flag |
| 136 | * r - Read flag |
| 137 | * . - Unused |
| 138 | */ |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 139 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 140 | #define P80211DID_LSB_SECTION (0) |
| 141 | #define P80211DID_LSB_GROUP (6) |
| 142 | #define P80211DID_LSB_ITEM (12) |
| 143 | #define P80211DID_LSB_INDEX (18) |
| 144 | #define P80211DID_LSB_ISTABLE (26) |
Johan Meiring | c5de215 | 2010-11-06 18:23:09 +0200 | [diff] [blame] | 145 | #define P80211DID_LSB_ACCESS (27) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 146 | |
| 147 | #define P80211DID_MASK_SECTION (0x0000003fUL) |
| 148 | #define P80211DID_MASK_GROUP (0x0000003fUL) |
| 149 | #define P80211DID_MASK_ITEM (0x0000003fUL) |
| 150 | #define P80211DID_MASK_INDEX (0x000000ffUL) |
| 151 | #define P80211DID_MASK_ISTABLE (0x00000001UL) |
Johan Meiring | c5de215 | 2010-11-06 18:23:09 +0200 | [diff] [blame] | 152 | #define P80211DID_MASK_ACCESS (0x00000003UL) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 153 | |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 154 | #define P80211DID_MK(a, m, l) ((((u32)(a)) & (m)) << (l)) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 155 | |
| 156 | #define P80211DID_MKSECTION(a) P80211DID_MK(a, \ |
| 157 | P80211DID_MASK_SECTION, \ |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 158 | P80211DID_LSB_SECTION) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 159 | #define P80211DID_MKGROUP(a) P80211DID_MK(a, \ |
| 160 | P80211DID_MASK_GROUP, \ |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 161 | P80211DID_LSB_GROUP) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 162 | #define P80211DID_MKITEM(a) P80211DID_MK(a, \ |
| 163 | P80211DID_MASK_ITEM, \ |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 164 | P80211DID_LSB_ITEM) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 165 | #define P80211DID_MKINDEX(a) P80211DID_MK(a, \ |
| 166 | P80211DID_MASK_INDEX, \ |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 167 | P80211DID_LSB_INDEX) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 168 | #define P80211DID_MKISTABLE(a) P80211DID_MK(a, \ |
| 169 | P80211DID_MASK_ISTABLE, \ |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 170 | P80211DID_LSB_ISTABLE) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 171 | |
Svenne Krap | 5dd8acc | 2010-02-14 18:59:00 +0100 | [diff] [blame] | 172 | #define P80211DID_MKID(s, g, i, n, t, a) (P80211DID_MKSECTION(s) | \ |
| 173 | P80211DID_MKGROUP(g) | \ |
| 174 | P80211DID_MKITEM(i) | \ |
| 175 | P80211DID_MKINDEX(n) | \ |
| 176 | P80211DID_MKISTABLE(t) | \ |
| 177 | (a)) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 178 | |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 179 | #define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m)) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 180 | |
| 181 | #define P80211DID_SECTION(a) P80211DID_GET(a, \ |
| 182 | P80211DID_MASK_SECTION, \ |
| 183 | P80211DID_LSB_SECTION) |
| 184 | #define P80211DID_GROUP(a) P80211DID_GET(a, \ |
| 185 | P80211DID_MASK_GROUP, \ |
| 186 | P80211DID_LSB_GROUP) |
| 187 | #define P80211DID_ITEM(a) P80211DID_GET(a, \ |
| 188 | P80211DID_MASK_ITEM, \ |
| 189 | P80211DID_LSB_ITEM) |
| 190 | #define P80211DID_INDEX(a) P80211DID_GET(a, \ |
| 191 | P80211DID_MASK_INDEX, \ |
| 192 | P80211DID_LSB_INDEX) |
| 193 | #define P80211DID_ISTABLE(a) P80211DID_GET(a, \ |
| 194 | P80211DID_MASK_ISTABLE, \ |
| 195 | P80211DID_LSB_ISTABLE) |
| 196 | #define P80211DID_ACCESS(a) P80211DID_GET(a, \ |
| 197 | P80211DID_MASK_ACCESS, \ |
| 198 | P80211DID_LSB_ACCESS) |
| 199 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 200 | /*----------------------------------------------------------------*/ |
Justin P. Mattock | d34602d | 2012-09-24 09:16:57 -0700 | [diff] [blame] | 201 | /* The following structure types are used for the representation */ |
Solomon Peachy | aaad430 | 2008-10-29 10:42:53 -0400 | [diff] [blame] | 202 | /* of ENUMint type metadata. */ |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 203 | |
Sergio Paracuellos | c491786 | 2016-09-23 15:45:17 +0200 | [diff] [blame] | 204 | struct p80211enumpair { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 205 | u32 val; |
| 206 | char *name; |
Sergio Paracuellos | c491786 | 2016-09-23 15:45:17 +0200 | [diff] [blame] | 207 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 208 | |
Sergio Paracuellos | aa97dc1 | 2016-09-23 15:45:19 +0200 | [diff] [blame] | 209 | struct p80211enum { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 210 | int nitems; |
Sergio Paracuellos | c491786 | 2016-09-23 15:45:17 +0200 | [diff] [blame] | 211 | struct p80211enumpair *list; |
Sergio Paracuellos | aa97dc1 | 2016-09-23 15:45:19 +0200 | [diff] [blame] | 212 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 213 | |
| 214 | /*----------------------------------------------------------------*/ |
| 215 | /* The following structure types are used to store data items in */ |
| 216 | /* messages. */ |
| 217 | |
| 218 | /* Template pascal string */ |
Sergio Paracuellos | c529e31 | 2016-09-23 15:45:20 +0200 | [diff] [blame] | 219 | struct p80211pstr { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 220 | u8 len; |
Sergio Paracuellos | c529e31 | 2016-09-23 15:45:20 +0200 | [diff] [blame] | 221 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 222 | |
Sergio Paracuellos | 3fd1e3f | 2016-09-25 15:34:52 +0200 | [diff] [blame] | 223 | struct p80211pstrd { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 224 | u8 len; |
| 225 | u8 data[0]; |
Sergio Paracuellos | 3fd1e3f | 2016-09-25 15:34:52 +0200 | [diff] [blame] | 226 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 227 | |
| 228 | /* Maximum pascal string */ |
Sergio Paracuellos | 94a2914 | 2016-09-25 15:34:53 +0200 | [diff] [blame] | 229 | struct p80211pstr255 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 230 | u8 len; |
| 231 | u8 data[MAXLEN_PSTR255]; |
Sergio Paracuellos | 94a2914 | 2016-09-25 15:34:53 +0200 | [diff] [blame] | 232 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 233 | |
| 234 | /* pascal string for macaddress and bssid */ |
Sergio Paracuellos | 2816c00 | 2016-09-25 15:34:54 +0200 | [diff] [blame] | 235 | struct p80211pstr6 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 236 | u8 len; |
| 237 | u8 data[MAXLEN_PSTR6]; |
Sergio Paracuellos | 2816c00 | 2016-09-25 15:34:54 +0200 | [diff] [blame] | 238 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 239 | |
| 240 | /* pascal string for channel list */ |
Sergio Paracuellos | 5d00558 | 2016-09-25 15:34:55 +0200 | [diff] [blame] | 241 | struct p80211pstr14 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 242 | u8 len; |
| 243 | u8 data[MAXLEN_PSTR14]; |
Sergio Paracuellos | 5d00558 | 2016-09-25 15:34:55 +0200 | [diff] [blame] | 244 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 245 | |
| 246 | /* pascal string for ssid */ |
Sergio Paracuellos | 758f140d | 2016-09-25 15:34:56 +0200 | [diff] [blame] | 247 | struct p80211pstr32 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 248 | u8 len; |
| 249 | u8 data[MAXLEN_PSTR32]; |
Sergio Paracuellos | 758f140d | 2016-09-25 15:34:56 +0200 | [diff] [blame] | 250 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 251 | |
| 252 | /* MAC address array */ |
Sergio Paracuellos | 46c226d | 2016-09-25 15:34:57 +0200 | [diff] [blame] | 253 | struct p80211macarray { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 254 | u32 cnt; |
| 255 | u8 data[1][MAXLEN_PSTR6]; |
Sergio Paracuellos | 46c226d | 2016-09-25 15:34:57 +0200 | [diff] [blame] | 256 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 257 | |
| 258 | /* prototype template */ |
Sergio Paracuellos | cf79693 | 2016-09-25 15:34:58 +0200 | [diff] [blame] | 259 | struct p80211item { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 260 | u32 did; |
| 261 | u16 status; |
| 262 | u16 len; |
Sergio Paracuellos | cf79693 | 2016-09-25 15:34:58 +0200 | [diff] [blame] | 263 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 264 | |
| 265 | /* prototype template w/ data item */ |
Sergio Paracuellos | ac033ec | 2016-09-25 15:34:59 +0200 | [diff] [blame] | 266 | struct p80211itemd { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 267 | u32 did; |
| 268 | u16 status; |
| 269 | u16 len; |
| 270 | u8 data[0]; |
Sergio Paracuellos | ac033ec | 2016-09-25 15:34:59 +0200 | [diff] [blame] | 271 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 272 | |
Solomon Peachy | aaad430 | 2008-10-29 10:42:53 -0400 | [diff] [blame] | 273 | /* message data item for int, BOUNDEDINT, ENUMINT */ |
Sergio Paracuellos | b26b232 | 2016-09-25 15:35:00 +0200 | [diff] [blame] | 274 | struct p80211item_uint32 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 275 | u32 did; |
| 276 | u16 status; |
| 277 | u16 len; |
| 278 | u32 data; |
Sergio Paracuellos | b26b232 | 2016-09-25 15:35:00 +0200 | [diff] [blame] | 279 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 280 | |
| 281 | /* message data item for OCTETSTR, DISPLAYSTR */ |
Sergio Paracuellos | 34aae05 | 2016-09-25 15:35:01 +0200 | [diff] [blame] | 282 | struct p80211item_pstr6 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 283 | u32 did; |
| 284 | u16 status; |
| 285 | u16 len; |
Sergio Paracuellos | 2816c00 | 2016-09-25 15:34:54 +0200 | [diff] [blame] | 286 | struct p80211pstr6 data; |
Sergio Paracuellos | 34aae05 | 2016-09-25 15:35:01 +0200 | [diff] [blame] | 287 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 288 | |
| 289 | /* message data item for OCTETSTR, DISPLAYSTR */ |
Sergio Paracuellos | f055b21 | 2016-09-25 15:35:02 +0200 | [diff] [blame] | 290 | struct p80211item_pstr14 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 291 | u32 did; |
| 292 | u16 status; |
| 293 | u16 len; |
Sergio Paracuellos | 5d00558 | 2016-09-25 15:34:55 +0200 | [diff] [blame] | 294 | struct p80211pstr14 data; |
Sergio Paracuellos | f055b21 | 2016-09-25 15:35:02 +0200 | [diff] [blame] | 295 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 296 | |
| 297 | /* message data item for OCTETSTR, DISPLAYSTR */ |
Sergio Paracuellos | 6a50b5a | 2016-09-25 15:35:03 +0200 | [diff] [blame] | 298 | struct p80211item_pstr32 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 299 | u32 did; |
| 300 | u16 status; |
| 301 | u16 len; |
Sergio Paracuellos | 758f140d | 2016-09-25 15:34:56 +0200 | [diff] [blame] | 302 | struct p80211pstr32 data; |
Sergio Paracuellos | 6a50b5a | 2016-09-25 15:35:03 +0200 | [diff] [blame] | 303 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 304 | |
| 305 | /* message data item for OCTETSTR, DISPLAYSTR */ |
Sergio Paracuellos | 3636ab0 | 2016-09-25 15:35:04 +0200 | [diff] [blame] | 306 | struct p80211item_pstr255 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 307 | u32 did; |
| 308 | u16 status; |
| 309 | u16 len; |
Sergio Paracuellos | 94a2914 | 2016-09-25 15:34:53 +0200 | [diff] [blame] | 310 | struct p80211pstr255 data; |
Sergio Paracuellos | 3636ab0 | 2016-09-25 15:35:04 +0200 | [diff] [blame] | 311 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 312 | |
| 313 | /* message data item for UNK 392, namely mib items */ |
Sergio Paracuellos | 37e4866 | 2016-09-25 15:35:05 +0200 | [diff] [blame] | 314 | struct p80211item_unk392 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 315 | u32 did; |
| 316 | u16 status; |
| 317 | u16 len; |
| 318 | u8 data[MAXLEN_MIBATTRIBUTE]; |
Sergio Paracuellos | 37e4866 | 2016-09-25 15:35:05 +0200 | [diff] [blame] | 319 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 320 | |
| 321 | /* message data item for UNK 1025, namely p2 pdas */ |
Sergio Paracuellos | 1ad26f7 | 2016-09-25 15:35:06 +0200 | [diff] [blame] | 322 | struct p80211item_unk1024 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 323 | u32 did; |
| 324 | u16 status; |
| 325 | u16 len; |
| 326 | u8 data[1024]; |
Sergio Paracuellos | 1ad26f7 | 2016-09-25 15:35:06 +0200 | [diff] [blame] | 327 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 328 | |
| 329 | /* message data item for UNK 4096, namely p2 download chunks */ |
Sergio Paracuellos | f8b8f64 | 2016-09-25 15:35:07 +0200 | [diff] [blame] | 330 | struct p80211item_unk4096 { |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 331 | u32 did; |
| 332 | u16 status; |
| 333 | u16 len; |
| 334 | u8 data[4096]; |
Sergio Paracuellos | f8b8f64 | 2016-09-25 15:35:07 +0200 | [diff] [blame] | 335 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 336 | |
| 337 | struct catlistitem; |
| 338 | |
| 339 | /*----------------------------------------------------------------*/ |
| 340 | /* The following structure type is used to represent all of the */ |
| 341 | /* metadata items. Some components may choose to use more, */ |
| 342 | /* less or different metadata items. */ |
| 343 | |
Svenne Krap | 5dd8acc | 2010-02-14 18:59:00 +0100 | [diff] [blame] | 344 | typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf, |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 345 | char *textbuf); |
Svenne Krap | 5dd8acc | 2010-02-14 18:59:00 +0100 | [diff] [blame] | 346 | typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf, |
Moritz Muehlenhoff | 356925c | 2009-02-08 02:20:57 +0100 | [diff] [blame] | 347 | char *textbuf); |
Svenne Krap | 5dd8acc | 2010-02-14 18:59:00 +0100 | [diff] [blame] | 348 | typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf); |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 349 | |
| 350 | /*----------------------------------------------------------------*/ |
| 351 | /* Enumeration Lists */ |
| 352 | /* The following are the external declarations */ |
| 353 | /* for all enumerations */ |
| 354 | |
Sergio Paracuellos | aa97dc1 | 2016-09-23 15:45:19 +0200 | [diff] [blame] | 355 | extern struct p80211enum MKENUMNAME(truth); |
| 356 | extern struct p80211enum MKENUMNAME(ifstate); |
| 357 | extern struct p80211enum MKENUMNAME(powermgmt); |
| 358 | extern struct p80211enum MKENUMNAME(bsstype); |
| 359 | extern struct p80211enum MKENUMNAME(authalg); |
| 360 | extern struct p80211enum MKENUMNAME(phytype); |
| 361 | extern struct p80211enum MKENUMNAME(temptype); |
| 362 | extern struct p80211enum MKENUMNAME(regdomain); |
| 363 | extern struct p80211enum MKENUMNAME(ccamode); |
| 364 | extern struct p80211enum MKENUMNAME(diversity); |
| 365 | extern struct p80211enum MKENUMNAME(scantype); |
| 366 | extern struct p80211enum MKENUMNAME(resultcode); |
| 367 | extern struct p80211enum MKENUMNAME(reason); |
| 368 | extern struct p80211enum MKENUMNAME(status); |
| 369 | extern struct p80211enum MKENUMNAME(msgcode); |
| 370 | extern struct p80211enum MKENUMNAME(msgitem_status); |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 371 | |
Sergio Paracuellos | aa97dc1 | 2016-09-23 15:45:19 +0200 | [diff] [blame] | 372 | extern struct p80211enum MKENUMNAME(lnxroam_reason); |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 373 | |
Sergio Paracuellos | aa97dc1 | 2016-09-23 15:45:19 +0200 | [diff] [blame] | 374 | extern struct p80211enum MKENUMNAME(p2preamble); |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 375 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 376 | #endif /* _P80211TYPES_H */ |