Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 1 | /* p80211mgmt.h |
| 2 | * |
| 3 | * Macros, types, and functions to handle 802.11 mgmt frames |
| 4 | * |
| 5 | * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved. |
| 6 | * -------------------------------------------------------------------- |
| 7 | * |
| 8 | * linux-wlan |
| 9 | * |
| 10 | * The contents of this file are subject to the Mozilla Public |
| 11 | * License Version 1.1 (the "License"); you may not use this file |
| 12 | * except in compliance with the License. You may obtain a copy of |
| 13 | * the License at http://www.mozilla.org/MPL/ |
| 14 | * |
| 15 | * Software distributed under the License is distributed on an "AS |
| 16 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 17 | * implied. See the License for the specific language governing |
| 18 | * rights and limitations under the License. |
| 19 | * |
| 20 | * Alternatively, the contents of this file may be used under the |
| 21 | * terms of the GNU Public License version 2 (the "GPL"), in which |
| 22 | * case the provisions of the GPL are applicable instead of the |
| 23 | * above. If you wish to allow the use of your version of this file |
| 24 | * only under the terms of the GPL and not to allow others to use |
| 25 | * your version of this file under the MPL, indicate your decision |
| 26 | * by deleting the provisions above and replace them with the notice |
| 27 | * and other provisions required by the GPL. If you do not delete |
| 28 | * the provisions above, a recipient may use your version of this |
| 29 | * file under either the MPL or the GPL. |
| 30 | * |
| 31 | * -------------------------------------------------------------------- |
| 32 | * |
| 33 | * Inquiries regarding the linux-wlan Open Source project can be |
| 34 | * made directly to: |
| 35 | * |
| 36 | * AbsoluteValue Systems Inc. |
| 37 | * info@linux-wlan.com |
| 38 | * http://www.linux-wlan.com |
| 39 | * |
| 40 | * -------------------------------------------------------------------- |
| 41 | * |
| 42 | * Portions of the development of this software were funded by |
| 43 | * Intersil Corporation as part of PRISM(R) chipset product development. |
| 44 | * |
| 45 | * -------------------------------------------------------------------- |
| 46 | * |
| 47 | * This file declares the constants and types used in the interface |
| 48 | * between a wlan driver and the user mode utilities. |
| 49 | * |
| 50 | * Notes: |
| 51 | * - Constant values are always in HOST byte order. To assign |
| 52 | * values to multi-byte fields they _must_ be converted to |
| 53 | * ieee byte order. To retrieve multi-byte values from incoming |
| 54 | * frames, they must be converted to host order. |
| 55 | * |
| 56 | * - The len member of the frame structure does NOT!!! include |
| 57 | * the MAC CRC. Therefore, the len field on rx'd frames should |
| 58 | * have 4 subtracted from it. |
| 59 | * |
| 60 | * All functions declared here are implemented in p80211.c |
| 61 | * |
| 62 | * The types, macros, and functions defined here are primarily |
| 63 | * used for encoding and decoding management frames. They are |
| 64 | * designed to follow these patterns of use: |
| 65 | * |
| 66 | * DECODE: |
| 67 | * 1) a frame of length len is received into buffer b |
| 68 | * 2) using the hdr structure and macros, we determine the type |
| 69 | * 3) an appropriate mgmt frame structure, mf, is allocated and zeroed |
| 70 | * 4) mf.hdr = b |
| 71 | * mf.buf = b |
| 72 | * mf.len = len |
| 73 | * 5) call mgmt_decode( mf ) |
| 74 | * 6) the frame field pointers in mf are now set. Note that any |
| 75 | * multi-byte frame field values accessed using the frame field |
| 76 | * pointers are in ieee byte order and will have to be converted |
| 77 | * to host order. |
| 78 | * |
| 79 | * ENCODE: |
| 80 | * 1) Library client allocates buffer space for maximum length |
| 81 | * frame of the desired type |
| 82 | * 2) Library client allocates a mgmt frame structure, called mf, |
| 83 | * of the desired type |
| 84 | * 3) Set the following: |
| 85 | * mf.type = <desired type> |
| 86 | * mf.buf = <allocated buffer address> |
| 87 | * 4) call mgmt_encode( mf ) |
| 88 | * 5) all of the fixed field pointers and fixed length information element |
| 89 | * pointers in mf are now set to their respective locations in the |
| 90 | * allocated space (fortunately, all variable length information elements |
| 91 | * fall at the end of their respective frames). |
| 92 | * 5a) The length field is set to include the last of the fixed and fixed |
| 93 | * length fields. It may have to be updated for optional or variable |
Ebru Akagunduz | ade6509 | 2014-03-06 19:42:16 +0200 | [diff] [blame] | 94 | * length information elements. |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 95 | * 6) Optional and variable length information elements are special cases |
| 96 | * and must be handled individually by the client code. |
| 97 | * -------------------------------------------------------------------- |
| 98 | */ |
| 99 | |
| 100 | #ifndef _P80211MGMT_H |
| 101 | #define _P80211MGMT_H |
| 102 | |
Svenne Krap | 5dd8acc | 2010-02-14 18:59:00 +0100 | [diff] [blame] | 103 | #ifndef _P80211HDR_H |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 104 | #include "p80211hdr.h" |
| 105 | #endif |
| 106 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 107 | /*-- Information Element IDs --------------------*/ |
| 108 | #define WLAN_EID_SSID 0 |
| 109 | #define WLAN_EID_SUPP_RATES 1 |
| 110 | #define WLAN_EID_FH_PARMS 2 |
| 111 | #define WLAN_EID_DS_PARMS 3 |
| 112 | #define WLAN_EID_CF_PARMS 4 |
| 113 | #define WLAN_EID_TIM 5 |
| 114 | #define WLAN_EID_IBSS_PARMS 6 |
| 115 | /*-- values 7-15 reserved --*/ |
| 116 | #define WLAN_EID_CHALLENGE 16 |
| 117 | /*-- values 17-31 reserved for challenge text extension --*/ |
| 118 | /*-- values 32-255 reserved --*/ |
| 119 | |
| 120 | /*-- Reason Codes -------------------------------*/ |
| 121 | #define WLAN_MGMT_REASON_RSVD 0 |
| 122 | #define WLAN_MGMT_REASON_UNSPEC 1 |
| 123 | #define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID 2 |
| 124 | #define WLAN_MGMT_REASON_DEAUTH_LEAVING 3 |
| 125 | #define WLAN_MGMT_REASON_DISASSOC_INACTIVE 4 |
| 126 | #define WLAN_MGMT_REASON_DISASSOC_AP_BUSY 5 |
| 127 | #define WLAN_MGMT_REASON_CLASS2_NONAUTH 6 |
| 128 | #define WLAN_MGMT_REASON_CLASS3_NONASSOC 7 |
| 129 | #define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT 8 |
| 130 | #define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH 9 |
| 131 | |
| 132 | /*-- Status Codes -------------------------------*/ |
| 133 | #define WLAN_MGMT_STATUS_SUCCESS 0 |
| 134 | #define WLAN_MGMT_STATUS_UNSPEC_FAILURE 1 |
| 135 | #define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED 10 |
| 136 | #define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC 11 |
| 137 | #define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC 12 |
| 138 | #define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG 13 |
| 139 | #define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ 14 |
| 140 | #define WLAN_MGMT_STATUS_CHALLENGE_FAIL 15 |
| 141 | #define WLAN_MGMT_STATUS_AUTH_TIMEOUT 16 |
| 142 | #define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY 17 |
| 143 | #define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES 18 |
| 144 | /* p80211b additions */ |
| 145 | #define WLAN_MGMT_STATUS_ASSOC_DENIED_NOSHORT 19 |
| 146 | #define WLAN_MGMT_STATUS_ASSOC_DENIED_NOPBCC 20 |
| 147 | #define WLAN_MGMT_STATUS_ASSOC_DENIED_NOAGILITY 21 |
| 148 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 149 | /*-- Auth Algorithm Field ---------------------------*/ |
| 150 | #define WLAN_AUTH_ALG_OPENSYSTEM 0 |
| 151 | #define WLAN_AUTH_ALG_SHAREDKEY 1 |
| 152 | |
| 153 | /*-- Management Frame Field Offsets -------------*/ |
| 154 | /* Note: Not all fields are listed because of variable lengths, */ |
| 155 | /* see the code in p80211.c to see how we search for fields */ |
| 156 | /* Note: These offsets are from the start of the frame data */ |
| 157 | |
| 158 | #define WLAN_BEACON_OFF_TS 0 |
Solomon Peachy | aaad430 | 2008-10-29 10:42:53 -0400 | [diff] [blame] | 159 | #define WLAN_BEACON_OFF_BCN_int 8 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 160 | #define WLAN_BEACON_OFF_CAPINFO 10 |
| 161 | #define WLAN_BEACON_OFF_SSID 12 |
| 162 | |
| 163 | #define WLAN_DISASSOC_OFF_REASON 0 |
| 164 | |
| 165 | #define WLAN_ASSOCREQ_OFF_CAP_INFO 0 |
Solomon Peachy | aaad430 | 2008-10-29 10:42:53 -0400 | [diff] [blame] | 166 | #define WLAN_ASSOCREQ_OFF_LISTEN_int 2 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 167 | #define WLAN_ASSOCREQ_OFF_SSID 4 |
| 168 | |
| 169 | #define WLAN_ASSOCRESP_OFF_CAP_INFO 0 |
| 170 | #define WLAN_ASSOCRESP_OFF_STATUS 2 |
| 171 | #define WLAN_ASSOCRESP_OFF_AID 4 |
| 172 | #define WLAN_ASSOCRESP_OFF_SUPP_RATES 6 |
| 173 | |
| 174 | #define WLAN_REASSOCREQ_OFF_CAP_INFO 0 |
Solomon Peachy | aaad430 | 2008-10-29 10:42:53 -0400 | [diff] [blame] | 175 | #define WLAN_REASSOCREQ_OFF_LISTEN_int 2 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 176 | #define WLAN_REASSOCREQ_OFF_CURR_AP 4 |
| 177 | #define WLAN_REASSOCREQ_OFF_SSID 10 |
| 178 | |
| 179 | #define WLAN_REASSOCRESP_OFF_CAP_INFO 0 |
| 180 | #define WLAN_REASSOCRESP_OFF_STATUS 2 |
| 181 | #define WLAN_REASSOCRESP_OFF_AID 4 |
| 182 | #define WLAN_REASSOCRESP_OFF_SUPP_RATES 6 |
| 183 | |
| 184 | #define WLAN_PROBEREQ_OFF_SSID 0 |
| 185 | |
| 186 | #define WLAN_PROBERESP_OFF_TS 0 |
Solomon Peachy | aaad430 | 2008-10-29 10:42:53 -0400 | [diff] [blame] | 187 | #define WLAN_PROBERESP_OFF_BCN_int 8 |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 188 | #define WLAN_PROBERESP_OFF_CAP_INFO 10 |
| 189 | #define WLAN_PROBERESP_OFF_SSID 12 |
| 190 | |
| 191 | #define WLAN_AUTHEN_OFF_AUTH_ALG 0 |
| 192 | #define WLAN_AUTHEN_OFF_AUTH_SEQ 2 |
| 193 | #define WLAN_AUTHEN_OFF_STATUS 4 |
| 194 | #define WLAN_AUTHEN_OFF_CHALLENGE 6 |
| 195 | |
| 196 | #define WLAN_DEAUTHEN_OFF_REASON 0 |
| 197 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 198 | /*-- Capability Field ---------------------------*/ |
Moritz Muehlenhoff | 7f6e0e4 | 2009-01-25 21:54:55 +0100 | [diff] [blame] | 199 | #define WLAN_GET_MGMT_CAP_INFO_ESS(n) ((n) & BIT(0)) |
| 200 | #define WLAN_GET_MGMT_CAP_INFO_IBSS(n) (((n) & BIT(1)) >> 1) |
| 201 | #define WLAN_GET_MGMT_CAP_INFO_CFPOLLABLE(n) (((n) & BIT(2)) >> 2) |
| 202 | #define WLAN_GET_MGMT_CAP_INFO_CFPOLLREQ(n) (((n) & BIT(3)) >> 3) |
| 203 | #define WLAN_GET_MGMT_CAP_INFO_PRIVACY(n) (((n) & BIT(4)) >> 4) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 204 | /* p80211b additions */ |
Moritz Muehlenhoff | 7f6e0e4 | 2009-01-25 21:54:55 +0100 | [diff] [blame] | 205 | #define WLAN_GET_MGMT_CAP_INFO_SHORT(n) (((n) & BIT(5)) >> 5) |
| 206 | #define WLAN_GET_MGMT_CAP_INFO_PBCC(n) (((n) & BIT(6)) >> 6) |
| 207 | #define WLAN_GET_MGMT_CAP_INFO_AGILITY(n) (((n) & BIT(7)) >> 7) |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 208 | |
| 209 | #define WLAN_SET_MGMT_CAP_INFO_ESS(n) (n) |
| 210 | #define WLAN_SET_MGMT_CAP_INFO_IBSS(n) ((n) << 1) |
| 211 | #define WLAN_SET_MGMT_CAP_INFO_CFPOLLABLE(n) ((n) << 2) |
| 212 | #define WLAN_SET_MGMT_CAP_INFO_CFPOLLREQ(n) ((n) << 3) |
| 213 | #define WLAN_SET_MGMT_CAP_INFO_PRIVACY(n) ((n) << 4) |
| 214 | /* p80211b additions */ |
| 215 | #define WLAN_SET_MGMT_CAP_INFO_SHORT(n) ((n) << 5) |
| 216 | #define WLAN_SET_MGMT_CAP_INFO_PBCC(n) ((n) << 6) |
| 217 | #define WLAN_SET_MGMT_CAP_INFO_AGILITY(n) ((n) << 7) |
| 218 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 219 | /*-- Information Element Types --------------------*/ |
| 220 | /* prototype structure, all IEs start with these members */ |
| 221 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 222 | struct wlan_ie { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 223 | u8 eid; |
| 224 | u8 len; |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 225 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 226 | |
| 227 | /*-- Service Set Identity (SSID) -----------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 228 | struct wlan_ie_ssid { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 229 | u8 eid; |
| 230 | u8 len; |
| 231 | u8 ssid[1]; /* may be zero, ptrs may overlap */ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 232 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 233 | |
| 234 | /*-- Supported Rates -----------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 235 | struct wlan_ie_supp_rates { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 236 | u8 eid; |
| 237 | u8 len; |
| 238 | u8 rates[1]; /* had better be at LEAST one! */ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 239 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 240 | |
| 241 | /*-- FH Parameter Set ----------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 242 | struct wlan_ie_fh_parms { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 243 | u8 eid; |
| 244 | u8 len; |
| 245 | u16 dwell; |
| 246 | u8 hopset; |
| 247 | u8 hoppattern; |
| 248 | u8 hopindex; |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 249 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 250 | |
| 251 | /*-- DS Parameter Set ----------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 252 | struct wlan_ie_ds_parms { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 253 | u8 eid; |
| 254 | u8 len; |
| 255 | u8 curr_ch; |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 256 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 257 | |
| 258 | /*-- CF Parameter Set ----------------------------*/ |
| 259 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 260 | struct wlan_ie_cf_parms { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 261 | u8 eid; |
| 262 | u8 len; |
| 263 | u8 cfp_cnt; |
| 264 | u8 cfp_period; |
| 265 | u16 cfp_maxdur; |
| 266 | u16 cfp_durremaining; |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 267 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 268 | |
| 269 | /*-- TIM ------------------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 270 | struct wlan_ie_tim { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 271 | u8 eid; |
| 272 | u8 len; |
| 273 | u8 dtim_cnt; |
| 274 | u8 dtim_period; |
| 275 | u8 bitmap_ctl; |
| 276 | u8 virt_bm[1]; |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 277 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 278 | |
| 279 | /*-- IBSS Parameter Set ---------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 280 | struct wlan_ie_ibss_parms { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 281 | u8 eid; |
| 282 | u8 len; |
| 283 | u16 atim_win; |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 284 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 285 | |
| 286 | /*-- Challenge Text ------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 287 | struct wlan_ie_challenge { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 288 | u8 eid; |
| 289 | u8 len; |
| 290 | u8 challenge[1]; |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 291 | } __packed; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 292 | |
| 293 | /*-------------------------------------------------*/ |
| 294 | /* Frame Types */ |
| 295 | |
| 296 | /* prototype structure, all mgmt frame types will start with these members */ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 297 | struct wlan_fr_mgmt { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 298 | u16 type; |
| 299 | u16 len; /* DOES NOT include CRC !!!! */ |
| 300 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 301 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 302 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 303 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 304 | /*-- fixed fields -----------*/ |
| 305 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 306 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 307 | |
| 308 | /*-- Beacon ---------------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 309 | struct wlan_fr_beacon { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 310 | u16 type; |
| 311 | u16 len; |
| 312 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 313 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 314 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 315 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 316 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 317 | u64 *ts; |
| 318 | u16 *bcn_int; |
| 319 | u16 *cap_info; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 320 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 321 | struct wlan_ie_ssid *ssid; |
| 322 | struct wlan_ie_supp_rates *supp_rates; |
| 323 | struct wlan_ie_fh_parms *fh_parms; |
| 324 | struct wlan_ie_ds_parms *ds_parms; |
| 325 | struct wlan_ie_cf_parms *cf_parms; |
| 326 | struct wlan_ie_ibss_parms *ibss_parms; |
| 327 | struct wlan_ie_tim *tim; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 328 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 329 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 330 | |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 331 | /*-- IBSS ATIM ------------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 332 | struct wlan_fr_ibssatim { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 333 | u16 type; |
| 334 | u16 len; |
| 335 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 336 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 337 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 338 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 339 | |
| 340 | /*-- fixed fields -----------*/ |
| 341 | /*-- info elements ----------*/ |
| 342 | |
| 343 | /* this frame type has a null body */ |
| 344 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 345 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 346 | |
| 347 | /*-- Disassociation -------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 348 | struct wlan_fr_disassoc { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 349 | u16 type; |
| 350 | u16 len; |
| 351 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 352 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 353 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 354 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 355 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 356 | u16 *reason; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 357 | |
| 358 | /*-- info elements ----------*/ |
| 359 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 360 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 361 | |
| 362 | /*-- Association Request --------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 363 | struct wlan_fr_assocreq { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 364 | u16 type; |
| 365 | u16 len; |
| 366 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 367 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 368 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 369 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 370 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 371 | u16 *cap_info; |
| 372 | u16 *listen_int; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 373 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 374 | struct wlan_ie_ssid *ssid; |
| 375 | struct wlan_ie_supp_rates *supp_rates; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 376 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 377 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 378 | |
| 379 | /*-- Association Response -------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 380 | struct wlan_fr_assocresp { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 381 | u16 type; |
| 382 | u16 len; |
| 383 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 384 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 385 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 386 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 387 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 388 | u16 *cap_info; |
| 389 | u16 *status; |
| 390 | u16 *aid; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 391 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 392 | struct wlan_ie_supp_rates *supp_rates; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 393 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 394 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 395 | |
| 396 | /*-- Reassociation Request ------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 397 | struct wlan_fr_reassocreq { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 398 | u16 type; |
| 399 | u16 len; |
| 400 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 401 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 402 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 403 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 404 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 405 | u16 *cap_info; |
| 406 | u16 *listen_int; |
| 407 | u8 *curr_ap; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 408 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 409 | struct wlan_ie_ssid *ssid; |
| 410 | struct wlan_ie_supp_rates *supp_rates; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 411 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 412 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 413 | |
| 414 | /*-- Reassociation Response -----------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 415 | struct wlan_fr_reassocresp { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 416 | u16 type; |
| 417 | u16 len; |
| 418 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 419 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 420 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 421 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 422 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 423 | u16 *cap_info; |
| 424 | u16 *status; |
| 425 | u16 *aid; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 426 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 427 | struct wlan_ie_supp_rates *supp_rates; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 428 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 429 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 430 | |
| 431 | /*-- Probe Request --------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 432 | struct wlan_fr_probereq { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 433 | u16 type; |
| 434 | u16 len; |
| 435 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 436 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 437 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 438 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 439 | /*-- fixed fields -----------*/ |
| 440 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 441 | struct wlan_ie_ssid *ssid; |
| 442 | struct wlan_ie_supp_rates *supp_rates; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 443 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 444 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 445 | |
| 446 | /*-- Probe Response -------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 447 | struct wlan_fr_proberesp { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 448 | u16 type; |
| 449 | u16 len; |
| 450 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 451 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 452 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 453 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 454 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 455 | u64 *ts; |
| 456 | u16 *bcn_int; |
| 457 | u16 *cap_info; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 458 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 459 | struct wlan_ie_ssid *ssid; |
| 460 | struct wlan_ie_supp_rates *supp_rates; |
| 461 | struct wlan_ie_fh_parms *fh_parms; |
| 462 | struct wlan_ie_ds_parms *ds_parms; |
| 463 | struct wlan_ie_cf_parms *cf_parms; |
| 464 | struct wlan_ie_ibss_parms *ibss_parms; |
| 465 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 466 | |
| 467 | /*-- Authentication -------------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 468 | struct wlan_fr_authen { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 469 | u16 type; |
| 470 | u16 len; |
| 471 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 472 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 473 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 474 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 475 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 476 | u16 *auth_alg; |
| 477 | u16 *auth_seq; |
| 478 | u16 *status; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 479 | /*-- info elements ----------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 480 | struct wlan_ie_challenge *challenge; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 481 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 482 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 483 | |
| 484 | /*-- Deauthenication -----------------------------*/ |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 485 | struct wlan_fr_deauthen { |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 486 | u16 type; |
| 487 | u16 len; |
| 488 | u8 *buf; |
Edgardo Hames | 93df38e | 2010-07-30 22:51:55 -0300 | [diff] [blame] | 489 | union p80211_hdr *hdr; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 490 | /* used for target specific data, skb in Linux */ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 491 | void *priv; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 492 | /*-- fixed fields -----------*/ |
Moritz Muehlenhoff | bb12793 | 2009-02-08 02:21:02 +0100 | [diff] [blame] | 493 | u16 *reason; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 494 | |
| 495 | /*-- info elements ----------*/ |
| 496 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 497 | }; |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 498 | |
Ebru Akagunduz | e2665c2 | 2014-03-10 10:02:02 +0200 | [diff] [blame] | 499 | void wlan_mgmt_encode_beacon(struct wlan_fr_beacon *f); |
| 500 | void wlan_mgmt_decode_beacon(struct wlan_fr_beacon *f); |
| 501 | void wlan_mgmt_encode_disassoc(struct wlan_fr_disassoc *f); |
| 502 | void wlan_mgmt_decode_disassoc(struct wlan_fr_disassoc *f); |
| 503 | void wlan_mgmt_encode_assocreq(struct wlan_fr_assocreq *f); |
| 504 | void wlan_mgmt_decode_assocreq(struct wlan_fr_assocreq *f); |
| 505 | void wlan_mgmt_encode_assocresp(struct wlan_fr_assocresp *f); |
| 506 | void wlan_mgmt_decode_assocresp(struct wlan_fr_assocresp *f); |
| 507 | void wlan_mgmt_encode_reassocreq(struct wlan_fr_reassocreq *f); |
| 508 | void wlan_mgmt_decode_reassocreq(struct wlan_fr_reassocreq *f); |
| 509 | void wlan_mgmt_encode_reassocresp(struct wlan_fr_reassocresp *f); |
| 510 | void wlan_mgmt_decode_reassocresp(struct wlan_fr_reassocresp *f); |
| 511 | void wlan_mgmt_encode_probereq(struct wlan_fr_probereq *f); |
| 512 | void wlan_mgmt_decode_probereq(struct wlan_fr_probereq *f); |
| 513 | void wlan_mgmt_encode_proberesp(struct wlan_fr_proberesp *f); |
| 514 | void wlan_mgmt_decode_proberesp(struct wlan_fr_proberesp *f); |
| 515 | void wlan_mgmt_encode_authen(struct wlan_fr_authen *f); |
| 516 | void wlan_mgmt_decode_authen(struct wlan_fr_authen *f); |
| 517 | void wlan_mgmt_encode_deauthen(struct wlan_fr_deauthen *f); |
| 518 | void wlan_mgmt_decode_deauthen(struct wlan_fr_deauthen *f); |
Greg Kroah-Hartman | 00b3ed1 | 2008-10-02 11:29:28 -0700 | [diff] [blame] | 519 | |
| 520 | #endif /* _P80211MGMT_H */ |