Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
| 29 | * \file dot11f.c |
| 30 | * |
| 31 | * \brief Structures, functions & definitions for |
| 32 | * working with 802.11 Frames |
| 33 | * |
| 34 | * |
| 35 | * This file was automatically generated by 'framesc' |
| 36 | * Wed Oct 14 10:14:42 2015 from the following file(s): |
| 37 | * |
| 38 | * dot11f.frms |
| 39 | * |
| 40 | * PLEASE DON'T EDIT THIS FILE BY HAND! |
| 41 | * |
| 42 | */ |
| 43 | |
| 44 | #if !defined ANI_OS_TYPE_OSX && !defined ANI_OS_TYPE_LINUX && !defined ANI_OS_TYPE_ANDROID |
| 45 | #include <memory.h> /* For memcpy */ |
| 46 | #include <stdio.h> /* For _vsnprintf */ |
| 47 | #include <stddef.h> /* For offsetof */ |
| 48 | #endif |
| 49 | |
| 50 | #include <ani_global.h> |
| 51 | #include <utils_api.h> |
| 52 | #include "dot11fdefs.h" |
| 53 | #include "dot11f.h" |
| 54 | |
| 55 | #if defined(_MSC_VER) |
| 56 | #pragma warning (disable:4244) |
| 57 | #pragma warning (disable:4505) |
| 58 | #pragma warning (disable:4702) |
| 59 | #pragma warning (disable:4996)/* ... was declared deprecated */ |
| 60 | #endif /* Microsoft C/C++ */ |
| 61 | |
| 62 | typedef unsigned char tFRAMES_BOOL; |
| 63 | typedef void (*pfnGeneric_t)(void); |
| 64 | |
| 65 | typedef struct sFFDefn { |
| 66 | const char *name; |
| 67 | uint32_t offset; |
| 68 | uint16_t sig; |
| 69 | uint8_t size; |
| 70 | } tFFDefn; |
| 71 | |
| 72 | typedef struct sIEDefn { |
| 73 | uint32_t offset; |
| 74 | uint32_t presenceOffset; |
| 75 | uint32_t countOffset; |
| 76 | const char *name; |
| 77 | uint16_t arraybound; |
| 78 | uint16_t minSize; |
| 79 | uint16_t maxSize; |
| 80 | uint16_t sig; |
| 81 | unsigned char oui[5]; |
| 82 | unsigned char noui; |
| 83 | uint8_t eid; |
| 84 | tFRAMES_BOOL fMandatory; |
| 85 | } tIEDefn; |
| 86 | |
| 87 | #if !defined(countof) |
| 88 | #define countof(x) (sizeof((x)) / sizeof((x)[0])) |
| 89 | #endif |
| 90 | |
| 91 | #if !defined(DOT11F_MEMCPY) |
| 92 | #define DOT11F_MEMCPY(ctx, dst, src, len) \ |
| 93 | memcpy((dst), (src), (len)) |
| 94 | #endif |
| 95 | |
| 96 | #if !defined(DOT11F_MEMCMP) |
| 97 | #define DOT11F_MEMCMP(ctx, lhs, rhs, len) \ |
| 98 | memcmp((lhs), (rhs), (len)) |
| 99 | #endif |
| 100 | |
| 101 | #ifndef DOT11F_HAVE_LOG_SEVERITIES |
| 102 | #define FRLOG_OFF (0) |
| 103 | #define FRLOGP (1) |
| 104 | #define FRLOGE (2) |
| 105 | #define FRLOGW (3) |
| 106 | #define FRLOG1 (4) |
| 107 | #define FRLOG2 (5) |
| 108 | #define FRLOG3 (6) |
| 109 | #define FRLOG4 (7) |
| 110 | #endif |
| 111 | |
| 112 | #define FRFL(x) x |
| 113 | |
| 114 | #define FRAMES_LOG0(ctx, sev, fmt) |
| 115 | #define FRAMES_LOG1(ctx, sev, fmt, p1) |
| 116 | #define FRAMES_LOG2(ctx, sev, fmt, p1, p2) |
| 117 | #define FRAMES_LOG3(ctx, sev, fmt, p1, p2, p3) |
| 118 | #define FRAMES_DUMP(ctx, sev, p, n) |
| 119 | #ifndef FRAMES_SEV_FOR_FRAME |
| 120 | #define FRAMES_SEV_FOR_FRAME(ctx, sig) FRLOG3 |
| 121 | #endif |
| 122 | |
| 123 | #if defined(DOT11F_ENABLE_DBG_BREAK) && defined (WIN32) |
| 124 | #define FRAMES_DBG_BREAK() { _asm int 3 } |
| 125 | #else |
| 126 | #define FRAMES_DBG_BREAK() |
| 127 | #endif |
| 128 | |
| 129 | #if !defined(DOT11F_PARAMETER_CHECK) |
| 130 | #if defined (DOT11F_HAVE_WIN32_API) |
| 131 | |
| 132 | #define DOT11F_PARAMETER_CHECK(pBuf, nBuf, pFrm, nFrm) \ |
| 133 | if (!pBuf || IsBadReadPtr(pBuf, nBuf))\ |
| 134 | return DOT11F_BAD_INPUT_BUFFER; \ |
| 135 | if (!pFrm || IsBadWritePtr(pFrm, nFrm))\ |
| 136 | return DOT11F_BAD_OUTPUT_BUFFER \ |
| 137 | |
| 138 | #define DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed) \ |
| 139 | if (!pSrc || IsBadReadPtr(pSrc, 4))\ |
| 140 | eturn DOT11F_BAD_INPUT_BUFFER; \ |
| 141 | if (!pBuf || IsBadWritePtr(pBuf, nBuf))\ |
| 142 | return DOT11F_BAD_OUTPUT_BUFFER; \ |
| 143 | if (!nBuf)\ |
| 144 | return DOT11F_BAD_OUTPUT_BUFFER; \ |
| 145 | if (IsBadWritePtr(pnConsumed, 4))\ |
| 146 | return DOT11F_BAD_OUTPUT_BUFFER \ |
| 147 | |
| 148 | #else |
| 149 | |
| 150 | #define DOT11F_PARAMETER_CHECK(pBuf, nBuf, pFrm, nFrm) \ |
| 151 | if (!pBuf)\ |
| 152 | return DOT11F_BAD_INPUT_BUFFER; \ |
| 153 | if (!pFrm)\ |
| 154 | return DOT11F_BAD_OUTPUT_BUFFER \ |
| 155 | |
| 156 | #define DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed) \ |
| 157 | if (!pSrc)\ |
| 158 | return DOT11F_BAD_INPUT_BUFFER; \ |
| 159 | if (!pBuf)\ |
| 160 | return DOT11F_BAD_OUTPUT_BUFFER; \ |
| 161 | if (!nBuf)\ |
| 162 | return DOT11F_BAD_OUTPUT_BUFFER; \ |
| 163 | if (!pnConsumed)\ |
| 164 | return DOT11F_BAD_OUTPUT_BUFFER \ |
| 165 | |
| 166 | #endif |
| 167 | #endif |
| 168 | |
| 169 | static void framesntohs(tpAniSirGlobal pCtx, |
| 170 | uint16_t *pOut, |
| 171 | uint8_t *pIn, |
| 172 | tFRAMES_BOOL fMsb) |
| 173 | { |
| 174 | (void)pCtx; |
| 175 | #if defined (DOT11F_LITTLE_ENDIAN_HOST) |
| 176 | if (!fMsb) |
| 177 | DOT11F_MEMCPY(pCtx, (uint16_t *)pOut, pIn, 2); |
| 178 | else |
| 179 | *pOut = (uint16_t)(*pIn << 8) | *(pIn + 1); |
| 180 | #else |
| 181 | if (!fMsb) |
| 182 | *pOut = (uint16_t)(*pIn | (*(pIn + 1) << 8)); |
| 183 | else |
| 184 | DOT11F_MEMCPY(pCtx, (uint16_t *)pOut, pIn, 2); |
| 185 | #endif |
| 186 | } |
| 187 | |
| 188 | static void framesntohl(tpAniSirGlobal pCtx, |
| 189 | uint32_t *pOut, |
| 190 | uint8_t *pIn, |
| 191 | tFRAMES_BOOL fMsb) |
| 192 | { |
| 193 | (void)pCtx; |
| 194 | #if defined (DOT11F_LITTLE_ENDIAN_HOST) |
| 195 | if (!fMsb) |
| 196 | DOT11F_MEMCPY(pCtx, (uint32_t *)pOut, pIn, 4); |
| 197 | else |
| 198 | *pOut = (uint32_t)(*pIn << 24) | |
| 199 | (*(pIn + 1) << 16) | |
| 200 | (*(pIn + 2) << 8) | |
| 201 | (*(pIn + 3)); |
| 202 | #else |
| 203 | if (!fMsb) |
| 204 | *pOut = (uint32_t)(*(pIn + 3) << 24) | |
| 205 | (*(pIn + 2) << 16) | |
| 206 | (*(pIn + 1) << 8) | |
| 207 | (*(pIn)); |
| 208 | else |
| 209 | *pOut = *(uint32_t *)pIn; |
| 210 | #endif |
| 211 | } |
| 212 | |
| 213 | static void framesntohq(tpAniSirGlobal pCtx, |
| 214 | tDOT11F_U64 *pOut, |
| 215 | uint8_t *pIn, |
| 216 | tFRAMES_BOOL fMsb) |
| 217 | { |
| 218 | #if defined (DOT11F_LITTLE_ENDIAN_HOST) |
| 219 | framesntohl(pCtx, &((*pOut)[0]), pIn, fMsb); |
| 220 | framesntohl(pCtx, &((*pOut)[1]), pIn + 4, fMsb); |
| 221 | #else |
| 222 | framesntohl(pCtx, &((*pOut)[1]), pIn, fMsb); |
| 223 | framesntohl(pCtx, &((*pOut)[0]), pIn + 4, fMsb); |
| 224 | #endif |
| 225 | } |
| 226 | |
| 227 | static void frameshtons(tpAniSirGlobal pCtx, |
| 228 | uint8_t *pOut, |
| 229 | uint16_t pIn, |
| 230 | tFRAMES_BOOL fMsb) |
| 231 | { |
| 232 | (void)pCtx; |
| 233 | #if defined (DOT11F_LITTLE_ENDIAN_HOST) |
| 234 | if (!fMsb) { |
| 235 | DOT11F_MEMCPY(pCtx, pOut, &pIn, 2); |
| 236 | } else { |
| 237 | *pOut = (pIn & 0xff00) >> 8; |
| 238 | *(pOut + 1) = pIn & 0xff; |
| 239 | } |
| 240 | #else |
| 241 | if (!fMsb) { |
| 242 | *pOut = pIn & 0xff; |
| 243 | *(pOut + 1) = (pIn & 0xff00) >> 8; |
| 244 | } else { |
| 245 | DOT11F_MEMCPY(pCtx, pOut, &pIn, 2); |
| 246 | } |
| 247 | #endif |
| 248 | } |
| 249 | |
| 250 | static void frameshtonl(tpAniSirGlobal pCtx, |
| 251 | uint8_t *pOut, |
| 252 | uint32_t pIn, |
| 253 | tFRAMES_BOOL fMsb) |
| 254 | { |
| 255 | (void)pCtx; |
| 256 | #if defined (DOT11F_LITTLE_ENDIAN_HOST) |
| 257 | if (!fMsb) { |
| 258 | DOT11F_MEMCPY(pCtx, pOut, &pIn, 4); |
| 259 | } else { |
| 260 | *pOut = (pIn & 0xff000000) >> 24; |
| 261 | *(pOut + 1) = (pIn & 0x00ff0000) >> 16; |
| 262 | *(pOut + 2) = (pIn & 0x0000ff00) >> 8; |
| 263 | *(pOut + 3) = (pIn & 0x000000ff); |
| 264 | } |
| 265 | #else |
| 266 | if (!fMsb) { |
| 267 | *pOut = (pIn & 0x000000ff); |
| 268 | *(pOut + 1) = (pIn & 0x0000ff00) >> 8; |
| 269 | *(pOut + 2) = (pIn & 0x00ff0000) >> 16; |
| 270 | *(pOut + 3) = (pIn & 0xff000000) >> 24; |
| 271 | } else { |
| 272 | DOT11F_MEMCPY(pCtx, pOut, &pIn, 4); |
| 273 | } |
| 274 | #endif |
| 275 | } |
| 276 | |
| 277 | static void frameshtonq(tpAniSirGlobal pCtx, |
| 278 | uint8_t *pOut, |
| 279 | tDOT11F_U64 pIn, |
| 280 | tFRAMES_BOOL fMsb) |
| 281 | { |
| 282 | #if defined (DOT11F_LITTLE_ENDIAN_HOST) |
| 283 | frameshtonl(pCtx, pOut, pIn[0], fMsb); |
| 284 | frameshtonl(pCtx, pOut + 4, pIn[1], fMsb); |
| 285 | #else |
| 286 | frameshtonl(pCtx, pOut + 4, pIn[1], fMsb); |
| 287 | frameshtonl(pCtx, pOut, pIn[0], fMsb); |
| 288 | #endif |
| 289 | } |
| 290 | |
| 291 | static const tIEDefn *find_ie_defn(tpAniSirGlobal pCtx, |
| 292 | uint8_t *pBuf, |
| 293 | uint32_t nBuf, |
| 294 | const tIEDefn IEs[]) |
| 295 | { |
| 296 | const tIEDefn *pIe; |
| 297 | (void)pCtx; |
| 298 | |
| 299 | pIe = &(IEs[0]); |
| 300 | while (0xff != pIe->eid) { |
| 301 | if (*pBuf == pIe->eid) { |
| 302 | if (0 == pIe->noui) |
| 303 | return pIe; |
| 304 | |
| 305 | if ((nBuf > (uint32_t)(pIe->noui + 2)) && |
| 306 | (!DOT11F_MEMCMP(pCtx, pBuf + 2, pIe->oui, |
| 307 | pIe->noui))) |
| 308 | return pIe; |
| 309 | } |
| 310 | |
| 311 | ++pIe; |
| 312 | } |
| 313 | |
| 314 | return NULL; |
| 315 | } |
| 316 | |
| 317 | static uint32_t get_container_ies_len(tpAniSirGlobal pCtx, |
| 318 | uint8_t *pBuf, |
| 319 | uint32_t nBuf, |
| 320 | uint8_t *pnConsumed, |
| 321 | const tIEDefn IEs[]) |
| 322 | { |
| 323 | const tIEDefn *pIe, *pIeFirst; |
| 324 | uint8_t *pBufRemaining = pBuf; |
| 325 | uint8_t len = 0; |
| 326 | (void)pCtx; |
| 327 | |
| 328 | pIeFirst = &(IEs[0]); |
| 329 | |
| 330 | if (*pBufRemaining != pIeFirst->eid) |
| 331 | return DOT11F_INTERNAL_ERROR; |
| 332 | len += *(pBufRemaining+1); |
| 333 | pBufRemaining += len + 2; |
| 334 | len += 2; |
| 335 | while (len < nBuf) { |
| 336 | pIe = find_ie_defn(pCtx, pBufRemaining, nBuf + len, IEs); |
| 337 | if (NULL == pIe) |
| 338 | break; |
| 339 | if (pIe->eid == pIeFirst->eid) |
| 340 | break; |
| 341 | len += *(pBufRemaining + 1) + 2; |
| 342 | pBufRemaining += *(pBufRemaining + 1) + 2; |
| 343 | } |
| 344 | |
| 345 | *pnConsumed = len; |
| 346 | return DOT11F_PARSE_SUCCESS; |
| 347 | |
| 348 | } |
| 349 | |
| 350 | |
| 351 | static uint32_t unpack_core(tpAniSirGlobal pCtx, |
| 352 | uint8_t *pBuf, |
| 353 | uint32_t nBuf, |
| 354 | const tFFDefn FFs[], |
| 355 | const tIEDefn IEs[], |
| 356 | uint8_t *pFrm, |
| 357 | size_t nFrm); |
| 358 | static uint32_t pack_core(tpAniSirGlobal pCtx, |
| 359 | uint8_t *pSrc, |
| 360 | uint8_t *pBuf, |
| 361 | uint32_t nBuf, |
| 362 | uint32_t *pnConsumed, |
| 363 | const tFFDefn FFs[], |
| 364 | const tIEDefn IEs[]); |
| 365 | static uint32_t get_packed_size_core(tpAniSirGlobal pCtx, |
| 366 | uint8_t *pFrm, |
| 367 | uint32_t *pnNeeded, |
| 368 | const tIEDefn IEs[]); |
| 369 | |
| 370 | uint32_t dot11f_unpack_tlv_common_func(tpAniSirGlobal pCtx, uint8_t *pBuf, |
| 371 | uint16_t tlvlen, uint8_t *pDstPresent, |
| 372 | uint8_t *pDstField) |
| 373 | { |
| 374 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 375 | (void)tlvlen; /* Shutup the compiler */ |
| 376 | |
| 377 | *pDstPresent = 1; |
| 378 | *pDstField = *pBuf; |
| 379 | (void)pCtx; |
| 380 | return status; |
| 381 | } /* End dot11f_unpack_tlv_common_func. */ |
| 382 | |
| 383 | uint32_t dot11f_unpack_tlv_common_func2(tpAniSirGlobal pCtx, uint8_t *pBuf, |
| 384 | uint16_t tlvlen, uint8_t *pDstPresent, |
| 385 | uint16_t *pDstState) |
| 386 | { |
| 387 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 388 | (void)tlvlen; /* Shutup the compiler */ |
| 389 | |
| 390 | *pDstPresent = 1; |
| 391 | framesntohs(pCtx, pDstState, pBuf, 1); |
| 392 | (void)pCtx; |
| 393 | return status; |
| 394 | |
| 395 | } /* End dot11f_unpack_tlv_common_func2. */ |
| 396 | |
| 397 | void dot11f_unpack_ff_common_func(tpAniSirGlobal pCtx, |
| 398 | uint8_t *pBuf, uint16_t *pDstField) |
| 399 | { |
| 400 | framesntohs(pCtx, pDstField, pBuf, 0); |
| 401 | (void)pCtx; |
| 402 | } /* End dot11f_unpack_ff_common_func. */ |
| 403 | |
| 404 | uint32_t dot11f_unpack_ie_common_func(tpAniSirGlobal pCtx, uint8_t *pBuf, |
| 405 | uint8_t ielen, uint8_t *pDstPresent , |
| 406 | uint8_t *pDstField) |
| 407 | { |
| 408 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 409 | (void)ielen; |
| 410 | (void)pBuf; |
| 411 | if ((*pDstPresent)) |
| 412 | status = DOT11F_DUPLICATE_IE; |
| 413 | *pDstPresent = 1; |
| 414 | *pDstField = *pBuf; |
| 415 | (void)pCtx; |
| 416 | |
| 417 | return status; |
| 418 | } /* End dot11f_unpack_ie_common_func */ |
| 419 | |
| 420 | typedef struct sTLVDefn { |
| 421 | uint32_t offset; |
| 422 | uint32_t presenceOffset; |
| 423 | const char *name; |
| 424 | uint16_t sig; |
| 425 | uint32_t id; |
| 426 | uint32_t pec; |
| 427 | uint32_t minSize; |
| 428 | uint32_t maxSize; |
| 429 | uint8_t fMandatory; |
| 430 | uint8_t sType; |
| 431 | uint8_t sLen; |
| 432 | uint8_t fMsb; |
| 433 | } tTLVDefn; |
| 434 | |
| 435 | static const tTLVDefn *find_tlv_defn(tpAniSirGlobal pCtx, |
| 436 | uint8_t *pBuf, |
| 437 | uint32_t nBuf, |
| 438 | const tTLVDefn TLVs[]) |
| 439 | { |
| 440 | const tTLVDefn *pTlv; |
| 441 | uint32_t pec; |
| 442 | uint16_t id; |
| 443 | |
| 444 | pTlv = &(TLVs[0]); |
| 445 | (void)pCtx; |
| 446 | if (pTlv->sType == 2) |
| 447 | framesntohs(pCtx, &id, pBuf, 1); |
| 448 | else |
| 449 | id = *pBuf; |
| 450 | |
| 451 | while (0xffff != pTlv->id) { |
| 452 | if (id == pTlv->id) { |
| 453 | if (0 == pTlv->pec) |
| 454 | return pTlv; |
| 455 | |
| 456 | if (nBuf > 5) { |
| 457 | pec = ((*(pBuf + 4)) << 16) | |
| 458 | ((*(pBuf + 5)) << 8) | |
| 459 | *(pBuf + 6); |
| 460 | if (pec == pTlv->pec) |
| 461 | return pTlv; |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | ++pTlv; |
| 466 | } |
| 467 | |
| 468 | return NULL; |
| 469 | } |
| 470 | |
| 471 | static uint32_t unpack_tlv_core(tpAniSirGlobal pCtx, |
| 472 | uint8_t *pBuf, |
| 473 | uint32_t nBuf, |
| 474 | const tTLVDefn TLVs[], |
| 475 | uint8_t *pFrm, |
| 476 | size_t nFrm); |
| 477 | static uint32_t pack_tlv_core(tpAniSirGlobal pCtx, |
| 478 | uint8_t *pSrc, |
| 479 | uint8_t *pBuf, |
| 480 | uint32_t nBuf, |
| 481 | uint32_t *pnConsumed, |
| 482 | const tTLVDefn TLVs[], |
| 483 | uint32_t *pidx); |
| 484 | static uint32_t get_packed_size_tlv_core(tpAniSirGlobal pCtx, |
| 485 | uint8_t *pFrm, |
| 486 | uint32_t *pnNeeded, |
| 487 | const tTLVDefn TLVs[]); |
| 488 | |
| 489 | #define SigFfAID (0x0001) |
| 490 | |
| 491 | void dot11f_unpack_ff_action(tpAniSirGlobal pCtx, |
| 492 | uint8_t *pBuf, |
| 493 | tDot11fFfAction *pDst) |
| 494 | { |
| 495 | pDst->action = *pBuf; |
| 496 | (void)pCtx; |
| 497 | } /* End dot11f_unpack_ff_action. */ |
| 498 | |
| 499 | #define SigFfAction (0x0002) |
| 500 | |
| 501 | #define SigFfAuthAlgo (0x0003) |
| 502 | |
| 503 | #define SigFfAuthSeqNo (0x0004) |
| 504 | |
| 505 | #define SigFfBeaconInterval (0x0005) |
| 506 | |
| 507 | void dot11f_unpack_ff_capabilities(tpAniSirGlobal pCtx, |
| 508 | uint8_t *pBuf, |
| 509 | tDot11fFfCapabilities *pDst) |
| 510 | { |
| 511 | uint16_t tmp0__; |
| 512 | framesntohs(pCtx, &tmp0__, pBuf, 0); |
| 513 | pDst->ess = tmp0__ >> 0 & 0x1; |
| 514 | pDst->ibss = tmp0__ >> 1 & 0x1; |
| 515 | pDst->cfPollable = tmp0__ >> 2 & 0x1; |
| 516 | pDst->cfPollReq = tmp0__ >> 3 & 0x1; |
| 517 | pDst->privacy = tmp0__ >> 4 & 0x1; |
| 518 | pDst->shortPreamble = tmp0__ >> 5 & 0x1; |
| 519 | pDst->pbcc = tmp0__ >> 6 & 0x1; |
| 520 | pDst->channelAgility = tmp0__ >> 7 & 0x1; |
| 521 | pDst->spectrumMgt = tmp0__ >> 8 & 0x1; |
| 522 | pDst->qos = tmp0__ >> 9 & 0x1; |
| 523 | pDst->shortSlotTime = tmp0__ >> 10 & 0x1; |
| 524 | pDst->apsd = tmp0__ >> 11 & 0x1; |
| 525 | pDst->rrm = tmp0__ >> 12 & 0x1; |
| 526 | pDst->dsssOfdm = tmp0__ >> 13 & 0x1; |
| 527 | pDst->delayedBA = tmp0__ >> 14 & 0x1; |
| 528 | pDst->immediateBA = tmp0__ >> 15 & 0x1; |
| 529 | (void)pCtx; |
| 530 | } /* End dot11f_unpack_ff_capabilities. */ |
| 531 | |
| 532 | #define SigFfCapabilities (0x0006) |
| 533 | |
| 534 | void dot11f_unpack_ff_category(tpAniSirGlobal pCtx, |
| 535 | uint8_t *pBuf, |
| 536 | tDot11fFfCategory *pDst) |
| 537 | { |
| 538 | pDst->category = *pBuf; |
| 539 | (void)pCtx; |
| 540 | } /* End dot11f_unpack_ff_category. */ |
| 541 | |
| 542 | #define SigFfCategory (0x0007) |
| 543 | |
| 544 | void dot11f_unpack_ff_current_ap_address(tpAniSirGlobal pCtx, |
| 545 | uint8_t *pBuf, |
| 546 | tDot11fFfCurrentAPAddress *pDst) |
| 547 | { |
| 548 | DOT11F_MEMCPY(pCtx, pDst->mac, pBuf, 6); |
| 549 | (void)pCtx; |
| 550 | } /* End dot11f_unpack_ff_current_ap_address. */ |
| 551 | |
| 552 | #define SigFfCurrentAPAddress (0x0008) |
| 553 | |
| 554 | void dot11f_unpack_ff_dialog_token(tpAniSirGlobal pCtx, |
| 555 | uint8_t *pBuf, |
| 556 | tDot11fFfDialogToken *pDst) |
| 557 | { |
| 558 | pDst->token = *pBuf; |
| 559 | (void)pCtx; |
| 560 | } /* End dot11f_unpack_ff_dialog_token. */ |
| 561 | |
| 562 | #define SigFfDialogToken (0x0009) |
| 563 | |
| 564 | void dot11f_unpack_ff_link_margin(tpAniSirGlobal pCtx, |
| 565 | uint8_t *pBuf, |
| 566 | tDot11fFfLinkMargin *pDst) |
| 567 | { |
| 568 | pDst->linkMargin = *pBuf; |
| 569 | (void)pCtx; |
| 570 | } /* End dot11f_unpack_ff_link_margin. */ |
| 571 | |
| 572 | #define SigFfLinkMargin (0x000a) |
| 573 | |
| 574 | #define SigFfListenInterval (0x000b) |
| 575 | |
| 576 | void dot11f_unpack_ff_max_tx_power(tpAniSirGlobal pCtx, |
| 577 | uint8_t *pBuf, |
| 578 | tDot11fFfMaxTxPower *pDst) |
| 579 | { |
| 580 | pDst->maxTxPower = *pBuf; |
| 581 | (void)pCtx; |
| 582 | } /* End dot11f_unpack_ff_max_tx_power. */ |
| 583 | |
| 584 | #define SigFfMaxTxPower (0x000c) |
| 585 | |
| 586 | void dot11f_unpack_ff_num_of_repetitions(tpAniSirGlobal pCtx, |
| 587 | uint8_t *pBuf, |
| 588 | tDot11fFfNumOfRepetitions *pDst) |
| 589 | { |
| 590 | framesntohs(pCtx, &pDst->repetitions, pBuf, 0); |
| 591 | (void)pCtx; |
| 592 | } /* End dot11f_unpack_ff_num_of_repetitions. */ |
| 593 | |
| 594 | #define SigFfNumOfRepetitions (0x000d) |
| 595 | |
| 596 | void dot11f_unpack_ff_operating_mode(tpAniSirGlobal pCtx, |
| 597 | uint8_t *pBuf, |
| 598 | tDot11fFfOperatingMode *pDst) |
| 599 | { |
| 600 | uint8_t tmp1__; |
| 601 | tmp1__ = *pBuf; |
| 602 | pDst->chanWidth = tmp1__ >> 0 & 0x3; |
| 603 | pDst->reserved = tmp1__ >> 2 & 0x3; |
| 604 | pDst->rxNSS = tmp1__ >> 4 & 0x7; |
| 605 | pDst->rxNSSType = tmp1__ >> 7 & 0x1; |
| 606 | (void)pCtx; |
| 607 | } /* End dot11f_unpack_ff_operating_mode. */ |
| 608 | |
| 609 | #define SigFfOperatingMode (0x000e) |
| 610 | |
| 611 | void dot11f_unpack_ff_rcpi(tpAniSirGlobal pCtx, |
| 612 | uint8_t *pBuf, |
| 613 | tDot11fFfRCPI *pDst) |
| 614 | { |
| 615 | pDst->rcpi = *pBuf; |
| 616 | (void)pCtx; |
| 617 | } /* End dot11f_unpack_ff_rcpi. */ |
| 618 | |
| 619 | #define SigFfRCPI (0x000f) |
| 620 | |
| 621 | void dot11f_unpack_ff_rsni(tpAniSirGlobal pCtx, |
| 622 | uint8_t *pBuf, |
| 623 | tDot11fFfRSNI *pDst) |
| 624 | { |
| 625 | pDst->rsni = *pBuf; |
| 626 | (void)pCtx; |
| 627 | } /* End dot11f_unpack_ff_rsni. */ |
| 628 | |
| 629 | #define SigFfRSNI (0x0010) |
| 630 | |
| 631 | #define SigFfReason (0x0011) |
| 632 | |
| 633 | void dot11f_unpack_ff_rx_antenna_id(tpAniSirGlobal pCtx, |
| 634 | uint8_t *pBuf, |
| 635 | tDot11fFfRxAntennaId *pDst) |
| 636 | { |
| 637 | pDst->antennaId = *pBuf; |
| 638 | (void)pCtx; |
| 639 | } /* End dot11f_unpack_ff_rx_antenna_id. */ |
| 640 | |
| 641 | #define SigFfRxAntennaId (0x0012) |
| 642 | |
| 643 | void dot11f_unpack_ff_sm_power_mode_set(tpAniSirGlobal pCtx, |
| 644 | uint8_t *pBuf, |
| 645 | tDot11fFfSMPowerModeSet *pDst) |
| 646 | { |
| 647 | uint8_t tmp2__; |
| 648 | tmp2__ = *pBuf; |
| 649 | pDst->PowerSave_En = tmp2__ >> 0 & 0x1; |
| 650 | pDst->Mode = tmp2__ >> 1 & 0x1; |
| 651 | pDst->reserved = tmp2__ >> 2 & 0x3f; |
| 652 | (void)pCtx; |
| 653 | } /* End dot11f_unpack_ff_sm_power_mode_set. */ |
| 654 | |
| 655 | #define SigFfSMPowerModeSet (0x0013) |
| 656 | |
| 657 | #define SigFfStatus (0x0014) |
| 658 | |
| 659 | void dot11f_unpack_ff_status_code(tpAniSirGlobal pCtx, |
| 660 | uint8_t *pBuf, |
| 661 | tDot11fFfStatusCode *pDst) |
| 662 | { |
| 663 | pDst->statusCode = *pBuf; |
| 664 | (void)pCtx; |
| 665 | } /* End dot11f_unpack_ff_status_code. */ |
| 666 | |
| 667 | #define SigFfStatusCode (0x0015) |
| 668 | |
| 669 | void dot11f_unpack_ff_tpc_ele_id(tpAniSirGlobal pCtx, |
| 670 | uint8_t *pBuf, |
| 671 | tDot11fFfTPCEleID *pDst) |
| 672 | { |
| 673 | pDst->TPCId = *pBuf; |
| 674 | (void)pCtx; |
| 675 | } /* End dot11f_unpack_ff_tpc_ele_id. */ |
| 676 | |
| 677 | #define SigFfTPCEleID (0x0016) |
| 678 | |
| 679 | void dot11f_unpack_ff_tpc_ele_len(tpAniSirGlobal pCtx, |
| 680 | uint8_t *pBuf, |
| 681 | tDot11fFfTPCEleLen *pDst) |
| 682 | { |
| 683 | pDst->TPCLen = *pBuf; |
| 684 | (void)pCtx; |
| 685 | } /* End dot11f_unpack_ff_tpc_ele_len. */ |
| 686 | |
| 687 | #define SigFfTPCEleLen (0x0017) |
| 688 | |
| 689 | void dot11f_unpack_ff_ts_info(tpAniSirGlobal pCtx, |
| 690 | uint8_t *pBuf, |
| 691 | tDot11fFfTSInfo *pDst) |
| 692 | { |
| 693 | uint32_t tmp3__; |
| 694 | framesntohl(pCtx, &tmp3__, pBuf, 0); |
| 695 | pDst->traffic_type = tmp3__ >> 0 & 0x1; |
| 696 | pDst->tsid = tmp3__ >> 1 & 0xf; |
| 697 | pDst->direction = tmp3__ >> 5 & 0x3; |
| 698 | pDst->access_policy = tmp3__ >> 7 & 0x3; |
| 699 | pDst->aggregation = tmp3__ >> 9 & 0x1; |
| 700 | pDst->psb = tmp3__ >> 10 & 0x1; |
| 701 | pDst->user_priority = tmp3__ >> 11 & 0x7; |
| 702 | pDst->tsinfo_ack_pol = tmp3__ >> 14 & 0x3; |
| 703 | pDst->schedule = tmp3__ >> 16 & 0x1; |
| 704 | pDst->unused = tmp3__ >> 17 & 0x7fff; |
| 705 | (void)pCtx; |
| 706 | } /* End dot11f_unpack_ff_ts_info. */ |
| 707 | |
| 708 | #define SigFfTSInfo (0x0018) |
| 709 | |
| 710 | void dot11f_unpack_ff_time_stamp(tpAniSirGlobal pCtx, |
| 711 | uint8_t *pBuf, |
| 712 | tDot11fFfTimeStamp *pDst) |
| 713 | { |
| 714 | framesntohq(pCtx, &pDst->timestamp, pBuf, 0); |
| 715 | (void)pCtx; |
| 716 | } /* End dot11f_unpack_ff_time_stamp. */ |
| 717 | |
| 718 | #define SigFfTimeStamp (0x0019) |
| 719 | |
| 720 | void dot11f_unpack_ff_transaction_id(tpAniSirGlobal pCtx, |
| 721 | uint8_t *pBuf, |
| 722 | tDot11fFfTransactionId *pDst) |
| 723 | { |
| 724 | DOT11F_MEMCPY(pCtx, pDst->transId, pBuf, 2); |
| 725 | (void)pCtx; |
| 726 | } /* End dot11f_unpack_ff_transaction_id. */ |
| 727 | |
| 728 | #define SigFfTransactionId (0x001a) |
| 729 | |
| 730 | void dot11f_unpack_ff_tx_antenna_id(tpAniSirGlobal pCtx, |
| 731 | uint8_t *pBuf, |
| 732 | tDot11fFfTxAntennaId *pDst) |
| 733 | { |
| 734 | pDst->antennaId = *pBuf; |
| 735 | (void)pCtx; |
| 736 | } /* End dot11f_unpack_ff_tx_antenna_id. */ |
| 737 | |
| 738 | #define SigFfTxAntennaId (0x001b) |
| 739 | |
| 740 | void dot11f_unpack_ff_tx_power(tpAniSirGlobal pCtx, |
| 741 | uint8_t *pBuf, |
| 742 | tDot11fFfTxPower *pDst) |
| 743 | { |
| 744 | pDst->txPower = *pBuf; |
| 745 | (void)pCtx; |
| 746 | } /* End dot11f_unpack_ff_tx_power. */ |
| 747 | |
| 748 | #define SigFfTxPower (0x001c) |
| 749 | |
| 750 | void dot11f_unpack_ff_vht_membership_status_array(tpAniSirGlobal pCtx, |
| 751 | uint8_t *pBuf, |
| 752 | tDot11fFfVhtMembershipStatusArray *pDst) |
| 753 | { |
| 754 | DOT11F_MEMCPY(pCtx, pDst->membershipStatusArray, pBuf, 8); |
| 755 | (void)pCtx; |
| 756 | } /* End dot11f_unpack_ff_vht_membership_status_array. */ |
| 757 | |
| 758 | #define SigFfVhtMembershipStatusArray (0x001d) |
| 759 | |
| 760 | void dot11f_unpack_ff_vht_user_position_array(tpAniSirGlobal pCtx, |
| 761 | uint8_t *pBuf, |
| 762 | tDot11fFfVhtUserPositionArray *pDst) |
| 763 | { |
| 764 | DOT11F_MEMCPY(pCtx, pDst->userPositionArray, pBuf, 16); |
| 765 | (void)pCtx; |
| 766 | } /* End dot11f_unpack_ff_vht_user_position_array. */ |
| 767 | |
| 768 | #define SigFfVhtUserPositionArray (0x001e) |
| 769 | |
| 770 | uint32_t dot11f_unpack_tlv_authorized_ma_cs(tpAniSirGlobal pCtx, |
| 771 | uint8_t *pBuf, |
| 772 | uint16_t tlvlen, |
| 773 | tDot11fTLVAuthorizedMACs *pDst) |
| 774 | { |
| 775 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 776 | pDst->present = 1; |
| 777 | DOT11F_MEMCPY(pCtx, pDst->mac, pBuf, 6); |
| 778 | pBuf += 6; |
| 779 | tlvlen -= (uint8_t)6; |
| 780 | (void)pCtx; |
| 781 | return status; |
| 782 | } /* End dot11f_unpack_tlv_authorized_ma_cs. */ |
| 783 | |
| 784 | #define SigTlvAuthorizedMACs (0x0001) |
| 785 | |
| 786 | |
| 787 | #define SigTlvRequestToEnroll (0x0002) |
| 788 | |
| 789 | |
| 790 | uint32_t dot11f_unpack_tlv_version2(tpAniSirGlobal pCtx, |
| 791 | uint8_t *pBuf, |
| 792 | uint16_t tlvlen, |
| 793 | tDot11fTLVVersion2 *pDst) |
| 794 | { |
| 795 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 796 | uint8_t tmp4__; |
| 797 | pDst->present = 1; |
| 798 | tmp4__ = *pBuf; |
| 799 | pBuf += 1; |
| 800 | tlvlen -= 1; |
| 801 | pDst->minor = tmp4__ >> 0 & 0xf; |
| 802 | pDst->major = tmp4__ >> 4 & 0xf; |
| 803 | (void)pCtx; |
| 804 | return status; |
| 805 | } /* End dot11f_unpack_tlv_version2. */ |
| 806 | |
| 807 | #define SigTlvVersion2 (0x0003) |
| 808 | |
| 809 | |
| 810 | #define SigTlvAPSetupLocked (0x0004) |
| 811 | |
| 812 | |
| 813 | #define SigTlvAssociationState (0x0005) |
| 814 | |
| 815 | |
| 816 | #define SigTlvConfigMethods (0x0006) |
| 817 | |
| 818 | |
| 819 | #define SigTlvConfigurationError (0x0007) |
| 820 | |
| 821 | |
| 822 | uint32_t dot11f_unpack_tlv_device_name(tpAniSirGlobal pCtx, |
| 823 | uint8_t *pBuf, |
| 824 | uint16_t tlvlen, |
| 825 | tDot11fTLVDeviceName *pDst) |
| 826 | { |
| 827 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 828 | pDst->present = 1; |
| 829 | pDst->num_text = (uint8_t)(tlvlen); |
| 830 | if (tlvlen > 32) { |
| 831 | pDst->present = 0; |
| 832 | return DOT11F_SKIPPED_BAD_IE; |
| 833 | } |
| 834 | |
| 835 | DOT11F_MEMCPY(pCtx, pDst->text, pBuf, (tlvlen)); |
| 836 | pBuf += (tlvlen); |
| 837 | tlvlen -= (tlvlen); |
| 838 | (void)pCtx; |
| 839 | return status; |
| 840 | } /* End dot11f_unpack_tlv_device_name. */ |
| 841 | |
| 842 | #define SigTlvDeviceName (0x0008) |
| 843 | |
| 844 | |
| 845 | #define SigTlvDevicePasswordID (0x0009) |
| 846 | |
| 847 | |
| 848 | uint32_t dot11f_unpack_tlv_extended_listen_timing(tpAniSirGlobal pCtx, |
| 849 | uint8_t *pBuf, |
| 850 | uint16_t tlvlen, |
| 851 | tDot11fTLVExtendedListenTiming *pDst) |
| 852 | { |
| 853 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 854 | pDst->present = 1; |
| 855 | framesntohs(pCtx, &pDst->availibilityPeriod, pBuf, 0); |
| 856 | pBuf += 2; |
| 857 | tlvlen -= (uint8_t)2; |
| 858 | framesntohs(pCtx, &pDst->availibilityInterval, pBuf, 0); |
| 859 | pBuf += 2; |
| 860 | tlvlen -= (uint8_t)2; |
| 861 | (void)pCtx; |
| 862 | return status; |
| 863 | } /* End dot11f_unpack_tlv_extended_listen_timing. */ |
| 864 | |
| 865 | #define SigTlvExtendedListenTiming (0x000a) |
| 866 | |
| 867 | |
| 868 | uint32_t dot11f_unpack_tlv_listen_channel(tpAniSirGlobal pCtx, |
| 869 | uint8_t *pBuf, |
| 870 | uint16_t tlvlen, |
| 871 | tDot11fTLVListenChannel *pDst) |
| 872 | { |
| 873 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 874 | pDst->present = 1; |
| 875 | DOT11F_MEMCPY(pCtx, pDst->countryString, pBuf, 3); |
| 876 | pBuf += 3; |
| 877 | tlvlen -= (uint8_t)3; |
| 878 | pDst->regulatoryClass = *pBuf; |
| 879 | pBuf += 1; |
| 880 | tlvlen -= (uint8_t)1; |
| 881 | pDst->channel = *pBuf; |
| 882 | pBuf += 1; |
| 883 | tlvlen -= (uint8_t)1; |
| 884 | (void)pCtx; |
| 885 | return status; |
| 886 | } /* End dot11f_unpack_tlv_listen_channel. */ |
| 887 | |
| 888 | #define SigTlvListenChannel (0x000b) |
| 889 | |
| 890 | |
| 891 | uint32_t dot11f_unpack_tlv_manufacturer(tpAniSirGlobal pCtx, |
| 892 | uint8_t *pBuf, |
| 893 | uint16_t tlvlen, |
| 894 | tDot11fTLVManufacturer *pDst) |
| 895 | { |
| 896 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 897 | pDst->present = 1; |
| 898 | pDst->num_name = (uint8_t)(tlvlen); |
| 899 | if (tlvlen > 64) { |
| 900 | pDst->present = 0; |
| 901 | return DOT11F_SKIPPED_BAD_IE; |
| 902 | } |
| 903 | |
| 904 | DOT11F_MEMCPY(pCtx, pDst->name, pBuf, (tlvlen)); |
| 905 | pBuf += (tlvlen); |
| 906 | tlvlen -= (tlvlen); |
| 907 | (void)pCtx; |
| 908 | return status; |
| 909 | } /* End dot11f_unpack_tlv_manufacturer. */ |
| 910 | |
| 911 | #define SigTlvManufacturer (0x000c) |
| 912 | |
| 913 | |
| 914 | #define SigTlvMinorReasonCode (0x000d) |
| 915 | |
| 916 | |
| 917 | uint32_t dot11f_unpack_tlv_model_name(tpAniSirGlobal pCtx, |
| 918 | uint8_t *pBuf, |
| 919 | uint16_t tlvlen, |
| 920 | tDot11fTLVModelName *pDst) |
| 921 | { |
| 922 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 923 | pDst->present = 1; |
| 924 | pDst->num_text = (uint8_t)(tlvlen); |
| 925 | if (tlvlen > 32) { |
| 926 | pDst->present = 0; |
| 927 | return DOT11F_SKIPPED_BAD_IE; |
| 928 | } |
| 929 | |
| 930 | DOT11F_MEMCPY(pCtx, pDst->text, pBuf, (tlvlen)); |
| 931 | pBuf += (tlvlen); |
| 932 | tlvlen -= (tlvlen); |
| 933 | (void)pCtx; |
| 934 | return status; |
| 935 | } /* End dot11f_unpack_tlv_model_name. */ |
| 936 | |
| 937 | #define SigTlvModelName (0x000e) |
| 938 | |
| 939 | |
| 940 | uint32_t dot11f_unpack_tlv_model_number(tpAniSirGlobal pCtx, |
| 941 | uint8_t *pBuf, |
| 942 | uint16_t tlvlen, |
| 943 | tDot11fTLVModelNumber *pDst) |
| 944 | { |
| 945 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 946 | pDst->present = 1; |
| 947 | pDst->num_text = (uint8_t)(tlvlen); |
| 948 | if (tlvlen > 32) { |
| 949 | pDst->present = 0; |
| 950 | return DOT11F_SKIPPED_BAD_IE; |
| 951 | } |
| 952 | |
| 953 | DOT11F_MEMCPY(pCtx, pDst->text, pBuf, (tlvlen)); |
| 954 | pBuf += (tlvlen); |
| 955 | tlvlen -= (tlvlen); |
| 956 | (void)pCtx; |
| 957 | return status; |
| 958 | } /* End dot11f_unpack_tlv_model_number. */ |
| 959 | |
| 960 | #define SigTlvModelNumber (0x000f) |
| 961 | |
| 962 | |
| 963 | uint32_t dot11f_unpack_tlv_notice_of_absence(tpAniSirGlobal pCtx, |
| 964 | uint8_t *pBuf, |
| 965 | uint16_t tlvlen, |
| 966 | tDot11fTLVNoticeOfAbsence *pDst) |
| 967 | { |
| 968 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 969 | pDst->present = 1; |
| 970 | pDst->index = *pBuf; |
| 971 | pBuf += 1; |
| 972 | tlvlen -= (uint8_t)1; |
| 973 | pDst->CTSWindowOppPS = *pBuf; |
| 974 | pBuf += 1; |
| 975 | tlvlen -= (uint8_t)1; |
| 976 | pDst->num_NoADesc = (uint8_t)(tlvlen); |
| 977 | if (tlvlen > 36) { |
| 978 | pDst->present = 0; |
| 979 | return DOT11F_SKIPPED_BAD_IE; |
| 980 | } |
| 981 | |
| 982 | DOT11F_MEMCPY(pCtx, pDst->NoADesc, pBuf, (tlvlen)); |
| 983 | pBuf += (tlvlen); |
| 984 | tlvlen -= (tlvlen); |
| 985 | (void)pCtx; |
| 986 | return status; |
| 987 | } /* End dot11f_unpack_tlv_notice_of_absence. */ |
| 988 | |
| 989 | #define SigTlvNoticeOfAbsence (0x0010) |
| 990 | |
| 991 | |
| 992 | uint32_t dot11f_unpack_tlv_operating_channel(tpAniSirGlobal pCtx, |
| 993 | uint8_t *pBuf, |
| 994 | uint16_t tlvlen, |
| 995 | tDot11fTLVOperatingChannel *pDst) |
| 996 | { |
| 997 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 998 | pDst->present = 1; |
| 999 | DOT11F_MEMCPY(pCtx, pDst->countryString, pBuf, 3); |
| 1000 | pBuf += 3; |
| 1001 | tlvlen -= (uint8_t)3; |
| 1002 | pDst->regulatoryClass = *pBuf; |
| 1003 | pBuf += 1; |
| 1004 | tlvlen -= (uint8_t)1; |
| 1005 | pDst->channel = *pBuf; |
| 1006 | pBuf += 1; |
| 1007 | tlvlen -= (uint8_t)1; |
| 1008 | (void)pCtx; |
| 1009 | return status; |
| 1010 | } /* End dot11f_unpack_tlv_operating_channel. */ |
| 1011 | |
| 1012 | #define SigTlvOperatingChannel (0x0011) |
| 1013 | |
| 1014 | |
| 1015 | uint32_t dot11f_unpack_tlv_p2_p_capability(tpAniSirGlobal pCtx, |
| 1016 | uint8_t *pBuf, |
| 1017 | uint16_t tlvlen, |
| 1018 | tDot11fTLVP2PCapability *pDst) |
| 1019 | { |
| 1020 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1021 | pDst->present = 1; |
| 1022 | pDst->deviceCapability = *pBuf; |
| 1023 | pBuf += 1; |
| 1024 | tlvlen -= (uint8_t)1; |
| 1025 | pDst->groupCapability = *pBuf; |
| 1026 | pBuf += 1; |
| 1027 | tlvlen -= (uint8_t)1; |
| 1028 | (void)pCtx; |
| 1029 | return status; |
| 1030 | } /* End dot11f_unpack_tlv_p2_p_capability. */ |
| 1031 | |
| 1032 | #define SigTlvP2PCapability (0x0012) |
| 1033 | |
| 1034 | |
| 1035 | uint32_t dot11f_unpack_tlv_p2_p_device_id(tpAniSirGlobal pCtx, |
| 1036 | uint8_t *pBuf, |
| 1037 | uint16_t tlvlen, |
| 1038 | tDot11fTLVP2PDeviceId *pDst) |
| 1039 | { |
| 1040 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1041 | pDst->present = 1; |
| 1042 | DOT11F_MEMCPY(pCtx, pDst->P2PDeviceAddress, pBuf, 6); |
| 1043 | pBuf += 6; |
| 1044 | tlvlen -= (uint8_t)6; |
| 1045 | (void)pCtx; |
| 1046 | return status; |
| 1047 | } /* End dot11f_unpack_tlv_p2_p_device_id. */ |
| 1048 | |
| 1049 | #define SigTlvP2PDeviceId (0x0013) |
| 1050 | |
| 1051 | |
| 1052 | static const tTLVDefn TLVS_P2PDeviceInfo[] = { |
| 1053 | { offsetof(tDot11fTLVP2PDeviceInfo, DeviceName), |
| 1054 | offsetof(tDot11fTLVDeviceName, present), "DeviceName", SigTlvDeviceName, |
| 1055 | DOT11F_TLV_DEVICENAME, 0, 4, 36, 1, 2, 2, 1, }, |
| 1056 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 1057 | }; |
| 1058 | |
| 1059 | uint32_t dot11f_unpack_tlv_p2_p_device_info(tpAniSirGlobal pCtx, |
| 1060 | uint8_t *pBuf, |
| 1061 | uint16_t tlvlen, |
| 1062 | tDot11fTLVP2PDeviceInfo *pDst) |
| 1063 | { |
| 1064 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1065 | pDst->present = 1; |
| 1066 | DOT11F_MEMCPY(pCtx, pDst->P2PDeviceAddress, pBuf, 6); |
| 1067 | pBuf += 6; |
| 1068 | tlvlen -= (uint8_t)6; |
| 1069 | framesntohs(pCtx, &pDst->configMethod, pBuf, 0); |
| 1070 | pBuf += 2; |
| 1071 | tlvlen -= (uint8_t)2; |
| 1072 | DOT11F_MEMCPY(pCtx, pDst->primaryDeviceType, pBuf, 8); |
| 1073 | pBuf += 8; |
| 1074 | tlvlen -= (uint8_t)8; |
| 1075 | (void)pCtx; |
| 1076 | status |= unpack_tlv_core(pCtx, |
| 1077 | pBuf, |
| 1078 | tlvlen, |
| 1079 | TLVS_P2PDeviceInfo, |
| 1080 | (uint8_t *)pDst, |
| 1081 | sizeof(*pDst)); |
| 1082 | return status; |
| 1083 | } /* End dot11f_unpack_tlv_p2_p_device_info. */ |
| 1084 | |
| 1085 | #define SigTlvP2PDeviceInfo (0x0014) |
| 1086 | |
| 1087 | |
| 1088 | uint32_t dot11f_unpack_tlv_p2_p_group_info(tpAniSirGlobal pCtx, |
| 1089 | uint8_t *pBuf, |
| 1090 | uint16_t tlvlen, |
| 1091 | tDot11fTLVP2PGroupInfo *pDst) |
| 1092 | { |
| 1093 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1094 | pDst->present = 1; |
| 1095 | pDst->num_P2PClientInfoDesc = (uint8_t)(tlvlen); |
| 1096 | DOT11F_MEMCPY(pCtx, pDst->P2PClientInfoDesc, pBuf, (tlvlen)); |
| 1097 | pBuf += (tlvlen); |
| 1098 | tlvlen -= (tlvlen); |
| 1099 | (void)pCtx; |
| 1100 | return status; |
| 1101 | } /* End dot11f_unpack_tlv_p2_p_group_info. */ |
| 1102 | |
| 1103 | #define SigTlvP2PGroupInfo (0x0015) |
| 1104 | |
| 1105 | |
| 1106 | #define SigTlvP2PStatus (0x0016) |
| 1107 | |
| 1108 | |
| 1109 | uint32_t dot11f_unpack_tlv_primary_device_type(tpAniSirGlobal pCtx, |
| 1110 | uint8_t *pBuf, |
| 1111 | uint16_t tlvlen, |
| 1112 | tDot11fTLVPrimaryDeviceType *pDst) |
| 1113 | { |
| 1114 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1115 | (void)pBuf; (void)tlvlen; /* Shutup the compiler */ |
| 1116 | pDst->present = 1; |
| 1117 | framesntohs(pCtx, &pDst->primary_category, pBuf, 1); |
| 1118 | pBuf += 2; |
| 1119 | tlvlen -= (uint8_t)2; |
| 1120 | DOT11F_MEMCPY(pCtx, pDst->oui, pBuf, 4); |
| 1121 | pBuf += 4; |
| 1122 | tlvlen -= (uint8_t)4; |
| 1123 | framesntohs(pCtx, &pDst->sub_category, pBuf, 1); |
| 1124 | pBuf += 2; |
| 1125 | tlvlen -= (uint8_t)2; |
| 1126 | (void)pCtx; |
| 1127 | return status; |
| 1128 | } /* End dot11f_unpack_tlv_primary_device_type. */ |
| 1129 | |
| 1130 | #define SigTlvPrimaryDeviceType (0x0017) |
| 1131 | |
| 1132 | |
| 1133 | #define SigTlvRFBands (0x0018) |
| 1134 | |
| 1135 | |
| 1136 | uint32_t dot11f_unpack_tlv_request_device_type(tpAniSirGlobal pCtx, |
| 1137 | uint8_t *pBuf, |
| 1138 | uint16_t tlvlen, |
| 1139 | tDot11fTLVRequestDeviceType *pDst) |
| 1140 | { |
| 1141 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1142 | pDst->present = 1; |
| 1143 | framesntohs(pCtx, &pDst->primary_category, pBuf, 1); |
| 1144 | pBuf += 2; |
| 1145 | tlvlen -= (uint8_t)2; |
| 1146 | DOT11F_MEMCPY(pCtx, pDst->oui, pBuf, 4); |
| 1147 | pBuf += 4; |
| 1148 | tlvlen -= (uint8_t)4; |
| 1149 | framesntohs(pCtx, &pDst->sub_category, pBuf, 1); |
| 1150 | pBuf += 2; |
| 1151 | tlvlen -= (uint8_t)2; |
| 1152 | (void)pCtx; |
| 1153 | return status; |
| 1154 | } /* End dot11f_unpack_tlv_request_device_type. */ |
| 1155 | |
| 1156 | #define SigTlvRequestDeviceType (0x0019) |
| 1157 | |
| 1158 | |
| 1159 | #define SigTlvRequestType (0x001a) |
| 1160 | |
| 1161 | |
| 1162 | #define SigTlvResponseType (0x001b) |
| 1163 | |
| 1164 | |
| 1165 | #define SigTlvSelectedRegistrar (0x001c) |
| 1166 | |
| 1167 | |
| 1168 | #define SigTlvSelectedRegistrarConfigMethods (0x001d) |
| 1169 | |
| 1170 | |
| 1171 | uint32_t dot11f_unpack_tlv_serial_number(tpAniSirGlobal pCtx, |
| 1172 | uint8_t *pBuf, |
| 1173 | uint16_t tlvlen, |
| 1174 | tDot11fTLVSerialNumber *pDst) |
| 1175 | { |
| 1176 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1177 | pDst->present = 1; |
| 1178 | pDst->num_text = (uint8_t)(tlvlen); |
| 1179 | if (tlvlen > 32) { |
| 1180 | pDst->present = 0; |
| 1181 | return DOT11F_SKIPPED_BAD_IE; |
| 1182 | } |
| 1183 | |
| 1184 | DOT11F_MEMCPY(pCtx, pDst->text, pBuf, (tlvlen)); |
| 1185 | pBuf += (tlvlen); |
| 1186 | tlvlen -= (tlvlen); |
| 1187 | (void)pCtx; |
| 1188 | return status; |
| 1189 | } /* End dot11f_unpack_tlv_serial_number. */ |
| 1190 | |
| 1191 | #define SigTlvSerialNumber (0x001e) |
| 1192 | |
| 1193 | |
| 1194 | uint32_t dot11f_unpack_tlv_uuid_e(tpAniSirGlobal pCtx, |
| 1195 | uint8_t *pBuf, |
| 1196 | uint16_t tlvlen, |
| 1197 | tDot11fTLVUUID_E *pDst) |
| 1198 | { |
| 1199 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1200 | pDst->present = 1; |
| 1201 | DOT11F_MEMCPY(pCtx, pDst->uuid, pBuf, 16); |
| 1202 | pBuf += 16; |
| 1203 | tlvlen -= (uint8_t)16; |
| 1204 | (void)pCtx; |
| 1205 | return status; |
| 1206 | } /* End dot11f_unpack_tlv_uuid_e. */ |
| 1207 | |
| 1208 | #define SigTlvUUID_E (0x001f) |
| 1209 | |
| 1210 | |
| 1211 | uint32_t dot11f_unpack_tlv_uuid_r(tpAniSirGlobal pCtx, |
| 1212 | uint8_t *pBuf, |
| 1213 | uint16_t tlvlen, |
| 1214 | tDot11fTLVUUID_R *pDst) |
| 1215 | { |
| 1216 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1217 | pDst->present = 1; |
| 1218 | DOT11F_MEMCPY(pCtx, pDst->uuid, pBuf, 16); |
| 1219 | pBuf += 16; |
| 1220 | tlvlen -= (uint8_t)16; |
| 1221 | (void)pCtx; |
| 1222 | return status; |
| 1223 | } /* End dot11f_unpack_tlv_uuid_r. */ |
| 1224 | |
| 1225 | #define SigTlvUUID_R (0x0020) |
| 1226 | |
| 1227 | |
| 1228 | static const tTLVDefn TLVS_VendorExtension[] = { |
| 1229 | { offsetof(tDot11fTLVVendorExtension, Version2), |
| 1230 | offsetof(tDot11fTLVVersion2, present), "Version2", SigTlvVersion2, |
| 1231 | DOT11F_TLV_VERSION2, 0, 3, 3, 0, 1, 1, 1, }, |
| 1232 | { offsetof(tDot11fTLVVendorExtension, AuthorizedMACs), |
| 1233 | offsetof(tDot11fTLVAuthorizedMACs, present), "AuthorizedMACs", |
| 1234 | SigTlvAuthorizedMACs, DOT11F_TLV_AUTHORIZEDMACS, 0, 8, 8, 0, 1, 1, 1, }, |
| 1235 | { offsetof(tDot11fTLVVendorExtension, RequestToEnroll), |
| 1236 | offsetof(tDot11fTLVRequestToEnroll, present), "RequestToEnroll", |
| 1237 | SigTlvRequestToEnroll, DOT11F_TLV_REQUESTTOENROLL, |
| 1238 | 0, 3, 3, 0, 1, 1, 1, }, |
| 1239 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 1240 | }; |
| 1241 | |
| 1242 | uint32_t dot11f_unpack_tlv_vendor_extension(tpAniSirGlobal pCtx, |
| 1243 | uint8_t *pBuf, |
| 1244 | uint16_t tlvlen, |
| 1245 | tDot11fTLVVendorExtension *pDst) |
| 1246 | { |
| 1247 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1248 | pDst->present = 1; |
| 1249 | DOT11F_MEMCPY(pCtx, pDst->vendorId, pBuf, 3); |
| 1250 | pBuf += 3; |
| 1251 | tlvlen -= (uint8_t)3; |
| 1252 | (void)pCtx; |
| 1253 | status |= unpack_tlv_core(pCtx, |
| 1254 | pBuf, |
| 1255 | tlvlen, |
| 1256 | TLVS_VendorExtension, |
| 1257 | (uint8_t *)pDst, |
| 1258 | sizeof(*pDst)); |
| 1259 | return status; |
| 1260 | } /* End dot11f_unpack_tlv_vendor_extension. */ |
| 1261 | |
| 1262 | #define SigTlvVendorExtension (0x0021) |
| 1263 | |
| 1264 | |
| 1265 | uint32_t dot11f_unpack_tlv_version(tpAniSirGlobal pCtx, |
| 1266 | uint8_t *pBuf, |
| 1267 | uint16_t tlvlen, |
| 1268 | tDot11fTLVVersion *pDst) |
| 1269 | { |
| 1270 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1271 | uint8_t tmp5__; |
| 1272 | pDst->present = 1; |
| 1273 | tmp5__ = *pBuf; |
| 1274 | pBuf += 1; |
| 1275 | tlvlen -= 1; |
| 1276 | pDst->minor = tmp5__ >> 0 & 0xf; |
| 1277 | pDst->major = tmp5__ >> 4 & 0xf; |
| 1278 | (void)pCtx; |
| 1279 | return status; |
| 1280 | } /* End dot11f_unpack_tlv_version. */ |
| 1281 | |
| 1282 | #define SigTlvVersion (0x0022) |
| 1283 | |
| 1284 | |
| 1285 | #define SigTlvWPSState (0x0023) |
| 1286 | |
| 1287 | |
| 1288 | uint32_t dot11f_unpack_tlv_p2_p_interface(tpAniSirGlobal pCtx, |
| 1289 | uint8_t *pBuf, |
| 1290 | uint16_t tlvlen, |
| 1291 | tDot11fTLVP2PInterface *pDst) |
| 1292 | { |
| 1293 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1294 | pDst->present = 1; |
| 1295 | DOT11F_MEMCPY(pCtx, pDst->P2PDeviceAddress, pBuf, 6); |
| 1296 | pBuf += 6; |
| 1297 | tlvlen -= (uint8_t)6; |
| 1298 | (void)pCtx; |
| 1299 | return status; |
| 1300 | } /* End dot11f_unpack_tlv_p2_p_interface. */ |
| 1301 | |
| 1302 | #define SigTlvP2PInterface (0x0024) |
| 1303 | |
| 1304 | |
| 1305 | #define SigTlvP2PManageability (0x0025) |
| 1306 | |
| 1307 | |
| 1308 | uint32_t dot11f_unpack_ie_condensed_country_str(tpAniSirGlobal pCtx, |
| 1309 | uint8_t *pBuf, |
| 1310 | uint8_t ielen, |
| 1311 | tDot11fIECondensedCountryStr *pDst) |
| 1312 | { |
| 1313 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1314 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1315 | if (pDst->present) |
| 1316 | status = DOT11F_DUPLICATE_IE; |
| 1317 | pDst->present = 1; |
| 1318 | DOT11F_MEMCPY(pCtx, pDst->countryStr, pBuf, 2); |
| 1319 | (void)pCtx; |
| 1320 | return status; |
| 1321 | } /* End dot11f_unpack_ie_condensed_country_str. */ |
| 1322 | |
| 1323 | #define SigIeCondensedCountryStr (0x0001) |
| 1324 | |
| 1325 | |
| 1326 | uint32_t dot11f_unpack_ie_gtk(tpAniSirGlobal pCtx, |
| 1327 | uint8_t *pBuf, |
| 1328 | uint8_t ielen, |
| 1329 | tDot11fIEGTK *pDst) |
| 1330 | { |
| 1331 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1332 | uint16_t tmp6__; |
| 1333 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1334 | if (pDst->present) |
| 1335 | status = DOT11F_DUPLICATE_IE; |
| 1336 | pDst->present = 1; |
| 1337 | framesntohs(pCtx, &tmp6__, pBuf, 0); |
| 1338 | pBuf += 2; |
| 1339 | ielen -= 2; |
| 1340 | pDst->keyId = tmp6__ >> 0 & 0x3; |
| 1341 | pDst->reserved = tmp6__ >> 2 & 0x3feb; |
| 1342 | pDst->keyLength = *pBuf; |
| 1343 | pBuf += 1; |
| 1344 | ielen -= (uint8_t)1; |
| 1345 | DOT11F_MEMCPY(pCtx, pDst->RSC, pBuf, 8); |
| 1346 | pBuf += 8; |
| 1347 | ielen -= (uint8_t)8; |
| 1348 | pDst->num_key = (uint8_t)(ielen); |
| 1349 | if (ielen > 32) { |
| 1350 | pDst->present = 0; |
| 1351 | return DOT11F_SKIPPED_BAD_IE; |
| 1352 | } |
| 1353 | |
| 1354 | DOT11F_MEMCPY(pCtx, pDst->key, pBuf, (ielen)); |
| 1355 | (void)pCtx; |
| 1356 | return status; |
| 1357 | } /* End dot11f_unpack_ie_gtk. */ |
| 1358 | |
| 1359 | #define SigIeGTK (0x0002) |
| 1360 | |
| 1361 | |
| 1362 | uint32_t dot11f_unpack_ie_igtk(tpAniSirGlobal pCtx, |
| 1363 | uint8_t *pBuf, |
| 1364 | uint8_t ielen, |
| 1365 | tDot11fIEIGTK *pDst) |
| 1366 | { |
| 1367 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1368 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1369 | if (pDst->present) |
| 1370 | status = DOT11F_DUPLICATE_IE; |
| 1371 | pDst->present = 1; |
| 1372 | DOT11F_MEMCPY(pCtx, pDst->keyID, pBuf, 2); |
| 1373 | pBuf += 2; |
| 1374 | ielen -= (uint8_t)2; |
| 1375 | DOT11F_MEMCPY(pCtx, pDst->IPN, pBuf, 6); |
| 1376 | pBuf += 6; |
| 1377 | ielen -= (uint8_t)6; |
| 1378 | pDst->keyLength = *pBuf; |
| 1379 | pBuf += 1; |
| 1380 | ielen -= (uint8_t)1; |
| 1381 | DOT11F_MEMCPY(pCtx, pDst->key, pBuf, 24); |
| 1382 | (void)pCtx; |
| 1383 | return status; |
| 1384 | } /* End dot11f_unpack_ie_igtk. */ |
| 1385 | |
| 1386 | #define SigIeIGTK (0x0003) |
| 1387 | |
| 1388 | |
| 1389 | uint32_t dot11f_unpack_ie_r0_kh_id(tpAniSirGlobal pCtx, |
| 1390 | uint8_t *pBuf, |
| 1391 | uint8_t ielen, |
| 1392 | tDot11fIER0KH_ID *pDst) |
| 1393 | { |
| 1394 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1395 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1396 | if (pDst->present) |
| 1397 | status = DOT11F_DUPLICATE_IE; |
| 1398 | pDst->present = 1; |
| 1399 | pDst->num_PMK_R0_ID = (uint8_t)(ielen); |
| 1400 | if (ielen > 48) { |
| 1401 | pDst->present = 0; |
| 1402 | return DOT11F_SKIPPED_BAD_IE; |
| 1403 | } |
| 1404 | |
| 1405 | DOT11F_MEMCPY(pCtx, pDst->PMK_R0_ID, pBuf, (ielen)); |
| 1406 | (void)pCtx; |
| 1407 | return status; |
| 1408 | } /* End dot11f_unpack_ie_r0_kh_id. */ |
| 1409 | |
| 1410 | #define SigIeR0KH_ID (0x0004) |
| 1411 | |
| 1412 | |
| 1413 | uint32_t dot11f_unpack_ie_r1_kh_id(tpAniSirGlobal pCtx, |
| 1414 | uint8_t *pBuf, |
| 1415 | uint8_t ielen, |
| 1416 | tDot11fIER1KH_ID *pDst) |
| 1417 | { |
| 1418 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1419 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1420 | if (pDst->present) |
| 1421 | status = DOT11F_DUPLICATE_IE; |
| 1422 | pDst->present = 1; |
| 1423 | DOT11F_MEMCPY(pCtx, pDst->PMK_R1_ID, pBuf, 6); |
| 1424 | (void)pCtx; |
| 1425 | return status; |
| 1426 | } /* End dot11f_unpack_ie_r1_kh_id. */ |
| 1427 | |
| 1428 | #define SigIeR1KH_ID (0x0005) |
| 1429 | |
| 1430 | |
| 1431 | uint32_t dot11f_unpack_ie_tsf_info(tpAniSirGlobal pCtx, |
| 1432 | uint8_t *pBuf, |
| 1433 | uint8_t ielen, |
| 1434 | tDot11fIETSFInfo *pDst) |
| 1435 | { |
| 1436 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1437 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1438 | if (pDst->present) |
| 1439 | status = DOT11F_DUPLICATE_IE; |
| 1440 | pDst->present = 1; |
| 1441 | framesntohs(pCtx, &pDst->TsfOffset, pBuf, 0); |
| 1442 | pBuf += 2; |
| 1443 | ielen -= (uint8_t)2; |
| 1444 | framesntohs(pCtx, &pDst->BeaconIntvl, pBuf, 0); |
| 1445 | (void)pCtx; |
| 1446 | return status; |
| 1447 | } /* End dot11f_unpack_ie_tsf_info. */ |
| 1448 | |
| 1449 | #define SigIeTSFInfo (0x0006) |
| 1450 | |
| 1451 | |
| 1452 | uint32_t dot11f_unpack_ie_ap_channel_report(tpAniSirGlobal pCtx, |
| 1453 | uint8_t *pBuf, |
| 1454 | uint8_t ielen, |
| 1455 | tDot11fIEAPChannelReport *pDst) |
| 1456 | { |
| 1457 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1458 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1459 | if (pDst->present) |
| 1460 | status = DOT11F_DUPLICATE_IE; |
| 1461 | pDst->present = 1; |
| 1462 | pDst->regulatoryClass = *pBuf; |
| 1463 | pBuf += 1; |
| 1464 | ielen -= (uint8_t)1; |
| 1465 | pDst->num_channelList = (uint8_t)(ielen); |
| 1466 | if (ielen > 50) { |
| 1467 | pDst->present = 0; |
| 1468 | return DOT11F_SKIPPED_BAD_IE; |
| 1469 | } |
| 1470 | |
| 1471 | DOT11F_MEMCPY(pCtx, pDst->channelList, pBuf, (ielen)); |
| 1472 | (void)pCtx; |
| 1473 | return status; |
| 1474 | } /* End dot11f_unpack_ie_ap_channel_report. */ |
| 1475 | |
| 1476 | #define SigIeAPChannelReport (0x0007) |
| 1477 | |
| 1478 | |
| 1479 | uint32_t dot11f_unpack_ie_bcn_reporting_detail(tpAniSirGlobal pCtx, |
| 1480 | uint8_t *pBuf, |
| 1481 | uint8_t ielen, |
| 1482 | tDot11fIEBcnReportingDetail *pDst) |
| 1483 | { |
| 1484 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1485 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1486 | if (pDst->present) |
| 1487 | status = DOT11F_DUPLICATE_IE; |
| 1488 | pDst->present = 1; |
| 1489 | pDst->reportingDetail = *pBuf; |
| 1490 | (void)pCtx; |
| 1491 | return status; |
| 1492 | } /* End dot11f_unpack_ie_bcn_reporting_detail. */ |
| 1493 | |
| 1494 | #define SigIeBcnReportingDetail (0x0008) |
| 1495 | |
| 1496 | |
| 1497 | uint32_t dot11f_unpack_ie_beacon_report_frm_body(tpAniSirGlobal pCtx, |
| 1498 | uint8_t *pBuf, |
| 1499 | uint8_t ielen, |
| 1500 | tDot11fIEBeaconReportFrmBody *pDst) |
| 1501 | { |
| 1502 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1503 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1504 | if (pDst->present) |
| 1505 | status = DOT11F_DUPLICATE_IE; |
| 1506 | pDst->present = 1; |
| 1507 | pDst->num_reportedFields = (uint8_t)(ielen); |
| 1508 | if (ielen > 224) { |
| 1509 | pDst->present = 0; |
| 1510 | return DOT11F_SKIPPED_BAD_IE; |
| 1511 | } |
| 1512 | |
| 1513 | DOT11F_MEMCPY(pCtx, pDst->reportedFields, pBuf, (ielen)); |
| 1514 | (void)pCtx; |
| 1515 | return status; |
| 1516 | } /* End dot11f_unpack_ie_beacon_report_frm_body. */ |
| 1517 | |
| 1518 | #define SigIeBeaconReportFrmBody (0x0009) |
| 1519 | |
| 1520 | |
| 1521 | uint32_t dot11f_unpack_ie_beacon_reporting(tpAniSirGlobal pCtx, |
| 1522 | uint8_t *pBuf, |
| 1523 | uint8_t ielen, |
| 1524 | tDot11fIEBeaconReporting *pDst) |
| 1525 | { |
| 1526 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1527 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1528 | if (pDst->present) |
| 1529 | status = DOT11F_DUPLICATE_IE; |
| 1530 | pDst->present = 1; |
| 1531 | pDst->reportingCondition = *pBuf; |
| 1532 | pBuf += 1; |
| 1533 | ielen -= (uint8_t)1; |
| 1534 | pDst->threshold = *pBuf; |
| 1535 | (void)pCtx; |
| 1536 | return status; |
| 1537 | } /* End dot11f_unpack_ie_beacon_reporting. */ |
| 1538 | |
| 1539 | #define SigIeBeaconReporting (0x000a) |
| 1540 | |
| 1541 | |
| 1542 | uint32_t dot11f_unpack_ie_measurement_pilot(tpAniSirGlobal pCtx, |
| 1543 | uint8_t *pBuf, |
| 1544 | uint8_t ielen, |
| 1545 | tDot11fIEMeasurementPilot *pDst) |
| 1546 | { |
| 1547 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1548 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1549 | if (pDst->present) |
| 1550 | status = DOT11F_DUPLICATE_IE; |
| 1551 | pDst->present = 1; |
| 1552 | pDst->measurementPilot = *pBuf; |
| 1553 | pBuf += 1; |
| 1554 | ielen -= (uint8_t)1; |
| 1555 | pDst->num_vendorSpecific = (uint8_t)(ielen); |
| 1556 | DOT11F_MEMCPY(pCtx, pDst->vendorSpecific, pBuf, (ielen)); |
| 1557 | (void)pCtx; |
| 1558 | return status; |
| 1559 | } /* End dot11f_unpack_ie_measurement_pilot. */ |
| 1560 | |
| 1561 | #define SigIeMeasurementPilot (0x000b) |
| 1562 | |
| 1563 | |
| 1564 | uint32_t dot11f_unpack_ie_multi_bssid(tpAniSirGlobal pCtx, |
| 1565 | uint8_t *pBuf, |
| 1566 | uint8_t ielen, |
| 1567 | tDot11fIEMultiBssid *pDst) |
| 1568 | { |
| 1569 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1570 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1571 | if (pDst->present) |
| 1572 | status = DOT11F_DUPLICATE_IE; |
| 1573 | pDst->present = 1; |
| 1574 | pDst->maxBSSIDIndicator = *pBuf; |
| 1575 | pBuf += 1; |
| 1576 | ielen -= (uint8_t)1; |
| 1577 | pDst->num_vendorSpecific = (uint8_t)(ielen); |
| 1578 | DOT11F_MEMCPY(pCtx, pDst->vendorSpecific, pBuf, (ielen)); |
| 1579 | (void)pCtx; |
| 1580 | return status; |
| 1581 | } /* End dot11f_unpack_ie_multi_bssid. */ |
| 1582 | |
| 1583 | #define SigIeMultiBssid (0x000c) |
| 1584 | |
| 1585 | |
| 1586 | uint32_t dot11f_unpack_ie_ric_data(tpAniSirGlobal pCtx, |
| 1587 | uint8_t *pBuf, |
| 1588 | uint8_t ielen, |
| 1589 | tDot11fIERICData *pDst) |
| 1590 | { |
| 1591 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1592 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1593 | if (pDst->present) |
| 1594 | status = DOT11F_DUPLICATE_IE; |
| 1595 | pDst->present = 1; |
| 1596 | pDst->Identifier = *pBuf; |
| 1597 | pBuf += 1; |
| 1598 | ielen -= (uint8_t)1; |
| 1599 | pDst->resourceDescCount = *pBuf; |
| 1600 | pBuf += 1; |
| 1601 | ielen -= (uint8_t)1; |
| 1602 | framesntohs(pCtx, &pDst->statusCode, pBuf, 0); |
| 1603 | (void)pCtx; |
| 1604 | return status; |
| 1605 | } /* End dot11f_unpack_ie_ric_data. */ |
| 1606 | |
| 1607 | #define SigIeRICData (0x000d) |
| 1608 | |
| 1609 | |
| 1610 | uint32_t dot11f_unpack_ie_ric_descriptor(tpAniSirGlobal pCtx, |
| 1611 | uint8_t *pBuf, |
| 1612 | uint8_t ielen, |
| 1613 | tDot11fIERICDescriptor *pDst) |
| 1614 | { |
| 1615 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1616 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1617 | if (pDst->present) |
| 1618 | status = DOT11F_DUPLICATE_IE; |
| 1619 | pDst->present = 1; |
| 1620 | pDst->resourceType = *pBuf; |
| 1621 | pBuf += 1; |
| 1622 | ielen -= (uint8_t)1; |
| 1623 | pDst->num_variableData = (uint8_t)(ielen); |
| 1624 | DOT11F_MEMCPY(pCtx, pDst->variableData, pBuf, (ielen)); |
| 1625 | (void)pCtx; |
| 1626 | return status; |
| 1627 | } /* End dot11f_unpack_ie_ric_descriptor. */ |
| 1628 | |
| 1629 | #define SigIeRICDescriptor (0x000e) |
| 1630 | |
| 1631 | |
| 1632 | uint32_t dot11f_unpack_ie_rrm_enabled_cap(tpAniSirGlobal pCtx, |
| 1633 | uint8_t *pBuf, |
| 1634 | uint8_t ielen, |
| 1635 | tDot11fIERRMEnabledCap *pDst) |
| 1636 | { |
| 1637 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1638 | uint8_t tmp7__; |
| 1639 | uint8_t tmp8__; |
| 1640 | uint8_t tmp9__; |
| 1641 | uint8_t tmp10__; |
| 1642 | uint8_t tmp11__; |
| 1643 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1644 | if (pDst->present) |
| 1645 | status = DOT11F_DUPLICATE_IE; |
| 1646 | pDst->present = 1; |
| 1647 | tmp7__ = *pBuf; |
| 1648 | pBuf += 1; |
| 1649 | ielen -= 1; |
| 1650 | pDst->LinkMeasurement = tmp7__ >> 0 & 0x1; |
| 1651 | pDst->NeighborRpt = tmp7__ >> 1 & 0x1; |
| 1652 | pDst->parallel = tmp7__ >> 2 & 0x1; |
| 1653 | pDst->repeated = tmp7__ >> 3 & 0x1; |
| 1654 | pDst->BeaconPassive = tmp7__ >> 4 & 0x1; |
| 1655 | pDst->BeaconActive = tmp7__ >> 5 & 0x1; |
| 1656 | pDst->BeaconTable = tmp7__ >> 6 & 0x1; |
| 1657 | pDst->BeaconRepCond = tmp7__ >> 7 & 0x1; |
| 1658 | tmp8__ = *pBuf; |
| 1659 | pBuf += 1; |
| 1660 | ielen -= 1; |
| 1661 | pDst->FrameMeasurement = tmp8__ >> 0 & 0x1; |
| 1662 | pDst->ChannelLoad = tmp8__ >> 1 & 0x1; |
| 1663 | pDst->NoiseHistogram = tmp8__ >> 2 & 0x1; |
| 1664 | pDst->statistics = tmp8__ >> 3 & 0x1; |
| 1665 | pDst->LCIMeasurement = tmp8__ >> 4 & 0x1; |
| 1666 | pDst->LCIAzimuth = tmp8__ >> 5 & 0x1; |
| 1667 | pDst->TCMCapability = tmp8__ >> 6 & 0x1; |
| 1668 | pDst->triggeredTCM = tmp8__ >> 7 & 0x1; |
| 1669 | tmp9__ = *pBuf; |
| 1670 | pBuf += 1; |
| 1671 | ielen -= 1; |
| 1672 | pDst->APChanReport = tmp9__ >> 0 & 0x1; |
| 1673 | pDst->RRMMIBEnabled = tmp9__ >> 1 & 0x1; |
| 1674 | pDst->operatingChanMax = tmp9__ >> 2 & 0x7; |
| 1675 | pDst->nonOperatinChanMax = tmp9__ >> 5 & 0x7; |
| 1676 | tmp10__ = *pBuf; |
| 1677 | pBuf += 1; |
| 1678 | ielen -= 1; |
| 1679 | pDst->MeasurementPilot = tmp10__ >> 0 & 0x7; |
| 1680 | pDst->MeasurementPilotEnabled = tmp10__ >> 3 & 0x1; |
| 1681 | pDst->NeighborTSFOffset = tmp10__ >> 4 & 0x1; |
| 1682 | pDst->RCPIMeasurement = tmp10__ >> 5 & 0x1; |
| 1683 | pDst->RSNIMeasurement = tmp10__ >> 6 & 0x1; |
| 1684 | pDst->BssAvgAccessDelay = tmp10__ >> 7 & 0x1; |
| 1685 | tmp11__ = *pBuf; |
| 1686 | pDst->BSSAvailAdmission = tmp11__ >> 0 & 0x1; |
| 1687 | pDst->AntennaInformation = tmp11__ >> 1 & 0x1; |
| 1688 | pDst->fine_time_meas_rpt = tmp11__ >> 2 & 0x1; |
| 1689 | pDst->lci_capability = tmp11__ >> 3 & 0x1; |
| 1690 | pDst->reserved = tmp11__ >> 4 & 0xf; |
| 1691 | (void)pCtx; |
| 1692 | return status; |
| 1693 | } /* End dot11f_unpack_ie_rrm_enabled_cap. */ |
| 1694 | |
| 1695 | #define SigIeRRMEnabledCap (0x000f) |
| 1696 | |
| 1697 | |
| 1698 | uint32_t dot11f_unpack_ie_requested_info(tpAniSirGlobal pCtx, |
| 1699 | uint8_t *pBuf, |
| 1700 | uint8_t ielen, |
| 1701 | tDot11fIERequestedInfo *pDst) |
| 1702 | { |
| 1703 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1704 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1705 | if (pDst->present) |
| 1706 | status = DOT11F_DUPLICATE_IE; |
| 1707 | pDst->present = 1; |
| 1708 | pDst->num_requested_eids = (uint8_t)(ielen); |
| 1709 | DOT11F_MEMCPY(pCtx, pDst->requested_eids, pBuf, (ielen)); |
| 1710 | (void)pCtx; |
| 1711 | return status; |
| 1712 | } /* End dot11f_unpack_ie_requested_info. */ |
| 1713 | |
| 1714 | #define SigIeRequestedInfo (0x0010) |
| 1715 | |
| 1716 | |
| 1717 | uint32_t dot11f_unpack_ie_ssid(tpAniSirGlobal pCtx, |
| 1718 | uint8_t *pBuf, |
| 1719 | uint8_t ielen, |
| 1720 | tDot11fIESSID *pDst) |
| 1721 | { |
| 1722 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1723 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1724 | if (pDst->present) { |
| 1725 | status = DOT11F_DUPLICATE_IE; |
| 1726 | return status; |
| 1727 | } |
| 1728 | pDst->present = 1; |
| 1729 | pDst->num_ssid = (uint8_t)(ielen); |
| 1730 | if (ielen > 32) { |
| 1731 | pDst->present = 0; |
| 1732 | return DOT11F_SKIPPED_BAD_IE; |
| 1733 | } |
| 1734 | |
| 1735 | DOT11F_MEMCPY(pCtx, pDst->ssid, pBuf, (ielen)); |
| 1736 | (void)pCtx; |
| 1737 | return status; |
| 1738 | } /* End dot11f_unpack_ie_ssid. */ |
| 1739 | |
| 1740 | #define SigIeSSID (0x0011) |
| 1741 | |
| 1742 | |
| 1743 | uint32_t dot11f_unpack_ie_schedule(tpAniSirGlobal pCtx, |
| 1744 | uint8_t *pBuf, |
| 1745 | uint8_t ielen, |
| 1746 | tDot11fIESchedule *pDst) |
| 1747 | { |
| 1748 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1749 | uint16_t tmp12__; |
| 1750 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1751 | if (pDst->present) |
| 1752 | status = DOT11F_DUPLICATE_IE; |
| 1753 | pDst->present = 1; |
| 1754 | framesntohs(pCtx, &tmp12__, pBuf, 0); |
| 1755 | pBuf += 2; |
| 1756 | ielen -= 2; |
| 1757 | pDst->aggregation = tmp12__ >> 0 & 0x1; |
| 1758 | pDst->tsid = tmp12__ >> 1 & 0xf; |
| 1759 | pDst->direction = tmp12__ >> 5 & 0x3; |
| 1760 | pDst->reserved = tmp12__ >> 7 & 0x1ff; |
| 1761 | framesntohl(pCtx, &pDst->service_start_time, pBuf, 0); |
| 1762 | pBuf += 4; |
| 1763 | ielen -= (uint8_t)4; |
| 1764 | framesntohl(pCtx, &pDst->service_interval, pBuf, 0); |
| 1765 | pBuf += 4; |
| 1766 | ielen -= (uint8_t)4; |
| 1767 | framesntohs(pCtx, &pDst->max_service_dur, pBuf, 0); |
| 1768 | pBuf += 2; |
| 1769 | ielen -= (uint8_t)2; |
| 1770 | framesntohs(pCtx, &pDst->spec_interval, pBuf, 0); |
| 1771 | (void)pCtx; |
| 1772 | return status; |
| 1773 | } /* End dot11f_unpack_ie_schedule. */ |
| 1774 | |
| 1775 | #define SigIeSchedule (0x0012) |
| 1776 | |
| 1777 | |
| 1778 | uint32_t dot11f_unpack_ie_tclas(tpAniSirGlobal pCtx, |
| 1779 | uint8_t *pBuf, |
| 1780 | uint8_t ielen, |
| 1781 | tDot11fIETCLAS *pDst) |
| 1782 | { |
| 1783 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1784 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1785 | if (pDst->present) |
| 1786 | status = DOT11F_DUPLICATE_IE; |
| 1787 | pDst->present = 1; |
| 1788 | pDst->user_priority = *pBuf; |
| 1789 | pBuf += 1; |
| 1790 | ielen -= (uint8_t)1; |
| 1791 | pDst->classifier_type = *pBuf; |
| 1792 | pBuf += 1; |
| 1793 | ielen -= (uint8_t)1; |
| 1794 | pDst->classifier_mask = *pBuf; |
| 1795 | pBuf += 1; |
| 1796 | ielen -= (uint8_t)1; |
| 1797 | switch (pDst->classifier_type) { |
| 1798 | case 0: |
| 1799 | DOT11F_MEMCPY(pCtx, pDst->info.EthParams.source, pBuf, 6); |
| 1800 | pBuf += 6; |
| 1801 | ielen -= (uint8_t)6; |
| 1802 | DOT11F_MEMCPY(pCtx, pDst->info.EthParams.dest, pBuf, 6); |
| 1803 | pBuf += 6; |
| 1804 | ielen -= (uint8_t)6; |
| 1805 | framesntohs(pCtx, &pDst->info.EthParams.type, pBuf, 0); |
| 1806 | pBuf += 2; |
| 1807 | ielen -= (uint8_t)2; |
| 1808 | break; |
| 1809 | case 1: |
| 1810 | pDst->info.IpParams.version = *pBuf; |
| 1811 | pBuf += 1; |
| 1812 | ielen -= (uint8_t)1; |
| 1813 | switch (pDst->info.IpParams.version) { |
| 1814 | case 4: |
| 1815 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.source, pBuf, 4); |
| 1816 | pBuf += 4; |
| 1817 | ielen -= (uint8_t)4; |
| 1818 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.dest, pBuf, 4); |
| 1819 | pBuf += 4; |
| 1820 | ielen -= (uint8_t)4; |
| 1821 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.src_port, pBuf, 0); |
| 1822 | pBuf += 2; |
| 1823 | ielen -= (uint8_t)2; |
| 1824 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.dest_port, pBuf, 0); |
| 1825 | pBuf += 2; |
| 1826 | ielen -= (uint8_t)2; |
| 1827 | pDst->info.IpParams.params.IpV4Params.DSCP = *pBuf; |
| 1828 | pBuf += 1; |
| 1829 | ielen -= (uint8_t)1; |
| 1830 | pDst->info.IpParams.params.IpV4Params.proto = *pBuf; |
| 1831 | pBuf += 1; |
| 1832 | ielen -= (uint8_t)1; |
| 1833 | pDst->info.IpParams.params.IpV4Params.reserved = *pBuf; |
| 1834 | pBuf += 1; |
| 1835 | ielen -= (uint8_t)1; |
| 1836 | break; |
| 1837 | case 6: |
| 1838 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.source, pBuf, 16); |
| 1839 | pBuf += 16; |
| 1840 | ielen -= (uint8_t)16; |
| 1841 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.dest, pBuf, 16); |
| 1842 | pBuf += 16; |
| 1843 | ielen -= (uint8_t)16; |
| 1844 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.src_port, pBuf, 0); |
| 1845 | pBuf += 2; |
| 1846 | ielen -= (uint8_t)2; |
| 1847 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.dest_port, pBuf, 0); |
| 1848 | pBuf += 2; |
| 1849 | ielen -= (uint8_t)2; |
| 1850 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.flow_label, pBuf, 3); |
| 1851 | pBuf += 3; |
| 1852 | ielen -= (uint8_t)3; |
| 1853 | break; |
| 1854 | } |
| 1855 | break; |
| 1856 | case 2: |
| 1857 | framesntohs(pCtx, &pDst->info.Params8021dq.tag_type, pBuf, 0); |
| 1858 | pBuf += 2; |
| 1859 | ielen -= (uint8_t)2; |
| 1860 | break; |
| 1861 | } |
| 1862 | (void)pCtx; |
| 1863 | return status; |
| 1864 | } /* End dot11f_unpack_ie_tclas. */ |
| 1865 | |
| 1866 | #define SigIeTCLAS (0x0013) |
| 1867 | |
| 1868 | |
| 1869 | #define SigIeTCLASSPROC (0x0014) |
| 1870 | |
| 1871 | |
| 1872 | uint32_t dot11f_unpack_ie_ts_delay(tpAniSirGlobal pCtx, |
| 1873 | uint8_t *pBuf, |
| 1874 | uint8_t ielen, |
| 1875 | tDot11fIETSDelay *pDst) |
| 1876 | { |
| 1877 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1878 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1879 | if (pDst->present) |
| 1880 | status = DOT11F_DUPLICATE_IE; |
| 1881 | pDst->present = 1; |
| 1882 | framesntohl(pCtx, &pDst->delay, pBuf, 0); |
| 1883 | (void)pCtx; |
| 1884 | return status; |
| 1885 | } /* End dot11f_unpack_ie_ts_delay. */ |
| 1886 | |
| 1887 | #define SigIeTSDelay (0x0015) |
| 1888 | |
| 1889 | |
| 1890 | uint32_t dot11f_unpack_ie_tspec(tpAniSirGlobal pCtx, |
| 1891 | uint8_t *pBuf, |
| 1892 | uint8_t ielen, |
| 1893 | tDot11fIETSPEC *pDst) |
| 1894 | { |
| 1895 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1896 | uint16_t tmp13__; |
| 1897 | uint8_t tmp14__; |
| 1898 | uint16_t tmp15__; |
| 1899 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1900 | if (pDst->present) |
| 1901 | status = DOT11F_DUPLICATE_IE; |
| 1902 | pDst->present = 1; |
| 1903 | framesntohs(pCtx, &tmp13__, pBuf, 0); |
| 1904 | pBuf += 2; |
| 1905 | ielen -= 2; |
| 1906 | pDst->traffic_type = tmp13__ >> 0 & 0x1; |
| 1907 | pDst->tsid = tmp13__ >> 1 & 0xf; |
| 1908 | pDst->direction = tmp13__ >> 5 & 0x3; |
| 1909 | pDst->access_policy = tmp13__ >> 7 & 0x3; |
| 1910 | pDst->aggregation = tmp13__ >> 9 & 0x1; |
| 1911 | pDst->psb = tmp13__ >> 10 & 0x1; |
| 1912 | pDst->user_priority = tmp13__ >> 11 & 0x7; |
| 1913 | pDst->tsinfo_ack_pol = tmp13__ >> 14 & 0x3; |
| 1914 | tmp14__ = *pBuf; |
| 1915 | pBuf += 1; |
| 1916 | ielen -= 1; |
| 1917 | pDst->schedule = tmp14__ >> 0 & 0x1; |
| 1918 | pDst->unused = tmp14__ >> 1 & 0x7f; |
| 1919 | framesntohs(pCtx, &tmp15__, pBuf, 0); |
| 1920 | pBuf += 2; |
| 1921 | ielen -= 2; |
| 1922 | pDst->size = tmp15__ >> 0 & 0x7fff; |
| 1923 | pDst->fixed = tmp15__ >> 15 & 0x1; |
| 1924 | framesntohs(pCtx, &pDst->max_msdu_size, pBuf, 0); |
| 1925 | pBuf += 2; |
| 1926 | ielen -= (uint8_t)2; |
| 1927 | framesntohl(pCtx, &pDst->min_service_int, pBuf, 0); |
| 1928 | pBuf += 4; |
| 1929 | ielen -= (uint8_t)4; |
| 1930 | framesntohl(pCtx, &pDst->max_service_int, pBuf, 0); |
| 1931 | pBuf += 4; |
| 1932 | ielen -= (uint8_t)4; |
| 1933 | framesntohl(pCtx, &pDst->inactivity_int, pBuf, 0); |
| 1934 | pBuf += 4; |
| 1935 | ielen -= (uint8_t)4; |
| 1936 | framesntohl(pCtx, &pDst->suspension_int, pBuf, 0); |
| 1937 | pBuf += 4; |
| 1938 | ielen -= (uint8_t)4; |
| 1939 | framesntohl(pCtx, &pDst->service_start_time, pBuf, 0); |
| 1940 | pBuf += 4; |
| 1941 | ielen -= (uint8_t)4; |
| 1942 | framesntohl(pCtx, &pDst->min_data_rate, pBuf, 0); |
| 1943 | pBuf += 4; |
| 1944 | ielen -= (uint8_t)4; |
| 1945 | framesntohl(pCtx, &pDst->mean_data_rate, pBuf, 0); |
| 1946 | pBuf += 4; |
| 1947 | ielen -= (uint8_t)4; |
| 1948 | framesntohl(pCtx, &pDst->peak_data_rate, pBuf, 0); |
| 1949 | pBuf += 4; |
| 1950 | ielen -= (uint8_t)4; |
| 1951 | framesntohl(pCtx, &pDst->burst_size, pBuf, 0); |
| 1952 | pBuf += 4; |
| 1953 | ielen -= (uint8_t)4; |
| 1954 | framesntohl(pCtx, &pDst->delay_bound, pBuf, 0); |
| 1955 | pBuf += 4; |
| 1956 | ielen -= (uint8_t)4; |
| 1957 | framesntohl(pCtx, &pDst->min_phy_rate, pBuf, 0); |
| 1958 | pBuf += 4; |
| 1959 | ielen -= (uint8_t)4; |
| 1960 | framesntohs(pCtx, &pDst->surplus_bw_allowance, pBuf, 0); |
| 1961 | pBuf += 2; |
| 1962 | ielen -= (uint8_t)2; |
| 1963 | framesntohs(pCtx, &pDst->medium_time, pBuf, 0); |
| 1964 | (void)pCtx; |
| 1965 | return status; |
| 1966 | } /* End dot11f_unpack_ie_tspec. */ |
| 1967 | |
| 1968 | #define SigIeTSPEC (0x0016) |
| 1969 | |
| 1970 | |
| 1971 | uint32_t dot11f_unpack_ie_vht_caps(tpAniSirGlobal pCtx, |
| 1972 | uint8_t *pBuf, |
| 1973 | uint8_t ielen, |
| 1974 | tDot11fIEVHTCaps *pDst) |
| 1975 | { |
| 1976 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 1977 | uint32_t tmp16__; |
| 1978 | uint16_t tmp17__; |
| 1979 | uint16_t tmp18__; |
| 1980 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 1981 | if (pDst->present) |
| 1982 | status = DOT11F_DUPLICATE_IE; |
| 1983 | pDst->present = 1; |
| 1984 | framesntohl(pCtx, &tmp16__, pBuf, 0); |
| 1985 | pBuf += 4; |
| 1986 | ielen -= 4; |
| 1987 | pDst->maxMPDULen = tmp16__ >> 0 & 0x3; |
| 1988 | pDst->supportedChannelWidthSet = tmp16__ >> 2 & 0x3; |
| 1989 | pDst->ldpcCodingCap = tmp16__ >> 4 & 0x1; |
| 1990 | pDst->shortGI80MHz = tmp16__ >> 5 & 0x1; |
| 1991 | pDst->shortGI160and80plus80MHz = tmp16__ >> 6 & 0x1; |
| 1992 | pDst->txSTBC = tmp16__ >> 7 & 0x1; |
| 1993 | pDst->rxSTBC = tmp16__ >> 8 & 0x7; |
| 1994 | pDst->suBeamFormerCap = tmp16__ >> 11 & 0x1; |
| 1995 | pDst->suBeamformeeCap = tmp16__ >> 12 & 0x1; |
| 1996 | pDst->csnofBeamformerAntSup = tmp16__ >> 13 & 0x7; |
| 1997 | pDst->numSoundingDim = tmp16__ >> 16 & 0x7; |
| 1998 | pDst->muBeamformerCap = tmp16__ >> 19 & 0x1; |
| 1999 | pDst->muBeamformeeCap = tmp16__ >> 20 & 0x1; |
| 2000 | pDst->vhtTXOPPS = tmp16__ >> 21 & 0x1; |
| 2001 | pDst->htcVHTCap = tmp16__ >> 22 & 0x1; |
| 2002 | pDst->maxAMPDULenExp = tmp16__ >> 23 & 0x7; |
| 2003 | pDst->vhtLinkAdaptCap = tmp16__ >> 26 & 0x3; |
| 2004 | pDst->rxAntPattern = tmp16__ >> 28 & 0x1; |
| 2005 | pDst->txAntPattern = tmp16__ >> 29 & 0x1; |
| 2006 | pDst->reserved1 = tmp16__ >> 30 & 0x3; |
| 2007 | framesntohs(pCtx, &pDst->rxMCSMap, pBuf, 0); |
| 2008 | pBuf += 2; |
| 2009 | ielen -= (uint8_t)2; |
| 2010 | framesntohs(pCtx, &tmp17__, pBuf, 0); |
| 2011 | pBuf += 2; |
| 2012 | ielen -= 2; |
| 2013 | pDst->rxHighSupDataRate = tmp17__ >> 0 & 0x1fff; |
| 2014 | pDst->reserved2 = tmp17__ >> 13 & 0x7; |
| 2015 | framesntohs(pCtx, &pDst->txMCSMap, pBuf, 0); |
| 2016 | pBuf += 2; |
| 2017 | ielen -= (uint8_t)2; |
| 2018 | framesntohs(pCtx, &tmp18__, pBuf, 0); |
| 2019 | pDst->txSupDataRate = tmp18__ >> 0 & 0x1fff; |
| 2020 | pDst->reserved3 = tmp18__ >> 13 & 0x7; |
| 2021 | (void)pCtx; |
| 2022 | return status; |
| 2023 | } /* End dot11f_unpack_ie_vht_caps. */ |
| 2024 | |
| 2025 | #define SigIeVHTCaps (0x0017) |
| 2026 | |
| 2027 | |
| 2028 | uint32_t dot11f_unpack_ie_vht_operation(tpAniSirGlobal pCtx, |
| 2029 | uint8_t *pBuf, |
| 2030 | uint8_t ielen, |
| 2031 | tDot11fIEVHTOperation *pDst) |
| 2032 | { |
| 2033 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2034 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2035 | if (pDst->present) |
| 2036 | status = DOT11F_DUPLICATE_IE; |
| 2037 | pDst->present = 1; |
| 2038 | pDst->chanWidth = *pBuf; |
| 2039 | pBuf += 1; |
| 2040 | ielen -= (uint8_t)1; |
| 2041 | pDst->chanCenterFreqSeg1 = *pBuf; |
| 2042 | pBuf += 1; |
| 2043 | ielen -= (uint8_t)1; |
| 2044 | pDst->chanCenterFreqSeg2 = *pBuf; |
| 2045 | pBuf += 1; |
| 2046 | ielen -= (uint8_t)1; |
| 2047 | framesntohs(pCtx, &pDst->basicMCSSet, pBuf, 0); |
| 2048 | (void)pCtx; |
| 2049 | return status; |
| 2050 | } /* End dot11f_unpack_ie_vht_operation. */ |
| 2051 | |
| 2052 | #define SigIeVHTOperation (0x0018) |
| 2053 | |
| 2054 | |
| 2055 | uint32_t dot11f_unpack_ie_wmm_schedule(tpAniSirGlobal pCtx, |
| 2056 | uint8_t *pBuf, |
| 2057 | uint8_t ielen, |
| 2058 | tDot11fIEWMMSchedule *pDst) |
| 2059 | { |
| 2060 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2061 | uint16_t tmp19__; |
| 2062 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2063 | if (pDst->present) |
| 2064 | status = DOT11F_DUPLICATE_IE; |
| 2065 | pDst->present = 1; |
| 2066 | pDst->version = *pBuf; |
| 2067 | pBuf += 1; |
| 2068 | ielen -= (uint8_t)1; |
| 2069 | if (pDst->version != 0x1) { |
| 2070 | pDst->present = 0; |
| 2071 | return status | DOT11F_BAD_FIXED_VALUE; |
| 2072 | } |
| 2073 | framesntohs(pCtx, &tmp19__, pBuf, 0); |
| 2074 | pBuf += 2; |
| 2075 | ielen -= 2; |
| 2076 | pDst->aggregation = tmp19__ >> 0 & 0x1; |
| 2077 | pDst->tsid = tmp19__ >> 1 & 0xf; |
| 2078 | pDst->direction = tmp19__ >> 5 & 0x3; |
| 2079 | pDst->reserved = tmp19__ >> 7 & 0x1ff; |
| 2080 | framesntohl(pCtx, &pDst->service_start_time, pBuf, 0); |
| 2081 | pBuf += 4; |
| 2082 | ielen -= (uint8_t)4; |
| 2083 | framesntohl(pCtx, &pDst->service_interval, pBuf, 0); |
| 2084 | pBuf += 4; |
| 2085 | ielen -= (uint8_t)4; |
| 2086 | framesntohs(pCtx, &pDst->max_service_dur, pBuf, 0); |
| 2087 | pBuf += 2; |
| 2088 | ielen -= (uint8_t)2; |
| 2089 | framesntohs(pCtx, &pDst->spec_interval, pBuf, 0); |
| 2090 | (void)pCtx; |
| 2091 | return status; |
| 2092 | } /* End dot11f_unpack_ie_wmm_schedule. */ |
| 2093 | |
| 2094 | #define SigIeWMMSchedule (0x0019) |
| 2095 | |
| 2096 | |
| 2097 | uint32_t dot11f_unpack_ie_wmmtclas(tpAniSirGlobal pCtx, |
| 2098 | uint8_t *pBuf, |
| 2099 | uint8_t ielen, |
| 2100 | tDot11fIEWMMTCLAS *pDst) |
| 2101 | { |
| 2102 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2103 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2104 | if (pDst->present) |
| 2105 | status = DOT11F_DUPLICATE_IE; |
| 2106 | pDst->present = 1; |
| 2107 | pDst->version = *pBuf; |
| 2108 | pBuf += 1; |
| 2109 | ielen -= (uint8_t)1; |
| 2110 | if (pDst->version != 0x1) { |
| 2111 | pDst->present = 0; |
| 2112 | return status | DOT11F_BAD_FIXED_VALUE; |
| 2113 | } |
| 2114 | pDst->user_priority = *pBuf; |
| 2115 | pBuf += 1; |
| 2116 | ielen -= (uint8_t)1; |
| 2117 | pDst->classifier_type = *pBuf; |
| 2118 | pBuf += 1; |
| 2119 | ielen -= (uint8_t)1; |
| 2120 | pDst->classifier_mask = *pBuf; |
| 2121 | pBuf += 1; |
| 2122 | ielen -= (uint8_t)1; |
| 2123 | switch (pDst->classifier_type) { |
| 2124 | case 0: |
| 2125 | DOT11F_MEMCPY(pCtx, pDst->info.EthParams.source, pBuf, 6); |
| 2126 | pBuf += 6; |
| 2127 | ielen -= (uint8_t)6; |
| 2128 | DOT11F_MEMCPY(pCtx, pDst->info.EthParams.dest, pBuf, 6); |
| 2129 | pBuf += 6; |
| 2130 | ielen -= (uint8_t)6; |
| 2131 | framesntohs(pCtx, &pDst->info.EthParams.type, pBuf, 0); |
| 2132 | pBuf += 2; |
| 2133 | ielen -= (uint8_t)2; |
| 2134 | break; |
| 2135 | case 1: |
| 2136 | pDst->info.IpParams.version = *pBuf; |
| 2137 | pBuf += 1; |
| 2138 | ielen -= (uint8_t)1; |
| 2139 | switch (pDst->info.IpParams.version) { |
| 2140 | case 4: |
| 2141 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.source, pBuf, 4); |
| 2142 | pBuf += 4; |
| 2143 | ielen -= (uint8_t)4; |
| 2144 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.dest, pBuf, 4); |
| 2145 | pBuf += 4; |
| 2146 | ielen -= (uint8_t)4; |
| 2147 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.src_port, pBuf, 0); |
| 2148 | pBuf += 2; |
| 2149 | ielen -= (uint8_t)2; |
| 2150 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.dest_port, pBuf, 0); |
| 2151 | pBuf += 2; |
| 2152 | ielen -= (uint8_t)2; |
| 2153 | pDst->info.IpParams.params.IpV4Params.DSCP = *pBuf; |
| 2154 | pBuf += 1; |
| 2155 | ielen -= (uint8_t)1; |
| 2156 | pDst->info.IpParams.params.IpV4Params.proto = *pBuf; |
| 2157 | pBuf += 1; |
| 2158 | ielen -= (uint8_t)1; |
| 2159 | pDst->info.IpParams.params.IpV4Params.reserved = *pBuf; |
| 2160 | pBuf += 1; |
| 2161 | ielen -= (uint8_t)1; |
| 2162 | break; |
| 2163 | case 6: |
| 2164 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.source, pBuf, 16); |
| 2165 | pBuf += 16; |
| 2166 | ielen -= (uint8_t)16; |
| 2167 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.dest, pBuf, 16); |
| 2168 | pBuf += 16; |
| 2169 | ielen -= (uint8_t)16; |
| 2170 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.src_port, pBuf, 0); |
| 2171 | pBuf += 2; |
| 2172 | ielen -= (uint8_t)2; |
| 2173 | framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.dest_port, pBuf, 0); |
| 2174 | pBuf += 2; |
| 2175 | ielen -= (uint8_t)2; |
| 2176 | DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.flow_label, pBuf, 3); |
| 2177 | pBuf += 3; |
| 2178 | ielen -= (uint8_t)3; |
| 2179 | break; |
| 2180 | } |
| 2181 | break; |
| 2182 | case 2: |
| 2183 | framesntohs(pCtx, &pDst->info.Params8021dq.tag_type, pBuf, 0); |
| 2184 | pBuf += 2; |
| 2185 | ielen -= (uint8_t)2; |
| 2186 | break; |
| 2187 | } |
| 2188 | (void)pCtx; |
| 2189 | return status; |
| 2190 | } /* End dot11f_unpack_ie_wmmtclas. */ |
| 2191 | |
| 2192 | #define SigIeWMMTCLAS (0x001a) |
| 2193 | |
| 2194 | |
| 2195 | uint32_t dot11f_unpack_ie_wmmtclasproc(tpAniSirGlobal pCtx, |
| 2196 | uint8_t *pBuf, |
| 2197 | uint8_t ielen, |
| 2198 | tDot11fIEWMMTCLASPROC *pDst) |
| 2199 | { |
| 2200 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2201 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2202 | if (pDst->present) |
| 2203 | status = DOT11F_DUPLICATE_IE; |
| 2204 | pDst->present = 1; |
| 2205 | pDst->version = *pBuf; |
| 2206 | pBuf += 1; |
| 2207 | ielen -= (uint8_t)1; |
| 2208 | if (pDst->version != 0x1) { |
| 2209 | pDst->present = 0; |
| 2210 | return status | DOT11F_BAD_FIXED_VALUE; |
| 2211 | } |
| 2212 | pDst->processing = *pBuf; |
| 2213 | (void)pCtx; |
| 2214 | return status; |
| 2215 | } /* End dot11f_unpack_ie_wmmtclasproc. */ |
| 2216 | |
| 2217 | #define SigIeWMMTCLASPROC (0x001b) |
| 2218 | |
| 2219 | |
| 2220 | uint32_t dot11f_unpack_ie_wmmts_delay(tpAniSirGlobal pCtx, |
| 2221 | uint8_t *pBuf, |
| 2222 | uint8_t ielen, |
| 2223 | tDot11fIEWMMTSDelay *pDst) |
| 2224 | { |
| 2225 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2226 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2227 | if (pDst->present) |
| 2228 | status = DOT11F_DUPLICATE_IE; |
| 2229 | pDst->present = 1; |
| 2230 | pDst->version = *pBuf; |
| 2231 | pBuf += 1; |
| 2232 | ielen -= (uint8_t)1; |
| 2233 | if (pDst->version != 0x1) { |
| 2234 | pDst->present = 0; |
| 2235 | return status | DOT11F_BAD_FIXED_VALUE; |
| 2236 | } |
| 2237 | framesntohl(pCtx, &pDst->delay, pBuf, 0); |
| 2238 | (void)pCtx; |
| 2239 | return status; |
| 2240 | } /* End dot11f_unpack_ie_wmmts_delay. */ |
| 2241 | |
| 2242 | #define SigIeWMMTSDelay (0x001c) |
| 2243 | |
| 2244 | |
| 2245 | uint32_t dot11f_unpack_ie_wmmtspec(tpAniSirGlobal pCtx, |
| 2246 | uint8_t *pBuf, |
| 2247 | uint8_t ielen, |
| 2248 | tDot11fIEWMMTSPEC *pDst) |
| 2249 | { |
| 2250 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2251 | uint16_t tmp20__; |
| 2252 | uint8_t tmp21__; |
| 2253 | uint16_t tmp22__; |
| 2254 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2255 | if (pDst->present) |
| 2256 | status = DOT11F_DUPLICATE_IE; |
| 2257 | pDst->present = 1; |
| 2258 | pDst->version = *pBuf; |
| 2259 | pBuf += 1; |
| 2260 | ielen -= (uint8_t)1; |
| 2261 | if (pDst->version != 0x1) { |
| 2262 | pDst->present = 0; |
| 2263 | return status | DOT11F_BAD_FIXED_VALUE; |
| 2264 | } |
| 2265 | framesntohs(pCtx, &tmp20__, pBuf, 0); |
| 2266 | pBuf += 2; |
| 2267 | ielen -= 2; |
| 2268 | pDst->traffic_type = tmp20__ >> 0 & 0x1; |
| 2269 | pDst->tsid = tmp20__ >> 1 & 0xf; |
| 2270 | pDst->direction = tmp20__ >> 5 & 0x3; |
| 2271 | pDst->access_policy = tmp20__ >> 7 & 0x3; |
| 2272 | pDst->aggregation = tmp20__ >> 9 & 0x1; |
| 2273 | pDst->psb = tmp20__ >> 10 & 0x1; |
| 2274 | pDst->user_priority = tmp20__ >> 11 & 0x7; |
| 2275 | pDst->tsinfo_ack_pol = tmp20__ >> 14 & 0x3; |
| 2276 | tmp21__ = *pBuf; |
| 2277 | pBuf += 1; |
| 2278 | ielen -= 1; |
| 2279 | pDst->tsinfo_rsvd = tmp21__ >> 0 & 0x7f; |
| 2280 | pDst->burst_size_defn = tmp21__ >> 7 & 0x1; |
| 2281 | framesntohs(pCtx, &tmp22__, pBuf, 0); |
| 2282 | pBuf += 2; |
| 2283 | ielen -= 2; |
| 2284 | pDst->size = tmp22__ >> 0 & 0x7fff; |
| 2285 | pDst->fixed = tmp22__ >> 15 & 0x1; |
| 2286 | framesntohs(pCtx, &pDst->max_msdu_size, pBuf, 0); |
| 2287 | pBuf += 2; |
| 2288 | ielen -= (uint8_t)2; |
| 2289 | framesntohl(pCtx, &pDst->min_service_int, pBuf, 0); |
| 2290 | pBuf += 4; |
| 2291 | ielen -= (uint8_t)4; |
| 2292 | framesntohl(pCtx, &pDst->max_service_int, pBuf, 0); |
| 2293 | pBuf += 4; |
| 2294 | ielen -= (uint8_t)4; |
| 2295 | framesntohl(pCtx, &pDst->inactivity_int, pBuf, 0); |
| 2296 | pBuf += 4; |
| 2297 | ielen -= (uint8_t)4; |
| 2298 | framesntohl(pCtx, &pDst->suspension_int, pBuf, 0); |
| 2299 | pBuf += 4; |
| 2300 | ielen -= (uint8_t)4; |
| 2301 | framesntohl(pCtx, &pDst->service_start_time, pBuf, 0); |
| 2302 | pBuf += 4; |
| 2303 | ielen -= (uint8_t)4; |
| 2304 | framesntohl(pCtx, &pDst->min_data_rate, pBuf, 0); |
| 2305 | pBuf += 4; |
| 2306 | ielen -= (uint8_t)4; |
| 2307 | framesntohl(pCtx, &pDst->mean_data_rate, pBuf, 0); |
| 2308 | pBuf += 4; |
| 2309 | ielen -= (uint8_t)4; |
| 2310 | framesntohl(pCtx, &pDst->peak_data_rate, pBuf, 0); |
| 2311 | pBuf += 4; |
| 2312 | ielen -= (uint8_t)4; |
| 2313 | framesntohl(pCtx, &pDst->burst_size, pBuf, 0); |
| 2314 | pBuf += 4; |
| 2315 | ielen -= (uint8_t)4; |
| 2316 | framesntohl(pCtx, &pDst->delay_bound, pBuf, 0); |
| 2317 | pBuf += 4; |
| 2318 | ielen -= (uint8_t)4; |
| 2319 | framesntohl(pCtx, &pDst->min_phy_rate, pBuf, 0); |
| 2320 | pBuf += 4; |
| 2321 | ielen -= (uint8_t)4; |
| 2322 | framesntohs(pCtx, &pDst->surplus_bw_allowance, pBuf, 0); |
| 2323 | pBuf += 2; |
| 2324 | ielen -= (uint8_t)2; |
| 2325 | framesntohs(pCtx, &pDst->medium_time, pBuf, 0); |
| 2326 | (void)pCtx; |
| 2327 | return status; |
| 2328 | } /* End dot11f_unpack_ie_wmmtspec. */ |
| 2329 | |
| 2330 | #define SigIeWMMTSPEC (0x001d) |
| 2331 | |
| 2332 | |
| 2333 | uint32_t dot11f_unpack_ie_wider_bw_chan_switch_ann(tpAniSirGlobal pCtx, |
| 2334 | uint8_t *pBuf, |
| 2335 | uint8_t ielen, |
| 2336 | tDot11fIEWiderBWChanSwitchAnn *pDst) |
| 2337 | { |
| 2338 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2339 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2340 | if (pDst->present) |
| 2341 | status = DOT11F_DUPLICATE_IE; |
| 2342 | pDst->present = 1; |
| 2343 | pDst->newChanWidth = *pBuf; |
| 2344 | pBuf += 1; |
| 2345 | ielen -= (uint8_t)1; |
| 2346 | pDst->newCenterChanFreq0 = *pBuf; |
| 2347 | pBuf += 1; |
| 2348 | ielen -= (uint8_t)1; |
| 2349 | pDst->newCenterChanFreq1 = *pBuf; |
| 2350 | (void)pCtx; |
| 2351 | return status; |
| 2352 | } /* End dot11f_unpack_ie_wider_bw_chan_switch_ann. */ |
| 2353 | |
| 2354 | #define SigIeWiderBWChanSwitchAnn (0x001e) |
| 2355 | |
| 2356 | |
| 2357 | uint32_t dot11f_unpack_ie_aid(tpAniSirGlobal pCtx, |
| 2358 | uint8_t *pBuf, |
| 2359 | uint8_t ielen, |
| 2360 | tDot11fIEAID *pDst) |
| 2361 | { |
| 2362 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2363 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2364 | if (pDst->present) |
| 2365 | status = DOT11F_DUPLICATE_IE; |
| 2366 | pDst->present = 1; |
| 2367 | framesntohs(pCtx, &pDst->assocId, pBuf, 0); |
| 2368 | (void)pCtx; |
| 2369 | return status; |
| 2370 | } /* End dot11f_unpack_ie_aid. */ |
| 2371 | |
| 2372 | #define SigIeAID (0x001f) |
| 2373 | |
| 2374 | |
| 2375 | uint32_t dot11f_unpack_ie_cf_params(tpAniSirGlobal pCtx, |
| 2376 | uint8_t *pBuf, |
| 2377 | uint8_t ielen, |
| 2378 | tDot11fIECFParams *pDst) |
| 2379 | { |
| 2380 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2381 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2382 | if (pDst->present) |
| 2383 | status = DOT11F_DUPLICATE_IE; |
| 2384 | pDst->present = 1; |
| 2385 | pDst->cfp_count = *pBuf; |
| 2386 | pBuf += 1; |
| 2387 | ielen -= (uint8_t)1; |
| 2388 | pDst->cfp_period = *pBuf; |
| 2389 | pBuf += 1; |
| 2390 | ielen -= (uint8_t)1; |
| 2391 | framesntohs(pCtx, &pDst->cfp_maxduration, pBuf, 0); |
| 2392 | pBuf += 2; |
| 2393 | ielen -= (uint8_t)2; |
| 2394 | framesntohs(pCtx, &pDst->cfp_durremaining, pBuf, 0); |
| 2395 | (void)pCtx; |
| 2396 | return status; |
| 2397 | } /* End dot11f_unpack_ie_cf_params. */ |
| 2398 | |
| 2399 | #define SigIeCFParams (0x0020) |
| 2400 | |
| 2401 | |
| 2402 | uint32_t dot11f_unpack_ie_challenge_text(tpAniSirGlobal pCtx, |
| 2403 | uint8_t *pBuf, |
| 2404 | uint8_t ielen, |
| 2405 | tDot11fIEChallengeText *pDst) |
| 2406 | { |
| 2407 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2408 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2409 | if (pDst->present) |
| 2410 | status = DOT11F_DUPLICATE_IE; |
| 2411 | pDst->present = 1; |
| 2412 | pDst->num_text = (uint8_t)(ielen); |
| 2413 | if (ielen > 253) { |
| 2414 | pDst->present = 0; |
| 2415 | return DOT11F_SKIPPED_BAD_IE; |
| 2416 | } |
| 2417 | |
| 2418 | DOT11F_MEMCPY(pCtx, pDst->text, pBuf, (ielen)); |
| 2419 | (void)pCtx; |
| 2420 | return status; |
| 2421 | } /* End dot11f_unpack_ie_challenge_text. */ |
| 2422 | |
| 2423 | #define SigIeChallengeText (0x0021) |
| 2424 | |
| 2425 | |
| 2426 | uint32_t dot11f_unpack_ie_chan_switch_ann(tpAniSirGlobal pCtx, |
| 2427 | uint8_t *pBuf, |
| 2428 | uint8_t ielen, |
| 2429 | tDot11fIEChanSwitchAnn *pDst) |
| 2430 | { |
| 2431 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2432 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2433 | if (pDst->present) |
| 2434 | status = DOT11F_DUPLICATE_IE; |
| 2435 | pDst->present = 1; |
| 2436 | pDst->switchMode = *pBuf; |
| 2437 | pBuf += 1; |
| 2438 | ielen -= (uint8_t)1; |
| 2439 | pDst->newChannel = *pBuf; |
| 2440 | pBuf += 1; |
| 2441 | ielen -= (uint8_t)1; |
| 2442 | pDst->switchCount = *pBuf; |
| 2443 | (void)pCtx; |
| 2444 | return status; |
| 2445 | } /* End dot11f_unpack_ie_chan_switch_ann. */ |
| 2446 | |
| 2447 | #define SigIeChanSwitchAnn (0x0022) |
| 2448 | |
| 2449 | |
| 2450 | static const tFFDefn FFS_ChannelSwitchWrapper[] = { |
| 2451 | { NULL, 0, 0, 0,}, |
| 2452 | }; |
| 2453 | |
| 2454 | static const tIEDefn IES_ChannelSwitchWrapper[] = { |
| 2455 | { offsetof(tDot11fIEChannelSwitchWrapper, WiderBWChanSwitchAnn), |
| 2456 | offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, |
| 2457 | "WiderBWChanSwitchAnn", 0, 5, 5, SigIeWiderBWChanSwitchAnn, |
| 2458 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, |
| 2459 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, |
| 2460 | }; |
| 2461 | |
| 2462 | uint32_t dot11f_unpack_ie_channel_switch_wrapper(tpAniSirGlobal pCtx, |
| 2463 | uint8_t *pBuf, |
| 2464 | uint8_t ielen, |
| 2465 | tDot11fIEChannelSwitchWrapper *pDst) |
| 2466 | { |
| 2467 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2468 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2469 | if (pDst->present) |
| 2470 | status = DOT11F_DUPLICATE_IE; |
| 2471 | pDst->present = 1; |
| 2472 | (void)pCtx; |
| 2473 | status |= unpack_core(pCtx, |
| 2474 | pBuf, |
| 2475 | ielen, |
| 2476 | FFS_ChannelSwitchWrapper, |
| 2477 | IES_ChannelSwitchWrapper, |
| 2478 | (uint8_t *)pDst, |
| 2479 | sizeof(*pDst)); |
| 2480 | return status; |
| 2481 | } /* End dot11f_unpack_ie_channel_switch_wrapper. */ |
| 2482 | |
| 2483 | #define SigIeChannelSwitchWrapper (0x0023) |
| 2484 | |
| 2485 | |
| 2486 | uint32_t dot11f_unpack_ie_country(tpAniSirGlobal pCtx, |
| 2487 | uint8_t *pBuf, |
| 2488 | uint8_t ielen, |
| 2489 | tDot11fIECountry *pDst) |
| 2490 | { |
| 2491 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2492 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2493 | if (pDst->present) |
| 2494 | status = DOT11F_DUPLICATE_IE; |
| 2495 | pDst->present = 1; |
| 2496 | DOT11F_MEMCPY(pCtx, pDst->country, pBuf, 3); |
| 2497 | pBuf += 3; |
| 2498 | ielen -= (uint8_t)3; |
| 2499 | if (!ielen) { |
| 2500 | pDst->num_triplets = 0U; |
| 2501 | return 0U; |
| 2502 | } else { |
| 2503 | pDst->num_triplets = (uint8_t)(ielen / 3); |
| 2504 | if (ielen > 84 * 3) { |
| 2505 | pDst->present = 0; |
| 2506 | return DOT11F_SKIPPED_BAD_IE; |
| 2507 | } |
| 2508 | |
| 2509 | DOT11F_MEMCPY(pCtx, pDst->triplets, pBuf, (ielen)); |
| 2510 | } |
| 2511 | (void)pCtx; |
| 2512 | return status; |
| 2513 | } /* End dot11f_unpack_ie_country. */ |
| 2514 | |
| 2515 | #define SigIeCountry (0x0024) |
| 2516 | |
| 2517 | |
| 2518 | #define SigIeDSParams (0x0025) |
| 2519 | |
| 2520 | |
| 2521 | uint32_t dot11f_unpack_ie_edca_param_set(tpAniSirGlobal pCtx, |
| 2522 | uint8_t *pBuf, |
| 2523 | uint8_t ielen, |
| 2524 | tDot11fIEEDCAParamSet *pDst) |
| 2525 | { |
| 2526 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2527 | uint8_t tmp23__; |
| 2528 | uint8_t tmp24__; |
| 2529 | uint8_t tmp25__; |
| 2530 | uint8_t tmp26__; |
| 2531 | uint8_t tmp27__; |
| 2532 | uint8_t tmp28__; |
| 2533 | uint8_t tmp29__; |
| 2534 | uint8_t tmp30__; |
| 2535 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2536 | if (pDst->present) |
| 2537 | status = DOT11F_DUPLICATE_IE; |
| 2538 | pDst->present = 1; |
| 2539 | pDst->qos = *pBuf; |
| 2540 | pBuf += 1; |
| 2541 | ielen -= (uint8_t)1; |
| 2542 | pDst->reserved = *pBuf; |
| 2543 | pBuf += 1; |
| 2544 | ielen -= (uint8_t)1; |
| 2545 | tmp23__ = *pBuf; |
| 2546 | pBuf += 1; |
| 2547 | ielen -= 1; |
| 2548 | pDst->acbe_aifsn = tmp23__ >> 0 & 0xf; |
| 2549 | pDst->acbe_acm = tmp23__ >> 4 & 0x1; |
| 2550 | pDst->acbe_aci = tmp23__ >> 5 & 0x3; |
| 2551 | pDst->unused1 = tmp23__ >> 7 & 0x1; |
| 2552 | tmp24__ = *pBuf; |
| 2553 | pBuf += 1; |
| 2554 | ielen -= 1; |
| 2555 | pDst->acbe_acwmin = tmp24__ >> 0 & 0xf; |
| 2556 | pDst->acbe_acwmax = tmp24__ >> 4 & 0xf; |
| 2557 | framesntohs(pCtx, &pDst->acbe_txoplimit, pBuf, 0); |
| 2558 | pBuf += 2; |
| 2559 | ielen -= (uint8_t)2; |
| 2560 | tmp25__ = *pBuf; |
| 2561 | pBuf += 1; |
| 2562 | ielen -= 1; |
| 2563 | pDst->acbk_aifsn = tmp25__ >> 0 & 0xf; |
| 2564 | pDst->acbk_acm = tmp25__ >> 4 & 0x1; |
| 2565 | pDst->acbk_aci = tmp25__ >> 5 & 0x3; |
| 2566 | pDst->unused2 = tmp25__ >> 7 & 0x1; |
| 2567 | tmp26__ = *pBuf; |
| 2568 | pBuf += 1; |
| 2569 | ielen -= 1; |
| 2570 | pDst->acbk_acwmin = tmp26__ >> 0 & 0xf; |
| 2571 | pDst->acbk_acwmax = tmp26__ >> 4 & 0xf; |
| 2572 | framesntohs(pCtx, &pDst->acbk_txoplimit, pBuf, 0); |
| 2573 | pBuf += 2; |
| 2574 | ielen -= (uint8_t)2; |
| 2575 | tmp27__ = *pBuf; |
| 2576 | pBuf += 1; |
| 2577 | ielen -= 1; |
| 2578 | pDst->acvi_aifsn = tmp27__ >> 0 & 0xf; |
| 2579 | pDst->acvi_acm = tmp27__ >> 4 & 0x1; |
| 2580 | pDst->acvi_aci = tmp27__ >> 5 & 0x3; |
| 2581 | pDst->unused3 = tmp27__ >> 7 & 0x1; |
| 2582 | tmp28__ = *pBuf; |
| 2583 | pBuf += 1; |
| 2584 | ielen -= 1; |
| 2585 | pDst->acvi_acwmin = tmp28__ >> 0 & 0xf; |
| 2586 | pDst->acvi_acwmax = tmp28__ >> 4 & 0xf; |
| 2587 | framesntohs(pCtx, &pDst->acvi_txoplimit, pBuf, 0); |
| 2588 | pBuf += 2; |
| 2589 | ielen -= (uint8_t)2; |
| 2590 | tmp29__ = *pBuf; |
| 2591 | pBuf += 1; |
| 2592 | ielen -= 1; |
| 2593 | pDst->acvo_aifsn = tmp29__ >> 0 & 0xf; |
| 2594 | pDst->acvo_acm = tmp29__ >> 4 & 0x1; |
| 2595 | pDst->acvo_aci = tmp29__ >> 5 & 0x3; |
| 2596 | pDst->unused4 = tmp29__ >> 7 & 0x1; |
| 2597 | tmp30__ = *pBuf; |
| 2598 | pBuf += 1; |
| 2599 | ielen -= 1; |
| 2600 | pDst->acvo_acwmin = tmp30__ >> 0 & 0xf; |
| 2601 | pDst->acvo_acwmax = tmp30__ >> 4 & 0xf; |
| 2602 | framesntohs(pCtx, &pDst->acvo_txoplimit, pBuf, 0); |
| 2603 | (void)pCtx; |
| 2604 | return status; |
| 2605 | } /* End dot11f_unpack_ie_edca_param_set. */ |
| 2606 | |
| 2607 | #define SigIeEDCAParamSet (0x0026) |
| 2608 | |
| 2609 | |
| 2610 | uint32_t dot11f_unpack_ie_erp_info(tpAniSirGlobal pCtx, |
| 2611 | uint8_t *pBuf, |
| 2612 | uint8_t ielen, |
| 2613 | tDot11fIEERPInfo *pDst) |
| 2614 | { |
| 2615 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2616 | uint8_t tmp31__; |
| 2617 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2618 | if (pDst->present) |
| 2619 | status = DOT11F_DUPLICATE_IE; |
| 2620 | pDst->present = 1; |
| 2621 | tmp31__ = *pBuf; |
| 2622 | pDst->non_erp_present = tmp31__ >> 0 & 0x1; |
| 2623 | pDst->use_prot = tmp31__ >> 1 & 0x1; |
| 2624 | pDst->barker_preamble = tmp31__ >> 2 & 0x1; |
| 2625 | pDst->unused = tmp31__ >> 3 & 0x1f; |
| 2626 | (void)pCtx; |
| 2627 | return status; |
| 2628 | } /* End dot11f_unpack_ie_erp_info. */ |
| 2629 | |
| 2630 | #define SigIeERPInfo (0x0027) |
| 2631 | |
| 2632 | |
| 2633 | uint32_t dot11f_unpack_ie_ese_cckm_opaque(tpAniSirGlobal pCtx, |
| 2634 | uint8_t *pBuf, |
| 2635 | uint8_t ielen, |
| 2636 | tDot11fIEESECckmOpaque *pDst) |
| 2637 | { |
| 2638 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2639 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2640 | if (pDst->present) |
| 2641 | status = DOT11F_DUPLICATE_IE; |
| 2642 | pDst->present = 1; |
| 2643 | pDst->num_data = (uint8_t)(ielen); |
| 2644 | if (ielen > 20) { |
| 2645 | pDst->present = 0; |
| 2646 | return DOT11F_SKIPPED_BAD_IE; |
| 2647 | } |
| 2648 | |
| 2649 | DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen)); |
| 2650 | (void)pCtx; |
| 2651 | return status; |
| 2652 | } /* End dot11f_unpack_ie_ese_cckm_opaque. */ |
| 2653 | |
| 2654 | #define SigIeESECckmOpaque (0x0028) |
| 2655 | |
| 2656 | |
| 2657 | uint32_t dot11f_unpack_ie_ese_rad_mgmt_cap(tpAniSirGlobal pCtx, |
| 2658 | uint8_t *pBuf, |
| 2659 | uint8_t ielen, |
| 2660 | tDot11fIEESERadMgmtCap *pDst) |
| 2661 | { |
| 2662 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2663 | uint8_t tmp32__; |
| 2664 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2665 | if (pDst->present) |
| 2666 | status = DOT11F_DUPLICATE_IE; |
| 2667 | pDst->present = 1; |
| 2668 | pDst->mgmt_state = *pBuf; |
| 2669 | pBuf += 1; |
| 2670 | ielen -= (uint8_t)1; |
| 2671 | tmp32__ = *pBuf; |
| 2672 | pDst->mbssid_mask = tmp32__ >> 0 & 0x7; |
| 2673 | pDst->reserved = tmp32__ >> 3 & 0x1f; |
| 2674 | (void)pCtx; |
| 2675 | return status; |
| 2676 | } /* End dot11f_unpack_ie_ese_rad_mgmt_cap. */ |
| 2677 | |
| 2678 | #define SigIeESERadMgmtCap (0x0029) |
| 2679 | |
| 2680 | |
| 2681 | uint32_t dot11f_unpack_ie_ese_traf_strm_met(tpAniSirGlobal pCtx, |
| 2682 | uint8_t *pBuf, |
| 2683 | uint8_t ielen, |
| 2684 | tDot11fIEESETrafStrmMet *pDst) |
| 2685 | { |
| 2686 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2687 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2688 | if (pDst->present) |
| 2689 | status = DOT11F_DUPLICATE_IE; |
| 2690 | pDst->present = 1; |
| 2691 | pDst->tsid = *pBuf; |
| 2692 | pBuf += 1; |
| 2693 | ielen -= (uint8_t)1; |
| 2694 | pDst->state = *pBuf; |
| 2695 | pBuf += 1; |
| 2696 | ielen -= (uint8_t)1; |
| 2697 | framesntohs(pCtx, &pDst->msmt_interval, pBuf, 0); |
| 2698 | (void)pCtx; |
| 2699 | return status; |
| 2700 | } /* End dot11f_unpack_ie_ese_traf_strm_met. */ |
| 2701 | |
| 2702 | #define SigIeESETrafStrmMet (0x002a) |
| 2703 | |
| 2704 | |
| 2705 | uint32_t dot11f_unpack_ie_ese_traf_strm_rate_set(tpAniSirGlobal pCtx, |
| 2706 | uint8_t *pBuf, |
| 2707 | uint8_t ielen, |
| 2708 | tDot11fIEESETrafStrmRateSet *pDst) |
| 2709 | { |
| 2710 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2711 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2712 | if (pDst->present) |
| 2713 | status = DOT11F_DUPLICATE_IE; |
| 2714 | pDst->present = 1; |
| 2715 | pDst->tsid = *pBuf; |
| 2716 | pBuf += 1; |
| 2717 | ielen -= (uint8_t)1; |
| 2718 | pDst->num_tsrates = (uint8_t)(ielen); |
| 2719 | if (ielen > 8) { |
| 2720 | pDst->present = 0; |
| 2721 | return DOT11F_SKIPPED_BAD_IE; |
| 2722 | } |
| 2723 | |
| 2724 | DOT11F_MEMCPY(pCtx, pDst->tsrates, pBuf, (ielen)); |
| 2725 | (void)pCtx; |
| 2726 | return status; |
| 2727 | } /* End dot11f_unpack_ie_ese_traf_strm_rate_set. */ |
| 2728 | |
| 2729 | #define SigIeESETrafStrmRateSet (0x002b) |
| 2730 | |
| 2731 | |
| 2732 | uint32_t dot11f_unpack_ie_ese_txmit_power(tpAniSirGlobal pCtx, |
| 2733 | uint8_t *pBuf, |
| 2734 | uint8_t ielen, |
| 2735 | tDot11fIEESETxmitPower *pDst) |
| 2736 | { |
| 2737 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2738 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2739 | if (pDst->present) |
| 2740 | status = DOT11F_DUPLICATE_IE; |
| 2741 | pDst->present = 1; |
| 2742 | pDst->power_limit = *pBuf; |
| 2743 | pBuf += 1; |
| 2744 | ielen -= (uint8_t)1; |
| 2745 | pDst->reserved = *pBuf; |
| 2746 | (void)pCtx; |
| 2747 | return status; |
| 2748 | } /* End dot11f_unpack_ie_ese_txmit_power. */ |
| 2749 | |
| 2750 | #define SigIeESETxmitPower (0x002c) |
| 2751 | |
| 2752 | |
| 2753 | uint32_t dot11f_unpack_ie_ese_version(tpAniSirGlobal pCtx, |
| 2754 | uint8_t *pBuf, |
| 2755 | uint8_t ielen, |
| 2756 | tDot11fIEESEVersion *pDst) |
| 2757 | { |
| 2758 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2759 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2760 | if (pDst->present) |
| 2761 | status = DOT11F_DUPLICATE_IE; |
| 2762 | pDst->present = 1; |
| 2763 | pDst->version = *pBuf; |
| 2764 | (void)pCtx; |
| 2765 | return status; |
| 2766 | } /* End dot11f_unpack_ie_ese_version. */ |
| 2767 | |
| 2768 | #define SigIeESEVersion (0x002d) |
| 2769 | |
| 2770 | |
| 2771 | uint32_t dot11f_unpack_ie_ext_cap(tpAniSirGlobal pCtx, |
| 2772 | uint8_t *pBuf, |
| 2773 | uint8_t ielen, |
| 2774 | tDot11fIEExtCap *pDst) |
| 2775 | { |
| 2776 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2777 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2778 | if (pDst->present) |
| 2779 | status = DOT11F_DUPLICATE_IE; |
| 2780 | pDst->present = 1; |
| 2781 | |
| 2782 | if (!ielen) /* Check to ensure copying of ielen bytes */ |
| 2783 | goto endUnpackIeExtCap; |
| 2784 | pDst->num_bytes = (uint8_t)(ielen); |
| 2785 | if (ielen > 9) { |
| 2786 | pDst->present = 0; |
| 2787 | return DOT11F_SKIPPED_BAD_IE; |
| 2788 | } |
| 2789 | |
| 2790 | DOT11F_MEMCPY(pCtx, pDst->bytes, pBuf, (ielen)); |
| 2791 | |
| 2792 | endUnpackIeExtCap: |
| 2793 | (void)pCtx; |
| 2794 | return status; |
| 2795 | } /* End dot11f_unpack_ie_ext_cap. */ |
| 2796 | |
| 2797 | #define SigIeExtCap (0x002e) |
| 2798 | |
| 2799 | |
| 2800 | uint32_t dot11f_unpack_ie_ext_supp_rates(tpAniSirGlobal pCtx, |
| 2801 | uint8_t *pBuf, |
| 2802 | uint8_t ielen, |
| 2803 | tDot11fIEExtSuppRates *pDst) |
| 2804 | { |
| 2805 | uint8_t i; |
| 2806 | uint8_t rate_indx = 0; |
| 2807 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2808 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2809 | if (pDst->present) |
| 2810 | status = DOT11F_DUPLICATE_IE; |
| 2811 | pDst->present = 1; |
| 2812 | for (i = 0; i < ielen; i++) { |
| 2813 | if ((DOT11F_IS_BG_RATE(pBuf[i] & 0x7F)) && |
| 2814 | (rate_indx < 12)) { |
| 2815 | pDst->rates[rate_indx++] = pBuf[i]; |
| 2816 | } |
| 2817 | } |
| 2818 | |
| 2819 | if (rate_indx == 0) { |
| 2820 | pDst->present = 0; |
| 2821 | return DOT11F_SKIPPED_BAD_IE; |
| 2822 | } |
| 2823 | |
| 2824 | pDst->num_rates = rate_indx; |
| 2825 | (void)pCtx; |
| 2826 | return status; |
| 2827 | } /* End dot11f_unpack_ie_ext_supp_rates. */ |
| 2828 | |
| 2829 | #define SigIeExtSuppRates (0x002f) |
| 2830 | |
| 2831 | |
| 2832 | uint32_t dot11f_unpack_ie_fh_param_set(tpAniSirGlobal pCtx, |
| 2833 | uint8_t *pBuf, |
| 2834 | uint8_t ielen, |
| 2835 | tDot11fIEFHParamSet *pDst) |
| 2836 | { |
| 2837 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2838 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2839 | if (pDst->present) |
| 2840 | status = DOT11F_DUPLICATE_IE; |
| 2841 | pDst->present = 1; |
| 2842 | framesntohs(pCtx, &pDst->dwell_time, pBuf, 0); |
| 2843 | pBuf += 2; |
| 2844 | ielen -= (uint8_t)2; |
| 2845 | pDst->hop_set = *pBuf; |
| 2846 | pBuf += 1; |
| 2847 | ielen -= (uint8_t)1; |
| 2848 | pDst->hop_pattern = *pBuf; |
| 2849 | pBuf += 1; |
| 2850 | ielen -= (uint8_t)1; |
| 2851 | pDst->hop_index = *pBuf; |
| 2852 | (void)pCtx; |
| 2853 | return status; |
| 2854 | } /* End dot11f_unpack_ie_fh_param_set. */ |
| 2855 | |
| 2856 | #define SigIeFHParamSet (0x0030) |
| 2857 | |
| 2858 | |
| 2859 | uint32_t dot11f_unpack_ie_fh_params(tpAniSirGlobal pCtx, |
| 2860 | uint8_t *pBuf, |
| 2861 | uint8_t ielen, |
| 2862 | tDot11fIEFHParams *pDst) |
| 2863 | { |
| 2864 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2865 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2866 | if (pDst->present) |
| 2867 | status = DOT11F_DUPLICATE_IE; |
| 2868 | pDst->present = 1; |
| 2869 | pDst->radix = *pBuf; |
| 2870 | pBuf += 1; |
| 2871 | ielen -= (uint8_t)1; |
| 2872 | pDst->nchannels = *pBuf; |
| 2873 | (void)pCtx; |
| 2874 | return status; |
| 2875 | } /* End dot11f_unpack_ie_fh_params. */ |
| 2876 | |
| 2877 | #define SigIeFHParams (0x0031) |
| 2878 | |
| 2879 | |
| 2880 | uint32_t dot11f_unpack_ie_fh_patt_table(tpAniSirGlobal pCtx, |
| 2881 | uint8_t *pBuf, |
| 2882 | uint8_t ielen, |
| 2883 | tDot11fIEFHPattTable *pDst) |
| 2884 | { |
| 2885 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2886 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2887 | if (pDst->present) |
| 2888 | status = DOT11F_DUPLICATE_IE; |
| 2889 | pDst->present = 1; |
| 2890 | pDst->flag = *pBuf; |
| 2891 | pBuf += 1; |
| 2892 | ielen -= (uint8_t)1; |
| 2893 | pDst->nsets = *pBuf; |
| 2894 | pBuf += 1; |
| 2895 | ielen -= (uint8_t)1; |
| 2896 | pDst->modulus = *pBuf; |
| 2897 | pBuf += 1; |
| 2898 | ielen -= (uint8_t)1; |
| 2899 | pDst->offset = *pBuf; |
| 2900 | pBuf += 1; |
| 2901 | ielen -= (uint8_t)1; |
| 2902 | pDst->num_randtable = (uint8_t)(ielen); |
| 2903 | if (ielen > 251) { |
| 2904 | pDst->present = 0; |
| 2905 | return DOT11F_SKIPPED_BAD_IE; |
| 2906 | } |
| 2907 | |
| 2908 | DOT11F_MEMCPY(pCtx, pDst->randtable, pBuf, (ielen)); |
| 2909 | (void)pCtx; |
| 2910 | return status; |
| 2911 | } /* End dot11f_unpack_ie_fh_patt_table. */ |
| 2912 | |
| 2913 | #define SigIeFHPattTable (0x0032) |
| 2914 | |
| 2915 | |
| 2916 | static const tFFDefn FFS_FTInfo[] = { |
| 2917 | { NULL, 0, 0, 0,}, |
| 2918 | }; |
| 2919 | |
| 2920 | static const tIEDefn IES_FTInfo[] = { |
| 2921 | { offsetof(tDot11fIEFTInfo, R1KH_ID), offsetof(tDot11fIER1KH_ID, present), |
| 2922 | 0, "R1KH_ID", 0, 8, 8, SigIeR1KH_ID, {0, 0, 0, 0, 0}, |
| 2923 | 0, DOT11F_EID_R1KH_ID, 0, }, |
| 2924 | { offsetof(tDot11fIEFTInfo, GTK), offsetof(tDot11fIEGTK, present), 0, "GTK", |
| 2925 | 0, 18, 45, SigIeGTK, {0, 0, 0, 0, 0}, 0, DOT11F_EID_GTK, 0, }, |
| 2926 | { offsetof(tDot11fIEFTInfo, R0KH_ID), offsetof(tDot11fIER0KH_ID, present), |
| 2927 | 0, "R0KH_ID", 0, 3, 50, SigIeR0KH_ID, {0, 0, 0, 0, 0}, |
| 2928 | 0, DOT11F_EID_R0KH_ID, 0, }, |
| 2929 | { offsetof(tDot11fIEFTInfo, IGTK), offsetof(tDot11fIEIGTK, present), 0, |
| 2930 | "IGTK", 0, 35, 35, SigIeIGTK, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IGTK, 0, }, |
| 2931 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, |
| 2932 | }; |
| 2933 | |
| 2934 | uint32_t dot11f_unpack_ie_ft_info(tpAniSirGlobal pCtx, |
| 2935 | uint8_t *pBuf, |
| 2936 | uint8_t ielen, |
| 2937 | tDot11fIEFTInfo *pDst) |
| 2938 | { |
| 2939 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2940 | uint16_t tmp33__; |
| 2941 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2942 | if (pDst->present) |
| 2943 | status = DOT11F_DUPLICATE_IE; |
| 2944 | pDst->present = 1; |
| 2945 | framesntohs(pCtx, &tmp33__, pBuf, 0); |
| 2946 | pBuf += 2; |
| 2947 | ielen -= 2; |
| 2948 | pDst->reserved = tmp33__ >> 0 & 0xff; |
| 2949 | pDst->IECount = tmp33__ >> 8 & 0xff; |
| 2950 | DOT11F_MEMCPY(pCtx, pDst->MIC, pBuf, 16); |
| 2951 | pBuf += 16; |
| 2952 | ielen -= (uint8_t)16; |
| 2953 | DOT11F_MEMCPY(pCtx, pDst->Anonce, pBuf, 32); |
| 2954 | pBuf += 32; |
| 2955 | ielen -= (uint8_t)32; |
| 2956 | DOT11F_MEMCPY(pCtx, pDst->Snonce, pBuf, 32); |
| 2957 | pBuf += 32; |
| 2958 | ielen -= (uint8_t)32; |
| 2959 | (void)pCtx; |
| 2960 | status |= unpack_core(pCtx, |
| 2961 | pBuf, |
| 2962 | ielen, |
| 2963 | FFS_FTInfo, |
| 2964 | IES_FTInfo, |
| 2965 | (uint8_t *)pDst, |
| 2966 | sizeof(*pDst)); |
| 2967 | return status; |
| 2968 | } /* End dot11f_unpack_ie_ft_info. */ |
| 2969 | |
| 2970 | #define SigIeFTInfo (0x0033) |
| 2971 | |
| 2972 | |
| 2973 | uint32_t dot11f_unpack_ie_ht_caps(tpAniSirGlobal pCtx, |
| 2974 | uint8_t *pBuf, |
| 2975 | uint8_t ielen, |
| 2976 | tDot11fIEHTCaps *pDst) |
| 2977 | { |
| 2978 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 2979 | uint16_t tmp34__; |
| 2980 | uint8_t tmp35__; |
| 2981 | uint16_t tmp36__; |
| 2982 | uint32_t tmp37__; |
| 2983 | uint8_t tmp38__; |
| 2984 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 2985 | if (pDst->present) |
| 2986 | status = DOT11F_DUPLICATE_IE; |
| 2987 | pDst->present = 1; |
| 2988 | framesntohs(pCtx, &tmp34__, pBuf, 0); |
| 2989 | pBuf += 2; |
| 2990 | ielen -= 2; |
| 2991 | pDst->advCodingCap = tmp34__ >> 0 & 0x1; |
| 2992 | pDst->supportedChannelWidthSet = tmp34__ >> 1 & 0x1; |
| 2993 | pDst->mimoPowerSave = tmp34__ >> 2 & 0x3; |
| 2994 | pDst->greenField = tmp34__ >> 4 & 0x1; |
| 2995 | pDst->shortGI20MHz = tmp34__ >> 5 & 0x1; |
| 2996 | pDst->shortGI40MHz = tmp34__ >> 6 & 0x1; |
| 2997 | pDst->txSTBC = tmp34__ >> 7 & 0x1; |
| 2998 | pDst->rxSTBC = tmp34__ >> 8 & 0x3; |
| 2999 | pDst->delayedBA = tmp34__ >> 10 & 0x1; |
| 3000 | pDst->maximalAMSDUsize = tmp34__ >> 11 & 0x1; |
| 3001 | pDst->dsssCckMode40MHz = tmp34__ >> 12 & 0x1; |
| 3002 | pDst->psmp = tmp34__ >> 13 & 0x1; |
| 3003 | pDst->stbcControlFrame = tmp34__ >> 14 & 0x1; |
| 3004 | pDst->lsigTXOPProtection = tmp34__ >> 15 & 0x1; |
| 3005 | tmp35__ = *pBuf; |
| 3006 | pBuf += 1; |
| 3007 | ielen -= 1; |
| 3008 | pDst->maxRxAMPDUFactor = tmp35__ >> 0 & 0x3; |
| 3009 | pDst->mpduDensity = tmp35__ >> 2 & 0x7; |
| 3010 | pDst->reserved1 = tmp35__ >> 5 & 0x7; |
| 3011 | DOT11F_MEMCPY(pCtx, pDst->supportedMCSSet, pBuf, 16); |
| 3012 | pBuf += 16; |
| 3013 | ielen -= (uint8_t)16; |
| 3014 | framesntohs(pCtx, &tmp36__, pBuf, 0); |
| 3015 | pBuf += 2; |
| 3016 | ielen -= 2; |
| 3017 | pDst->pco = tmp36__ >> 0 & 0x1; |
| 3018 | pDst->transitionTime = tmp36__ >> 1 & 0x3; |
| 3019 | pDst->reserved2 = tmp36__ >> 3 & 0x1f; |
| 3020 | pDst->mcsFeedback = tmp36__ >> 8 & 0x3; |
| 3021 | pDst->reserved3 = tmp36__ >> 10 & 0x3f; |
| 3022 | framesntohl(pCtx, &tmp37__, pBuf, 0); |
| 3023 | pBuf += 4; |
| 3024 | ielen -= 4; |
| 3025 | pDst->txBF = tmp37__ >> 0 & 0x1; |
| 3026 | pDst->rxStaggeredSounding = tmp37__ >> 1 & 0x1; |
| 3027 | pDst->txStaggeredSounding = tmp37__ >> 2 & 0x1; |
| 3028 | pDst->rxZLF = tmp37__ >> 3 & 0x1; |
| 3029 | pDst->txZLF = tmp37__ >> 4 & 0x1; |
| 3030 | pDst->implicitTxBF = tmp37__ >> 5 & 0x1; |
| 3031 | pDst->calibration = tmp37__ >> 6 & 0x3; |
| 3032 | pDst->explicitCSITxBF = tmp37__ >> 8 & 0x1; |
| 3033 | pDst->explicitUncompressedSteeringMatrix = tmp37__ >> 9 & 0x1; |
| 3034 | pDst->explicitBFCSIFeedback = tmp37__ >> 10 & 0x7; |
| 3035 | pDst->explicitUncompressedSteeringMatrixFeedback = tmp37__ >> 13 & 0x7; |
| 3036 | pDst->explicitCompressedSteeringMatrixFeedback = tmp37__ >> 16 & 0x7; |
| 3037 | pDst->csiNumBFAntennae = tmp37__ >> 19 & 0x3; |
| 3038 | pDst->uncompressedSteeringMatrixBFAntennae = tmp37__ >> 21 & 0x3; |
| 3039 | pDst->compressedSteeringMatrixBFAntennae = tmp37__ >> 23 & 0x3; |
| 3040 | pDst->reserved4 = tmp37__ >> 25 & 0x7f; |
| 3041 | tmp38__ = *pBuf; |
| 3042 | pBuf += 1; |
| 3043 | ielen -= 1; |
| 3044 | pDst->antennaSelection = tmp38__ >> 0 & 0x1; |
| 3045 | pDst->explicitCSIFeedbackTx = tmp38__ >> 1 & 0x1; |
| 3046 | pDst->antennaIndicesFeedbackTx = tmp38__ >> 2 & 0x1; |
| 3047 | pDst->explicitCSIFeedback = tmp38__ >> 3 & 0x1; |
| 3048 | pDst->antennaIndicesFeedback = tmp38__ >> 4 & 0x1; |
| 3049 | pDst->rxAS = tmp38__ >> 5 & 0x1; |
| 3050 | pDst->txSoundingPPDUs = tmp38__ >> 6 & 0x1; |
| 3051 | pDst->reserved5 = tmp38__ >> 7 & 0x1; |
| 3052 | pDst->num_rsvd = (uint8_t)(ielen); |
| 3053 | if (ielen > 32) { |
| 3054 | pDst->present = 0; |
| 3055 | return DOT11F_SKIPPED_BAD_IE; |
| 3056 | } |
| 3057 | |
| 3058 | DOT11F_MEMCPY(pCtx, pDst->rsvd, pBuf, (ielen)); |
| 3059 | (void)pCtx; |
| 3060 | return status; |
| 3061 | } /* End dot11f_unpack_ie_ht_caps. */ |
| 3062 | |
| 3063 | #define SigIeHTCaps (0x0034) |
| 3064 | |
| 3065 | |
| 3066 | uint32_t dot11f_unpack_ie_ht_info(tpAniSirGlobal pCtx, |
| 3067 | uint8_t *pBuf, |
| 3068 | uint8_t ielen, |
| 3069 | tDot11fIEHTInfo *pDst) |
| 3070 | { |
| 3071 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3072 | uint8_t tmp39__; |
| 3073 | uint16_t tmp40__; |
| 3074 | uint16_t tmp41__; |
| 3075 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3076 | if (pDst->present) |
| 3077 | status = DOT11F_DUPLICATE_IE; |
| 3078 | pDst->present = 1; |
| 3079 | pDst->primaryChannel = *pBuf; |
| 3080 | pBuf += 1; |
| 3081 | ielen -= (uint8_t)1; |
| 3082 | tmp39__ = *pBuf; |
| 3083 | pBuf += 1; |
| 3084 | ielen -= 1; |
| 3085 | pDst->secondaryChannelOffset = tmp39__ >> 0 & 0x3; |
| 3086 | pDst->recommendedTxWidthSet = tmp39__ >> 2 & 0x1; |
| 3087 | pDst->rifsMode = tmp39__ >> 3 & 0x1; |
| 3088 | pDst->controlledAccessOnly = tmp39__ >> 4 & 0x1; |
| 3089 | pDst->serviceIntervalGranularity = tmp39__ >> 5 & 0x7; |
| 3090 | framesntohs(pCtx, &tmp40__, pBuf, 0); |
| 3091 | pBuf += 2; |
| 3092 | ielen -= 2; |
| 3093 | pDst->opMode = tmp40__ >> 0 & 0x3; |
| 3094 | pDst->nonGFDevicesPresent = tmp40__ >> 2 & 0x1; |
| 3095 | pDst->transmitBurstLimit = tmp40__ >> 3 & 0x1; |
| 3096 | pDst->obssNonHTStaPresent = tmp40__ >> 4 & 0x1; |
| 3097 | pDst->reserved = tmp40__ >> 5 & 0x7ff; |
| 3098 | framesntohs(pCtx, &tmp41__, pBuf, 0); |
| 3099 | pBuf += 2; |
| 3100 | ielen -= 2; |
| 3101 | pDst->basicSTBCMCS = tmp41__ >> 0 & 0x7f; |
| 3102 | pDst->dualCTSProtection = tmp41__ >> 7 & 0x1; |
| 3103 | pDst->secondaryBeacon = tmp41__ >> 8 & 0x1; |
| 3104 | pDst->lsigTXOPProtectionFullSupport = tmp41__ >> 9 & 0x1; |
| 3105 | pDst->pcoActive = tmp41__ >> 10 & 0x1; |
| 3106 | pDst->pcoPhase = tmp41__ >> 11 & 0x1; |
| 3107 | pDst->reserved2 = tmp41__ >> 12 & 0xf; |
| 3108 | DOT11F_MEMCPY(pCtx, pDst->basicMCSSet, pBuf, 16); |
| 3109 | pBuf += 16; |
| 3110 | ielen -= (uint8_t)16; |
| 3111 | pDst->num_rsvd = (uint8_t)(ielen); |
| 3112 | if (ielen > 32) { |
| 3113 | pDst->present = 0; |
| 3114 | return DOT11F_SKIPPED_BAD_IE; |
| 3115 | } |
| 3116 | |
| 3117 | DOT11F_MEMCPY(pCtx, pDst->rsvd, pBuf, (ielen)); |
| 3118 | (void)pCtx; |
| 3119 | return status; |
| 3120 | } /* End dot11f_unpack_ie_ht_info. */ |
| 3121 | |
| 3122 | #define SigIeHTInfo (0x0035) |
| 3123 | |
| 3124 | |
| 3125 | uint32_t dot11f_unpack_ie_ibss_params(tpAniSirGlobal pCtx, |
| 3126 | uint8_t *pBuf, |
| 3127 | uint8_t ielen, |
| 3128 | tDot11fIEIBSSParams *pDst) |
| 3129 | { |
| 3130 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3131 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3132 | if (pDst->present) |
| 3133 | status = DOT11F_DUPLICATE_IE; |
| 3134 | pDst->present = 1; |
| 3135 | framesntohs(pCtx, &pDst->atim, pBuf, 0); |
| 3136 | (void)pCtx; |
| 3137 | return status; |
| 3138 | } /* End dot11f_unpack_ie_ibss_params. */ |
| 3139 | |
| 3140 | #define SigIeIBSSParams (0x0036) |
| 3141 | |
| 3142 | |
| 3143 | uint32_t dot11f_unpack_ie_link_identifier(tpAniSirGlobal pCtx, |
| 3144 | uint8_t *pBuf, |
| 3145 | uint8_t ielen, |
| 3146 | tDot11fIELinkIdentifier *pDst) |
| 3147 | { |
| 3148 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3149 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3150 | if (pDst->present) |
| 3151 | status = DOT11F_DUPLICATE_IE; |
| 3152 | pDst->present = 1; |
| 3153 | DOT11F_MEMCPY(pCtx, pDst->bssid, pBuf, 6); |
| 3154 | pBuf += 6; |
| 3155 | ielen -= (uint8_t)6; |
| 3156 | DOT11F_MEMCPY(pCtx, pDst->InitStaAddr, pBuf, 6); |
| 3157 | pBuf += 6; |
| 3158 | ielen -= (uint8_t)6; |
| 3159 | DOT11F_MEMCPY(pCtx, pDst->RespStaAddr, pBuf, 6); |
| 3160 | (void)pCtx; |
| 3161 | return status; |
| 3162 | } /* End dot11f_unpack_ie_link_identifier. */ |
| 3163 | |
| 3164 | #define SigIeLinkIdentifier (0x0037) |
| 3165 | |
| 3166 | |
| 3167 | static const tFFDefn FFS_reportBeacon[] = { |
| 3168 | { NULL, 0, 0, 0,}, |
| 3169 | }; |
| 3170 | |
| 3171 | static const tIEDefn IES_reportBeacon[] = { |
| 3172 | { offsetof(tDot11fIEMeasurementReport, |
| 3173 | report.Beacon.BeaconReportFrmBody), |
| 3174 | offsetof(tDot11fIEBeaconReportFrmBody, present), 0, "BeaconReportFrmBody", |
| 3175 | 0, 2, 226, SigIeBeaconReportFrmBody, {0, 0, 0, 0, 0}, |
| 3176 | 0, DOT11F_EID_BEACONREPORTFRMBODY, 0, }, |
| 3177 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, |
| 3178 | }; |
| 3179 | |
| 3180 | uint32_t dot11f_unpack_ie_measurement_report(tpAniSirGlobal pCtx, |
| 3181 | uint8_t *pBuf, |
| 3182 | uint8_t ielen, |
| 3183 | tDot11fIEMeasurementReport *pDst) |
| 3184 | { |
| 3185 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3186 | uint8_t tmp42__; |
| 3187 | uint8_t tmp43__; |
| 3188 | uint8_t tmp44__; |
| 3189 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3190 | if (pDst->present) |
| 3191 | status = DOT11F_DUPLICATE_IE; |
| 3192 | pDst->present = 1; |
| 3193 | pDst->token = *pBuf; |
| 3194 | pBuf += 1; |
| 3195 | ielen -= (uint8_t)1; |
| 3196 | tmp42__ = *pBuf; |
| 3197 | pBuf += 1; |
| 3198 | ielen -= 1; |
| 3199 | pDst->late = tmp42__ >> 0 & 0x1; |
| 3200 | pDst->incapable = tmp42__ >> 1 & 0x1; |
| 3201 | pDst->refused = tmp42__ >> 2 & 0x1; |
| 3202 | pDst->unused = tmp42__ >> 3 & 0x1f; |
| 3203 | pDst->type = *pBuf; |
| 3204 | pBuf += 1; |
| 3205 | ielen -= (uint8_t)1; |
| 3206 | if (!ielen) { |
| 3207 | return 0U; |
| 3208 | } else { |
| 3209 | switch (pDst->type) { |
| 3210 | case 0: |
| 3211 | pDst->report.Basic.channel = *pBuf; |
| 3212 | pBuf += 1; |
| 3213 | ielen -= (uint8_t)1; |
| 3214 | framesntohq(pCtx, &pDst->report.Basic.meas_start_time, pBuf, 0); |
| 3215 | pBuf += 8; |
| 3216 | ielen -= (uint8_t)8; |
| 3217 | framesntohs(pCtx, &pDst->report.Basic.meas_duration, pBuf, 0); |
| 3218 | pBuf += 2; |
| 3219 | ielen -= (uint8_t)2; |
| 3220 | tmp43__ = *pBuf; |
| 3221 | pBuf += 1; |
| 3222 | ielen -= 1; |
| 3223 | pDst->report.Basic.bss = tmp43__ >> 0 & 0x1; |
| 3224 | pDst->report.Basic.ofdm_preamble = tmp43__ >> 1 & 0x1; |
| 3225 | pDst->report.Basic.unid_signal = tmp43__ >> 2 & 0x1; |
| 3226 | pDst->report.Basic.rader = tmp43__ >> 3 & 0x1; |
| 3227 | pDst->report.Basic.unmeasured = tmp43__ >> 4 & 0x1; |
| 3228 | pDst->report.Basic.unused = tmp43__ >> 5 & 0x7; |
| 3229 | break; |
| 3230 | case 1: |
| 3231 | pDst->report.CCA.channel = *pBuf; |
| 3232 | pBuf += 1; |
| 3233 | ielen -= (uint8_t)1; |
| 3234 | framesntohq(pCtx, &pDst->report.CCA.meas_start_time, pBuf, 0); |
| 3235 | pBuf += 8; |
| 3236 | ielen -= (uint8_t)8; |
| 3237 | framesntohs(pCtx, &pDst->report.CCA.meas_duration, pBuf, 0); |
| 3238 | pBuf += 2; |
| 3239 | ielen -= (uint8_t)2; |
| 3240 | pDst->report.CCA.cca_busy_fraction = *pBuf; |
| 3241 | pBuf += 1; |
| 3242 | ielen -= (uint8_t)1; |
| 3243 | break; |
| 3244 | case 2: |
| 3245 | pDst->report.RPIHistogram.channel = *pBuf; |
| 3246 | pBuf += 1; |
| 3247 | ielen -= (uint8_t)1; |
| 3248 | framesntohq(pCtx, &pDst->report.RPIHistogram.meas_start_time, pBuf, 0); |
| 3249 | pBuf += 8; |
| 3250 | ielen -= (uint8_t)8; |
| 3251 | framesntohs(pCtx, &pDst->report.RPIHistogram.meas_duration, pBuf, 0); |
| 3252 | pBuf += 2; |
| 3253 | ielen -= (uint8_t)2; |
| 3254 | pDst->report.RPIHistogram.rpi0_density = *pBuf; |
| 3255 | pBuf += 1; |
| 3256 | ielen -= (uint8_t)1; |
| 3257 | pDst->report.RPIHistogram.rpi1_density = *pBuf; |
| 3258 | pBuf += 1; |
| 3259 | ielen -= (uint8_t)1; |
| 3260 | pDst->report.RPIHistogram.rpi2_density = *pBuf; |
| 3261 | pBuf += 1; |
| 3262 | ielen -= (uint8_t)1; |
| 3263 | pDst->report.RPIHistogram.rpi3_density = *pBuf; |
| 3264 | pBuf += 1; |
| 3265 | ielen -= (uint8_t)1; |
| 3266 | pDst->report.RPIHistogram.rpi4_density = *pBuf; |
| 3267 | pBuf += 1; |
| 3268 | ielen -= (uint8_t)1; |
| 3269 | pDst->report.RPIHistogram.rpi5_density = *pBuf; |
| 3270 | pBuf += 1; |
| 3271 | ielen -= (uint8_t)1; |
| 3272 | pDst->report.RPIHistogram.rpi6_density = *pBuf; |
| 3273 | pBuf += 1; |
| 3274 | ielen -= (uint8_t)1; |
| 3275 | pDst->report.RPIHistogram.rpi7_density = *pBuf; |
| 3276 | pBuf += 1; |
| 3277 | ielen -= (uint8_t)1; |
| 3278 | break; |
| 3279 | case 5: |
| 3280 | pDst->report.Beacon.regClass = *pBuf; |
| 3281 | pBuf += 1; |
| 3282 | ielen -= (uint8_t)1; |
| 3283 | pDst->report.Beacon.channel = *pBuf; |
| 3284 | pBuf += 1; |
| 3285 | ielen -= (uint8_t)1; |
| 3286 | framesntohq(pCtx, &pDst->report.Beacon.meas_start_time, pBuf, 0); |
| 3287 | pBuf += 8; |
| 3288 | ielen -= (uint8_t)8; |
| 3289 | framesntohs(pCtx, &pDst->report.Beacon.meas_duration, pBuf, 0); |
| 3290 | pBuf += 2; |
| 3291 | ielen -= (uint8_t)2; |
| 3292 | tmp44__ = *pBuf; |
| 3293 | pBuf += 1; |
| 3294 | ielen -= 1; |
| 3295 | pDst->report.Beacon.condensed_PHY = tmp44__ >> 0 & 0x7f; |
| 3296 | pDst->report.Beacon.reported_frame_type = tmp44__ >> 7 & 0x1; |
| 3297 | pDst->report.Beacon.RCPI = *pBuf; |
| 3298 | pBuf += 1; |
| 3299 | ielen -= (uint8_t)1; |
| 3300 | pDst->report.Beacon.RSNI = *pBuf; |
| 3301 | pBuf += 1; |
| 3302 | ielen -= (uint8_t)1; |
| 3303 | DOT11F_MEMCPY(pCtx, pDst->report.Beacon.BSSID, pBuf, 6); |
| 3304 | pBuf += 6; |
| 3305 | ielen -= (uint8_t)6; |
| 3306 | pDst->report.Beacon.antenna_id = *pBuf; |
| 3307 | pBuf += 1; |
| 3308 | ielen -= (uint8_t)1; |
| 3309 | framesntohl(pCtx, &pDst->report.Beacon.parent_TSF, pBuf, 0); |
| 3310 | pBuf += 4; |
| 3311 | ielen -= (uint8_t)4; |
| 3312 | status |= unpack_core(pCtx, |
| 3313 | pBuf, |
| 3314 | ielen, |
| 3315 | FFS_reportBeacon, |
| 3316 | IES_reportBeacon, |
| 3317 | (uint8_t *)pDst, |
| 3318 | sizeof(*pDst)); |
| 3319 | break; |
| 3320 | } |
| 3321 | } |
| 3322 | (void)pCtx; |
| 3323 | return status; |
| 3324 | } /* End dot11f_unpack_ie_measurement_report. */ |
| 3325 | |
| 3326 | #define SigIeMeasurementReport (0x0038) |
| 3327 | |
| 3328 | |
| 3329 | static const tFFDefn FFS_measurement_requestBeacon[] = { |
| 3330 | { NULL, 0, 0, 0,}, |
| 3331 | }; |
| 3332 | |
| 3333 | static const tIEDefn IES_measurement_requestBeacon[] = { |
| 3334 | { offsetof(tDot11fIEMeasurementRequest, |
| 3335 | measurement_request.Beacon.SSID), offsetof(tDot11fIESSID, present), 0, |
| 3336 | "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, }, |
| 3337 | { offsetof(tDot11fIEMeasurementRequest, |
| 3338 | measurement_request.Beacon.BeaconReporting), |
| 3339 | offsetof(tDot11fIEBeaconReporting, present), 0, "BeaconReporting", |
| 3340 | 0, 4, 4, SigIeBeaconReporting, {0, 0, 0, 0, 0}, |
| 3341 | 0, DOT11F_EID_BEACONREPORTING, 0, }, |
| 3342 | { offsetof(tDot11fIEMeasurementRequest, |
| 3343 | measurement_request.Beacon.BcnReportingDetail), |
| 3344 | offsetof(tDot11fIEBcnReportingDetail, present), 0, "BcnReportingDetail", |
| 3345 | 0, 3, 3, SigIeBcnReportingDetail, {0, 0, 0, 0, 0}, |
| 3346 | 0, DOT11F_EID_BCNREPORTINGDETAIL, 0, }, |
| 3347 | { offsetof(tDot11fIEMeasurementRequest, |
| 3348 | measurement_request.Beacon.RequestedInfo), |
| 3349 | offsetof(tDot11fIERequestedInfo, present), 0, "RequestedInfo", |
| 3350 | 0, 2, 257, SigIeRequestedInfo, {0, 0, 0, 0, 0}, |
| 3351 | 0, DOT11F_EID_REQUESTEDINFO, 0, }, |
| 3352 | { offsetof(tDot11fIEMeasurementRequest, |
| 3353 | measurement_request.Beacon.APChannelReport), |
| 3354 | offsetof(tDot11fIEAPChannelReport, present), |
| 3355 | offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.num_APChannelReport), "APChannelReport", 2, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, }, |
| 3356 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, |
| 3357 | }; |
| 3358 | |
| 3359 | uint32_t dot11f_unpack_ie_measurement_request(tpAniSirGlobal pCtx, |
| 3360 | uint8_t *pBuf, |
| 3361 | uint8_t ielen, |
| 3362 | tDot11fIEMeasurementRequest *pDst) |
| 3363 | { |
| 3364 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3365 | uint8_t tmp45__; |
| 3366 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3367 | if (pDst->present) |
| 3368 | status = DOT11F_DUPLICATE_IE; |
| 3369 | pDst->present = 1; |
| 3370 | pDst->measurement_token = *pBuf; |
| 3371 | pBuf += 1; |
| 3372 | ielen -= (uint8_t)1; |
| 3373 | tmp45__ = *pBuf; |
| 3374 | pBuf += 1; |
| 3375 | ielen -= 1; |
| 3376 | pDst->parallel = tmp45__ >> 0 & 0x1; |
| 3377 | pDst->enable = tmp45__ >> 1 & 0x1; |
| 3378 | pDst->request = tmp45__ >> 2 & 0x1; |
| 3379 | pDst->report = tmp45__ >> 3 & 0x1; |
| 3380 | pDst->durationMandatory = tmp45__ >> 4 & 0x1; |
| 3381 | pDst->unused = tmp45__ >> 5 & 0x7; |
| 3382 | pDst->measurement_type = *pBuf; |
| 3383 | pBuf += 1; |
| 3384 | ielen -= (uint8_t)1; |
| 3385 | switch (pDst->measurement_type) { |
| 3386 | case 0: |
| 3387 | pDst->measurement_request.Basic.channel_no = *pBuf; |
| 3388 | pBuf += 1; |
| 3389 | ielen -= (uint8_t)1; |
| 3390 | DOT11F_MEMCPY(pCtx, pDst->measurement_request.Basic.meas_start_time, pBuf, 8); |
| 3391 | pBuf += 8; |
| 3392 | ielen -= (uint8_t)8; |
| 3393 | framesntohs(pCtx, &pDst->measurement_request.Basic.meas_duration, pBuf, 0); |
| 3394 | pBuf += 2; |
| 3395 | ielen -= (uint8_t)2; |
| 3396 | break; |
| 3397 | case 1: |
| 3398 | pDst->measurement_request.CCA.channel_no = *pBuf; |
| 3399 | pBuf += 1; |
| 3400 | ielen -= (uint8_t)1; |
| 3401 | DOT11F_MEMCPY(pCtx, pDst->measurement_request.CCA.meas_start_time, pBuf, 8); |
| 3402 | pBuf += 8; |
| 3403 | ielen -= (uint8_t)8; |
| 3404 | framesntohs(pCtx, &pDst->measurement_request.CCA.meas_duration, pBuf, 0); |
| 3405 | pBuf += 2; |
| 3406 | ielen -= (uint8_t)2; |
| 3407 | break; |
| 3408 | case 2: |
| 3409 | pDst->measurement_request.RPIHistogram.channel_no = *pBuf; |
| 3410 | pBuf += 1; |
| 3411 | ielen -= (uint8_t)1; |
| 3412 | DOT11F_MEMCPY(pCtx, pDst->measurement_request.RPIHistogram.meas_start_time, pBuf, 8); |
| 3413 | pBuf += 8; |
| 3414 | ielen -= (uint8_t)8; |
| 3415 | framesntohs(pCtx, &pDst->measurement_request.RPIHistogram.meas_duration, pBuf, 0); |
| 3416 | pBuf += 2; |
| 3417 | ielen -= (uint8_t)2; |
| 3418 | break; |
| 3419 | case 5: |
| 3420 | pDst->measurement_request.Beacon.regClass = *pBuf; |
| 3421 | pBuf += 1; |
| 3422 | ielen -= (uint8_t)1; |
| 3423 | pDst->measurement_request.Beacon.channel = *pBuf; |
| 3424 | pBuf += 1; |
| 3425 | ielen -= (uint8_t)1; |
| 3426 | framesntohs(pCtx, &pDst->measurement_request.Beacon.randomization, pBuf, 0); |
| 3427 | pBuf += 2; |
| 3428 | ielen -= (uint8_t)2; |
| 3429 | framesntohs(pCtx, &pDst->measurement_request.Beacon.meas_duration, pBuf, 0); |
| 3430 | pBuf += 2; |
| 3431 | ielen -= (uint8_t)2; |
| 3432 | pDst->measurement_request.Beacon.meas_mode = *pBuf; |
| 3433 | pBuf += 1; |
| 3434 | ielen -= (uint8_t)1; |
| 3435 | DOT11F_MEMCPY(pCtx, pDst->measurement_request.Beacon.BSSID, pBuf, 6); |
| 3436 | pBuf += 6; |
| 3437 | ielen -= (uint8_t)6; |
| 3438 | status |= unpack_core(pCtx, |
| 3439 | pBuf, |
| 3440 | ielen, |
| 3441 | FFS_measurement_requestBeacon, |
| 3442 | IES_measurement_requestBeacon, |
| 3443 | (uint8_t *)pDst, |
| 3444 | sizeof(*pDst)); |
| 3445 | break; |
| 3446 | } |
| 3447 | (void)pCtx; |
| 3448 | return status; |
| 3449 | } /* End dot11f_unpack_ie_measurement_request. */ |
| 3450 | |
| 3451 | #define SigIeMeasurementRequest (0x0039) |
| 3452 | |
| 3453 | |
| 3454 | uint32_t dot11f_unpack_ie_mobility_domain(tpAniSirGlobal pCtx, |
| 3455 | uint8_t *pBuf, |
| 3456 | uint8_t ielen, |
| 3457 | tDot11fIEMobilityDomain *pDst) |
| 3458 | { |
| 3459 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3460 | uint8_t tmp46__; |
| 3461 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3462 | if (pDst->present) |
| 3463 | status = DOT11F_DUPLICATE_IE; |
| 3464 | pDst->present = 1; |
| 3465 | framesntohs(pCtx, &pDst->MDID, pBuf, 0); |
| 3466 | pBuf += 2; |
| 3467 | ielen -= (uint8_t)2; |
| 3468 | tmp46__ = *pBuf; |
| 3469 | pDst->overDSCap = tmp46__ >> 0 & 0x1; |
| 3470 | pDst->resourceReqCap = tmp46__ >> 1 & 0x1; |
| 3471 | pDst->reserved = tmp46__ >> 2 & 0x3f; |
| 3472 | (void)pCtx; |
| 3473 | return status; |
| 3474 | } /* End dot11f_unpack_ie_mobility_domain. */ |
| 3475 | |
| 3476 | #define SigIeMobilityDomain (0x003a) |
| 3477 | |
| 3478 | |
| 3479 | static const tFFDefn FFS_NeighborReport[] = { |
| 3480 | { NULL, 0, 0, 0,}, |
| 3481 | }; |
| 3482 | |
| 3483 | static const tIEDefn IES_NeighborReport[] = { |
| 3484 | { offsetof(tDot11fIENeighborReport, TSFInfo), offsetof(tDot11fIETSFInfo, |
| 3485 | present), 0, "TSFInfo", 0, 6, 6, SigIeTSFInfo, {0, 0, 0, 0, 0}, |
| 3486 | 0, DOT11F_EID_TSFINFO, 0, }, |
| 3487 | { offsetof(tDot11fIENeighborReport, CondensedCountryStr), |
| 3488 | offsetof(tDot11fIECondensedCountryStr, present), 0, "CondensedCountryStr", |
| 3489 | 0, 4, 4, SigIeCondensedCountryStr, {0, 0, 0, 0, 0}, |
| 3490 | 0, DOT11F_EID_CONDENSEDCOUNTRYSTR, 0, }, |
| 3491 | { offsetof(tDot11fIENeighborReport, MeasurementPilot), |
| 3492 | offsetof(tDot11fIEMeasurementPilot, present), 0, "MeasurementPilot", |
| 3493 | 0, 3, 258, SigIeMeasurementPilot, {0, 0, 0, 0, 0}, |
| 3494 | 0, DOT11F_EID_MEASUREMENTPILOT, 0, }, |
| 3495 | { offsetof(tDot11fIENeighborReport, RRMEnabledCap), |
| 3496 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 3497 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 3498 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 3499 | { offsetof(tDot11fIENeighborReport, MultiBssid), |
| 3500 | offsetof(tDot11fIEMultiBssid, present), 0, "MultiBssid", |
| 3501 | 0, 3, 258, SigIeMultiBssid, {0, 0, 0, 0, 0}, |
| 3502 | 0, DOT11F_EID_MULTIBSSID, 0, }, |
| 3503 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, |
| 3504 | }; |
| 3505 | |
| 3506 | uint32_t dot11f_unpack_ie_neighbor_report(tpAniSirGlobal pCtx, |
| 3507 | uint8_t *pBuf, |
| 3508 | uint8_t ielen, |
| 3509 | tDot11fIENeighborReport *pDst) |
| 3510 | { |
| 3511 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3512 | uint8_t tmp47__; |
| 3513 | uint8_t tmp48__; |
| 3514 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3515 | if (pDst->present) |
| 3516 | status = DOT11F_DUPLICATE_IE; |
| 3517 | pDst->present = 1; |
| 3518 | DOT11F_MEMCPY(pCtx, pDst->bssid, pBuf, 6); |
| 3519 | pBuf += 6; |
| 3520 | ielen -= (uint8_t)6; |
| 3521 | tmp47__ = *pBuf; |
| 3522 | pBuf += 1; |
| 3523 | ielen -= 1; |
| 3524 | pDst->APReachability = tmp47__ >> 0 & 0x3; |
| 3525 | pDst->Security = tmp47__ >> 2 & 0x1; |
| 3526 | pDst->KeyScope = tmp47__ >> 3 & 0x1; |
| 3527 | pDst->SpecMgmtCap = tmp47__ >> 4 & 0x1; |
| 3528 | pDst->QosCap = tmp47__ >> 5 & 0x1; |
| 3529 | pDst->apsd = tmp47__ >> 6 & 0x1; |
| 3530 | pDst->rrm = tmp47__ >> 7 & 0x1; |
| 3531 | tmp48__ = *pBuf; |
| 3532 | pBuf += 1; |
| 3533 | ielen -= 1; |
| 3534 | pDst->DelayedBA = tmp48__ >> 0 & 0x1; |
| 3535 | pDst->ImmBA = tmp48__ >> 1 & 0x1; |
| 3536 | pDst->MobilityDomain = tmp48__ >> 2 & 0x1; |
| 3537 | pDst->reserved = tmp48__ >> 3 & 0x1f; |
| 3538 | framesntohs(pCtx, &pDst->reserved1, pBuf, 0); |
| 3539 | pBuf += 2; |
| 3540 | ielen -= (uint8_t)2; |
| 3541 | pDst->regulatoryClass = *pBuf; |
| 3542 | pBuf += 1; |
| 3543 | ielen -= (uint8_t)1; |
| 3544 | pDst->channel = *pBuf; |
| 3545 | pBuf += 1; |
| 3546 | ielen -= (uint8_t)1; |
| 3547 | pDst->PhyType = *pBuf; |
| 3548 | pBuf += 1; |
| 3549 | ielen -= (uint8_t)1; |
| 3550 | (void)pCtx; |
| 3551 | status |= unpack_core(pCtx, |
| 3552 | pBuf, |
| 3553 | ielen, |
| 3554 | FFS_NeighborReport, |
| 3555 | IES_NeighborReport, |
| 3556 | (uint8_t *)pDst, |
| 3557 | sizeof(*pDst)); |
| 3558 | return status; |
| 3559 | } /* End dot11f_unpack_ie_neighbor_report. */ |
| 3560 | |
| 3561 | #define SigIeNeighborReport (0x003b) |
| 3562 | |
| 3563 | |
| 3564 | uint32_t dot11f_unpack_ie_obss_scan_parameters(tpAniSirGlobal pCtx, |
| 3565 | uint8_t *pBuf, |
| 3566 | uint8_t ielen, |
| 3567 | tDot11fIEOBSSScanParameters *pDst) |
| 3568 | { |
| 3569 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3570 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3571 | if (pDst->present) |
| 3572 | status = DOT11F_DUPLICATE_IE; |
| 3573 | pDst->present = 1; |
| 3574 | framesntohs(pCtx, &pDst->obssScanPassiveDwell, pBuf, 0); |
| 3575 | pBuf += 2; |
| 3576 | ielen -= (uint8_t)2; |
| 3577 | framesntohs(pCtx, &pDst->obssScanActiveDwell, pBuf, 0); |
| 3578 | pBuf += 2; |
| 3579 | ielen -= (uint8_t)2; |
| 3580 | framesntohs(pCtx, &pDst->bssChannelWidthTriggerScanInterval, pBuf, 0); |
| 3581 | pBuf += 2; |
| 3582 | ielen -= (uint8_t)2; |
| 3583 | framesntohs(pCtx, &pDst->obssScanPassiveTotalPerChannel, pBuf, 0); |
| 3584 | pBuf += 2; |
| 3585 | ielen -= (uint8_t)2; |
| 3586 | framesntohs(pCtx, &pDst->obssScanActiveTotalPerChannel, pBuf, 0); |
| 3587 | pBuf += 2; |
| 3588 | ielen -= (uint8_t)2; |
| 3589 | framesntohs(pCtx, &pDst->bssWidthChannelTransitionDelayFactor, pBuf, 0); |
| 3590 | pBuf += 2; |
| 3591 | ielen -= (uint8_t)2; |
| 3592 | framesntohs(pCtx, &pDst->obssScanActivityThreshold, pBuf, 0); |
| 3593 | (void)pCtx; |
| 3594 | return status; |
| 3595 | } /* End dot11f_unpack_ie_obss_scan_parameters. */ |
| 3596 | |
| 3597 | #define SigIeOBSSScanParameters (0x003c) |
| 3598 | |
| 3599 | |
| 3600 | uint32_t dot11f_unpack_ie_operating_mode(tpAniSirGlobal pCtx, |
| 3601 | uint8_t *pBuf, |
| 3602 | uint8_t ielen, |
| 3603 | tDot11fIEOperatingMode *pDst) |
| 3604 | { |
| 3605 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3606 | uint8_t tmp49__; |
| 3607 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3608 | if (pDst->present) |
| 3609 | status = DOT11F_DUPLICATE_IE; |
| 3610 | pDst->present = 1; |
| 3611 | tmp49__ = *pBuf; |
| 3612 | pDst->chanWidth = tmp49__ >> 0 & 0x3; |
| 3613 | pDst->reserved = tmp49__ >> 2 & 0x3; |
| 3614 | pDst->rxNSS = tmp49__ >> 4 & 0x7; |
| 3615 | pDst->rxNSSType = tmp49__ >> 7 & 0x1; |
| 3616 | (void)pCtx; |
| 3617 | return status; |
| 3618 | } /* End dot11f_unpack_ie_operating_mode. */ |
| 3619 | |
| 3620 | #define SigIeOperatingMode (0x003d) |
| 3621 | |
| 3622 | |
| 3623 | static const tTLVDefn TLVS_P2PAssocReq[] = { |
| 3624 | { offsetof(tDot11fIEP2PAssocReq, P2PCapability), |
| 3625 | offsetof(tDot11fTLVP2PCapability, present), "P2PCapability", |
| 3626 | SigTlvP2PCapability, DOT11F_TLV_P2PCAPABILITY, 0, 5, 5, 1, 1, 2, 0, }, |
| 3627 | { offsetof(tDot11fIEP2PAssocReq, ExtendedListenTiming), |
| 3628 | offsetof(tDot11fTLVExtendedListenTiming, present), |
| 3629 | "ExtendedListenTiming", SigTlvExtendedListenTiming, |
| 3630 | DOT11F_TLV_EXTENDEDLISTENTIMING, 0, 7, 7, 0, 1, 2, 0, }, |
| 3631 | { offsetof(tDot11fIEP2PAssocReq, P2PDeviceInfo), |
| 3632 | offsetof(tDot11fTLVP2PDeviceInfo, present), "P2PDeviceInfo", |
| 3633 | SigTlvP2PDeviceInfo, DOT11F_TLV_P2PDEVICEINFO, 0, 19, 55, 1, 1, 2, 0, }, |
| 3634 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3635 | }; |
| 3636 | |
| 3637 | uint32_t dot11f_unpack_ie_p2_p_assoc_req(tpAniSirGlobal pCtx, |
| 3638 | uint8_t *pBuf, |
| 3639 | uint8_t ielen, |
| 3640 | tDot11fIEP2PAssocReq *pDst) |
| 3641 | { |
| 3642 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3643 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3644 | pDst->present = 1; |
| 3645 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3646 | TLVS_P2PAssocReq, |
| 3647 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3648 | return status; |
| 3649 | } /* End dot11f_unpack_ie_p2_p_assoc_req. */ |
| 3650 | |
| 3651 | #define SigIeP2PAssocReq (0x003e) |
| 3652 | |
| 3653 | |
| 3654 | static const tTLVDefn TLVS_P2PAssocRes[] = { |
| 3655 | { offsetof(tDot11fIEP2PAssocRes, P2PStatus), |
| 3656 | offsetof(tDot11fTLVP2PStatus, present), "P2PStatus", SigTlvP2PStatus, |
| 3657 | DOT11F_TLV_P2PSTATUS, 0, 4, 4, 1, 1, 2, 0, }, |
| 3658 | { offsetof(tDot11fIEP2PAssocRes, ExtendedListenTiming), |
| 3659 | offsetof(tDot11fTLVExtendedListenTiming, present), |
| 3660 | "ExtendedListenTiming", SigTlvExtendedListenTiming, |
| 3661 | DOT11F_TLV_EXTENDEDLISTENTIMING, 0, 7, 7, 0, 1, 2, 0, }, |
| 3662 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3663 | }; |
| 3664 | |
| 3665 | uint32_t dot11f_unpack_ie_p2_p_assoc_res(tpAniSirGlobal pCtx, |
| 3666 | uint8_t *pBuf, |
| 3667 | uint8_t ielen, |
| 3668 | tDot11fIEP2PAssocRes *pDst) |
| 3669 | { |
| 3670 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3671 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3672 | pDst->present = 1; |
| 3673 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3674 | TLVS_P2PAssocRes, |
| 3675 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3676 | return status; |
| 3677 | } /* End dot11f_unpack_ie_p2_p_assoc_res. */ |
| 3678 | |
| 3679 | #define SigIeP2PAssocRes (0x003f) |
| 3680 | |
| 3681 | |
| 3682 | static const tTLVDefn TLVS_P2PBeacon[] = { |
| 3683 | { offsetof(tDot11fIEP2PBeacon, P2PCapability), |
| 3684 | offsetof(tDot11fTLVP2PCapability, present), "P2PCapability", |
| 3685 | SigTlvP2PCapability, DOT11F_TLV_P2PCAPABILITY, 0, 5, 5, 1, 1, 2, 0, }, |
| 3686 | { offsetof(tDot11fIEP2PBeacon, P2PDeviceId), |
| 3687 | offsetof(tDot11fTLVP2PDeviceId, present), "P2PDeviceId", |
| 3688 | SigTlvP2PDeviceId, DOT11F_TLV_P2PDEVICEID, 0, 9, 9, 1, 1, 2, 0, }, |
| 3689 | { offsetof(tDot11fIEP2PBeacon, NoticeOfAbsence), |
| 3690 | offsetof(tDot11fTLVNoticeOfAbsence, present), "NoticeOfAbsence", |
| 3691 | SigTlvNoticeOfAbsence, DOT11F_TLV_NOTICEOFABSENCE, |
| 3692 | 0, 5, 41, 0, 1, 2, 0, }, |
| 3693 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3694 | }; |
| 3695 | |
| 3696 | uint32_t dot11f_unpack_ie_p2_p_beacon(tpAniSirGlobal pCtx, |
| 3697 | uint8_t *pBuf, |
| 3698 | uint8_t ielen, |
| 3699 | tDot11fIEP2PBeacon *pDst) |
| 3700 | { |
| 3701 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3702 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3703 | pDst->present = 1; |
| 3704 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3705 | TLVS_P2PBeacon, |
| 3706 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3707 | return status; |
| 3708 | } /* End dot11f_unpack_ie_p2_p_beacon. */ |
| 3709 | |
| 3710 | #define SigIeP2PBeacon (0x0040) |
| 3711 | |
| 3712 | |
| 3713 | static const tTLVDefn TLVS_P2PBeaconProbeRes[] = { |
| 3714 | { offsetof(tDot11fIEP2PBeaconProbeRes, P2PCapability), |
| 3715 | offsetof(tDot11fTLVP2PCapability, present), "P2PCapability", |
| 3716 | SigTlvP2PCapability, DOT11F_TLV_P2PCAPABILITY, 0, 5, 5, 0, 1, 2, 0, }, |
| 3717 | { offsetof(tDot11fIEP2PBeaconProbeRes, P2PDeviceId), |
| 3718 | offsetof(tDot11fTLVP2PDeviceId, present), "P2PDeviceId", |
| 3719 | SigTlvP2PDeviceId, DOT11F_TLV_P2PDEVICEID, 0, 9, 9, 0, 1, 2, 0, }, |
| 3720 | { offsetof(tDot11fIEP2PBeaconProbeRes, ExtendedListenTiming), |
| 3721 | offsetof(tDot11fTLVExtendedListenTiming, present), |
| 3722 | "ExtendedListenTiming", SigTlvExtendedListenTiming, |
| 3723 | DOT11F_TLV_EXTENDEDLISTENTIMING, 0, 7, 7, 0, 1, 2, 0, }, |
| 3724 | { offsetof(tDot11fIEP2PBeaconProbeRes, NoticeOfAbsence), |
| 3725 | offsetof(tDot11fTLVNoticeOfAbsence, present), "NoticeOfAbsence", |
| 3726 | SigTlvNoticeOfAbsence, DOT11F_TLV_NOTICEOFABSENCE, |
| 3727 | 0, 5, 41, 0, 1, 2, 0, }, |
| 3728 | { offsetof(tDot11fIEP2PBeaconProbeRes, P2PDeviceInfo), |
| 3729 | offsetof(tDot11fTLVP2PDeviceInfo, present), "P2PDeviceInfo", |
| 3730 | SigTlvP2PDeviceInfo, DOT11F_TLV_P2PDEVICEINFO, 0, 19, 55, 0, 1, 2, 0, }, |
| 3731 | { offsetof(tDot11fIEP2PBeaconProbeRes, P2PGroupInfo), |
| 3732 | offsetof(tDot11fTLVP2PGroupInfo, present), "P2PGroupInfo", |
| 3733 | SigTlvP2PGroupInfo, DOT11F_TLV_P2PGROUPINFO, 0, 3, 1027, 0, 1, 2, 0, }, |
| 3734 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3735 | }; |
| 3736 | |
| 3737 | uint32_t dot11f_unpack_ie_p2_p_beacon_probe_res(tpAniSirGlobal pCtx, |
| 3738 | uint8_t *pBuf, |
| 3739 | uint8_t ielen, |
| 3740 | tDot11fIEP2PBeaconProbeRes *pDst) |
| 3741 | { |
| 3742 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3743 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3744 | pDst->present = 1; |
| 3745 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3746 | TLVS_P2PBeaconProbeRes, |
| 3747 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3748 | return status; |
| 3749 | } /* End dot11f_unpack_ie_p2_p_beacon_probe_res. */ |
| 3750 | |
| 3751 | #define SigIeP2PBeaconProbeRes (0x0041) |
| 3752 | |
| 3753 | |
| 3754 | static const tTLVDefn TLVS_P2PDeAuth[] = { |
| 3755 | { offsetof(tDot11fIEP2PDeAuth, MinorReasonCode), |
| 3756 | offsetof(tDot11fTLVMinorReasonCode, present), "MinorReasonCode", |
| 3757 | SigTlvMinorReasonCode, DOT11F_TLV_MINORREASONCODE, |
| 3758 | 0, 4, 4, 1, 1, 2, 0, }, |
| 3759 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3760 | }; |
| 3761 | |
| 3762 | uint32_t dot11f_unpack_ie_p2_p_de_auth(tpAniSirGlobal pCtx, |
| 3763 | uint8_t *pBuf, |
| 3764 | uint8_t ielen, |
| 3765 | tDot11fIEP2PDeAuth *pDst) |
| 3766 | { |
| 3767 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3768 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3769 | pDst->present = 1; |
| 3770 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3771 | TLVS_P2PDeAuth, |
| 3772 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3773 | return status; |
| 3774 | } /* End dot11f_unpack_ie_p2_p_de_auth. */ |
| 3775 | |
| 3776 | #define SigIeP2PDeAuth (0x0042) |
| 3777 | |
| 3778 | |
| 3779 | static const tTLVDefn TLVS_P2PDisAssoc[] = { |
| 3780 | { offsetof(tDot11fIEP2PDisAssoc, MinorReasonCode), |
| 3781 | offsetof(tDot11fTLVMinorReasonCode, present), "MinorReasonCode", |
| 3782 | SigTlvMinorReasonCode, DOT11F_TLV_MINORREASONCODE, |
| 3783 | 0, 4, 4, 1, 1, 2, 0, }, |
| 3784 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3785 | }; |
| 3786 | |
| 3787 | uint32_t dot11f_unpack_ie_p2_p_dis_assoc(tpAniSirGlobal pCtx, |
| 3788 | uint8_t *pBuf, |
| 3789 | uint8_t ielen, |
| 3790 | tDot11fIEP2PDisAssoc *pDst) |
| 3791 | { |
| 3792 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3793 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3794 | pDst->present = 1; |
| 3795 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3796 | TLVS_P2PDisAssoc, |
| 3797 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3798 | return status; |
| 3799 | } /* End dot11f_unpack_ie_p2_p_dis_assoc. */ |
| 3800 | |
| 3801 | #define SigIeP2PDisAssoc (0x0043) |
| 3802 | |
| 3803 | |
| 3804 | uint32_t dot11f_unpack_ie_p2_pie_opaque(tpAniSirGlobal pCtx, |
| 3805 | uint8_t *pBuf, |
| 3806 | uint8_t ielen, |
| 3807 | tDot11fIEP2PIEOpaque *pDst) |
| 3808 | { |
| 3809 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3810 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3811 | if (pDst->present) |
| 3812 | status = DOT11F_DUPLICATE_IE; |
| 3813 | pDst->present = 1; |
| 3814 | pDst->num_data = (uint8_t)(ielen); |
| 3815 | if (ielen > 249) { |
| 3816 | pDst->present = 0; |
| 3817 | return DOT11F_SKIPPED_BAD_IE; |
| 3818 | } |
| 3819 | |
| 3820 | DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen)); |
| 3821 | (void)pCtx; |
| 3822 | return status; |
| 3823 | } /* End dot11f_unpack_ie_p2_pie_opaque. */ |
| 3824 | |
| 3825 | #define SigIeP2PIEOpaque (0x0044) |
| 3826 | |
| 3827 | |
| 3828 | static const tTLVDefn TLVS_P2PProbeReq[] = { |
| 3829 | { offsetof(tDot11fIEP2PProbeReq, P2PCapability), |
| 3830 | offsetof(tDot11fTLVP2PCapability, present), "P2PCapability", |
| 3831 | SigTlvP2PCapability, DOT11F_TLV_P2PCAPABILITY, 0, 5, 5, 1, 1, 2, 0, }, |
| 3832 | { offsetof(tDot11fIEP2PProbeReq, P2PDeviceId), |
| 3833 | offsetof(tDot11fTLVP2PDeviceId, present), "P2PDeviceId", |
| 3834 | SigTlvP2PDeviceId, DOT11F_TLV_P2PDEVICEID, 0, 9, 9, 0, 1, 2, 0, }, |
| 3835 | { offsetof(tDot11fIEP2PProbeReq, ListenChannel), |
| 3836 | offsetof(tDot11fTLVListenChannel, present), "ListenChannel", |
| 3837 | SigTlvListenChannel, DOT11F_TLV_LISTENCHANNEL, 0, 8, 8, 1, 1, 2, 0, }, |
| 3838 | { offsetof(tDot11fIEP2PProbeReq, ExtendedListenTiming), |
| 3839 | offsetof(tDot11fTLVExtendedListenTiming, present), |
| 3840 | "ExtendedListenTiming", SigTlvExtendedListenTiming, |
| 3841 | DOT11F_TLV_EXTENDEDLISTENTIMING, 0, 7, 7, 0, 1, 2, 0, }, |
| 3842 | { offsetof(tDot11fIEP2PProbeReq, OperatingChannel), |
| 3843 | offsetof(tDot11fTLVOperatingChannel, present), "OperatingChannel", |
| 3844 | SigTlvOperatingChannel, DOT11F_TLV_OPERATINGCHANNEL, |
| 3845 | 0, 8, 8, 0, 1, 2, 0, }, |
| 3846 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3847 | }; |
| 3848 | |
| 3849 | uint32_t dot11f_unpack_ie_p2_p_probe_req(tpAniSirGlobal pCtx, |
| 3850 | uint8_t *pBuf, |
| 3851 | uint8_t ielen, |
| 3852 | tDot11fIEP2PProbeReq *pDst) |
| 3853 | { |
| 3854 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3855 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3856 | pDst->present = 1; |
| 3857 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3858 | TLVS_P2PProbeReq, |
| 3859 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3860 | return status; |
| 3861 | } /* End dot11f_unpack_ie_p2_p_probe_req. */ |
| 3862 | |
| 3863 | #define SigIeP2PProbeReq (0x0045) |
| 3864 | |
| 3865 | |
| 3866 | static const tTLVDefn TLVS_P2PProbeRes[] = { |
| 3867 | { offsetof(tDot11fIEP2PProbeRes, P2PCapability), |
| 3868 | offsetof(tDot11fTLVP2PCapability, present), "P2PCapability", |
| 3869 | SigTlvP2PCapability, DOT11F_TLV_P2PCAPABILITY, 0, 5, 5, 1, 1, 2, 0, }, |
| 3870 | { offsetof(tDot11fIEP2PProbeRes, ExtendedListenTiming), |
| 3871 | offsetof(tDot11fTLVExtendedListenTiming, present), |
| 3872 | "ExtendedListenTiming", SigTlvExtendedListenTiming, |
| 3873 | DOT11F_TLV_EXTENDEDLISTENTIMING, 0, 7, 7, 0, 1, 2, 0, }, |
| 3874 | { offsetof(tDot11fIEP2PProbeRes, NoticeOfAbsence), |
| 3875 | offsetof(tDot11fTLVNoticeOfAbsence, present), "NoticeOfAbsence", |
| 3876 | SigTlvNoticeOfAbsence, DOT11F_TLV_NOTICEOFABSENCE, |
| 3877 | 0, 5, 41, 0, 1, 2, 0, }, |
| 3878 | { offsetof(tDot11fIEP2PProbeRes, P2PDeviceInfo), |
| 3879 | offsetof(tDot11fTLVP2PDeviceInfo, present), "P2PDeviceInfo", |
| 3880 | SigTlvP2PDeviceInfo, DOT11F_TLV_P2PDEVICEINFO, 0, 19, 55, 1, 1, 2, 0, }, |
| 3881 | { offsetof(tDot11fIEP2PProbeRes, P2PGroupInfo), |
| 3882 | offsetof(tDot11fTLVP2PGroupInfo, present), "P2PGroupInfo", |
| 3883 | SigTlvP2PGroupInfo, DOT11F_TLV_P2PGROUPINFO, 0, 3, 1027, 0, 1, 2, 0, }, |
| 3884 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 3885 | }; |
| 3886 | |
| 3887 | uint32_t dot11f_unpack_ie_p2_p_probe_res(tpAniSirGlobal pCtx, |
| 3888 | uint8_t *pBuf, |
| 3889 | uint8_t ielen, |
| 3890 | tDot11fIEP2PProbeRes *pDst) |
| 3891 | { |
| 3892 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3893 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 3894 | pDst->present = 1; |
| 3895 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 3896 | TLVS_P2PProbeRes, |
| 3897 | (uint8_t *)pDst, sizeof(*pDst)); |
| 3898 | return status; |
| 3899 | } /* End dot11f_unpack_ie_p2_p_probe_res. */ |
| 3900 | |
| 3901 | #define SigIeP2PProbeRes (0x0046) |
| 3902 | |
| 3903 | |
| 3904 | uint32_t dot11f_unpack_ie_pti_control(tpAniSirGlobal pCtx, |
| 3905 | uint8_t *pBuf, |
| 3906 | uint8_t ielen, |
| 3907 | tDot11fIEPTIControl *pDst) |
| 3908 | { |
| 3909 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3910 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3911 | if (pDst->present) |
| 3912 | status = DOT11F_DUPLICATE_IE; |
| 3913 | pDst->present = 1; |
| 3914 | pDst->tid = *pBuf; |
| 3915 | pBuf += 1; |
| 3916 | ielen -= (uint8_t)1; |
| 3917 | framesntohs(pCtx, &pDst->sequence_control, pBuf, 0); |
| 3918 | (void)pCtx; |
| 3919 | return status; |
| 3920 | } /* End dot11f_unpack_ie_pti_control. */ |
| 3921 | |
| 3922 | #define SigIePTIControl (0x0047) |
| 3923 | |
| 3924 | |
| 3925 | uint32_t dot11f_unpack_ie_pu_buffer_status(tpAniSirGlobal pCtx, |
| 3926 | uint8_t *pBuf, |
| 3927 | uint8_t ielen, |
| 3928 | tDot11fIEPUBufferStatus *pDst) |
| 3929 | { |
| 3930 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3931 | uint8_t tmp50__; |
| 3932 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3933 | if (pDst->present) |
| 3934 | status = DOT11F_DUPLICATE_IE; |
| 3935 | pDst->present = 1; |
| 3936 | tmp50__ = *pBuf; |
| 3937 | pDst->ac_bk_traffic_aval = tmp50__ >> 0 & 0x1; |
| 3938 | pDst->ac_be_traffic_aval = tmp50__ >> 1 & 0x1; |
| 3939 | pDst->ac_vi_traffic_aval = tmp50__ >> 2 & 0x1; |
| 3940 | pDst->ac_vo_traffic_aval = tmp50__ >> 3 & 0x1; |
| 3941 | pDst->reserved = tmp50__ >> 4 & 0xf; |
| 3942 | (void)pCtx; |
| 3943 | return status; |
| 3944 | } /* End dot11f_unpack_ie_pu_buffer_status. */ |
| 3945 | |
| 3946 | #define SigIePUBufferStatus (0x0048) |
| 3947 | |
| 3948 | |
| 3949 | uint32_t dot11f_unpack_ie_power_caps(tpAniSirGlobal pCtx, |
| 3950 | uint8_t *pBuf, |
| 3951 | uint8_t ielen, |
| 3952 | tDot11fIEPowerCaps *pDst) |
| 3953 | { |
| 3954 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3955 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3956 | if (pDst->present) |
| 3957 | status = DOT11F_DUPLICATE_IE; |
| 3958 | pDst->present = 1; |
| 3959 | pDst->minTxPower = *pBuf; |
| 3960 | pBuf += 1; |
| 3961 | ielen -= (uint8_t)1; |
| 3962 | pDst->maxTxPower = *pBuf; |
| 3963 | (void)pCtx; |
| 3964 | return status; |
| 3965 | } /* End dot11f_unpack_ie_power_caps. */ |
| 3966 | |
| 3967 | #define SigIePowerCaps (0x0049) |
| 3968 | |
| 3969 | |
| 3970 | uint32_t dot11f_unpack_ie_power_constraints(tpAniSirGlobal pCtx, |
| 3971 | uint8_t *pBuf, |
| 3972 | uint8_t ielen, |
| 3973 | tDot11fIEPowerConstraints *pDst) |
| 3974 | { |
| 3975 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3976 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3977 | if (pDst->present) |
| 3978 | status = DOT11F_DUPLICATE_IE; |
| 3979 | pDst->present = 1; |
| 3980 | pDst->localPowerConstraints = *pBuf; |
| 3981 | (void)pCtx; |
| 3982 | return status; |
| 3983 | } /* End dot11f_unpack_ie_power_constraints. */ |
| 3984 | |
| 3985 | #define SigIePowerConstraints (0x004a) |
| 3986 | |
| 3987 | |
| 3988 | uint32_t dot11f_unpack_ie_qbss_load(tpAniSirGlobal pCtx, |
| 3989 | uint8_t *pBuf, |
| 3990 | uint8_t ielen, |
| 3991 | tDot11fIEQBSSLoad *pDst) |
| 3992 | { |
| 3993 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 3994 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 3995 | if (pDst->present) |
| 3996 | status = DOT11F_DUPLICATE_IE; |
| 3997 | pDst->present = 1; |
| 3998 | framesntohs(pCtx, &pDst->stacount, pBuf, 0); |
| 3999 | pBuf += 2; |
| 4000 | ielen -= (uint8_t)2; |
| 4001 | pDst->chautil = *pBuf; |
| 4002 | pBuf += 1; |
| 4003 | ielen -= (uint8_t)1; |
| 4004 | framesntohs(pCtx, &pDst->avail, pBuf, 0); |
| 4005 | (void)pCtx; |
| 4006 | return status; |
| 4007 | } /* End dot11f_unpack_ie_qbss_load. */ |
| 4008 | |
| 4009 | #define SigIeQBSSLoad (0x004b) |
| 4010 | |
| 4011 | |
| 4012 | uint32_t dot11f_unpack_ie_QComVendorIE(tpAniSirGlobal pCtx, |
| 4013 | uint8_t *pBuf, |
| 4014 | uint8_t ielen, |
| 4015 | tDot11fIEQComVendorIE *pDst) |
| 4016 | { |
| 4017 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4018 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4019 | if (pDst->present) |
| 4020 | status = DOT11F_DUPLICATE_IE; |
| 4021 | pDst->present = 1; |
| 4022 | pDst->type = *pBuf; |
| 4023 | pBuf += 1; |
| 4024 | ielen -= (uint8_t)1; |
| 4025 | pDst->channel = *pBuf; |
| 4026 | (void)pCtx; |
| 4027 | return status; |
| 4028 | } /* End dot11f_unpack_ie_QComVendorIE. */ |
| 4029 | |
| 4030 | #define SigIeQComVendorIE (0x004c) |
| 4031 | |
| 4032 | |
| 4033 | uint32_t dot11f_unpack_ie_qos_caps_ap(tpAniSirGlobal pCtx, |
| 4034 | uint8_t *pBuf, |
| 4035 | uint8_t ielen, |
| 4036 | tDot11fIEQOSCapsAp *pDst) |
| 4037 | { |
| 4038 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4039 | uint8_t tmp51__; |
| 4040 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4041 | if (pDst->present) |
| 4042 | status = DOT11F_DUPLICATE_IE; |
| 4043 | pDst->present = 1; |
| 4044 | tmp51__ = *pBuf; |
| 4045 | pDst->count = tmp51__ >> 0 & 0xf; |
| 4046 | pDst->qack = tmp51__ >> 4 & 0x1; |
| 4047 | pDst->qreq = tmp51__ >> 5 & 0x1; |
| 4048 | pDst->txopreq = tmp51__ >> 6 & 0x1; |
| 4049 | pDst->reserved = tmp51__ >> 7 & 0x1; |
| 4050 | (void)pCtx; |
| 4051 | return status; |
| 4052 | } /* End dot11f_unpack_ie_qos_caps_ap. */ |
| 4053 | |
| 4054 | #define SigIeQOSCapsAp (0x004d) |
| 4055 | |
| 4056 | |
| 4057 | uint32_t dot11f_unpack_ie_qos_caps_station(tpAniSirGlobal pCtx, |
| 4058 | uint8_t *pBuf, |
| 4059 | uint8_t ielen, |
| 4060 | tDot11fIEQOSCapsStation *pDst) |
| 4061 | { |
| 4062 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4063 | uint8_t tmp52__; |
| 4064 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4065 | if (pDst->present) |
| 4066 | status = DOT11F_DUPLICATE_IE; |
| 4067 | pDst->present = 1; |
| 4068 | tmp52__ = *pBuf; |
| 4069 | pDst->acvo_uapsd = tmp52__ >> 0 & 0x1; |
| 4070 | pDst->acvi_uapsd = tmp52__ >> 1 & 0x1; |
| 4071 | pDst->acbk_uapsd = tmp52__ >> 2 & 0x1; |
| 4072 | pDst->acbe_uapsd = tmp52__ >> 3 & 0x1; |
| 4073 | pDst->qack = tmp52__ >> 4 & 0x1; |
| 4074 | pDst->max_sp_length = tmp52__ >> 5 & 0x3; |
| 4075 | pDst->more_data_ack = tmp52__ >> 7 & 0x1; |
| 4076 | (void)pCtx; |
| 4077 | return status; |
| 4078 | } /* End dot11f_unpack_ie_qos_caps_station. */ |
| 4079 | |
| 4080 | #define SigIeQOSCapsStation (0x004e) |
| 4081 | |
| 4082 | |
| 4083 | uint32_t dot11f_unpack_ie_qos_map_set(tpAniSirGlobal pCtx, |
| 4084 | uint8_t *pBuf, |
| 4085 | uint8_t ielen, |
| 4086 | tDot11fIEQosMapSet *pDst) |
| 4087 | { |
| 4088 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4089 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4090 | if (pDst->present) |
| 4091 | status = DOT11F_DUPLICATE_IE; |
| 4092 | pDst->present = 1; |
| 4093 | pDst->num_dscp_exceptions = (uint8_t)(ielen); |
| 4094 | if (ielen > 60) { |
| 4095 | pDst->present = 0; |
| 4096 | return DOT11F_SKIPPED_BAD_IE; |
| 4097 | } |
| 4098 | |
| 4099 | DOT11F_MEMCPY(pCtx, pDst->dscp_exceptions, pBuf, (ielen)); |
| 4100 | (void)pCtx; |
| 4101 | return status; |
| 4102 | } /* End dot11f_unpack_ie_qos_map_set. */ |
| 4103 | |
| 4104 | #define SigIeQosMapSet (0x004f) |
| 4105 | |
| 4106 | |
| 4107 | uint32_t dot11f_unpack_ie_quiet(tpAniSirGlobal pCtx, |
| 4108 | uint8_t *pBuf, |
| 4109 | uint8_t ielen, |
| 4110 | tDot11fIEQuiet *pDst) |
| 4111 | { |
| 4112 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4113 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4114 | if (pDst->present) |
| 4115 | status = DOT11F_DUPLICATE_IE; |
| 4116 | pDst->present = 1; |
| 4117 | pDst->count = *pBuf; |
| 4118 | pBuf += 1; |
| 4119 | ielen -= (uint8_t)1; |
| 4120 | pDst->period = *pBuf; |
| 4121 | pBuf += 1; |
| 4122 | ielen -= (uint8_t)1; |
| 4123 | framesntohs(pCtx, &pDst->duration, pBuf, 0); |
| 4124 | pBuf += 2; |
| 4125 | ielen -= (uint8_t)2; |
| 4126 | framesntohs(pCtx, &pDst->offset, pBuf, 0); |
| 4127 | (void)pCtx; |
| 4128 | return status; |
| 4129 | } /* End dot11f_unpack_ie_quiet. */ |
| 4130 | |
| 4131 | #define SigIeQuiet (0x0050) |
| 4132 | |
| 4133 | |
| 4134 | uint32_t dot11f_unpack_ie_rcpiie(tpAniSirGlobal pCtx, |
| 4135 | uint8_t *pBuf, |
| 4136 | uint8_t ielen, |
| 4137 | tDot11fIERCPIIE *pDst) |
| 4138 | { |
| 4139 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4140 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4141 | if (pDst->present) |
| 4142 | status = DOT11F_DUPLICATE_IE; |
| 4143 | pDst->present = 1; |
| 4144 | pDst->rcpi = *pBuf; |
| 4145 | (void)pCtx; |
| 4146 | return status; |
| 4147 | } /* End dot11f_unpack_ie_rcpiie. */ |
| 4148 | |
| 4149 | #define SigIeRCPIIE (0x0051) |
| 4150 | |
| 4151 | |
| 4152 | static const tFFDefn FFS_RICDataDesc[] = { |
| 4153 | { NULL, 0, 0, 0,}, |
| 4154 | }; |
| 4155 | |
| 4156 | static const tIEDefn IES_RICDataDesc[] = { |
| 4157 | { offsetof(tDot11fIERICDataDesc, RICData), offsetof(tDot11fIERICData, |
| 4158 | present), 0, "RICData", 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, |
| 4159 | 0, DOT11F_EID_RICDATA, 1, }, |
| 4160 | { offsetof(tDot11fIERICDataDesc, RICDescriptor), |
| 4161 | offsetof(tDot11fIERICDescriptor, present), 0, "RICDescriptor", |
| 4162 | 0, 3, 258, SigIeRICDescriptor, {0, 0, 0, 0, 0}, |
| 4163 | 0, DOT11F_EID_RICDESCRIPTOR, 0, }, |
| 4164 | { offsetof(tDot11fIERICDataDesc, TSPEC), offsetof(tDot11fIETSPEC, |
| 4165 | present), 0, "TSPEC", 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, |
| 4166 | 0, DOT11F_EID_TSPEC, 0, }, |
| 4167 | { offsetof(tDot11fIERICDataDesc, TCLAS), offsetof(tDot11fIETCLAS, |
| 4168 | present), offsetof(tDot11fIERICDataDesc, num_TCLAS), "TCLAS", |
| 4169 | 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, }, |
| 4170 | { offsetof(tDot11fIERICDataDesc, TCLASSPROC), |
| 4171 | offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC", |
| 4172 | 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, |
| 4173 | 0, DOT11F_EID_TCLASSPROC, 0, }, |
| 4174 | { offsetof(tDot11fIERICDataDesc, TSDelay), offsetof(tDot11fIETSDelay, |
| 4175 | present), 0, "TSDelay", 0, 6, 6, SigIeTSDelay, {0, 0, 0, 0, 0}, |
| 4176 | 0, DOT11F_EID_TSDELAY, 0, }, |
| 4177 | { offsetof(tDot11fIERICDataDesc, Schedule), offsetof(tDot11fIESchedule, |
| 4178 | present), 0, "Schedule", 0, 16, 16, SigIeSchedule, {0, 0, 0, 0, 0}, |
| 4179 | 0, DOT11F_EID_SCHEDULE, 0, }, |
| 4180 | { offsetof(tDot11fIERICDataDesc, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 4181 | present), 0, "WMMTSPEC", 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 4182 | 5, DOT11F_EID_WMMTSPEC, 0, }, |
| 4183 | { offsetof(tDot11fIERICDataDesc, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, |
| 4184 | present), offsetof(tDot11fIERICDataDesc, num_WMMTCLAS), "WMMTCLAS", |
| 4185 | 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, |
| 4186 | 5, DOT11F_EID_WMMTCLAS, 0, }, |
| 4187 | { offsetof(tDot11fIERICDataDesc, WMMTCLASPROC), |
| 4188 | offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC", |
| 4189 | 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, |
| 4190 | 5, DOT11F_EID_WMMTCLASPROC, 0, }, |
| 4191 | { offsetof(tDot11fIERICDataDesc, WMMTSDelay), |
| 4192 | offsetof(tDot11fIEWMMTSDelay, present), 0, "WMMTSDelay", |
| 4193 | 0, 12, 12, SigIeWMMTSDelay, {0, 80, 242, 2, 8}, |
| 4194 | 5, DOT11F_EID_WMMTSDELAY, 0, }, |
| 4195 | { offsetof(tDot11fIERICDataDesc, WMMSchedule), |
| 4196 | offsetof(tDot11fIEWMMSchedule, present), 0, "WMMSchedule", |
| 4197 | 0, 22, 22, SigIeWMMSchedule, {0, 80, 242, 2, 9}, |
| 4198 | 5, DOT11F_EID_WMMSCHEDULE, 0, }, |
| 4199 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, |
| 4200 | }; |
| 4201 | |
| 4202 | uint32_t dot11f_unpack_ie_ric_data_desc(tpAniSirGlobal pCtx, |
| 4203 | uint8_t *pBuf, |
| 4204 | uint8_t ielen, |
| 4205 | tDot11fIERICDataDesc *pDst) |
| 4206 | { |
| 4207 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4208 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4209 | if (pDst->present) |
| 4210 | status = DOT11F_DUPLICATE_IE; |
| 4211 | pDst->present = 1; |
| 4212 | (void)pCtx; |
| 4213 | status |= unpack_core(pCtx, |
| 4214 | pBuf, |
| 4215 | ielen, |
| 4216 | FFS_RICDataDesc, |
| 4217 | IES_RICDataDesc, |
| 4218 | (uint8_t *)pDst, |
| 4219 | sizeof(*pDst)); |
| 4220 | return status; |
| 4221 | } /* End dot11f_unpack_ie_ric_data_desc. */ |
| 4222 | |
| 4223 | #define SigIeRICDataDesc (0x0052) |
| 4224 | |
| 4225 | |
| 4226 | uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx, |
| 4227 | uint8_t *pBuf, |
| 4228 | uint8_t ielen, |
| 4229 | tDot11fIERSN *pDst) |
| 4230 | { |
| 4231 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4232 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4233 | if (pDst->present) |
| 4234 | status = DOT11F_DUPLICATE_IE; |
| 4235 | pDst->present = 1; |
| 4236 | framesntohs(pCtx, &pDst->version, pBuf, 0); |
| 4237 | pBuf += 2; |
| 4238 | ielen -= (uint8_t)2; |
| 4239 | if (pDst->version != 0x1) { |
| 4240 | pDst->present = 0; |
| 4241 | return status | DOT11F_BAD_FIXED_VALUE; |
| 4242 | } |
| 4243 | DOT11F_MEMCPY(pCtx, pDst->gp_cipher_suite, pBuf, 4); |
| 4244 | pBuf += 4; |
| 4245 | ielen -= (uint8_t)4; |
| 4246 | if (!ielen) { |
| 4247 | pDst->pwise_cipher_suite_count = 0U; |
| 4248 | pDst->akm_suite_count = 0U; |
| 4249 | pDst->pmkid_count = 0U; |
| 4250 | return 0U; |
| 4251 | } else { |
| 4252 | framesntohs(pCtx, &pDst->pwise_cipher_suite_count, pBuf, 0); |
| 4253 | pBuf += 2; |
| 4254 | ielen -= (uint8_t)2; |
| 4255 | } |
| 4256 | if (pDst->pwise_cipher_suite_count > 4) { |
| 4257 | pDst->present = 0; |
| 4258 | return DOT11F_SKIPPED_BAD_IE; |
| 4259 | } |
| 4260 | |
| 4261 | DOT11F_MEMCPY(pCtx, pDst->pwise_cipher_suites, pBuf, (pDst->pwise_cipher_suite_count * 4)); |
| 4262 | pBuf += (pDst->pwise_cipher_suite_count * 4); |
| 4263 | ielen -= (pDst->pwise_cipher_suite_count * 4); |
| 4264 | if (!ielen) { |
| 4265 | pDst->akm_suite_count = 0U; |
| 4266 | pDst->pmkid_count = 0U; |
| 4267 | return 0U; |
| 4268 | } else { |
| 4269 | framesntohs(pCtx, &pDst->akm_suite_count, pBuf, 0); |
| 4270 | pBuf += 2; |
| 4271 | ielen -= (uint8_t)2; |
| 4272 | } |
| 4273 | if (pDst->akm_suite_count > 4) { |
| 4274 | pDst->present = 0; |
| 4275 | return DOT11F_SKIPPED_BAD_IE; |
| 4276 | } |
| 4277 | |
| 4278 | DOT11F_MEMCPY(pCtx, pDst->akm_suites, pBuf, (pDst->akm_suite_count * 4)); |
| 4279 | pBuf += (pDst->akm_suite_count * 4); |
| 4280 | ielen -= (pDst->akm_suite_count * 4); |
| 4281 | if (!ielen) { |
| 4282 | pDst->pmkid_count = 0U; |
| 4283 | return 0U; |
| 4284 | } else { |
| 4285 | DOT11F_MEMCPY(pCtx, pDst->RSN_Cap, pBuf, 2); |
| 4286 | pBuf += 2; |
| 4287 | ielen -= (uint8_t)2; |
| 4288 | } |
| 4289 | if (!ielen) { |
| 4290 | pDst->pmkid_count = 0U; |
| 4291 | return 0U; |
| 4292 | } else { |
| 4293 | framesntohs(pCtx, &pDst->pmkid_count, pBuf, 0); |
| 4294 | pBuf += 2; |
| 4295 | ielen -= (uint8_t)2; |
| 4296 | } |
| 4297 | if (pDst->pmkid_count > 4) { |
| 4298 | pDst->present = 0; |
| 4299 | return DOT11F_SKIPPED_BAD_IE; |
| 4300 | } |
| 4301 | |
| 4302 | DOT11F_MEMCPY(pCtx, pDst->pmkid, pBuf, (pDst->pmkid_count * 16)); |
| 4303 | pBuf += (pDst->pmkid_count * 16); |
| 4304 | ielen -= (pDst->pmkid_count * 16); |
| 4305 | if (!ielen) { |
| 4306 | return 0U; |
| 4307 | } else { |
| 4308 | DOT11F_MEMCPY(pCtx, pDst->gp_mgmt_cipher_suite, pBuf, 4); |
| 4309 | } |
| 4310 | (void)pCtx; |
| 4311 | return status; |
| 4312 | } /* End dot11f_unpack_ie_rsn. */ |
| 4313 | |
| 4314 | #define SigIeRSN (0x0053) |
| 4315 | |
| 4316 | |
| 4317 | uint32_t dot11f_unpack_ie_rsniie(tpAniSirGlobal pCtx, |
| 4318 | uint8_t *pBuf, |
| 4319 | uint8_t ielen, |
| 4320 | tDot11fIERSNIIE *pDst) |
| 4321 | { |
| 4322 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4323 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4324 | if (pDst->present) |
| 4325 | status = DOT11F_DUPLICATE_IE; |
| 4326 | pDst->present = 1; |
| 4327 | pDst->rsni = *pBuf; |
| 4328 | (void)pCtx; |
| 4329 | return status; |
| 4330 | } /* End dot11f_unpack_ie_rsniie. */ |
| 4331 | |
| 4332 | #define SigIeRSNIIE (0x0054) |
| 4333 | |
| 4334 | |
| 4335 | uint32_t dot11f_unpack_ie_rsn_opaque(tpAniSirGlobal pCtx, |
| 4336 | uint8_t *pBuf, |
| 4337 | uint8_t ielen, |
| 4338 | tDot11fIERSNOpaque *pDst) |
| 4339 | { |
| 4340 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4341 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4342 | if (pDst->present) |
| 4343 | status = DOT11F_DUPLICATE_IE; |
| 4344 | pDst->present = 1; |
| 4345 | pDst->num_data = (uint8_t)(ielen); |
| 4346 | if (ielen > 253) { |
| 4347 | pDst->present = 0; |
| 4348 | return DOT11F_SKIPPED_BAD_IE; |
| 4349 | } |
| 4350 | |
| 4351 | DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen)); |
| 4352 | (void)pCtx; |
| 4353 | return status; |
| 4354 | } /* End dot11f_unpack_ie_rsn_opaque. */ |
| 4355 | |
| 4356 | #define SigIeRSNOpaque (0x0055) |
| 4357 | |
| 4358 | |
| 4359 | uint32_t dot11f_unpack_ie_supp_channels(tpAniSirGlobal pCtx, |
| 4360 | uint8_t *pBuf, |
| 4361 | uint8_t ielen, |
| 4362 | tDot11fIESuppChannels *pDst) |
| 4363 | { |
| 4364 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4365 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4366 | if (pDst->present) |
| 4367 | status = DOT11F_DUPLICATE_IE; |
| 4368 | pDst->present = 1; |
| 4369 | pDst->num_bands = (uint8_t)(ielen / 2); |
| 4370 | if (ielen > 48 * 2) { |
| 4371 | pDst->present = 0; |
| 4372 | return DOT11F_SKIPPED_BAD_IE; |
| 4373 | } |
| 4374 | |
| 4375 | DOT11F_MEMCPY(pCtx, pDst->bands, pBuf, (ielen)); |
| 4376 | (void)pCtx; |
| 4377 | return status; |
| 4378 | } /* End dot11f_unpack_ie_supp_channels. */ |
| 4379 | |
| 4380 | #define SigIeSuppChannels (0x0056) |
| 4381 | |
| 4382 | |
| 4383 | uint32_t dot11f_unpack_ie_supp_operating_classes(tpAniSirGlobal pCtx, |
| 4384 | uint8_t *pBuf, |
| 4385 | uint8_t ielen, |
| 4386 | tDot11fIESuppOperatingClasses *pDst) |
| 4387 | { |
| 4388 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4389 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4390 | if (pDst->present) |
| 4391 | status = DOT11F_DUPLICATE_IE; |
| 4392 | pDst->present = 1; |
| 4393 | pDst->num_classes = (uint8_t)(ielen); |
| 4394 | if (ielen > 32) { |
| 4395 | pDst->present = 0; |
| 4396 | return DOT11F_SKIPPED_BAD_IE; |
| 4397 | } |
| 4398 | |
| 4399 | DOT11F_MEMCPY(pCtx, pDst->classes, pBuf, (ielen)); |
| 4400 | (void)pCtx; |
| 4401 | return status; |
| 4402 | } /* End dot11f_unpack_ie_supp_operating_classes. */ |
| 4403 | |
| 4404 | #define SigIeSuppOperatingClasses (0x0057) |
| 4405 | |
| 4406 | |
| 4407 | uint32_t dot11f_unpack_ie_supp_rates(tpAniSirGlobal pCtx, |
| 4408 | uint8_t *pBuf, |
| 4409 | uint8_t ielen, |
| 4410 | tDot11fIESuppRates *pDst) |
| 4411 | { |
| 4412 | uint8_t i; |
| 4413 | uint8_t rate_indx = 0; |
| 4414 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4415 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4416 | if (pDst->present) |
| 4417 | status = DOT11F_DUPLICATE_IE; |
| 4418 | pDst->present = 1; |
| 4419 | for (i = 0; i < ielen; i++) { |
| 4420 | if ((DOT11F_IS_BG_RATE(pBuf[i] & 0x7F)) && |
| 4421 | (rate_indx < 12)) { |
| 4422 | pDst->rates[rate_indx++] = pBuf[i]; |
| 4423 | } |
| 4424 | } |
| 4425 | |
| 4426 | if (rate_indx == 0) { |
| 4427 | pDst->present = 0; |
| 4428 | return DOT11F_SKIPPED_BAD_IE; |
| 4429 | } |
| 4430 | |
| 4431 | pDst->num_rates = rate_indx; |
| 4432 | (void)pCtx; |
| 4433 | return status; |
| 4434 | } /* End dot11f_unpack_ie_supp_rates. */ |
| 4435 | |
| 4436 | #define SigIeSuppRates (0x0058) |
| 4437 | |
| 4438 | |
| 4439 | uint32_t dot11f_unpack_ie_tim(tpAniSirGlobal pCtx, |
| 4440 | uint8_t *pBuf, |
| 4441 | uint8_t ielen, |
| 4442 | tDot11fIETIM *pDst) |
| 4443 | { |
| 4444 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4445 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4446 | if (pDst->present) |
| 4447 | status = DOT11F_DUPLICATE_IE; |
| 4448 | pDst->present = 1; |
| 4449 | pDst->dtim_count = *pBuf; |
| 4450 | pBuf += 1; |
| 4451 | ielen -= (uint8_t)1; |
| 4452 | pDst->dtim_period = *pBuf; |
| 4453 | pBuf += 1; |
| 4454 | ielen -= (uint8_t)1; |
| 4455 | pDst->bmpctl = *pBuf; |
| 4456 | pBuf += 1; |
| 4457 | ielen -= (uint8_t)1; |
| 4458 | pDst->num_vbmp = (uint8_t)(ielen); |
| 4459 | if (ielen > 251) { |
| 4460 | pDst->present = 0; |
| 4461 | return DOT11F_SKIPPED_BAD_IE; |
| 4462 | } |
| 4463 | |
| 4464 | DOT11F_MEMCPY(pCtx, pDst->vbmp, pBuf, (ielen)); |
| 4465 | (void)pCtx; |
| 4466 | return status; |
| 4467 | } /* End dot11f_unpack_ie_tim. */ |
| 4468 | |
| 4469 | #define SigIeTIM (0x0059) |
| 4470 | |
| 4471 | |
| 4472 | uint32_t dot11f_unpack_ie_tpc_report(tpAniSirGlobal pCtx, |
| 4473 | uint8_t *pBuf, |
| 4474 | uint8_t ielen, |
| 4475 | tDot11fIETPCReport *pDst) |
| 4476 | { |
| 4477 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4478 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4479 | if (pDst->present) |
| 4480 | status = DOT11F_DUPLICATE_IE; |
| 4481 | pDst->present = 1; |
| 4482 | pDst->tx_power = *pBuf; |
| 4483 | pBuf += 1; |
| 4484 | ielen -= (uint8_t)1; |
| 4485 | pDst->link_margin = *pBuf; |
| 4486 | (void)pCtx; |
| 4487 | return status; |
| 4488 | } /* End dot11f_unpack_ie_tpc_report. */ |
| 4489 | |
| 4490 | #define SigIeTPCReport (0x005a) |
| 4491 | |
| 4492 | |
| 4493 | uint32_t dot11f_unpack_ie_tpc_request(tpAniSirGlobal pCtx, |
| 4494 | uint8_t *pBuf, |
| 4495 | uint8_t ielen, |
| 4496 | tDot11fIETPCRequest *pDst) |
| 4497 | { |
| 4498 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4499 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4500 | if (pDst->present) |
| 4501 | status = DOT11F_DUPLICATE_IE; |
| 4502 | pDst->present = 1; |
| 4503 | (void)pCtx; |
| 4504 | return status; |
| 4505 | } /* End dot11f_unpack_ie_tpc_request. */ |
| 4506 | |
| 4507 | #define SigIeTPCRequest (0x005b) |
| 4508 | |
| 4509 | |
| 4510 | uint32_t dot11f_unpack_ie_time_advertisement(tpAniSirGlobal pCtx, |
| 4511 | uint8_t *pBuf, |
| 4512 | uint8_t ielen, |
| 4513 | tDot11fIETimeAdvertisement *pDst) |
| 4514 | { |
| 4515 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4516 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4517 | if (pDst->present) |
| 4518 | status = DOT11F_DUPLICATE_IE; |
| 4519 | pDst->present = 1; |
| 4520 | pDst->timing_capabilities = *pBuf; |
| 4521 | pBuf += 1; |
| 4522 | ielen -= (uint8_t)1; |
| 4523 | DOT11F_MEMCPY(pCtx, pDst->time_value, pBuf, 10); |
| 4524 | pBuf += 10; |
| 4525 | ielen -= (uint8_t)10; |
| 4526 | DOT11F_MEMCPY(pCtx, pDst->time_error, pBuf, 5); |
| 4527 | (void)pCtx; |
| 4528 | return status; |
| 4529 | } /* End dot11f_unpack_ie_time_advertisement. */ |
| 4530 | |
| 4531 | #define SigIeTimeAdvertisement (0x005c) |
| 4532 | |
| 4533 | |
| 4534 | uint32_t dot11f_unpack_ie_timeout_interval(tpAniSirGlobal pCtx, |
| 4535 | uint8_t *pBuf, |
| 4536 | uint8_t ielen, |
| 4537 | tDot11fIETimeoutInterval *pDst) |
| 4538 | { |
| 4539 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4540 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4541 | if (pDst->present) |
| 4542 | status = DOT11F_DUPLICATE_IE; |
| 4543 | pDst->present = 1; |
| 4544 | pDst->timeoutType = *pBuf; |
| 4545 | pBuf += 1; |
| 4546 | ielen -= (uint8_t)1; |
| 4547 | framesntohl(pCtx, &pDst->timeoutValue, pBuf, 0); |
| 4548 | (void)pCtx; |
| 4549 | return status; |
| 4550 | } /* End dot11f_unpack_ie_timeout_interval. */ |
| 4551 | |
| 4552 | #define SigIeTimeoutInterval (0x005d) |
| 4553 | |
| 4554 | |
| 4555 | uint32_t dot11f_unpack_ie_vht_ext_bss_load(tpAniSirGlobal pCtx, |
| 4556 | uint8_t *pBuf, |
| 4557 | uint8_t ielen, |
| 4558 | tDot11fIEVHTExtBssLoad *pDst) |
| 4559 | { |
| 4560 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4561 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4562 | if (pDst->present) |
| 4563 | status = DOT11F_DUPLICATE_IE; |
| 4564 | pDst->present = 1; |
| 4565 | pDst->muMIMOCapStaCount = *pBuf; |
| 4566 | pBuf += 1; |
| 4567 | ielen -= (uint8_t)1; |
| 4568 | pDst->ssUnderUtil = *pBuf; |
| 4569 | pBuf += 1; |
| 4570 | ielen -= (uint8_t)1; |
| 4571 | pDst->FortyMHzUtil = *pBuf; |
| 4572 | pBuf += 1; |
| 4573 | ielen -= (uint8_t)1; |
| 4574 | pDst->EightyMHzUtil = *pBuf; |
| 4575 | pBuf += 1; |
| 4576 | ielen -= (uint8_t)1; |
| 4577 | pDst->OneSixtyMHzUtil = *pBuf; |
| 4578 | (void)pCtx; |
| 4579 | return status; |
| 4580 | } /* End dot11f_unpack_ie_vht_ext_bss_load. */ |
| 4581 | |
| 4582 | #define SigIeVHTExtBssLoad (0x005e) |
| 4583 | |
| 4584 | |
| 4585 | uint32_t dot11f_unpack_ie_vendor1_ie(tpAniSirGlobal pCtx, |
| 4586 | uint8_t *pBuf, |
| 4587 | uint8_t ielen, |
| 4588 | tDot11fIEVendor1IE *pDst) |
| 4589 | { |
| 4590 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4591 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4592 | if (pDst->present) |
| 4593 | status = DOT11F_DUPLICATE_IE; |
| 4594 | pDst->present = 1; |
| 4595 | (void)pCtx; |
| 4596 | return status; |
| 4597 | } /* End dot11f_unpack_ie_vendor1_ie. */ |
| 4598 | |
| 4599 | #define SigIeVendor1IE (0x005f) |
| 4600 | |
| 4601 | |
| 4602 | uint32_t dot11f_unpack_ie_vendor3_ie(tpAniSirGlobal pCtx, |
| 4603 | uint8_t *pBuf, |
| 4604 | uint8_t ielen, |
| 4605 | tDot11fIEVendor3IE *pDst) |
| 4606 | { |
| 4607 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4608 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4609 | if (pDst->present) |
| 4610 | status = DOT11F_DUPLICATE_IE; |
| 4611 | pDst->present = 1; |
| 4612 | (void)pCtx; |
| 4613 | return status; |
| 4614 | } /* End dot11f_unpack_ie_vendor3_ie. */ |
| 4615 | |
| 4616 | #define SigIeVendor3IE (0x0060) |
| 4617 | |
| 4618 | |
| 4619 | uint32_t dot11f_unpack_ie_wapi(tpAniSirGlobal pCtx, |
| 4620 | uint8_t *pBuf, |
| 4621 | uint8_t ielen, |
| 4622 | tDot11fIEWAPI *pDst) |
| 4623 | { |
| 4624 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4625 | uint16_t tmp53__; |
| 4626 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4627 | if (pDst->present) |
| 4628 | status = DOT11F_DUPLICATE_IE; |
| 4629 | pDst->present = 1; |
| 4630 | framesntohs(pCtx, &pDst->version, pBuf, 0); |
| 4631 | pBuf += 2; |
| 4632 | ielen -= (uint8_t)2; |
| 4633 | if (pDst->version != 0x1) { |
| 4634 | pDst->present = 0; |
| 4635 | return status | DOT11F_BAD_FIXED_VALUE; |
| 4636 | } |
| 4637 | framesntohs(pCtx, &pDst->akm_suite_count, pBuf, 0); |
| 4638 | pBuf += 2; |
| 4639 | ielen -= (uint8_t)2; |
| 4640 | if (pDst->akm_suite_count > 4) { |
| 4641 | pDst->present = 0; |
| 4642 | return DOT11F_SKIPPED_BAD_IE; |
| 4643 | } |
| 4644 | |
| 4645 | DOT11F_MEMCPY(pCtx, pDst->akm_suites, pBuf, (pDst->akm_suite_count * 4)); |
| 4646 | pBuf += (pDst->akm_suite_count * 4); |
| 4647 | ielen -= (pDst->akm_suite_count * 4); |
| 4648 | framesntohs(pCtx, &pDst->unicast_cipher_suite_count, pBuf, 0); |
| 4649 | pBuf += 2; |
| 4650 | ielen -= (uint8_t)2; |
| 4651 | if (pDst->unicast_cipher_suite_count > 4) { |
| 4652 | pDst->present = 0; |
| 4653 | return DOT11F_SKIPPED_BAD_IE; |
| 4654 | } |
| 4655 | |
| 4656 | DOT11F_MEMCPY(pCtx, pDst->unicast_cipher_suites, pBuf, (pDst->unicast_cipher_suite_count * 4)); |
| 4657 | pBuf += (pDst->unicast_cipher_suite_count * 4); |
| 4658 | ielen -= (pDst->unicast_cipher_suite_count * 4); |
| 4659 | DOT11F_MEMCPY(pCtx, pDst->multicast_cipher_suite, pBuf, 4); |
| 4660 | pBuf += 4; |
| 4661 | ielen -= (uint8_t)4; |
| 4662 | framesntohs(pCtx, &tmp53__, pBuf, 0); |
| 4663 | pBuf += 2; |
| 4664 | ielen -= 2; |
| 4665 | pDst->preauth = tmp53__ >> 0 & 0x1; |
| 4666 | pDst->reserved = tmp53__ >> 1 & 0x7fff; |
| 4667 | if (!ielen) { |
| 4668 | pDst->bkid_count = 0U; |
| 4669 | return 0U; |
| 4670 | } else { |
| 4671 | framesntohs(pCtx, &pDst->bkid_count, pBuf, 0); |
| 4672 | pBuf += 2; |
| 4673 | ielen -= (uint8_t)2; |
| 4674 | } |
| 4675 | if (pDst->bkid_count > 4) { |
| 4676 | pDst->present = 0; |
| 4677 | return DOT11F_SKIPPED_BAD_IE; |
| 4678 | } |
| 4679 | |
| 4680 | DOT11F_MEMCPY(pCtx, pDst->bkid, pBuf, (pDst->bkid_count * 16)); |
| 4681 | (void)pCtx; |
| 4682 | return status; |
| 4683 | } /* End dot11f_unpack_ie_wapi. */ |
| 4684 | |
| 4685 | #define SigIeWAPI (0x0061) |
| 4686 | |
| 4687 | |
| 4688 | uint32_t dot11f_unpack_ie_wapi_opaque(tpAniSirGlobal pCtx, |
| 4689 | uint8_t *pBuf, |
| 4690 | uint8_t ielen, |
| 4691 | tDot11fIEWAPIOpaque *pDst) |
| 4692 | { |
| 4693 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4694 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4695 | if (pDst->present) |
| 4696 | status = DOT11F_DUPLICATE_IE; |
| 4697 | pDst->present = 1; |
| 4698 | pDst->num_data = (uint8_t)(ielen); |
| 4699 | if (ielen > 253) { |
| 4700 | pDst->present = 0; |
| 4701 | return DOT11F_SKIPPED_BAD_IE; |
| 4702 | } |
| 4703 | |
| 4704 | DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen)); |
| 4705 | (void)pCtx; |
| 4706 | return status; |
| 4707 | } /* End dot11f_unpack_ie_wapi_opaque. */ |
| 4708 | |
| 4709 | #define SigIeWAPIOpaque (0x0062) |
| 4710 | |
| 4711 | |
| 4712 | uint32_t dot11f_unpack_ie_wfatpc(tpAniSirGlobal pCtx, |
| 4713 | uint8_t *pBuf, |
| 4714 | uint8_t ielen, |
| 4715 | tDot11fIEWFATPC *pDst) |
| 4716 | { |
| 4717 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4718 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4719 | if (pDst->present) |
| 4720 | status = DOT11F_DUPLICATE_IE; |
| 4721 | pDst->present = 1; |
| 4722 | pDst->txPower = *pBuf; |
| 4723 | pBuf += 1; |
| 4724 | ielen -= (uint8_t)1; |
| 4725 | pDst->linkMargin = *pBuf; |
| 4726 | (void)pCtx; |
| 4727 | return status; |
| 4728 | } /* End dot11f_unpack_ie_wfatpc. */ |
| 4729 | |
| 4730 | #define SigIeWFATPC (0x0063) |
| 4731 | |
| 4732 | |
| 4733 | uint32_t dot11f_unpack_ie_wfdie_opaque(tpAniSirGlobal pCtx, |
| 4734 | uint8_t *pBuf, |
| 4735 | uint8_t ielen, |
| 4736 | tDot11fIEWFDIEOpaque *pDst) |
| 4737 | { |
| 4738 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4739 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4740 | if (pDst->present) |
| 4741 | status = DOT11F_DUPLICATE_IE; |
| 4742 | pDst->present = 1; |
| 4743 | pDst->num_data = (uint8_t)(ielen); |
| 4744 | if (ielen > 249) { |
| 4745 | pDst->present = 0; |
| 4746 | return DOT11F_SKIPPED_BAD_IE; |
| 4747 | } |
| 4748 | |
| 4749 | DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen)); |
| 4750 | (void)pCtx; |
| 4751 | return status; |
| 4752 | } /* End dot11f_unpack_ie_wfdie_opaque. */ |
| 4753 | |
| 4754 | #define SigIeWFDIEOpaque (0x0064) |
| 4755 | |
| 4756 | |
| 4757 | uint32_t dot11f_unpack_ie_wmm_caps(tpAniSirGlobal pCtx, |
| 4758 | uint8_t *pBuf, |
| 4759 | uint8_t ielen, |
| 4760 | tDot11fIEWMMCaps *pDst) |
| 4761 | { |
| 4762 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4763 | uint8_t tmp54__; |
| 4764 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4765 | if (pDst->present) |
| 4766 | status = DOT11F_DUPLICATE_IE; |
| 4767 | pDst->present = 1; |
| 4768 | pDst->version = *pBuf; |
| 4769 | pBuf += 1; |
| 4770 | ielen -= (uint8_t)1; |
| 4771 | if (pDst->version != 0x1) { |
| 4772 | pDst->present = 0; |
| 4773 | return status | DOT11F_BAD_FIXED_VALUE; |
| 4774 | } |
| 4775 | tmp54__ = *pBuf; |
| 4776 | pDst->reserved = tmp54__ >> 0 & 0xf; |
| 4777 | pDst->qack = tmp54__ >> 4 & 0x1; |
| 4778 | pDst->queue_request = tmp54__ >> 5 & 0x1; |
| 4779 | pDst->txop_request = tmp54__ >> 6 & 0x1; |
| 4780 | pDst->more_ack = tmp54__ >> 7 & 0x1; |
| 4781 | (void)pCtx; |
| 4782 | return status; |
| 4783 | } /* End dot11f_unpack_ie_wmm_caps. */ |
| 4784 | |
| 4785 | #define SigIeWMMCaps (0x0065) |
| 4786 | |
| 4787 | |
| 4788 | uint32_t dot11f_unpack_ie_wmm_info_ap(tpAniSirGlobal pCtx, |
| 4789 | uint8_t *pBuf, |
| 4790 | uint8_t ielen, |
| 4791 | tDot11fIEWMMInfoAp *pDst) |
| 4792 | { |
| 4793 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4794 | uint8_t tmp55__; |
| 4795 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4796 | if (pDst->present) |
| 4797 | status = DOT11F_DUPLICATE_IE; |
| 4798 | pDst->present = 1; |
| 4799 | pDst->version = *pBuf; |
| 4800 | pBuf += 1; |
| 4801 | ielen -= (uint8_t)1; |
| 4802 | tmp55__ = *pBuf; |
| 4803 | pDst->param_set_count = tmp55__ >> 0 & 0xf; |
| 4804 | pDst->reserved = tmp55__ >> 4 & 0x7; |
| 4805 | pDst->uapsd = tmp55__ >> 7 & 0x1; |
| 4806 | (void)pCtx; |
| 4807 | return status; |
| 4808 | } /* End dot11f_unpack_ie_wmm_info_ap. */ |
| 4809 | |
| 4810 | #define SigIeWMMInfoAp (0x0066) |
| 4811 | |
| 4812 | |
| 4813 | uint32_t dot11f_unpack_ie_wmm_info_station(tpAniSirGlobal pCtx, |
| 4814 | uint8_t *pBuf, |
| 4815 | uint8_t ielen, |
| 4816 | tDot11fIEWMMInfoStation *pDst) |
| 4817 | { |
| 4818 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4819 | uint8_t tmp56__; |
| 4820 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4821 | if (pDst->present) |
| 4822 | status = DOT11F_DUPLICATE_IE; |
| 4823 | pDst->present = 1; |
| 4824 | pDst->version = *pBuf; |
| 4825 | pBuf += 1; |
| 4826 | ielen -= (uint8_t)1; |
| 4827 | tmp56__ = *pBuf; |
| 4828 | pDst->acvo_uapsd = tmp56__ >> 0 & 0x1; |
| 4829 | pDst->acvi_uapsd = tmp56__ >> 1 & 0x1; |
| 4830 | pDst->acbk_uapsd = tmp56__ >> 2 & 0x1; |
| 4831 | pDst->acbe_uapsd = tmp56__ >> 3 & 0x1; |
| 4832 | pDst->reserved1 = tmp56__ >> 4 & 0x1; |
| 4833 | pDst->max_sp_length = tmp56__ >> 5 & 0x3; |
| 4834 | pDst->reserved2 = tmp56__ >> 7 & 0x1; |
| 4835 | (void)pCtx; |
| 4836 | return status; |
| 4837 | } /* End dot11f_unpack_ie_wmm_info_station. */ |
| 4838 | |
| 4839 | #define SigIeWMMInfoStation (0x0067) |
| 4840 | |
| 4841 | |
| 4842 | uint32_t dot11f_unpack_ie_wmm_params(tpAniSirGlobal pCtx, |
| 4843 | uint8_t *pBuf, |
| 4844 | uint8_t ielen, |
| 4845 | tDot11fIEWMMParams *pDst) |
| 4846 | { |
| 4847 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4848 | uint8_t tmp57__; |
| 4849 | uint8_t tmp58__; |
| 4850 | uint8_t tmp59__; |
| 4851 | uint8_t tmp60__; |
| 4852 | uint8_t tmp61__; |
| 4853 | uint8_t tmp62__; |
| 4854 | uint8_t tmp63__; |
| 4855 | uint8_t tmp64__; |
| 4856 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4857 | if (pDst->present) |
| 4858 | status = DOT11F_DUPLICATE_IE; |
| 4859 | pDst->present = 1; |
| 4860 | pDst->version = *pBuf; |
| 4861 | pBuf += 1; |
| 4862 | ielen -= (uint8_t)1; |
| 4863 | if (pDst->version != 0x1) { |
| 4864 | pDst->present = 0; |
| 4865 | return status | DOT11F_BAD_FIXED_VALUE; |
| 4866 | } |
| 4867 | pDst->qosInfo = *pBuf; |
| 4868 | pBuf += 1; |
| 4869 | ielen -= (uint8_t)1; |
| 4870 | pDst->reserved2 = *pBuf; |
| 4871 | pBuf += 1; |
| 4872 | ielen -= (uint8_t)1; |
| 4873 | tmp57__ = *pBuf; |
| 4874 | pBuf += 1; |
| 4875 | ielen -= 1; |
| 4876 | pDst->acbe_aifsn = tmp57__ >> 0 & 0xf; |
| 4877 | pDst->acbe_acm = tmp57__ >> 4 & 0x1; |
| 4878 | pDst->acbe_aci = tmp57__ >> 5 & 0x3; |
| 4879 | pDst->unused1 = tmp57__ >> 7 & 0x1; |
| 4880 | tmp58__ = *pBuf; |
| 4881 | pBuf += 1; |
| 4882 | ielen -= 1; |
| 4883 | pDst->acbe_acwmin = tmp58__ >> 0 & 0xf; |
| 4884 | pDst->acbe_acwmax = tmp58__ >> 4 & 0xf; |
| 4885 | framesntohs(pCtx, &pDst->acbe_txoplimit, pBuf, 0); |
| 4886 | pBuf += 2; |
| 4887 | ielen -= (uint8_t)2; |
| 4888 | tmp59__ = *pBuf; |
| 4889 | pBuf += 1; |
| 4890 | ielen -= 1; |
| 4891 | pDst->acbk_aifsn = tmp59__ >> 0 & 0xf; |
| 4892 | pDst->acbk_acm = tmp59__ >> 4 & 0x1; |
| 4893 | pDst->acbk_aci = tmp59__ >> 5 & 0x3; |
| 4894 | pDst->unused2 = tmp59__ >> 7 & 0x1; |
| 4895 | tmp60__ = *pBuf; |
| 4896 | pBuf += 1; |
| 4897 | ielen -= 1; |
| 4898 | pDst->acbk_acwmin = tmp60__ >> 0 & 0xf; |
| 4899 | pDst->acbk_acwmax = tmp60__ >> 4 & 0xf; |
| 4900 | framesntohs(pCtx, &pDst->acbk_txoplimit, pBuf, 0); |
| 4901 | pBuf += 2; |
| 4902 | ielen -= (uint8_t)2; |
| 4903 | tmp61__ = *pBuf; |
| 4904 | pBuf += 1; |
| 4905 | ielen -= 1; |
| 4906 | pDst->acvi_aifsn = tmp61__ >> 0 & 0xf; |
| 4907 | pDst->acvi_acm = tmp61__ >> 4 & 0x1; |
| 4908 | pDst->acvi_aci = tmp61__ >> 5 & 0x3; |
| 4909 | pDst->unused3 = tmp61__ >> 7 & 0x1; |
| 4910 | tmp62__ = *pBuf; |
| 4911 | pBuf += 1; |
| 4912 | ielen -= 1; |
| 4913 | pDst->acvi_acwmin = tmp62__ >> 0 & 0xf; |
| 4914 | pDst->acvi_acwmax = tmp62__ >> 4 & 0xf; |
| 4915 | framesntohs(pCtx, &pDst->acvi_txoplimit, pBuf, 0); |
| 4916 | pBuf += 2; |
| 4917 | ielen -= (uint8_t)2; |
| 4918 | tmp63__ = *pBuf; |
| 4919 | pBuf += 1; |
| 4920 | ielen -= 1; |
| 4921 | pDst->acvo_aifsn = tmp63__ >> 0 & 0xf; |
| 4922 | pDst->acvo_acm = tmp63__ >> 4 & 0x1; |
| 4923 | pDst->acvo_aci = tmp63__ >> 5 & 0x3; |
| 4924 | pDst->unused4 = tmp63__ >> 7 & 0x1; |
| 4925 | tmp64__ = *pBuf; |
| 4926 | pBuf += 1; |
| 4927 | ielen -= 1; |
| 4928 | pDst->acvo_acwmin = tmp64__ >> 0 & 0xf; |
| 4929 | pDst->acvo_acwmax = tmp64__ >> 4 & 0xf; |
| 4930 | framesntohs(pCtx, &pDst->acvo_txoplimit, pBuf, 0); |
| 4931 | (void)pCtx; |
| 4932 | return status; |
| 4933 | } /* End dot11f_unpack_ie_wmm_params. */ |
| 4934 | |
| 4935 | #define SigIeWMMParams (0x0068) |
| 4936 | |
| 4937 | |
| 4938 | uint32_t dot11f_unpack_ie_wpa(tpAniSirGlobal pCtx, |
| 4939 | uint8_t *pBuf, |
| 4940 | uint8_t ielen, |
| 4941 | tDot11fIEWPA *pDst) |
| 4942 | { |
| 4943 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 4944 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 4945 | if (pDst->present) |
| 4946 | status = DOT11F_DUPLICATE_IE; |
| 4947 | pDst->present = 1; |
| 4948 | framesntohs(pCtx, &pDst->version, pBuf, 0); |
| 4949 | pBuf += 2; |
| 4950 | ielen -= (uint8_t)2; |
| 4951 | if (pDst->version != 0x1) { |
| 4952 | pDst->present = 0; |
| 4953 | return status | DOT11F_BAD_FIXED_VALUE; |
| 4954 | } |
| 4955 | if (!ielen) { |
| 4956 | pDst->multicast_cipher_present = 0U; |
| 4957 | pDst->unicast_cipher_count = 0U; |
| 4958 | pDst->auth_suite_count = 0U; |
| 4959 | return 0U; |
| 4960 | } else { |
| 4961 | pDst->multicast_cipher_present = 1U; |
| 4962 | DOT11F_MEMCPY(pCtx, pDst->multicast_cipher, pBuf, 4); |
| 4963 | pBuf += 4; |
| 4964 | ielen -= (uint8_t)4; |
| 4965 | } |
| 4966 | if (!ielen) { |
| 4967 | pDst->unicast_cipher_count = 0U; |
| 4968 | pDst->auth_suite_count = 0U; |
| 4969 | return 0U; |
| 4970 | } else { |
| 4971 | framesntohs(pCtx, &pDst->unicast_cipher_count, pBuf, 0); |
| 4972 | pBuf += 2; |
| 4973 | ielen -= (uint8_t)2; |
| 4974 | } |
| 4975 | if (pDst->unicast_cipher_count > 4) { |
| 4976 | pDst->present = 0; |
| 4977 | return DOT11F_SKIPPED_BAD_IE; |
| 4978 | } |
| 4979 | |
| 4980 | DOT11F_MEMCPY(pCtx, pDst->unicast_ciphers, pBuf, (pDst->unicast_cipher_count * 4)); |
| 4981 | pBuf += (pDst->unicast_cipher_count * 4); |
| 4982 | ielen -= (pDst->unicast_cipher_count * 4); |
| 4983 | if (!ielen) { |
| 4984 | pDst->auth_suite_count = 0U; |
| 4985 | return 0U; |
| 4986 | } else { |
| 4987 | framesntohs(pCtx, &pDst->auth_suite_count, pBuf, 0); |
| 4988 | pBuf += 2; |
| 4989 | ielen -= (uint8_t)2; |
| 4990 | } |
| 4991 | if (pDst->auth_suite_count > 4) { |
| 4992 | pDst->present = 0; |
| 4993 | return DOT11F_SKIPPED_BAD_IE; |
| 4994 | } |
| 4995 | |
| 4996 | DOT11F_MEMCPY(pCtx, pDst->auth_suites, pBuf, (pDst->auth_suite_count * 4)); |
| 4997 | pBuf += (pDst->auth_suite_count * 4); |
| 4998 | ielen -= (pDst->auth_suite_count * 4); |
| 4999 | if (!ielen) { |
| 5000 | return 0U; |
| 5001 | } else { |
| 5002 | framesntohs(pCtx, &pDst->caps, pBuf, 0); |
| 5003 | } |
| 5004 | (void)pCtx; |
| 5005 | return status; |
| 5006 | } /* End dot11f_unpack_ie_wpa. */ |
| 5007 | |
| 5008 | #define SigIeWPA (0x0069) |
| 5009 | |
| 5010 | |
| 5011 | uint32_t dot11f_unpack_ie_wpa_opaque(tpAniSirGlobal pCtx, |
| 5012 | uint8_t *pBuf, |
| 5013 | uint8_t ielen, |
| 5014 | tDot11fIEWPAOpaque *pDst) |
| 5015 | { |
| 5016 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5017 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 5018 | if (pDst->present) |
| 5019 | status = DOT11F_DUPLICATE_IE; |
| 5020 | pDst->present = 1; |
| 5021 | pDst->num_data = (uint8_t)(ielen); |
| 5022 | if (ielen > 249) { |
| 5023 | pDst->present = 0; |
| 5024 | return DOT11F_SKIPPED_BAD_IE; |
| 5025 | } |
| 5026 | |
| 5027 | DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen)); |
| 5028 | (void)pCtx; |
| 5029 | return status; |
| 5030 | } /* End dot11f_unpack_ie_wpa_opaque. */ |
| 5031 | |
| 5032 | #define SigIeWPAOpaque (0x006a) |
| 5033 | |
| 5034 | |
| 5035 | static const tTLVDefn TLVS_WSC[] = { |
| 5036 | { offsetof(tDot11fIEWSC, Version), offsetof(tDot11fTLVVersion, present), |
| 5037 | "Version", SigTlvVersion, DOT11F_TLV_VERSION, 0, 5, 5, 1, 2, 2, 1, }, |
| 5038 | { offsetof(tDot11fIEWSC, WPSState), offsetof(tDot11fTLVWPSState, present), |
| 5039 | "WPSState", SigTlvWPSState, DOT11F_TLV_WPSSTATE, 0, 5, 5, 0, 2, 2, 1, }, |
| 5040 | { offsetof(tDot11fIEWSC, APSetupLocked), |
| 5041 | offsetof(tDot11fTLVAPSetupLocked, present), "APSetupLocked", |
| 5042 | SigTlvAPSetupLocked, DOT11F_TLV_APSETUPLOCKED, 0, 5, 5, 0, 2, 2, 1, }, |
| 5043 | { offsetof(tDot11fIEWSC, SelectedRegistrarConfigMethods), |
| 5044 | offsetof(tDot11fTLVSelectedRegistrarConfigMethods, present), |
| 5045 | "SelectedRegistrarConfigMethods", SigTlvSelectedRegistrarConfigMethods, |
| 5046 | DOT11F_TLV_SELECTEDREGISTRARCONFIGMETHODS, 0, 6, 6, 0, 2, 2, 1, }, |
| 5047 | { offsetof(tDot11fIEWSC, UUID_E), offsetof(tDot11fTLVUUID_E, present), |
| 5048 | "UUID_E", SigTlvUUID_E, DOT11F_TLV_UUID_E, 0, 20, 20, 0, 2, 2, 1, }, |
| 5049 | { offsetof(tDot11fIEWSC, UUID_R), offsetof(tDot11fTLVUUID_R, present), |
| 5050 | "UUID_R", SigTlvUUID_R, DOT11F_TLV_UUID_R, 0, 20, 20, 0, 2, 2, 1, }, |
| 5051 | { offsetof(tDot11fIEWSC, RFBands), offsetof(tDot11fTLVRFBands, present), |
| 5052 | "RFBands", SigTlvRFBands, DOT11F_TLV_RFBANDS, 0, 5, 5, 0, 2, 2, 1, }, |
| 5053 | { offsetof(tDot11fIEWSC, SelectedRegistrar), |
| 5054 | offsetof(tDot11fTLVSelectedRegistrar, present), "SelectedRegistrar", |
| 5055 | SigTlvSelectedRegistrar, DOT11F_TLV_SELECTEDREGISTRAR, |
| 5056 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5057 | { offsetof(tDot11fIEWSC, ConfigMethods), |
| 5058 | offsetof(tDot11fTLVConfigMethods, present), "ConfigMethods", |
| 5059 | SigTlvConfigMethods, DOT11F_TLV_CONFIGMETHODS, 0, 6, 6, 0, 2, 2, 1, }, |
| 5060 | { offsetof(tDot11fIEWSC, AssociationState), |
| 5061 | offsetof(tDot11fTLVAssociationState, present), "AssociationState", |
| 5062 | SigTlvAssociationState, DOT11F_TLV_ASSOCIATIONSTATE, |
| 5063 | 0, 6, 6, 0, 2, 2, 1, }, |
| 5064 | { offsetof(tDot11fIEWSC, ConfigurationError), |
| 5065 | offsetof(tDot11fTLVConfigurationError, present), "ConfigurationError", |
| 5066 | SigTlvConfigurationError, DOT11F_TLV_CONFIGURATIONERROR, |
| 5067 | 0, 6, 6, 0, 2, 2, 1, }, |
| 5068 | { offsetof(tDot11fIEWSC, Manufacturer), offsetof(tDot11fTLVManufacturer, |
| 5069 | present), "Manufacturer", SigTlvManufacturer, DOT11F_TLV_MANUFACTURER, |
| 5070 | 0, 4, 68, 0, 2, 2, 1, }, |
| 5071 | { offsetof(tDot11fIEWSC, ModelName), offsetof(tDot11fTLVModelName, |
| 5072 | present), "ModelName", SigTlvModelName, DOT11F_TLV_MODELNAME, |
| 5073 | 0, 4, 36, 0, 2, 2, 1, }, |
| 5074 | { offsetof(tDot11fIEWSC, ModelNumber), offsetof(tDot11fTLVModelNumber, |
| 5075 | present), "ModelNumber", SigTlvModelNumber, DOT11F_TLV_MODELNUMBER, |
| 5076 | 0, 4, 36, 0, 2, 2, 1, }, |
| 5077 | { offsetof(tDot11fIEWSC, SerialNumber), offsetof(tDot11fTLVSerialNumber, |
| 5078 | present), "SerialNumber", SigTlvSerialNumber, DOT11F_TLV_SERIALNUMBER, |
| 5079 | 0, 4, 36, 0, 2, 2, 1, }, |
| 5080 | { offsetof(tDot11fIEWSC, DeviceName), offsetof(tDot11fTLVDeviceName, |
| 5081 | present), "DeviceName", SigTlvDeviceName, DOT11F_TLV_DEVICENAME, |
| 5082 | 0, 4, 36, 0, 2, 2, 1, }, |
| 5083 | { offsetof(tDot11fIEWSC, DevicePasswordID), |
| 5084 | offsetof(tDot11fTLVDevicePasswordID, present), "DevicePasswordID", |
| 5085 | SigTlvDevicePasswordID, DOT11F_TLV_DEVICEPASSWORDID, |
| 5086 | 0, 6, 6, 0, 2, 2, 1, }, |
| 5087 | { offsetof(tDot11fIEWSC, PrimaryDeviceType), |
| 5088 | offsetof(tDot11fTLVPrimaryDeviceType, present), "PrimaryDeviceType", |
| 5089 | SigTlvPrimaryDeviceType, DOT11F_TLV_PRIMARYDEVICETYPE, |
| 5090 | 0, 12, 12, 0, 2, 2, 1, }, |
| 5091 | { offsetof(tDot11fIEWSC, RequestType), offsetof(tDot11fTLVRequestType, |
| 5092 | present), "RequestType", SigTlvRequestType, DOT11F_TLV_REQUESTTYPE, |
| 5093 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5094 | { offsetof(tDot11fIEWSC, ResponseType), offsetof(tDot11fTLVResponseType, |
| 5095 | present), "ResponseType", SigTlvResponseType, DOT11F_TLV_RESPONSETYPE, |
| 5096 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5097 | { offsetof(tDot11fIEWSC, VendorExtension), |
| 5098 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5099 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5100 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5101 | { offsetof(tDot11fIEWSC, RequestDeviceType), |
| 5102 | offsetof(tDot11fTLVRequestDeviceType, present), "RequestDeviceType", |
| 5103 | SigTlvRequestDeviceType, DOT11F_TLV_REQUESTDEVICETYPE, |
| 5104 | 0, 12, 12, 0, 2, 2, 1, }, |
| 5105 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5106 | }; |
| 5107 | |
| 5108 | uint32_t dot11f_unpack_ie_wsc(tpAniSirGlobal pCtx, |
| 5109 | uint8_t *pBuf, |
| 5110 | uint8_t ielen, |
| 5111 | tDot11fIEWSC *pDst) |
| 5112 | { |
| 5113 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5114 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5115 | pDst->present = 1; |
| 5116 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5117 | TLVS_WSC, |
| 5118 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5119 | return status; |
| 5120 | } /* End dot11f_unpack_ie_wsc. */ |
| 5121 | |
| 5122 | #define SigIeWSC (0x006b) |
| 5123 | |
| 5124 | |
| 5125 | static const tTLVDefn TLVS_WscAssocReq[] = { |
| 5126 | { offsetof(tDot11fIEWscAssocReq, Version), offsetof(tDot11fTLVVersion, |
| 5127 | present), "Version", SigTlvVersion, DOT11F_TLV_VERSION, |
| 5128 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5129 | { offsetof(tDot11fIEWscAssocReq, RequestType), |
| 5130 | offsetof(tDot11fTLVRequestType, present), "RequestType", |
| 5131 | SigTlvRequestType, DOT11F_TLV_REQUESTTYPE, 0, 5, 5, 1, 2, 2, 1, }, |
| 5132 | { offsetof(tDot11fIEWscAssocReq, VendorExtension), |
| 5133 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5134 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5135 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5136 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5137 | }; |
| 5138 | |
| 5139 | uint32_t dot11f_unpack_ie_wsc_assoc_req(tpAniSirGlobal pCtx, |
| 5140 | uint8_t *pBuf, |
| 5141 | uint8_t ielen, |
| 5142 | tDot11fIEWscAssocReq *pDst) |
| 5143 | { |
| 5144 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5145 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5146 | pDst->present = 1; |
| 5147 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5148 | TLVS_WscAssocReq, |
| 5149 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5150 | return status; |
| 5151 | } /* End dot11f_unpack_ie_wsc_assoc_req. */ |
| 5152 | |
| 5153 | #define SigIeWscAssocReq (0x006c) |
| 5154 | |
| 5155 | |
| 5156 | static const tTLVDefn TLVS_WscAssocRes[] = { |
| 5157 | { offsetof(tDot11fIEWscAssocRes, Version), offsetof(tDot11fTLVVersion, |
| 5158 | present), "Version", SigTlvVersion, DOT11F_TLV_VERSION, |
| 5159 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5160 | { offsetof(tDot11fIEWscAssocRes, ResponseType), |
| 5161 | offsetof(tDot11fTLVResponseType, present), "ResponseType", |
| 5162 | SigTlvResponseType, DOT11F_TLV_RESPONSETYPE, 0, 5, 5, 1, 2, 2, 1, }, |
| 5163 | { offsetof(tDot11fIEWscAssocRes, VendorExtension), |
| 5164 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5165 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5166 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5167 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5168 | }; |
| 5169 | |
| 5170 | uint32_t dot11f_unpack_ie_wsc_assoc_res(tpAniSirGlobal pCtx, |
| 5171 | uint8_t *pBuf, |
| 5172 | uint8_t ielen, |
| 5173 | tDot11fIEWscAssocRes *pDst) |
| 5174 | { |
| 5175 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5176 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5177 | pDst->present = 1; |
| 5178 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5179 | TLVS_WscAssocRes, |
| 5180 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5181 | return status; |
| 5182 | } /* End dot11f_unpack_ie_wsc_assoc_res. */ |
| 5183 | |
| 5184 | #define SigIeWscAssocRes (0x006d) |
| 5185 | |
| 5186 | |
| 5187 | static const tTLVDefn TLVS_WscBeacon[] = { |
| 5188 | { offsetof(tDot11fIEWscBeacon, Version), offsetof(tDot11fTLVVersion, |
| 5189 | present), "Version", SigTlvVersion, DOT11F_TLV_VERSION, |
| 5190 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5191 | { offsetof(tDot11fIEWscBeacon, WPSState), offsetof(tDot11fTLVWPSState, |
| 5192 | present), "WPSState", SigTlvWPSState, DOT11F_TLV_WPSSTATE, |
| 5193 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5194 | { offsetof(tDot11fIEWscBeacon, APSetupLocked), |
| 5195 | offsetof(tDot11fTLVAPSetupLocked, present), "APSetupLocked", |
| 5196 | SigTlvAPSetupLocked, DOT11F_TLV_APSETUPLOCKED, 0, 5, 5, 0, 2, 2, 1, }, |
| 5197 | { offsetof(tDot11fIEWscBeacon, SelectedRegistrar), |
| 5198 | offsetof(tDot11fTLVSelectedRegistrar, present), "SelectedRegistrar", |
| 5199 | SigTlvSelectedRegistrar, DOT11F_TLV_SELECTEDREGISTRAR, |
| 5200 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5201 | { offsetof(tDot11fIEWscBeacon, DevicePasswordID), |
| 5202 | offsetof(tDot11fTLVDevicePasswordID, present), "DevicePasswordID", |
| 5203 | SigTlvDevicePasswordID, DOT11F_TLV_DEVICEPASSWORDID, |
| 5204 | 0, 6, 6, 0, 2, 2, 1, }, |
| 5205 | { offsetof(tDot11fIEWscBeacon, SelectedRegistrarConfigMethods), |
| 5206 | offsetof(tDot11fTLVSelectedRegistrarConfigMethods, present), |
| 5207 | "SelectedRegistrarConfigMethods", SigTlvSelectedRegistrarConfigMethods, |
| 5208 | DOT11F_TLV_SELECTEDREGISTRARCONFIGMETHODS, 0, 6, 6, 0, 2, 2, 1, }, |
| 5209 | { offsetof(tDot11fIEWscBeacon, UUID_E), offsetof(tDot11fTLVUUID_E, |
| 5210 | present), "UUID_E", SigTlvUUID_E, DOT11F_TLV_UUID_E, |
| 5211 | 0, 20, 20, 0, 2, 2, 1, }, |
| 5212 | { offsetof(tDot11fIEWscBeacon, RFBands), offsetof(tDot11fTLVRFBands, |
| 5213 | present), "RFBands", SigTlvRFBands, DOT11F_TLV_RFBANDS, |
| 5214 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5215 | { offsetof(tDot11fIEWscBeacon, VendorExtension), |
| 5216 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5217 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5218 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5219 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5220 | }; |
| 5221 | |
| 5222 | uint32_t dot11f_unpack_ie_wsc_beacon(tpAniSirGlobal pCtx, |
| 5223 | uint8_t *pBuf, |
| 5224 | uint8_t ielen, |
| 5225 | tDot11fIEWscBeacon *pDst) |
| 5226 | { |
| 5227 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5228 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5229 | pDst->present = 1; |
| 5230 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5231 | TLVS_WscBeacon, |
| 5232 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5233 | return status; |
| 5234 | } /* End dot11f_unpack_ie_wsc_beacon. */ |
| 5235 | |
| 5236 | #define SigIeWscBeacon (0x006e) |
| 5237 | |
| 5238 | |
| 5239 | static const tTLVDefn TLVS_WscBeaconProbeRes[] = { |
| 5240 | { offsetof(tDot11fIEWscBeaconProbeRes, Version), |
| 5241 | offsetof(tDot11fTLVVersion, present), "Version", SigTlvVersion, |
| 5242 | DOT11F_TLV_VERSION, 0, 5, 5, 0, 2, 2, 1, }, |
| 5243 | { offsetof(tDot11fIEWscBeaconProbeRes, WPSState), |
| 5244 | offsetof(tDot11fTLVWPSState, present), "WPSState", SigTlvWPSState, |
| 5245 | DOT11F_TLV_WPSSTATE, 0, 5, 5, 0, 2, 2, 1, }, |
| 5246 | { offsetof(tDot11fIEWscBeaconProbeRes, APSetupLocked), |
| 5247 | offsetof(tDot11fTLVAPSetupLocked, present), "APSetupLocked", |
| 5248 | SigTlvAPSetupLocked, DOT11F_TLV_APSETUPLOCKED, 0, 5, 5, 0, 2, 2, 1, }, |
| 5249 | { offsetof(tDot11fIEWscBeaconProbeRes, SelectedRegistrar), |
| 5250 | offsetof(tDot11fTLVSelectedRegistrar, present), "SelectedRegistrar", |
| 5251 | SigTlvSelectedRegistrar, DOT11F_TLV_SELECTEDREGISTRAR, |
| 5252 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5253 | { offsetof(tDot11fIEWscBeaconProbeRes, DevicePasswordID), |
| 5254 | offsetof(tDot11fTLVDevicePasswordID, present), "DevicePasswordID", |
| 5255 | SigTlvDevicePasswordID, DOT11F_TLV_DEVICEPASSWORDID, |
| 5256 | 0, 6, 6, 0, 2, 2, 1, }, |
| 5257 | { offsetof(tDot11fIEWscBeaconProbeRes, SelectedRegistrarConfigMethods), |
| 5258 | offsetof(tDot11fTLVSelectedRegistrarConfigMethods, present), |
| 5259 | "SelectedRegistrarConfigMethods", SigTlvSelectedRegistrarConfigMethods, |
| 5260 | DOT11F_TLV_SELECTEDREGISTRARCONFIGMETHODS, 0, 6, 6, 0, 2, 2, 1, }, |
| 5261 | { offsetof(tDot11fIEWscBeaconProbeRes, ResponseType), |
| 5262 | offsetof(tDot11fTLVResponseType, present), "ResponseType", |
| 5263 | SigTlvResponseType, DOT11F_TLV_RESPONSETYPE, 0, 5, 5, 0, 2, 2, 1, }, |
| 5264 | { offsetof(tDot11fIEWscBeaconProbeRes, UUID_E), |
| 5265 | offsetof(tDot11fTLVUUID_E, present), "UUID_E", SigTlvUUID_E, |
| 5266 | DOT11F_TLV_UUID_E, 0, 20, 20, 0, 2, 2, 1, }, |
| 5267 | { offsetof(tDot11fIEWscBeaconProbeRes, Manufacturer), |
| 5268 | offsetof(tDot11fTLVManufacturer, present), "Manufacturer", |
| 5269 | SigTlvManufacturer, DOT11F_TLV_MANUFACTURER, 0, 4, 68, 0, 2, 2, 1, }, |
| 5270 | { offsetof(tDot11fIEWscBeaconProbeRes, ModelName), |
| 5271 | offsetof(tDot11fTLVModelName, present), "ModelName", SigTlvModelName, |
| 5272 | DOT11F_TLV_MODELNAME, 0, 4, 36, 0, 2, 2, 1, }, |
| 5273 | { offsetof(tDot11fIEWscBeaconProbeRes, ModelNumber), |
| 5274 | offsetof(tDot11fTLVModelNumber, present), "ModelNumber", |
| 5275 | SigTlvModelNumber, DOT11F_TLV_MODELNUMBER, 0, 4, 36, 0, 2, 2, 1, }, |
| 5276 | { offsetof(tDot11fIEWscBeaconProbeRes, SerialNumber), |
| 5277 | offsetof(tDot11fTLVSerialNumber, present), "SerialNumber", |
| 5278 | SigTlvSerialNumber, DOT11F_TLV_SERIALNUMBER, 0, 4, 36, 0, 2, 2, 1, }, |
| 5279 | { offsetof(tDot11fIEWscBeaconProbeRes, PrimaryDeviceType), |
| 5280 | offsetof(tDot11fTLVPrimaryDeviceType, present), "PrimaryDeviceType", |
| 5281 | SigTlvPrimaryDeviceType, DOT11F_TLV_PRIMARYDEVICETYPE, |
| 5282 | 0, 12, 12, 0, 2, 2, 1, }, |
| 5283 | { offsetof(tDot11fIEWscBeaconProbeRes, DeviceName), |
| 5284 | offsetof(tDot11fTLVDeviceName, present), "DeviceName", SigTlvDeviceName, |
| 5285 | DOT11F_TLV_DEVICENAME, 0, 4, 36, 0, 2, 2, 1, }, |
| 5286 | { offsetof(tDot11fIEWscBeaconProbeRes, ConfigMethods), |
| 5287 | offsetof(tDot11fTLVConfigMethods, present), "ConfigMethods", |
| 5288 | SigTlvConfigMethods, DOT11F_TLV_CONFIGMETHODS, 0, 6, 6, 0, 2, 2, 1, }, |
| 5289 | { offsetof(tDot11fIEWscBeaconProbeRes, RFBands), |
| 5290 | offsetof(tDot11fTLVRFBands, present), "RFBands", SigTlvRFBands, |
| 5291 | DOT11F_TLV_RFBANDS, 0, 5, 5, 0, 2, 2, 1, }, |
| 5292 | { offsetof(tDot11fIEWscBeaconProbeRes, VendorExtension), |
| 5293 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5294 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5295 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5296 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5297 | }; |
| 5298 | |
| 5299 | uint32_t dot11f_unpack_ie_wsc_beacon_probe_res(tpAniSirGlobal pCtx, |
| 5300 | uint8_t *pBuf, |
| 5301 | uint8_t ielen, |
| 5302 | tDot11fIEWscBeaconProbeRes *pDst) |
| 5303 | { |
| 5304 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5305 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5306 | pDst->present = 1; |
| 5307 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5308 | TLVS_WscBeaconProbeRes, |
| 5309 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5310 | return status; |
| 5311 | } /* End dot11f_unpack_ie_wsc_beacon_probe_res. */ |
| 5312 | |
| 5313 | #define SigIeWscBeaconProbeRes (0x006f) |
| 5314 | |
| 5315 | |
| 5316 | uint32_t dot11f_unpack_ie_wsc_ie_opaque(tpAniSirGlobal pCtx, |
| 5317 | uint8_t *pBuf, |
| 5318 | uint8_t ielen, |
| 5319 | tDot11fIEWscIEOpaque *pDst) |
| 5320 | { |
| 5321 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5322 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 5323 | if (pDst->present) |
| 5324 | status = DOT11F_DUPLICATE_IE; |
| 5325 | pDst->present = 1; |
| 5326 | pDst->num_data = (uint8_t)(ielen); |
| 5327 | if (ielen > 249) { |
| 5328 | pDst->present = 0; |
| 5329 | return DOT11F_SKIPPED_BAD_IE; |
| 5330 | } |
| 5331 | |
| 5332 | DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen)); |
| 5333 | (void)pCtx; |
| 5334 | return status; |
| 5335 | } /* End dot11f_unpack_ie_wsc_ie_opaque. */ |
| 5336 | |
| 5337 | #define SigIeWscIEOpaque (0x0070) |
| 5338 | |
| 5339 | |
| 5340 | static const tTLVDefn TLVS_WscProbeReq[] = { |
| 5341 | { offsetof(tDot11fIEWscProbeReq, Version), offsetof(tDot11fTLVVersion, |
| 5342 | present), "Version", SigTlvVersion, DOT11F_TLV_VERSION, |
| 5343 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5344 | { offsetof(tDot11fIEWscProbeReq, RequestType), |
| 5345 | offsetof(tDot11fTLVRequestType, present), "RequestType", |
| 5346 | SigTlvRequestType, DOT11F_TLV_REQUESTTYPE, 0, 5, 5, 1, 2, 2, 1, }, |
| 5347 | { offsetof(tDot11fIEWscProbeReq, ConfigMethods), |
| 5348 | offsetof(tDot11fTLVConfigMethods, present), "ConfigMethods", |
| 5349 | SigTlvConfigMethods, DOT11F_TLV_CONFIGMETHODS, 0, 6, 6, 1, 2, 2, 1, }, |
| 5350 | { offsetof(tDot11fIEWscProbeReq, UUID_E), offsetof(tDot11fTLVUUID_E, |
| 5351 | present), "UUID_E", SigTlvUUID_E, DOT11F_TLV_UUID_E, |
| 5352 | 0, 20, 20, 1, 2, 2, 1, }, |
| 5353 | { offsetof(tDot11fIEWscProbeReq, PrimaryDeviceType), |
| 5354 | offsetof(tDot11fTLVPrimaryDeviceType, present), "PrimaryDeviceType", |
| 5355 | SigTlvPrimaryDeviceType, DOT11F_TLV_PRIMARYDEVICETYPE, |
| 5356 | 0, 12, 12, 1, 2, 2, 1, }, |
| 5357 | { offsetof(tDot11fIEWscProbeReq, RFBands), offsetof(tDot11fTLVRFBands, |
| 5358 | present), "RFBands", SigTlvRFBands, DOT11F_TLV_RFBANDS, |
| 5359 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5360 | { offsetof(tDot11fIEWscProbeReq, AssociationState), |
| 5361 | offsetof(tDot11fTLVAssociationState, present), "AssociationState", |
| 5362 | SigTlvAssociationState, DOT11F_TLV_ASSOCIATIONSTATE, |
| 5363 | 0, 6, 6, 1, 2, 2, 1, }, |
| 5364 | { offsetof(tDot11fIEWscProbeReq, ConfigurationError), |
| 5365 | offsetof(tDot11fTLVConfigurationError, present), "ConfigurationError", |
| 5366 | SigTlvConfigurationError, DOT11F_TLV_CONFIGURATIONERROR, |
| 5367 | 0, 6, 6, 1, 2, 2, 1, }, |
| 5368 | { offsetof(tDot11fIEWscProbeReq, DevicePasswordID), |
| 5369 | offsetof(tDot11fTLVDevicePasswordID, present), "DevicePasswordID", |
| 5370 | SigTlvDevicePasswordID, DOT11F_TLV_DEVICEPASSWORDID, |
| 5371 | 0, 6, 6, 1, 2, 2, 1, }, |
| 5372 | { offsetof(tDot11fIEWscProbeReq, Manufacturer), |
| 5373 | offsetof(tDot11fTLVManufacturer, present), "Manufacturer", |
| 5374 | SigTlvManufacturer, DOT11F_TLV_MANUFACTURER, 0, 4, 68, 0, 2, 2, 1, }, |
| 5375 | { offsetof(tDot11fIEWscProbeReq, ModelName), |
| 5376 | offsetof(tDot11fTLVModelName, present), "ModelName", SigTlvModelName, |
| 5377 | DOT11F_TLV_MODELNAME, 0, 4, 36, 0, 2, 2, 1, }, |
| 5378 | { offsetof(tDot11fIEWscProbeReq, ModelNumber), |
| 5379 | offsetof(tDot11fTLVModelNumber, present), "ModelNumber", |
| 5380 | SigTlvModelNumber, DOT11F_TLV_MODELNUMBER, 0, 4, 36, 0, 2, 2, 1, }, |
| 5381 | { offsetof(tDot11fIEWscProbeReq, DeviceName), |
| 5382 | offsetof(tDot11fTLVDeviceName, present), "DeviceName", SigTlvDeviceName, |
| 5383 | DOT11F_TLV_DEVICENAME, 0, 4, 36, 0, 2, 2, 1, }, |
| 5384 | { offsetof(tDot11fIEWscProbeReq, VendorExtension), |
| 5385 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5386 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5387 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5388 | { offsetof(tDot11fIEWscProbeReq, RequestDeviceType), |
| 5389 | offsetof(tDot11fTLVRequestDeviceType, present), "RequestDeviceType", |
| 5390 | SigTlvRequestDeviceType, DOT11F_TLV_REQUESTDEVICETYPE, |
| 5391 | 0, 12, 12, 0, 2, 2, 1, }, |
| 5392 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5393 | }; |
| 5394 | |
| 5395 | uint32_t dot11f_unpack_ie_wsc_probe_req(tpAniSirGlobal pCtx, |
| 5396 | uint8_t *pBuf, |
| 5397 | uint8_t ielen, |
| 5398 | tDot11fIEWscProbeReq *pDst) |
| 5399 | { |
| 5400 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5401 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5402 | pDst->present = 1; |
| 5403 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5404 | TLVS_WscProbeReq, |
| 5405 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5406 | return status; |
| 5407 | } /* End dot11f_unpack_ie_wsc_probe_req. */ |
| 5408 | |
| 5409 | #define SigIeWscProbeReq (0x0071) |
| 5410 | |
| 5411 | |
| 5412 | static const tTLVDefn TLVS_WscProbeRes[] = { |
| 5413 | { offsetof(tDot11fIEWscProbeRes, Version), offsetof(tDot11fTLVVersion, |
| 5414 | present), "Version", SigTlvVersion, DOT11F_TLV_VERSION, |
| 5415 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5416 | { offsetof(tDot11fIEWscProbeRes, WPSState), offsetof(tDot11fTLVWPSState, |
| 5417 | present), "WPSState", SigTlvWPSState, DOT11F_TLV_WPSSTATE, |
| 5418 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5419 | { offsetof(tDot11fIEWscProbeRes, APSetupLocked), |
| 5420 | offsetof(tDot11fTLVAPSetupLocked, present), "APSetupLocked", |
| 5421 | SigTlvAPSetupLocked, DOT11F_TLV_APSETUPLOCKED, 0, 5, 5, 0, 2, 2, 1, }, |
| 5422 | { offsetof(tDot11fIEWscProbeRes, SelectedRegistrar), |
| 5423 | offsetof(tDot11fTLVSelectedRegistrar, present), "SelectedRegistrar", |
| 5424 | SigTlvSelectedRegistrar, DOT11F_TLV_SELECTEDREGISTRAR, |
| 5425 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5426 | { offsetof(tDot11fIEWscProbeRes, DevicePasswordID), |
| 5427 | offsetof(tDot11fTLVDevicePasswordID, present), "DevicePasswordID", |
| 5428 | SigTlvDevicePasswordID, DOT11F_TLV_DEVICEPASSWORDID, |
| 5429 | 0, 6, 6, 0, 2, 2, 1, }, |
| 5430 | { offsetof(tDot11fIEWscProbeRes, SelectedRegistrarConfigMethods), |
| 5431 | offsetof(tDot11fTLVSelectedRegistrarConfigMethods, present), |
| 5432 | "SelectedRegistrarConfigMethods", SigTlvSelectedRegistrarConfigMethods, |
| 5433 | DOT11F_TLV_SELECTEDREGISTRARCONFIGMETHODS, 0, 6, 6, 0, 2, 2, 1, }, |
| 5434 | { offsetof(tDot11fIEWscProbeRes, ResponseType), |
| 5435 | offsetof(tDot11fTLVResponseType, present), "ResponseType", |
| 5436 | SigTlvResponseType, DOT11F_TLV_RESPONSETYPE, 0, 5, 5, 1, 2, 2, 1, }, |
| 5437 | { offsetof(tDot11fIEWscProbeRes, UUID_E), offsetof(tDot11fTLVUUID_E, |
| 5438 | present), "UUID_E", SigTlvUUID_E, DOT11F_TLV_UUID_E, |
| 5439 | 0, 20, 20, 1, 2, 2, 1, }, |
| 5440 | { offsetof(tDot11fIEWscProbeRes, Manufacturer), |
| 5441 | offsetof(tDot11fTLVManufacturer, present), "Manufacturer", |
| 5442 | SigTlvManufacturer, DOT11F_TLV_MANUFACTURER, 0, 4, 68, 1, 2, 2, 1, }, |
| 5443 | { offsetof(tDot11fIEWscProbeRes, ModelName), |
| 5444 | offsetof(tDot11fTLVModelName, present), "ModelName", SigTlvModelName, |
| 5445 | DOT11F_TLV_MODELNAME, 0, 4, 36, 1, 2, 2, 1, }, |
| 5446 | { offsetof(tDot11fIEWscProbeRes, ModelNumber), |
| 5447 | offsetof(tDot11fTLVModelNumber, present), "ModelNumber", |
| 5448 | SigTlvModelNumber, DOT11F_TLV_MODELNUMBER, 0, 4, 36, 1, 2, 2, 1, }, |
| 5449 | { offsetof(tDot11fIEWscProbeRes, SerialNumber), |
| 5450 | offsetof(tDot11fTLVSerialNumber, present), "SerialNumber", |
| 5451 | SigTlvSerialNumber, DOT11F_TLV_SERIALNUMBER, 0, 4, 36, 1, 2, 2, 1, }, |
| 5452 | { offsetof(tDot11fIEWscProbeRes, PrimaryDeviceType), |
| 5453 | offsetof(tDot11fTLVPrimaryDeviceType, present), "PrimaryDeviceType", |
| 5454 | SigTlvPrimaryDeviceType, DOT11F_TLV_PRIMARYDEVICETYPE, |
| 5455 | 0, 12, 12, 1, 2, 2, 1, }, |
| 5456 | { offsetof(tDot11fIEWscProbeRes, DeviceName), |
| 5457 | offsetof(tDot11fTLVDeviceName, present), "DeviceName", SigTlvDeviceName, |
| 5458 | DOT11F_TLV_DEVICENAME, 0, 4, 36, 1, 2, 2, 1, }, |
| 5459 | { offsetof(tDot11fIEWscProbeRes, ConfigMethods), |
| 5460 | offsetof(tDot11fTLVConfigMethods, present), "ConfigMethods", |
| 5461 | SigTlvConfigMethods, DOT11F_TLV_CONFIGMETHODS, 0, 6, 6, 1, 2, 2, 1, }, |
| 5462 | { offsetof(tDot11fIEWscProbeRes, RFBands), offsetof(tDot11fTLVRFBands, |
| 5463 | present), "RFBands", SigTlvRFBands, DOT11F_TLV_RFBANDS, |
| 5464 | 0, 5, 5, 0, 2, 2, 1, }, |
| 5465 | { offsetof(tDot11fIEWscProbeRes, VendorExtension), |
| 5466 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5467 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5468 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5469 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5470 | }; |
| 5471 | |
| 5472 | uint32_t dot11f_unpack_ie_wsc_probe_res(tpAniSirGlobal pCtx, |
| 5473 | uint8_t *pBuf, |
| 5474 | uint8_t ielen, |
| 5475 | tDot11fIEWscProbeRes *pDst) |
| 5476 | { |
| 5477 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5478 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5479 | pDst->present = 1; |
| 5480 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5481 | TLVS_WscProbeRes, |
| 5482 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5483 | return status; |
| 5484 | } /* End dot11f_unpack_ie_wsc_probe_res. */ |
| 5485 | |
| 5486 | #define SigIeWscProbeRes (0x0072) |
| 5487 | |
| 5488 | |
| 5489 | static const tTLVDefn TLVS_WscReassocRes[] = { |
| 5490 | { offsetof(tDot11fIEWscReassocRes, Version), offsetof(tDot11fTLVVersion, |
| 5491 | present), "Version", SigTlvVersion, DOT11F_TLV_VERSION, |
| 5492 | 0, 5, 5, 1, 2, 2, 1, }, |
| 5493 | { offsetof(tDot11fIEWscReassocRes, ResponseType), |
| 5494 | offsetof(tDot11fTLVResponseType, present), "ResponseType", |
| 5495 | SigTlvResponseType, DOT11F_TLV_RESPONSETYPE, 0, 5, 5, 1, 2, 2, 1, }, |
| 5496 | { offsetof(tDot11fIEWscReassocRes, VendorExtension), |
| 5497 | offsetof(tDot11fTLVVendorExtension, present), "VendorExtension", |
| 5498 | SigTlvVendorExtension, DOT11F_TLV_VENDOREXTENSION, |
| 5499 | 0, 7, 21, 0, 2, 2, 1, }, |
| 5500 | {0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0}, |
| 5501 | }; |
| 5502 | |
| 5503 | uint32_t dot11f_unpack_ie_wsc_reassoc_res(tpAniSirGlobal pCtx, |
| 5504 | uint8_t *pBuf, |
| 5505 | uint8_t ielen, |
| 5506 | tDot11fIEWscReassocRes *pDst) |
| 5507 | { |
| 5508 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5509 | (void)pBuf; (void)ielen; /* Shutup the compiler */ |
| 5510 | pDst->present = 1; |
| 5511 | status = unpack_tlv_core(pCtx, pBuf, ielen, |
| 5512 | TLVS_WscReassocRes, |
| 5513 | (uint8_t *)pDst, sizeof(*pDst)); |
| 5514 | return status; |
| 5515 | } /* End dot11f_unpack_ie_wsc_reassoc_res. */ |
| 5516 | |
| 5517 | #define SigIeWscReassocRes (0x0073) |
| 5518 | |
| 5519 | |
| 5520 | uint32_t dot11f_unpack_ie_ext_chan_switch_ann(tpAniSirGlobal pCtx, |
| 5521 | uint8_t *pBuf, |
| 5522 | uint8_t ielen, |
| 5523 | tDot11fIEext_chan_switch_ann *pDst) |
| 5524 | { |
| 5525 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5526 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 5527 | if (pDst->present) |
| 5528 | status = DOT11F_DUPLICATE_IE; |
| 5529 | pDst->present = 1; |
| 5530 | pDst->switch_mode = *pBuf; |
| 5531 | pBuf += 1; |
| 5532 | ielen -= (uint8_t)1; |
| 5533 | pDst->new_reg_class = *pBuf; |
| 5534 | pBuf += 1; |
| 5535 | ielen -= (uint8_t)1; |
| 5536 | pDst->new_channel = *pBuf; |
| 5537 | pBuf += 1; |
| 5538 | ielen -= (uint8_t)1; |
| 5539 | pDst->switch_count = *pBuf; |
| 5540 | (void)pCtx; |
| 5541 | return status; |
| 5542 | } /* End dot11f_unpack_ie_ext_chan_switch_ann. */ |
| 5543 | |
| 5544 | #define SigIeext_chan_switch_ann (0x0074) |
| 5545 | |
| 5546 | |
| 5547 | uint32_t dot11f_unpack_ie_ht2040_bss_coexistence(tpAniSirGlobal pCtx, |
| 5548 | uint8_t *pBuf, |
| 5549 | uint8_t ielen, |
| 5550 | tDot11fIEht2040_bss_coexistence *pDst) |
| 5551 | { |
| 5552 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5553 | uint8_t tmp65__; |
| 5554 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 5555 | if (pDst->present) |
| 5556 | status = DOT11F_DUPLICATE_IE; |
| 5557 | pDst->present = 1; |
| 5558 | tmp65__ = *pBuf; |
| 5559 | pDst->info_request = tmp65__ >> 0 & 0x1; |
| 5560 | pDst->forty_mhz_intolerant = tmp65__ >> 1 & 0x1; |
| 5561 | pDst->twenty_mhz_bsswidth_req = tmp65__ >> 2 & 0x1; |
| 5562 | pDst->obss_scan_exemption_req = tmp65__ >> 3 & 0x1; |
| 5563 | pDst->obss_scan_exemption_grant = tmp65__ >> 4 & 0x1; |
| 5564 | pDst->unused = tmp65__ >> 5 & 0x7; |
| 5565 | (void)pCtx; |
| 5566 | return status; |
| 5567 | } /* End dot11f_unpack_ie_ht2040_bss_coexistence. */ |
| 5568 | |
| 5569 | #define SigIeht2040_bss_coexistence (0x0075) |
| 5570 | |
| 5571 | |
| 5572 | uint32_t dot11f_unpack_ie_ht2040_bss_intolerant_report(tpAniSirGlobal pCtx, |
| 5573 | uint8_t *pBuf, |
| 5574 | uint8_t ielen, |
| 5575 | tDot11fIEht2040_bss_intolerant_report *pDst) |
| 5576 | { |
| 5577 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5578 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 5579 | if (pDst->present) |
| 5580 | status = DOT11F_DUPLICATE_IE; |
| 5581 | pDst->present = 1; |
| 5582 | pDst->operating_class = *pBuf; |
| 5583 | pBuf += 1; |
| 5584 | ielen -= (uint8_t)1; |
| 5585 | pDst->num_channel_list = (uint8_t)(ielen); |
| 5586 | if (ielen > 50) { |
| 5587 | pDst->present = 0; |
| 5588 | return DOT11F_SKIPPED_BAD_IE; |
| 5589 | } |
| 5590 | |
| 5591 | DOT11F_MEMCPY(pCtx, pDst->channel_list, pBuf, (ielen)); |
| 5592 | (void)pCtx; |
| 5593 | return status; |
| 5594 | } /* End dot11f_unpack_ie_ht2040_bss_intolerant_report. */ |
| 5595 | |
| 5596 | #define SigIeht2040_bss_intolerant_report (0x0076) |
| 5597 | |
| 5598 | |
| 5599 | uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx, |
| 5600 | uint8_t *pBuf, |
| 5601 | uint8_t ielen, |
| 5602 | tDot11fIEsec_chan_offset_ele *pDst) |
| 5603 | { |
| 5604 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5605 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 5606 | if (pDst->present) |
| 5607 | status = DOT11F_DUPLICATE_IE; |
| 5608 | pDst->present = 1; |
| 5609 | pDst->secondaryChannelOffset = *pBuf; |
| 5610 | (void)pCtx; |
| 5611 | return status; |
| 5612 | } /* End dot11f_unpack_ie_sec_chan_offset_ele. */ |
| 5613 | |
| 5614 | #define SigIesec_chan_offset_ele (0x0077) |
| 5615 | |
| 5616 | |
| 5617 | static const tFFDefn FFS_vendor2_ie[] = { |
| 5618 | { NULL, 0, 0, 0,}, |
| 5619 | }; |
| 5620 | |
| 5621 | static const tIEDefn IES_vendor2_ie[] = { |
| 5622 | { offsetof(tDot11fIEvendor2_ie, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 5623 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 5624 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 5625 | { offsetof(tDot11fIEvendor2_ie, VHTOperation), |
| 5626 | offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation", |
| 5627 | 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 5628 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 5629 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, |
| 5630 | }; |
| 5631 | |
| 5632 | uint32_t dot11f_unpack_ie_vendor2_ie(tpAniSirGlobal pCtx, |
| 5633 | uint8_t *pBuf, |
| 5634 | uint8_t ielen, |
| 5635 | tDot11fIEvendor2_ie *pDst) |
| 5636 | { |
| 5637 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 5638 | (void) pBuf; (void)ielen; /* Shutup the compiler */ |
| 5639 | if (pDst->present) |
| 5640 | status = DOT11F_DUPLICATE_IE; |
| 5641 | pDst->present = 1; |
| 5642 | pDst->type = *pBuf; |
| 5643 | pBuf += 1; |
| 5644 | ielen -= (uint8_t)1; |
| 5645 | pDst->sub_type = *pBuf; |
| 5646 | pBuf += 1; |
| 5647 | ielen -= (uint8_t)1; |
| 5648 | (void)pCtx; |
| 5649 | status |= unpack_core(pCtx, |
| 5650 | pBuf, |
| 5651 | ielen, |
| 5652 | FFS_vendor2_ie, |
| 5653 | IES_vendor2_ie, |
| 5654 | (uint8_t *)pDst, |
| 5655 | sizeof(*pDst)); |
| 5656 | return status; |
| 5657 | } /* End dot11f_unpack_ie_vendor2_ie. */ |
| 5658 | |
| 5659 | #define SigIevendor2_ie (0x0078) |
| 5660 | |
| 5661 | |
| 5662 | static const tFFDefn FFS_AddTSRequest[] = { |
| 5663 | { "Category", offsetof(tDot11fAddTSRequest, Category), SigFfCategory, |
| 5664 | DOT11F_FF_CATEGORY_LEN, }, |
| 5665 | { "Action", offsetof(tDot11fAddTSRequest, Action), SigFfAction, |
| 5666 | DOT11F_FF_ACTION_LEN, }, |
| 5667 | { "DialogToken", offsetof(tDot11fAddTSRequest, DialogToken), |
| 5668 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 5669 | { NULL, 0, 0, 0,}, |
| 5670 | }; |
| 5671 | |
| 5672 | static const tIEDefn IES_AddTSRequest[] = { |
| 5673 | { offsetof(tDot11fAddTSRequest, TSPEC), offsetof(tDot11fIETSPEC, present), |
| 5674 | 0, "TSPEC", 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, |
| 5675 | 0, DOT11F_EID_TSPEC, 1, }, |
| 5676 | { offsetof(tDot11fAddTSRequest, TCLAS), offsetof(tDot11fIETCLAS, present), |
| 5677 | offsetof(tDot11fAddTSRequest, num_TCLAS), "TCLAS", 2, 7, 45, SigIeTCLAS, |
| 5678 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, }, |
| 5679 | { offsetof(tDot11fAddTSRequest, TCLASSPROC), |
| 5680 | offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC", |
| 5681 | 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, |
| 5682 | 0, DOT11F_EID_TCLASSPROC, 0, }, |
| 5683 | { offsetof(tDot11fAddTSRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 5684 | present), 0, "WMMTSPEC", 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 5685 | 5, DOT11F_EID_WMMTSPEC, 0, }, |
| 5686 | { offsetof(tDot11fAddTSRequest, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, |
| 5687 | present), offsetof(tDot11fAddTSRequest, num_WMMTCLAS), "WMMTCLAS", |
| 5688 | 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, |
| 5689 | 5, DOT11F_EID_WMMTCLAS, 0, }, |
| 5690 | { offsetof(tDot11fAddTSRequest, WMMTCLASPROC), |
| 5691 | offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC", |
| 5692 | 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, |
| 5693 | 5, DOT11F_EID_WMMTCLASPROC, 0, }, |
| 5694 | { offsetof(tDot11fAddTSRequest, ESETrafStrmRateSet), |
| 5695 | offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet", |
| 5696 | 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, |
| 5697 | 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, |
| 5698 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 5699 | |
| 5700 | uint32_t dot11f_unpack_add_ts_request(tpAniSirGlobal pCtx, |
| 5701 | uint8_t *pBuf, uint32_t nBuf, |
| 5702 | tDot11fAddTSRequest *pFrm) |
| 5703 | { |
| 5704 | uint32_t i = 0; |
| 5705 | uint32_t status = 0; |
| 5706 | status = unpack_core(pCtx, pBuf, nBuf, |
| 5707 | FFS_AddTSRequest, IES_AddTSRequest, |
| 5708 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 5709 | |
| 5710 | (void)i; |
| 5711 | return status; |
| 5712 | |
| 5713 | } /* End dot11f_unpack_add_ts_request. */ |
| 5714 | |
| 5715 | static const tFFDefn FFS_AddTSResponse[] = { |
| 5716 | { "Category", offsetof(tDot11fAddTSResponse, Category), SigFfCategory, |
| 5717 | DOT11F_FF_CATEGORY_LEN, }, |
| 5718 | { "Action", offsetof(tDot11fAddTSResponse, Action), SigFfAction, |
| 5719 | DOT11F_FF_ACTION_LEN, }, |
| 5720 | { "DialogToken", offsetof(tDot11fAddTSResponse, DialogToken), |
| 5721 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 5722 | { "Status", offsetof(tDot11fAddTSResponse, Status), SigFfStatus, |
| 5723 | DOT11F_FF_STATUS_LEN, }, |
| 5724 | { NULL, 0, 0, 0,}, |
| 5725 | }; |
| 5726 | |
| 5727 | static const tIEDefn IES_AddTSResponse[] = { |
| 5728 | { offsetof(tDot11fAddTSResponse, TSDelay), offsetof(tDot11fIETSDelay, |
| 5729 | present), 0, "TSDelay", 0, 6, 6, SigIeTSDelay, {0, 0, 0, 0, 0}, |
| 5730 | 0, DOT11F_EID_TSDELAY, 1, }, |
| 5731 | { offsetof(tDot11fAddTSResponse, TSPEC), offsetof(tDot11fIETSPEC, |
| 5732 | present), 0, "TSPEC", 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, |
| 5733 | 0, DOT11F_EID_TSPEC, 1, }, |
| 5734 | { offsetof(tDot11fAddTSResponse, TCLAS), offsetof(tDot11fIETCLAS, |
| 5735 | present), offsetof(tDot11fAddTSResponse, num_TCLAS), "TCLAS", |
| 5736 | 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, }, |
| 5737 | { offsetof(tDot11fAddTSResponse, TCLASSPROC), |
| 5738 | offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC", |
| 5739 | 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, |
| 5740 | 0, DOT11F_EID_TCLASSPROC, 0, }, |
| 5741 | { offsetof(tDot11fAddTSResponse, Schedule), offsetof(tDot11fIESchedule, |
| 5742 | present), 0, "Schedule", 0, 16, 16, SigIeSchedule, {0, 0, 0, 0, 0}, |
| 5743 | 0, DOT11F_EID_SCHEDULE, 0, }, |
| 5744 | { offsetof(tDot11fAddTSResponse, WMMTSDelay), |
| 5745 | offsetof(tDot11fIEWMMTSDelay, present), 0, "WMMTSDelay", |
| 5746 | 0, 12, 12, SigIeWMMTSDelay, {0, 80, 242, 2, 8}, |
| 5747 | 5, DOT11F_EID_WMMTSDELAY, 0, }, |
| 5748 | { offsetof(tDot11fAddTSResponse, WMMSchedule), |
| 5749 | offsetof(tDot11fIEWMMSchedule, present), 0, "WMMSchedule", |
| 5750 | 0, 22, 22, SigIeWMMSchedule, {0, 80, 242, 2, 9}, |
| 5751 | 5, DOT11F_EID_WMMSCHEDULE, 0, }, |
| 5752 | { offsetof(tDot11fAddTSResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 5753 | present), 0, "WMMTSPEC", 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 5754 | 5, DOT11F_EID_WMMTSPEC, 0, }, |
| 5755 | { offsetof(tDot11fAddTSResponse, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, |
| 5756 | present), offsetof(tDot11fAddTSResponse, num_WMMTCLAS), "WMMTCLAS", |
| 5757 | 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, |
| 5758 | 5, DOT11F_EID_WMMTCLAS, 0, }, |
| 5759 | { offsetof(tDot11fAddTSResponse, WMMTCLASPROC), |
| 5760 | offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC", |
| 5761 | 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, |
| 5762 | 5, DOT11F_EID_WMMTCLASPROC, 0, }, |
| 5763 | { offsetof(tDot11fAddTSResponse, ESETrafStrmMet), |
| 5764 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 5765 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 5766 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 5767 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 5768 | |
| 5769 | uint32_t dot11f_unpack_add_ts_response(tpAniSirGlobal pCtx, |
| 5770 | uint8_t *pBuf, uint32_t nBuf, |
| 5771 | tDot11fAddTSResponse *pFrm) |
| 5772 | { |
| 5773 | uint32_t i = 0; |
| 5774 | uint32_t status = 0; |
| 5775 | status = unpack_core(pCtx, pBuf, nBuf, |
| 5776 | FFS_AddTSResponse, IES_AddTSResponse, |
| 5777 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 5778 | |
| 5779 | (void)i; |
| 5780 | return status; |
| 5781 | |
| 5782 | } /* End dot11f_unpack_add_ts_response. */ |
| 5783 | |
| 5784 | static const tFFDefn FFS_AssocRequest[] = { |
| 5785 | { "Capabilities", offsetof(tDot11fAssocRequest, Capabilities), |
| 5786 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 5787 | { "ListenInterval", offsetof(tDot11fAssocRequest, ListenInterval), |
| 5788 | SigFfListenInterval, DOT11F_FF_LISTENINTERVAL_LEN, }, |
| 5789 | { NULL, 0, 0, 0,}, |
| 5790 | }; |
| 5791 | |
| 5792 | static const tIEDefn IES_AssocRequest[] = { |
| 5793 | { offsetof(tDot11fAssocRequest, SSID), offsetof(tDot11fIESSID, present), 0, |
| 5794 | "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, |
| 5795 | { offsetof(tDot11fAssocRequest, SuppRates), offsetof(tDot11fIESuppRates, |
| 5796 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 5797 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 5798 | { offsetof(tDot11fAssocRequest, ExtSuppRates), |
| 5799 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 5800 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 5801 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 5802 | { offsetof(tDot11fAssocRequest, PowerCaps), offsetof(tDot11fIEPowerCaps, |
| 5803 | present), 0, "PowerCaps", 0, 4, 4, SigIePowerCaps, {0, 0, 0, 0, 0}, |
| 5804 | 0, DOT11F_EID_POWERCAPS, 0, }, |
| 5805 | { offsetof(tDot11fAssocRequest, SuppChannels), |
| 5806 | offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", |
| 5807 | 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, |
| 5808 | 0, DOT11F_EID_SUPPCHANNELS, 0, }, |
| 5809 | { offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, |
| 5810 | present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, |
| 5811 | 0, DOT11F_EID_RSNOPAQUE, 0, }, |
| 5812 | { offsetof(tDot11fAssocRequest, QOSCapsStation), |
| 5813 | offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation", |
| 5814 | 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, |
| 5815 | 0, DOT11F_EID_QOSCAPSSTATION, 0, }, |
| 5816 | { offsetof(tDot11fAssocRequest, RRMEnabledCap), |
| 5817 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 5818 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 5819 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 5820 | { offsetof(tDot11fAssocRequest, MobilityDomain), |
| 5821 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 5822 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 5823 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 5824 | { offsetof(tDot11fAssocRequest, WPAOpaque), offsetof(tDot11fIEWPAOpaque, |
| 5825 | present), 0, "WPAOpaque", 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, |
| 5826 | 4, DOT11F_EID_WPAOPAQUE, 0, }, |
| 5827 | { offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, |
| 5828 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 5829 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 5830 | { offsetof(tDot11fAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, |
| 5831 | present), 0, "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, |
| 5832 | 5, DOT11F_EID_WMMCAPS, 0, }, |
| 5833 | { offsetof(tDot11fAssocRequest, WMMInfoStation), |
| 5834 | offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation", |
| 5835 | 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, |
| 5836 | 5, DOT11F_EID_WMMINFOSTATION, 0, }, |
| 5837 | { offsetof(tDot11fAssocRequest, WscIEOpaque), |
| 5838 | offsetof(tDot11fIEWscIEOpaque, present), 0, "WscIEOpaque", |
| 5839 | 0, 8, 255, SigIeWscIEOpaque, {0, 80, 242, 4, 0}, |
| 5840 | 4, DOT11F_EID_WSCIEOPAQUE, 0, }, |
| 5841 | { offsetof(tDot11fAssocRequest, WAPIOpaque), |
| 5842 | offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque", |
| 5843 | 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, |
| 5844 | 0, DOT11F_EID_WAPIOPAQUE, 0, }, |
| 5845 | { offsetof(tDot11fAssocRequest, WAPI), offsetof(tDot11fIEWAPI, present), 0, |
| 5846 | "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, |
| 5847 | { offsetof(tDot11fAssocRequest, ESERadMgmtCap), |
| 5848 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 5849 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 5850 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 5851 | { offsetof(tDot11fAssocRequest, ESEVersion), |
| 5852 | offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion", |
| 5853 | 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, |
| 5854 | 4, DOT11F_EID_ESEVERSION, 0, }, |
| 5855 | { offsetof(tDot11fAssocRequest, P2PIEOpaque), |
| 5856 | offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque", |
| 5857 | 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, |
| 5858 | 4, DOT11F_EID_P2PIEOPAQUE, 0, }, |
| 5859 | { offsetof(tDot11fAssocRequest, WFDIEOpaque), |
| 5860 | offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque", |
| 5861 | 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, |
| 5862 | 4, DOT11F_EID_WFDIEOPAQUE, 0, }, |
| 5863 | { offsetof(tDot11fAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 5864 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 5865 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 5866 | { offsetof(tDot11fAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, |
| 5867 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 5868 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 5869 | { offsetof(tDot11fAssocRequest, OperatingMode), |
| 5870 | offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", |
| 5871 | 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, |
| 5872 | 0, DOT11F_EID_OPERATINGMODE, 0, }, |
| 5873 | { offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, |
| 5874 | present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, |
| 5875 | 0, DOT11F_EID_QOSMAPSET, 0, }, |
| 5876 | { offsetof(tDot11fAssocRequest, vendor2_ie), |
| 5877 | offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", |
| 5878 | 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 5879 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 5880 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 5881 | |
| 5882 | uint32_t dot11f_unpack_assoc_request(tpAniSirGlobal pCtx, |
| 5883 | uint8_t *pBuf, uint32_t nBuf, |
| 5884 | tDot11fAssocRequest *pFrm) |
| 5885 | { |
| 5886 | uint32_t i = 0; |
| 5887 | uint32_t status = 0; |
| 5888 | status = unpack_core(pCtx, pBuf, nBuf, |
| 5889 | FFS_AssocRequest, IES_AssocRequest, |
| 5890 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 5891 | |
| 5892 | (void)i; |
| 5893 | return status; |
| 5894 | |
| 5895 | } /* End dot11f_unpack_assoc_request. */ |
| 5896 | |
| 5897 | static const tFFDefn FFS_AssocResponse[] = { |
| 5898 | { "Capabilities", offsetof(tDot11fAssocResponse, Capabilities), |
| 5899 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 5900 | { "Status", offsetof(tDot11fAssocResponse, Status), SigFfStatus, |
| 5901 | DOT11F_FF_STATUS_LEN, }, |
| 5902 | { "AID", offsetof(tDot11fAssocResponse, AID), SigFfAID, |
| 5903 | DOT11F_FF_AID_LEN, }, |
| 5904 | { NULL, 0, 0, 0,}, |
| 5905 | }; |
| 5906 | |
| 5907 | static const tIEDefn IES_AssocResponse[] = { |
| 5908 | { offsetof(tDot11fAssocResponse, SuppRates), offsetof(tDot11fIESuppRates, |
| 5909 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 5910 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 5911 | { offsetof(tDot11fAssocResponse, ExtSuppRates), |
| 5912 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 5913 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 5914 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 5915 | { offsetof(tDot11fAssocResponse, EDCAParamSet), |
| 5916 | offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet", |
| 5917 | 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, |
| 5918 | 0, DOT11F_EID_EDCAPARAMSET, 0, }, |
| 5919 | { offsetof(tDot11fAssocResponse, RCPIIE), offsetof(tDot11fIERCPIIE, |
| 5920 | present), 0, "RCPIIE", 0, 3, 3, SigIeRCPIIE, {0, 0, 0, 0, 0}, |
| 5921 | 0, DOT11F_EID_RCPIIE, 0, }, |
| 5922 | { offsetof(tDot11fAssocResponse, RSNIIE), offsetof(tDot11fIERSNIIE, |
| 5923 | present), 0, "RSNIIE", 0, 3, 3, SigIeRSNIIE, {0, 0, 0, 0, 0}, |
| 5924 | 0, DOT11F_EID_RSNIIE, 0, }, |
| 5925 | { offsetof(tDot11fAssocResponse, RRMEnabledCap), |
| 5926 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 5927 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 5928 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 5929 | { offsetof(tDot11fAssocResponse, MobilityDomain), |
| 5930 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 5931 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 5932 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 5933 | { offsetof(tDot11fAssocResponse, FTInfo), offsetof(tDot11fIEFTInfo, |
| 5934 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 5935 | 0, DOT11F_EID_FTINFO, 0, }, |
| 5936 | { offsetof(tDot11fAssocResponse, RICDataDesc), |
| 5937 | offsetof(tDot11fIERICDataDesc, present), |
| 5938 | offsetof(tDot11fAssocResponse, num_RICDataDesc), "RICDataDesc", |
| 5939 | 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, |
| 5940 | 0, DOT11F_EID_RICDATADESC, 0, }, |
| 5941 | { offsetof(tDot11fAssocResponse, WPA), offsetof(tDot11fIEWPA, present), 0, |
| 5942 | "WPA", 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, |
| 5943 | { offsetof(tDot11fAssocResponse, TimeoutInterval), |
| 5944 | offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval", |
| 5945 | 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, |
| 5946 | 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, |
| 5947 | { offsetof(tDot11fAssocResponse, HTCaps), offsetof(tDot11fIEHTCaps, |
| 5948 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 5949 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 5950 | { offsetof(tDot11fAssocResponse, HTInfo), offsetof(tDot11fIEHTInfo, |
| 5951 | present), 0, "HTInfo", 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, |
| 5952 | 0, DOT11F_EID_HTINFO, 0, }, |
| 5953 | { offsetof(tDot11fAssocResponse, WMMParams), offsetof(tDot11fIEWMMParams, |
| 5954 | present), 0, "WMMParams", 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, |
| 5955 | 5, DOT11F_EID_WMMPARAMS, 0, }, |
| 5956 | { offsetof(tDot11fAssocResponse, WMMCaps), offsetof(tDot11fIEWMMCaps, |
| 5957 | present), 0, "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, |
| 5958 | 5, DOT11F_EID_WMMCAPS, 0, }, |
| 5959 | { offsetof(tDot11fAssocResponse, ESERadMgmtCap), |
| 5960 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 5961 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 5962 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 5963 | { offsetof(tDot11fAssocResponse, ESETrafStrmMet), |
| 5964 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 5965 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 5966 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 5967 | { offsetof(tDot11fAssocResponse, ESETxmitPower), |
| 5968 | offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower", |
| 5969 | 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, |
| 5970 | 4, DOT11F_EID_ESETXMITPOWER, 0, }, |
| 5971 | { offsetof(tDot11fAssocResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 5972 | present), offsetof(tDot11fAssocResponse, num_WMMTSPEC), "WMMTSPEC", |
| 5973 | 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 5974 | 5, DOT11F_EID_WMMTSPEC, 0, }, |
| 5975 | { offsetof(tDot11fAssocResponse, WscAssocRes), |
| 5976 | offsetof(tDot11fIEWscAssocRes, present), 0, "WscAssocRes", |
| 5977 | 0, 6, 37, SigIeWscAssocRes, {0, 80, 242, 4, 0}, |
| 5978 | 4, DOT11F_EID_WSCASSOCRES, 0, }, |
| 5979 | { offsetof(tDot11fAssocResponse, P2PAssocRes), |
| 5980 | offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes", |
| 5981 | 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, |
| 5982 | 4, DOT11F_EID_P2PASSOCRES, 0, }, |
| 5983 | { offsetof(tDot11fAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 5984 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 5985 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 5986 | { offsetof(tDot11fAssocResponse, VHTOperation), |
| 5987 | offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation", |
| 5988 | 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 5989 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 5990 | { offsetof(tDot11fAssocResponse, ExtCap), offsetof(tDot11fIEExtCap, |
| 5991 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 5992 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 5993 | { offsetof(tDot11fAssocResponse, OBSSScanParameters), |
| 5994 | offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters", |
| 5995 | 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, |
| 5996 | 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, |
| 5997 | { offsetof(tDot11fAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, |
| 5998 | present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, |
| 5999 | 0, DOT11F_EID_QOSMAPSET, 0, }, |
| 6000 | { offsetof(tDot11fAssocResponse, vendor2_ie), |
| 6001 | offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", |
| 6002 | 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 6003 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 6004 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6005 | |
| 6006 | uint32_t dot11f_unpack_assoc_response(tpAniSirGlobal pCtx, |
| 6007 | uint8_t *pBuf, uint32_t nBuf, |
| 6008 | tDot11fAssocResponse *pFrm) |
| 6009 | { |
| 6010 | uint32_t i = 0; |
| 6011 | uint32_t status = 0; |
| 6012 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6013 | FFS_AssocResponse, IES_AssocResponse, |
| 6014 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6015 | |
| 6016 | (void)i; |
| 6017 | return status; |
| 6018 | |
| 6019 | } /* End dot11f_unpack_assoc_response. */ |
| 6020 | |
| 6021 | static const tFFDefn FFS_Authentication[] = { |
| 6022 | { "AuthAlgo", offsetof(tDot11fAuthentication, AuthAlgo), SigFfAuthAlgo, |
| 6023 | DOT11F_FF_AUTHALGO_LEN, }, |
| 6024 | { "AuthSeqNo", offsetof(tDot11fAuthentication, AuthSeqNo), SigFfAuthSeqNo, |
| 6025 | DOT11F_FF_AUTHSEQNO_LEN, }, |
| 6026 | { "Status", offsetof(tDot11fAuthentication, Status), SigFfStatus, |
| 6027 | DOT11F_FF_STATUS_LEN, }, |
| 6028 | { NULL, 0, 0, 0,}, |
| 6029 | }; |
| 6030 | |
| 6031 | static const tIEDefn IES_Authentication[] = { |
| 6032 | { offsetof(tDot11fAuthentication, ChallengeText), |
| 6033 | offsetof(tDot11fIEChallengeText, present), 0, "ChallengeText", |
| 6034 | 0, 3, 255, SigIeChallengeText, {0, 0, 0, 0, 0}, |
| 6035 | 0, DOT11F_EID_CHALLENGETEXT, 0, }, |
| 6036 | { offsetof(tDot11fAuthentication, RSNOpaque), |
| 6037 | offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", |
| 6038 | 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, |
| 6039 | 0, DOT11F_EID_RSNOPAQUE, 0, }, |
| 6040 | { offsetof(tDot11fAuthentication, MobilityDomain), |
| 6041 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 6042 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 6043 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 6044 | { offsetof(tDot11fAuthentication, FTInfo), offsetof(tDot11fIEFTInfo, |
| 6045 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 6046 | 0, DOT11F_EID_FTINFO, 0, }, |
| 6047 | { offsetof(tDot11fAuthentication, TimeoutInterval), |
| 6048 | offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval", |
| 6049 | 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, |
| 6050 | 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, |
| 6051 | { offsetof(tDot11fAuthentication, RICDataDesc), |
| 6052 | offsetof(tDot11fIERICDataDesc, present), |
| 6053 | offsetof(tDot11fAuthentication, num_RICDataDesc), "RICDataDesc", |
| 6054 | 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, |
| 6055 | 0, DOT11F_EID_RICDATADESC, 0, }, |
| 6056 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6057 | |
| 6058 | uint32_t dot11f_unpack_authentication(tpAniSirGlobal pCtx, |
| 6059 | uint8_t *pBuf, uint32_t nBuf, |
| 6060 | tDot11fAuthentication *pFrm) |
| 6061 | { |
| 6062 | uint32_t i = 0; |
| 6063 | uint32_t status = 0; |
| 6064 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6065 | FFS_Authentication, IES_Authentication, |
| 6066 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6067 | |
| 6068 | (void)i; |
| 6069 | return status; |
| 6070 | |
| 6071 | } /* End dot11f_unpack_authentication. */ |
| 6072 | |
| 6073 | static const tFFDefn FFS_Beacon[] = { |
| 6074 | { "TimeStamp", offsetof(tDot11fBeacon, TimeStamp), SigFfTimeStamp, |
| 6075 | DOT11F_FF_TIMESTAMP_LEN, }, |
| 6076 | { "BeaconInterval", offsetof(tDot11fBeacon, BeaconInterval), |
| 6077 | SigFfBeaconInterval, DOT11F_FF_BEACONINTERVAL_LEN, }, |
| 6078 | { "Capabilities", offsetof(tDot11fBeacon, Capabilities), |
| 6079 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 6080 | { NULL, 0, 0, 0,}, |
| 6081 | }; |
| 6082 | |
| 6083 | static const tIEDefn IES_Beacon[] = { |
| 6084 | { offsetof(tDot11fBeacon, SSID), offsetof(tDot11fIESSID, present), 0, |
| 6085 | "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, |
| 6086 | { offsetof(tDot11fBeacon, SuppRates), offsetof(tDot11fIESuppRates, |
| 6087 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 6088 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 6089 | { offsetof(tDot11fBeacon, FHParamSet), offsetof(tDot11fIEFHParamSet, |
| 6090 | present), 0, "FHParamSet", 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, |
| 6091 | 0, DOT11F_EID_FHPARAMSET, 0, }, |
| 6092 | { offsetof(tDot11fBeacon, DSParams), offsetof(tDot11fIEDSParams, present), |
| 6093 | 0, "DSParams", 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, |
| 6094 | 0, DOT11F_EID_DSPARAMS, 0, }, |
| 6095 | { offsetof(tDot11fBeacon, CFParams), offsetof(tDot11fIECFParams, present), |
| 6096 | 0, "CFParams", 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, |
| 6097 | 0, DOT11F_EID_CFPARAMS, 0, }, |
| 6098 | { offsetof(tDot11fBeacon, IBSSParams), offsetof(tDot11fIEIBSSParams, |
| 6099 | present), 0, "IBSSParams", 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, |
| 6100 | 0, DOT11F_EID_IBSSPARAMS, 0, }, |
| 6101 | { offsetof(tDot11fBeacon, TIM), offsetof(tDot11fIETIM, present), 0, "TIM", |
| 6102 | 0, 6, 256, SigIeTIM, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIM, 0, }, |
| 6103 | { offsetof(tDot11fBeacon, Country), offsetof(tDot11fIECountry, present), 0, |
| 6104 | "Country", 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, |
| 6105 | 0, DOT11F_EID_COUNTRY, 0, }, |
| 6106 | { offsetof(tDot11fBeacon, FHParams), offsetof(tDot11fIEFHParams, present), |
| 6107 | 0, "FHParams", 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, |
| 6108 | 0, DOT11F_EID_FHPARAMS, 0, }, |
| 6109 | { offsetof(tDot11fBeacon, FHPattTable), offsetof(tDot11fIEFHPattTable, |
| 6110 | present), 0, "FHPattTable", 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, |
| 6111 | 0, DOT11F_EID_FHPATTTABLE, 0, }, |
| 6112 | { offsetof(tDot11fBeacon, PowerConstraints), |
| 6113 | offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints", |
| 6114 | 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, |
| 6115 | 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, |
| 6116 | { offsetof(tDot11fBeacon, ChanSwitchAnn), |
| 6117 | offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn", |
| 6118 | 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, |
| 6119 | 0, DOT11F_EID_CHANSWITCHANN, 0, }, |
| 6120 | { offsetof(tDot11fBeacon, ext_chan_switch_ann), |
| 6121 | offsetof(tDot11fIEext_chan_switch_ann, present), 0, "ext_chan_switch_ann", |
| 6122 | 0, 6, 6, SigIeext_chan_switch_ann, {0, 0, 0, 0, 0}, |
| 6123 | 0, DOT11F_EID_EXT_CHAN_SWITCH_ANN, 0, }, |
| 6124 | { offsetof(tDot11fBeacon, Quiet), offsetof(tDot11fIEQuiet, present), 0, |
| 6125 | "Quiet", 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, }, |
| 6126 | { offsetof(tDot11fBeacon, TPCReport), offsetof(tDot11fIETPCReport, |
| 6127 | present), 0, "TPCReport", 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, |
| 6128 | 0, DOT11F_EID_TPCREPORT, 0, }, |
| 6129 | { offsetof(tDot11fBeacon, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, |
| 6130 | "ERPInfo", 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, |
| 6131 | 0, DOT11F_EID_ERPINFO, 0, }, |
| 6132 | { offsetof(tDot11fBeacon, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, |
| 6133 | present), 0, "ExtSuppRates", 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 6134 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 6135 | { offsetof(tDot11fBeacon, RSN), offsetof(tDot11fIERSN, present), 0, "RSN", |
| 6136 | 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, |
| 6137 | { offsetof(tDot11fBeacon, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), |
| 6138 | 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, |
| 6139 | 0, DOT11F_EID_QBSSLOAD, 0, }, |
| 6140 | { offsetof(tDot11fBeacon, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, |
| 6141 | present), 0, "EDCAParamSet", 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, |
| 6142 | 0, DOT11F_EID_EDCAPARAMSET, 0, }, |
| 6143 | { offsetof(tDot11fBeacon, QOSCapsAp), offsetof(tDot11fIEQOSCapsAp, |
| 6144 | present), 0, "QOSCapsAp", 0, 3, 3, SigIeQOSCapsAp, {0, 0, 0, 0, 0}, |
| 6145 | 0, DOT11F_EID_QOSCAPSAP, 0, }, |
| 6146 | { offsetof(tDot11fBeacon, APChannelReport), |
| 6147 | offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport", |
| 6148 | 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, |
| 6149 | 0, DOT11F_EID_APCHANNELREPORT, 0, }, |
| 6150 | { offsetof(tDot11fBeacon, RRMEnabledCap), |
| 6151 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 6152 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 6153 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 6154 | { offsetof(tDot11fBeacon, MobilityDomain), |
| 6155 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 6156 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 6157 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 6158 | { offsetof(tDot11fBeacon, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA", |
| 6159 | 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, |
| 6160 | { offsetof(tDot11fBeacon, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, |
| 6161 | "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 6162 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 6163 | { offsetof(tDot11fBeacon, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, |
| 6164 | "HTInfo", 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, |
| 6165 | 0, DOT11F_EID_HTINFO, 0, }, |
| 6166 | { offsetof(tDot11fBeacon, sec_chan_offset_ele), |
| 6167 | offsetof(tDot11fIEsec_chan_offset_ele, present), 0, "sec_chan_offset_ele", |
| 6168 | 0, 3, 3, SigIesec_chan_offset_ele, {0, 0, 0, 0, 0}, |
| 6169 | 0, DOT11F_EID_SEC_CHAN_OFFSET_ELE, 0, }, |
| 6170 | { offsetof(tDot11fBeacon, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, |
| 6171 | present), 0, "WMMInfoAp", 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, |
| 6172 | 5, DOT11F_EID_WMMINFOAP, 0, }, |
| 6173 | { offsetof(tDot11fBeacon, WMMParams), offsetof(tDot11fIEWMMParams, |
| 6174 | present), 0, "WMMParams", 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, |
| 6175 | 5, DOT11F_EID_WMMPARAMS, 0, }, |
| 6176 | { offsetof(tDot11fBeacon, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, |
| 6177 | "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, |
| 6178 | 5, DOT11F_EID_WMMCAPS, 0, }, |
| 6179 | { offsetof(tDot11fBeacon, WAPI), offsetof(tDot11fIEWAPI, present), 0, |
| 6180 | "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, |
| 6181 | { offsetof(tDot11fBeacon, ESERadMgmtCap), |
| 6182 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 6183 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 6184 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 6185 | { offsetof(tDot11fBeacon, ESETrafStrmMet), |
| 6186 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 6187 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 6188 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 6189 | { offsetof(tDot11fBeacon, ESETxmitPower), |
| 6190 | offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower", |
| 6191 | 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, |
| 6192 | 4, DOT11F_EID_ESETXMITPOWER, 0, }, |
| 6193 | { offsetof(tDot11fBeacon, WscBeacon), offsetof(tDot11fIEWscBeacon, |
| 6194 | present), 0, "WscBeacon", 0, 6, 84, SigIeWscBeacon, {0, 80, 242, 4, 0}, |
| 6195 | 4, DOT11F_EID_WSCBEACON, 0, }, |
| 6196 | { offsetof(tDot11fBeacon, P2PBeacon), offsetof(tDot11fIEP2PBeacon, |
| 6197 | present), 0, "P2PBeacon", 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, |
| 6198 | 4, DOT11F_EID_P2PBEACON, 0, }, |
| 6199 | { offsetof(tDot11fBeacon, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, |
| 6200 | "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 6201 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 6202 | { offsetof(tDot11fBeacon, VHTOperation), offsetof(tDot11fIEVHTOperation, |
| 6203 | present), 0, "VHTOperation", 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 6204 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 6205 | { offsetof(tDot11fBeacon, VHTExtBssLoad), |
| 6206 | offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad", |
| 6207 | 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, |
| 6208 | 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, |
| 6209 | { offsetof(tDot11fBeacon, ExtCap), offsetof(tDot11fIEExtCap, present), 0, |
| 6210 | "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 6211 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 6212 | { offsetof(tDot11fBeacon, OperatingMode), |
| 6213 | offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", |
| 6214 | 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, |
| 6215 | 0, DOT11F_EID_OPERATINGMODE, 0, }, |
| 6216 | { offsetof(tDot11fBeacon, WiderBWChanSwitchAnn), |
| 6217 | offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, |
| 6218 | "WiderBWChanSwitchAnn", 0, 5, 5, SigIeWiderBWChanSwitchAnn, |
| 6219 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, |
| 6220 | { offsetof(tDot11fBeacon, OBSSScanParameters), |
| 6221 | offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters", |
| 6222 | 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, |
| 6223 | 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, |
| 6224 | { offsetof(tDot11fBeacon, Vendor1IE), offsetof(tDot11fIEVendor1IE, |
| 6225 | present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, |
| 6226 | 3, DOT11F_EID_VENDOR1IE, 0, }, |
| 6227 | { offsetof(tDot11fBeacon, vendor2_ie), offsetof(tDot11fIEvendor2_ie, |
| 6228 | present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 6229 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 6230 | { offsetof(tDot11fBeacon, Vendor3IE), offsetof(tDot11fIEVendor3IE, |
| 6231 | present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, |
| 6232 | 3, DOT11F_EID_VENDOR3IE, 0, }, |
| 6233 | { offsetof(tDot11fBeacon, ChannelSwitchWrapper), |
| 6234 | offsetof(tDot11fIEChannelSwitchWrapper, present), 0, |
| 6235 | "ChannelSwitchWrapper", 0, 2, 7, SigIeChannelSwitchWrapper, |
| 6236 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, |
| 6237 | { offsetof(tDot11fBeacon, QComVendorIE), offsetof(tDot11fIEQComVendorIE, |
| 6238 | present), 0, "QComVendorIE", 0, 7, 7, SigIeQComVendorIE, |
| 6239 | {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, |
| 6240 | { offsetof(tDot11fBeacon, ESEVersion), offsetof(tDot11fIEESEVersion, |
| 6241 | present), 0, "ESEVersion", 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, |
| 6242 | 4, DOT11F_EID_ESEVERSION, 0, }, |
| 6243 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6244 | |
| 6245 | uint32_t dot11f_unpack_beacon(tpAniSirGlobal pCtx, |
| 6246 | uint8_t *pBuf, uint32_t nBuf, |
| 6247 | tDot11fBeacon *pFrm) |
| 6248 | { |
| 6249 | uint32_t i = 0; |
| 6250 | uint32_t status = 0; |
| 6251 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6252 | FFS_Beacon, IES_Beacon, |
| 6253 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6254 | |
| 6255 | (void)i; |
| 6256 | return status; |
| 6257 | |
| 6258 | } /* End dot11f_unpack_beacon. */ |
| 6259 | |
| 6260 | static const tFFDefn FFS_Beacon1[] = { |
| 6261 | { "TimeStamp", offsetof(tDot11fBeacon1, TimeStamp), SigFfTimeStamp, |
| 6262 | DOT11F_FF_TIMESTAMP_LEN, }, |
| 6263 | { "BeaconInterval", offsetof(tDot11fBeacon1, BeaconInterval), |
| 6264 | SigFfBeaconInterval, DOT11F_FF_BEACONINTERVAL_LEN, }, |
| 6265 | { "Capabilities", offsetof(tDot11fBeacon1, Capabilities), |
| 6266 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 6267 | { NULL, 0, 0, 0,}, |
| 6268 | }; |
| 6269 | |
| 6270 | static const tIEDefn IES_Beacon1[] = { |
| 6271 | { offsetof(tDot11fBeacon1, SSID), offsetof(tDot11fIESSID, present), 0, |
| 6272 | "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, |
| 6273 | { offsetof(tDot11fBeacon1, SuppRates), offsetof(tDot11fIESuppRates, |
| 6274 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 6275 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 6276 | { offsetof(tDot11fBeacon1, DSParams), offsetof(tDot11fIEDSParams, |
| 6277 | present), 0, "DSParams", 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, |
| 6278 | 0, DOT11F_EID_DSPARAMS, 0, }, |
| 6279 | { offsetof(tDot11fBeacon1, IBSSParams), offsetof(tDot11fIEIBSSParams, |
| 6280 | present), 0, "IBSSParams", 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, |
| 6281 | 0, DOT11F_EID_IBSSPARAMS, 0, }, |
| 6282 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6283 | |
| 6284 | uint32_t dot11f_unpack_beacon1(tpAniSirGlobal pCtx, |
| 6285 | uint8_t *pBuf, uint32_t nBuf, |
| 6286 | tDot11fBeacon1 *pFrm) |
| 6287 | { |
| 6288 | uint32_t i = 0; |
| 6289 | uint32_t status = 0; |
| 6290 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6291 | FFS_Beacon1, IES_Beacon1, |
| 6292 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6293 | |
| 6294 | (void)i; |
| 6295 | return status; |
| 6296 | |
| 6297 | } /* End dot11f_unpack_beacon1. */ |
| 6298 | |
| 6299 | static const tFFDefn FFS_Beacon2[] = { |
| 6300 | { NULL, 0, 0, 0,}, |
| 6301 | }; |
| 6302 | |
| 6303 | static const tIEDefn IES_Beacon2[] = { |
| 6304 | { offsetof(tDot11fBeacon2, Country), offsetof(tDot11fIECountry, present), |
| 6305 | 0, "Country", 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, |
| 6306 | 0, DOT11F_EID_COUNTRY, 0, }, |
| 6307 | { offsetof(tDot11fBeacon2, PowerConstraints), |
| 6308 | offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints", |
| 6309 | 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, |
| 6310 | 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, |
| 6311 | { offsetof(tDot11fBeacon2, ChanSwitchAnn), |
| 6312 | offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn", |
| 6313 | 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, |
| 6314 | 0, DOT11F_EID_CHANSWITCHANN, 0, }, |
| 6315 | { offsetof(tDot11fBeacon2, ext_chan_switch_ann), |
| 6316 | offsetof(tDot11fIEext_chan_switch_ann, present), 0, "ext_chan_switch_ann", |
| 6317 | 0, 6, 6, SigIeext_chan_switch_ann, {0, 0, 0, 0, 0}, |
| 6318 | 0, DOT11F_EID_EXT_CHAN_SWITCH_ANN, 0, }, |
| 6319 | { offsetof(tDot11fBeacon2, Quiet), offsetof(tDot11fIEQuiet, present), 0, |
| 6320 | "Quiet", 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, }, |
| 6321 | { offsetof(tDot11fBeacon2, TPCReport), offsetof(tDot11fIETPCReport, |
| 6322 | present), 0, "TPCReport", 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, |
| 6323 | 0, DOT11F_EID_TPCREPORT, 0, }, |
| 6324 | { offsetof(tDot11fBeacon2, ERPInfo), offsetof(tDot11fIEERPInfo, present), |
| 6325 | 0, "ERPInfo", 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, |
| 6326 | 0, DOT11F_EID_ERPINFO, 0, }, |
| 6327 | { offsetof(tDot11fBeacon2, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, |
| 6328 | present), 0, "ExtSuppRates", 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 6329 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 6330 | { offsetof(tDot11fBeacon2, RSNOpaque), offsetof(tDot11fIERSNOpaque, |
| 6331 | present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, |
| 6332 | 0, DOT11F_EID_RSNOPAQUE, 0, }, |
| 6333 | { offsetof(tDot11fBeacon2, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, |
| 6334 | present), 0, "EDCAParamSet", 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, |
| 6335 | 0, DOT11F_EID_EDCAPARAMSET, 0, }, |
| 6336 | { offsetof(tDot11fBeacon2, APChannelReport), |
| 6337 | offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport", |
| 6338 | 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, |
| 6339 | 0, DOT11F_EID_APCHANNELREPORT, 0, }, |
| 6340 | { offsetof(tDot11fBeacon2, RRMEnabledCap), |
| 6341 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 6342 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 6343 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 6344 | { offsetof(tDot11fBeacon2, MobilityDomain), |
| 6345 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 6346 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 6347 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 6348 | { offsetof(tDot11fBeacon2, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA", |
| 6349 | 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, |
| 6350 | { offsetof(tDot11fBeacon2, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, |
| 6351 | "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 6352 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 6353 | { offsetof(tDot11fBeacon2, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, |
| 6354 | "HTInfo", 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, |
| 6355 | 0, DOT11F_EID_HTINFO, 0, }, |
| 6356 | { offsetof(tDot11fBeacon2, sec_chan_offset_ele), |
| 6357 | offsetof(tDot11fIEsec_chan_offset_ele, present), 0, "sec_chan_offset_ele", |
| 6358 | 0, 3, 3, SigIesec_chan_offset_ele, {0, 0, 0, 0, 0}, |
| 6359 | 0, DOT11F_EID_SEC_CHAN_OFFSET_ELE, 0, }, |
| 6360 | { offsetof(tDot11fBeacon2, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, |
| 6361 | present), 0, "WMMInfoAp", 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, |
| 6362 | 5, DOT11F_EID_WMMINFOAP, 0, }, |
| 6363 | { offsetof(tDot11fBeacon2, WMMParams), offsetof(tDot11fIEWMMParams, |
| 6364 | present), 0, "WMMParams", 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, |
| 6365 | 5, DOT11F_EID_WMMPARAMS, 0, }, |
| 6366 | { offsetof(tDot11fBeacon2, WMMCaps), offsetof(tDot11fIEWMMCaps, present), |
| 6367 | 0, "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, |
| 6368 | 5, DOT11F_EID_WMMCAPS, 0, }, |
| 6369 | { offsetof(tDot11fBeacon2, WscBeacon), offsetof(tDot11fIEWscBeacon, |
| 6370 | present), 0, "WscBeacon", 0, 6, 84, SigIeWscBeacon, {0, 80, 242, 4, 0}, |
| 6371 | 4, DOT11F_EID_WSCBEACON, 0, }, |
| 6372 | { offsetof(tDot11fBeacon2, WAPI), offsetof(tDot11fIEWAPI, present), 0, |
| 6373 | "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, |
| 6374 | { offsetof(tDot11fBeacon2, ESERadMgmtCap), |
| 6375 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 6376 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 6377 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 6378 | { offsetof(tDot11fBeacon2, ESETrafStrmMet), |
| 6379 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 6380 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 6381 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 6382 | { offsetof(tDot11fBeacon2, ESETxmitPower), |
| 6383 | offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower", |
| 6384 | 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, |
| 6385 | 4, DOT11F_EID_ESETXMITPOWER, 0, }, |
| 6386 | { offsetof(tDot11fBeacon2, P2PBeacon), offsetof(tDot11fIEP2PBeacon, |
| 6387 | present), 0, "P2PBeacon", 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, |
| 6388 | 4, DOT11F_EID_P2PBEACON, 0, }, |
| 6389 | { offsetof(tDot11fBeacon2, VHTCaps), offsetof(tDot11fIEVHTCaps, present), |
| 6390 | 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 6391 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 6392 | { offsetof(tDot11fBeacon2, VHTOperation), offsetof(tDot11fIEVHTOperation, |
| 6393 | present), 0, "VHTOperation", 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 6394 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 6395 | { offsetof(tDot11fBeacon2, VHTExtBssLoad), |
| 6396 | offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad", |
| 6397 | 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, |
| 6398 | 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, |
| 6399 | { offsetof(tDot11fBeacon2, ExtCap), offsetof(tDot11fIEExtCap, present), 0, |
| 6400 | "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 6401 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 6402 | { offsetof(tDot11fBeacon2, OperatingMode), |
| 6403 | offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", |
| 6404 | 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, |
| 6405 | 0, DOT11F_EID_OPERATINGMODE, 0, }, |
| 6406 | { offsetof(tDot11fBeacon2, WiderBWChanSwitchAnn), |
| 6407 | offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, |
| 6408 | "WiderBWChanSwitchAnn", 0, 5, 5, SigIeWiderBWChanSwitchAnn, |
| 6409 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, |
| 6410 | { offsetof(tDot11fBeacon2, OBSSScanParameters), |
| 6411 | offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters", |
| 6412 | 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, |
| 6413 | 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, |
| 6414 | { offsetof(tDot11fBeacon2, Vendor1IE), offsetof(tDot11fIEVendor1IE, |
| 6415 | present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, |
| 6416 | 3, DOT11F_EID_VENDOR1IE, 0, }, |
| 6417 | { offsetof(tDot11fBeacon2, vendor2_ie), offsetof(tDot11fIEvendor2_ie, |
| 6418 | present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 6419 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 6420 | { offsetof(tDot11fBeacon2, Vendor3IE), offsetof(tDot11fIEVendor3IE, |
| 6421 | present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, |
| 6422 | 3, DOT11F_EID_VENDOR3IE, 0, }, |
| 6423 | { offsetof(tDot11fBeacon2, ChannelSwitchWrapper), |
| 6424 | offsetof(tDot11fIEChannelSwitchWrapper, present), 0, |
| 6425 | "ChannelSwitchWrapper", 0, 2, 7, SigIeChannelSwitchWrapper, |
| 6426 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, |
| 6427 | { offsetof(tDot11fBeacon2, QComVendorIE), offsetof(tDot11fIEQComVendorIE, |
| 6428 | present), 0, "QComVendorIE", 0, 7, 7, SigIeQComVendorIE, |
| 6429 | {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, |
| 6430 | { offsetof(tDot11fBeacon2, ESEVersion), offsetof(tDot11fIEESEVersion, |
| 6431 | present), 0, "ESEVersion", 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, |
| 6432 | 4, DOT11F_EID_ESEVERSION, 0, }, |
| 6433 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6434 | |
| 6435 | uint32_t dot11f_unpack_beacon2(tpAniSirGlobal pCtx, |
| 6436 | uint8_t *pBuf, uint32_t nBuf, |
| 6437 | tDot11fBeacon2 *pFrm) |
| 6438 | { |
| 6439 | uint32_t i = 0; |
| 6440 | uint32_t status = 0; |
| 6441 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6442 | FFS_Beacon2, IES_Beacon2, |
| 6443 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6444 | |
| 6445 | (void)i; |
| 6446 | return status; |
| 6447 | |
| 6448 | } /* End dot11f_unpack_beacon2. */ |
| 6449 | |
| 6450 | static const tFFDefn FFS_BeaconIEs[] = { |
| 6451 | { NULL, 0, 0, 0,}, |
| 6452 | }; |
| 6453 | |
| 6454 | static const tIEDefn IES_BeaconIEs[] = { |
| 6455 | { offsetof(tDot11fBeaconIEs, SSID), offsetof(tDot11fIESSID, present), 0, |
| 6456 | "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, |
| 6457 | { offsetof(tDot11fBeaconIEs, SuppRates), offsetof(tDot11fIESuppRates, |
| 6458 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 6459 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 6460 | { offsetof(tDot11fBeaconIEs, FHParamSet), offsetof(tDot11fIEFHParamSet, |
| 6461 | present), 0, "FHParamSet", 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, |
| 6462 | 0, DOT11F_EID_FHPARAMSET, 0, }, |
| 6463 | { offsetof(tDot11fBeaconIEs, DSParams), offsetof(tDot11fIEDSParams, |
| 6464 | present), 0, "DSParams", 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, |
| 6465 | 0, DOT11F_EID_DSPARAMS, 0, }, |
| 6466 | { offsetof(tDot11fBeaconIEs, CFParams), offsetof(tDot11fIECFParams, |
| 6467 | present), 0, "CFParams", 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, |
| 6468 | 0, DOT11F_EID_CFPARAMS, 0, }, |
| 6469 | { offsetof(tDot11fBeaconIEs, IBSSParams), offsetof(tDot11fIEIBSSParams, |
| 6470 | present), 0, "IBSSParams", 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, |
| 6471 | 0, DOT11F_EID_IBSSPARAMS, 0, }, |
| 6472 | { offsetof(tDot11fBeaconIEs, TIM), offsetof(tDot11fIETIM, present), 0, |
| 6473 | "TIM", 0, 6, 256, SigIeTIM, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIM, 0, }, |
| 6474 | { offsetof(tDot11fBeaconIEs, Country), offsetof(tDot11fIECountry, |
| 6475 | present), 0, "Country", 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, |
| 6476 | 0, DOT11F_EID_COUNTRY, 0, }, |
| 6477 | { offsetof(tDot11fBeaconIEs, FHParams), offsetof(tDot11fIEFHParams, |
| 6478 | present), 0, "FHParams", 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, |
| 6479 | 0, DOT11F_EID_FHPARAMS, 0, }, |
| 6480 | { offsetof(tDot11fBeaconIEs, FHPattTable), offsetof(tDot11fIEFHPattTable, |
| 6481 | present), 0, "FHPattTable", 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, |
| 6482 | 0, DOT11F_EID_FHPATTTABLE, 0, }, |
| 6483 | { offsetof(tDot11fBeaconIEs, PowerConstraints), |
| 6484 | offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints", |
| 6485 | 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, |
| 6486 | 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, |
| 6487 | { offsetof(tDot11fBeaconIEs, ChanSwitchAnn), |
| 6488 | offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn", |
| 6489 | 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, |
| 6490 | 0, DOT11F_EID_CHANSWITCHANN, 0, }, |
| 6491 | { offsetof(tDot11fBeaconIEs, ext_chan_switch_ann), |
| 6492 | offsetof(tDot11fIEext_chan_switch_ann, present), 0, "ext_chan_switch_ann", |
| 6493 | 0, 6, 6, SigIeext_chan_switch_ann, {0, 0, 0, 0, 0}, |
| 6494 | 0, DOT11F_EID_EXT_CHAN_SWITCH_ANN, 0, }, |
| 6495 | { offsetof(tDot11fBeaconIEs, Quiet), offsetof(tDot11fIEQuiet, present), 0, |
| 6496 | "Quiet", 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, }, |
| 6497 | { offsetof(tDot11fBeaconIEs, TPCReport), offsetof(tDot11fIETPCReport, |
| 6498 | present), 0, "TPCReport", 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, |
| 6499 | 0, DOT11F_EID_TPCREPORT, 0, }, |
| 6500 | { offsetof(tDot11fBeaconIEs, ERPInfo), offsetof(tDot11fIEERPInfo, |
| 6501 | present), 0, "ERPInfo", 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, |
| 6502 | 0, DOT11F_EID_ERPINFO, 0, }, |
| 6503 | { offsetof(tDot11fBeaconIEs, ExtSuppRates), |
| 6504 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 6505 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 6506 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 6507 | { offsetof(tDot11fBeaconIEs, RSN), offsetof(tDot11fIERSN, present), 0, |
| 6508 | "RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, |
| 6509 | { offsetof(tDot11fBeaconIEs, QBSSLoad), offsetof(tDot11fIEQBSSLoad, |
| 6510 | present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, |
| 6511 | 0, DOT11F_EID_QBSSLOAD, 0, }, |
| 6512 | { offsetof(tDot11fBeaconIEs, EDCAParamSet), |
| 6513 | offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet", |
| 6514 | 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, |
| 6515 | 0, DOT11F_EID_EDCAPARAMSET, 0, }, |
| 6516 | { offsetof(tDot11fBeaconIEs, QOSCapsAp), offsetof(tDot11fIEQOSCapsAp, |
| 6517 | present), 0, "QOSCapsAp", 0, 3, 3, SigIeQOSCapsAp, {0, 0, 0, 0, 0}, |
| 6518 | 0, DOT11F_EID_QOSCAPSAP, 0, }, |
| 6519 | { offsetof(tDot11fBeaconIEs, APChannelReport), |
| 6520 | offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport", |
| 6521 | 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, |
| 6522 | 0, DOT11F_EID_APCHANNELREPORT, 0, }, |
| 6523 | { offsetof(tDot11fBeaconIEs, RRMEnabledCap), |
| 6524 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 6525 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 6526 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 6527 | { offsetof(tDot11fBeaconIEs, MobilityDomain), |
| 6528 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 6529 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 6530 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 6531 | { offsetof(tDot11fBeaconIEs, WPA), offsetof(tDot11fIEWPA, present), 0, |
| 6532 | "WPA", 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, |
| 6533 | { offsetof(tDot11fBeaconIEs, HTCaps), offsetof(tDot11fIEHTCaps, present), |
| 6534 | 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 6535 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 6536 | { offsetof(tDot11fBeaconIEs, HTInfo), offsetof(tDot11fIEHTInfo, present), |
| 6537 | 0, "HTInfo", 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, |
| 6538 | 0, DOT11F_EID_HTINFO, 0, }, |
| 6539 | { offsetof(tDot11fBeaconIEs, sec_chan_offset_ele), |
| 6540 | offsetof(tDot11fIEsec_chan_offset_ele, present), 0, "sec_chan_offset_ele", |
| 6541 | 0, 3, 3, SigIesec_chan_offset_ele, {0, 0, 0, 0, 0}, |
| 6542 | 0, DOT11F_EID_SEC_CHAN_OFFSET_ELE, 0, }, |
| 6543 | { offsetof(tDot11fBeaconIEs, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, |
| 6544 | present), 0, "WMMInfoAp", 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, |
| 6545 | 5, DOT11F_EID_WMMINFOAP, 0, }, |
| 6546 | { offsetof(tDot11fBeaconIEs, WMMParams), offsetof(tDot11fIEWMMParams, |
| 6547 | present), 0, "WMMParams", 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, |
| 6548 | 5, DOT11F_EID_WMMPARAMS, 0, }, |
| 6549 | { offsetof(tDot11fBeaconIEs, WMMCaps), offsetof(tDot11fIEWMMCaps, |
| 6550 | present), 0, "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, |
| 6551 | 5, DOT11F_EID_WMMCAPS, 0, }, |
| 6552 | { offsetof(tDot11fBeaconIEs, WAPI), offsetof(tDot11fIEWAPI, present), 0, |
| 6553 | "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, |
| 6554 | { offsetof(tDot11fBeaconIEs, ESEVersion), offsetof(tDot11fIEESEVersion, |
| 6555 | present), 0, "ESEVersion", 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, |
| 6556 | 4, DOT11F_EID_ESEVERSION, 0, }, |
| 6557 | { offsetof(tDot11fBeaconIEs, ESERadMgmtCap), |
| 6558 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 6559 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 6560 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 6561 | { offsetof(tDot11fBeaconIEs, ESETrafStrmMet), |
| 6562 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 6563 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 6564 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 6565 | { offsetof(tDot11fBeaconIEs, ESETxmitPower), |
| 6566 | offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower", |
| 6567 | 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, |
| 6568 | 4, DOT11F_EID_ESETXMITPOWER, 0, }, |
| 6569 | { offsetof(tDot11fBeaconIEs, WscBeaconProbeRes), |
| 6570 | offsetof(tDot11fIEWscBeaconProbeRes, present), 0, "WscBeaconProbeRes", |
| 6571 | 0, 6, 319, SigIeWscBeaconProbeRes, {0, 80, 242, 4, 0}, |
| 6572 | 4, DOT11F_EID_WSCBEACONPROBERES, 0, }, |
| 6573 | { offsetof(tDot11fBeaconIEs, P2PBeaconProbeRes), |
| 6574 | offsetof(tDot11fIEP2PBeaconProbeRes, present), 0, "P2PBeaconProbeRes", |
| 6575 | 0, 6, 1150, SigIeP2PBeaconProbeRes, {80, 111, 154, 9, 0}, |
| 6576 | 4, DOT11F_EID_P2PBEACONPROBERES, 0, }, |
| 6577 | { offsetof(tDot11fBeaconIEs, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 6578 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 6579 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 6580 | { offsetof(tDot11fBeaconIEs, VHTOperation), |
| 6581 | offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation", |
| 6582 | 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 6583 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 6584 | { offsetof(tDot11fBeaconIEs, VHTExtBssLoad), |
| 6585 | offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad", |
| 6586 | 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, |
| 6587 | 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, |
| 6588 | { offsetof(tDot11fBeaconIEs, ExtCap), offsetof(tDot11fIEExtCap, present), |
| 6589 | 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 6590 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 6591 | { offsetof(tDot11fBeaconIEs, OperatingMode), |
| 6592 | offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", |
| 6593 | 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, |
| 6594 | 0, DOT11F_EID_OPERATINGMODE, 0, }, |
| 6595 | { offsetof(tDot11fBeaconIEs, WiderBWChanSwitchAnn), |
| 6596 | offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, |
| 6597 | "WiderBWChanSwitchAnn", 0, 5, 5, SigIeWiderBWChanSwitchAnn, |
| 6598 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, |
| 6599 | { offsetof(tDot11fBeaconIEs, OBSSScanParameters), |
| 6600 | offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters", |
| 6601 | 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, |
| 6602 | 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, |
| 6603 | { offsetof(tDot11fBeaconIEs, Vendor1IE), offsetof(tDot11fIEVendor1IE, |
| 6604 | present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, |
| 6605 | 3, DOT11F_EID_VENDOR1IE, 0, }, |
| 6606 | { offsetof(tDot11fBeaconIEs, vendor2_ie), offsetof(tDot11fIEvendor2_ie, |
| 6607 | present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 6608 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 6609 | { offsetof(tDot11fBeaconIEs, Vendor3IE), offsetof(tDot11fIEVendor3IE, |
| 6610 | present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, |
| 6611 | 3, DOT11F_EID_VENDOR3IE, 0, }, |
| 6612 | { offsetof(tDot11fBeaconIEs, ChannelSwitchWrapper), |
| 6613 | offsetof(tDot11fIEChannelSwitchWrapper, present), 0, |
| 6614 | "ChannelSwitchWrapper", 0, 2, 7, SigIeChannelSwitchWrapper, |
| 6615 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, |
| 6616 | { offsetof(tDot11fBeaconIEs, QComVendorIE), |
| 6617 | offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE", |
| 6618 | 0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0}, |
| 6619 | 3, DOT11F_EID_QCOMVENDORIE, 0, }, |
| 6620 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6621 | |
| 6622 | uint32_t dot11f_unpack_beacon_i_es(tpAniSirGlobal pCtx, |
| 6623 | uint8_t *pBuf, uint32_t nBuf, |
| 6624 | tDot11fBeaconIEs *pFrm) |
| 6625 | { |
| 6626 | uint32_t i = 0; |
| 6627 | uint32_t status = 0; |
| 6628 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6629 | FFS_BeaconIEs, IES_BeaconIEs, |
| 6630 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6631 | |
| 6632 | (void)i; |
| 6633 | return status; |
| 6634 | |
| 6635 | } /* End dot11f_unpack_beacon_i_es. */ |
| 6636 | |
| 6637 | static const tFFDefn FFS_ChannelSwitch[] = { |
| 6638 | { "Category", offsetof(tDot11fChannelSwitch, Category), SigFfCategory, |
| 6639 | DOT11F_FF_CATEGORY_LEN, }, |
| 6640 | { "Action", offsetof(tDot11fChannelSwitch, Action), SigFfAction, |
| 6641 | DOT11F_FF_ACTION_LEN, }, |
| 6642 | { NULL, 0, 0, 0,}, |
| 6643 | }; |
| 6644 | |
| 6645 | static const tIEDefn IES_ChannelSwitch[] = { |
| 6646 | { offsetof(tDot11fChannelSwitch, ChanSwitchAnn), |
| 6647 | offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn", |
| 6648 | 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, |
| 6649 | 0, DOT11F_EID_CHANSWITCHANN, 1, }, |
| 6650 | { offsetof(tDot11fChannelSwitch, sec_chan_offset_ele), |
| 6651 | offsetof(tDot11fIEsec_chan_offset_ele, present), 0, "sec_chan_offset_ele", |
| 6652 | 0, 3, 3, SigIesec_chan_offset_ele, {0, 0, 0, 0, 0}, |
| 6653 | 0, DOT11F_EID_SEC_CHAN_OFFSET_ELE, 0, }, |
| 6654 | { offsetof(tDot11fChannelSwitch, WiderBWChanSwitchAnn), |
| 6655 | offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, |
| 6656 | "WiderBWChanSwitchAnn", 0, 5, 5, SigIeWiderBWChanSwitchAnn, |
| 6657 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, |
| 6658 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6659 | |
| 6660 | uint32_t dot11f_unpack_channel_switch(tpAniSirGlobal pCtx, |
| 6661 | uint8_t *pBuf, uint32_t nBuf, |
| 6662 | tDot11fChannelSwitch *pFrm) |
| 6663 | { |
| 6664 | uint32_t i = 0; |
| 6665 | uint32_t status = 0; |
| 6666 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6667 | FFS_ChannelSwitch, IES_ChannelSwitch, |
| 6668 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6669 | |
| 6670 | (void)i; |
| 6671 | return status; |
| 6672 | |
| 6673 | } /* End dot11f_unpack_channel_switch. */ |
| 6674 | |
| 6675 | static const tFFDefn FFS_DeAuth[] = { |
| 6676 | { "Reason", offsetof(tDot11fDeAuth, Reason), SigFfReason, |
| 6677 | DOT11F_FF_REASON_LEN, }, |
| 6678 | { NULL, 0, 0, 0,}, |
| 6679 | }; |
| 6680 | |
| 6681 | static const tIEDefn IES_DeAuth[] = { |
| 6682 | { offsetof(tDot11fDeAuth, P2PDeAuth), offsetof(tDot11fIEP2PDeAuth, |
| 6683 | present), 0, "P2PDeAuth", 0, 6, 10, SigIeP2PDeAuth, {80, 111, 154, 9, 0}, |
| 6684 | 4, DOT11F_EID_P2PDEAUTH, 0, }, |
| 6685 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6686 | |
| 6687 | uint32_t dot11f_unpack_de_auth(tpAniSirGlobal pCtx, |
| 6688 | uint8_t *pBuf, uint32_t nBuf, |
| 6689 | tDot11fDeAuth *pFrm) |
| 6690 | { |
| 6691 | uint32_t i = 0; |
| 6692 | uint32_t status = 0; |
| 6693 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6694 | FFS_DeAuth, IES_DeAuth, |
| 6695 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6696 | |
| 6697 | (void)i; |
| 6698 | return status; |
| 6699 | |
| 6700 | } /* End dot11f_unpack_de_auth. */ |
| 6701 | |
| 6702 | static const tFFDefn FFS_DelTS[] = { |
| 6703 | { "Category", offsetof(tDot11fDelTS, Category), SigFfCategory, |
| 6704 | DOT11F_FF_CATEGORY_LEN, }, |
| 6705 | { "Action", offsetof(tDot11fDelTS, Action), SigFfAction, |
| 6706 | DOT11F_FF_ACTION_LEN, }, |
| 6707 | { "TSInfo", offsetof(tDot11fDelTS, TSInfo), SigFfTSInfo, |
| 6708 | DOT11F_FF_TSINFO_LEN, }, |
| 6709 | { "Reason", offsetof(tDot11fDelTS, Reason), SigFfReason, |
| 6710 | DOT11F_FF_REASON_LEN, }, |
| 6711 | { NULL, 0, 0, 0,}, |
| 6712 | }; |
| 6713 | |
| 6714 | static const tIEDefn IES_DelTS[] = { |
| 6715 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6716 | |
| 6717 | uint32_t dot11f_unpack_del_ts(tpAniSirGlobal pCtx, |
| 6718 | uint8_t *pBuf, uint32_t nBuf, |
| 6719 | tDot11fDelTS *pFrm) |
| 6720 | { |
| 6721 | uint32_t i = 0; |
| 6722 | uint32_t status = 0; |
| 6723 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6724 | FFS_DelTS, IES_DelTS, |
| 6725 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6726 | |
| 6727 | (void)i; |
| 6728 | return status; |
| 6729 | |
| 6730 | } /* End dot11f_unpack_del_ts. */ |
| 6731 | |
| 6732 | static const tFFDefn FFS_Disassociation[] = { |
| 6733 | { "Reason", offsetof(tDot11fDisassociation, Reason), SigFfReason, |
| 6734 | DOT11F_FF_REASON_LEN, }, |
| 6735 | { NULL, 0, 0, 0,}, |
| 6736 | }; |
| 6737 | |
| 6738 | static const tIEDefn IES_Disassociation[] = { |
| 6739 | { offsetof(tDot11fDisassociation, P2PDisAssoc), |
| 6740 | offsetof(tDot11fIEP2PDisAssoc, present), 0, "P2PDisAssoc", |
| 6741 | 0, 6, 10, SigIeP2PDisAssoc, {80, 111, 154, 9, 0}, |
| 6742 | 4, DOT11F_EID_P2PDISASSOC, 0, }, |
| 6743 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6744 | |
| 6745 | uint32_t dot11f_unpack_disassociation(tpAniSirGlobal pCtx, |
| 6746 | uint8_t *pBuf, uint32_t nBuf, |
| 6747 | tDot11fDisassociation *pFrm) |
| 6748 | { |
| 6749 | uint32_t i = 0; |
| 6750 | uint32_t status = 0; |
| 6751 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6752 | FFS_Disassociation, IES_Disassociation, |
| 6753 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6754 | |
| 6755 | (void)i; |
| 6756 | return status; |
| 6757 | |
| 6758 | } /* End dot11f_unpack_disassociation. */ |
| 6759 | |
| 6760 | static const tFFDefn FFS_LinkMeasurementReport[] = { |
| 6761 | { "Category", offsetof(tDot11fLinkMeasurementReport, Category), |
| 6762 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 6763 | { "Action", offsetof(tDot11fLinkMeasurementReport, Action), SigFfAction, |
| 6764 | DOT11F_FF_ACTION_LEN, }, |
| 6765 | { "DialogToken", offsetof(tDot11fLinkMeasurementReport, DialogToken), |
| 6766 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 6767 | { "TPCEleID", offsetof(tDot11fLinkMeasurementReport, TPCEleID), |
| 6768 | SigFfTPCEleID, DOT11F_FF_TPCELEID_LEN, }, |
| 6769 | { "TPCEleLen", offsetof(tDot11fLinkMeasurementReport, TPCEleLen), |
| 6770 | SigFfTPCEleLen, DOT11F_FF_TPCELELEN_LEN, }, |
| 6771 | { "TxPower", offsetof(tDot11fLinkMeasurementReport, TxPower), |
| 6772 | SigFfTxPower, DOT11F_FF_TXPOWER_LEN, }, |
| 6773 | { "LinkMargin", offsetof(tDot11fLinkMeasurementReport, LinkMargin), |
| 6774 | SigFfLinkMargin, DOT11F_FF_LINKMARGIN_LEN, }, |
| 6775 | { "RxAntennaId", offsetof(tDot11fLinkMeasurementReport, RxAntennaId), |
| 6776 | SigFfRxAntennaId, DOT11F_FF_RXANTENNAID_LEN, }, |
| 6777 | { "TxAntennaId", offsetof(tDot11fLinkMeasurementReport, TxAntennaId), |
| 6778 | SigFfTxAntennaId, DOT11F_FF_TXANTENNAID_LEN, }, |
| 6779 | { "RCPI", offsetof(tDot11fLinkMeasurementReport, RCPI), SigFfRCPI, |
| 6780 | DOT11F_FF_RCPI_LEN, }, |
| 6781 | { "RSNI", offsetof(tDot11fLinkMeasurementReport, RSNI), SigFfRSNI, |
| 6782 | DOT11F_FF_RSNI_LEN, }, |
| 6783 | { NULL, 0, 0, 0,}, |
| 6784 | }; |
| 6785 | |
| 6786 | static const tIEDefn IES_LinkMeasurementReport[] = { |
| 6787 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6788 | |
| 6789 | uint32_t dot11f_unpack_link_measurement_report(tpAniSirGlobal pCtx, |
| 6790 | uint8_t *pBuf, uint32_t nBuf, |
| 6791 | tDot11fLinkMeasurementReport *pFrm) |
| 6792 | { |
| 6793 | uint32_t i = 0; |
| 6794 | uint32_t status = 0; |
| 6795 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6796 | FFS_LinkMeasurementReport, IES_LinkMeasurementReport, |
| 6797 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6798 | |
| 6799 | (void)i; |
| 6800 | return status; |
| 6801 | |
| 6802 | } /* End dot11f_unpack_link_measurement_report. */ |
| 6803 | |
| 6804 | static const tFFDefn FFS_LinkMeasurementRequest[] = { |
| 6805 | { "Category", offsetof(tDot11fLinkMeasurementRequest, Category), |
| 6806 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 6807 | { "Action", offsetof(tDot11fLinkMeasurementRequest, Action), SigFfAction, |
| 6808 | DOT11F_FF_ACTION_LEN, }, |
| 6809 | { "DialogToken", offsetof(tDot11fLinkMeasurementRequest, DialogToken), |
| 6810 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 6811 | { "TxPower", offsetof(tDot11fLinkMeasurementRequest, TxPower), |
| 6812 | SigFfTxPower, DOT11F_FF_TXPOWER_LEN, }, |
| 6813 | { "MaxTxPower", offsetof(tDot11fLinkMeasurementRequest, MaxTxPower), |
| 6814 | SigFfMaxTxPower, DOT11F_FF_MAXTXPOWER_LEN, }, |
| 6815 | { NULL, 0, 0, 0,}, |
| 6816 | }; |
| 6817 | |
| 6818 | static const tIEDefn IES_LinkMeasurementRequest[] = { |
| 6819 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6820 | |
| 6821 | uint32_t dot11f_unpack_link_measurement_request(tpAniSirGlobal pCtx, |
| 6822 | uint8_t *pBuf, uint32_t nBuf, |
| 6823 | tDot11fLinkMeasurementRequest *pFrm) |
| 6824 | { |
| 6825 | uint32_t i = 0; |
| 6826 | uint32_t status = 0; |
| 6827 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6828 | FFS_LinkMeasurementRequest, IES_LinkMeasurementRequest, |
| 6829 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6830 | |
| 6831 | (void)i; |
| 6832 | return status; |
| 6833 | |
| 6834 | } /* End dot11f_unpack_link_measurement_request. */ |
| 6835 | |
| 6836 | static const tFFDefn FFS_MeasurementReport[] = { |
| 6837 | { "Category", offsetof(tDot11fMeasurementReport, Category), SigFfCategory, |
| 6838 | DOT11F_FF_CATEGORY_LEN, }, |
| 6839 | { "Action", offsetof(tDot11fMeasurementReport, Action), SigFfAction, |
| 6840 | DOT11F_FF_ACTION_LEN, }, |
| 6841 | { "DialogToken", offsetof(tDot11fMeasurementReport, DialogToken), |
| 6842 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 6843 | { NULL, 0, 0, 0,}, |
| 6844 | }; |
| 6845 | |
| 6846 | static const tIEDefn IES_MeasurementReport[] = { |
| 6847 | { offsetof(tDot11fMeasurementReport, MeasurementReport), |
| 6848 | offsetof(tDot11fIEMeasurementReport, present), 0, "MeasurementReport", |
| 6849 | 0, 5, 31, SigIeMeasurementReport, {0, 0, 0, 0, 0}, |
| 6850 | 0, DOT11F_EID_MEASUREMENTREPORT, 1, }, |
| 6851 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6852 | |
| 6853 | uint32_t dot11f_unpack_measurement_report(tpAniSirGlobal pCtx, |
| 6854 | uint8_t *pBuf, uint32_t nBuf, |
| 6855 | tDot11fMeasurementReport *pFrm) |
| 6856 | { |
| 6857 | uint32_t i = 0; |
| 6858 | uint32_t status = 0; |
| 6859 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6860 | FFS_MeasurementReport, IES_MeasurementReport, |
| 6861 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6862 | |
| 6863 | (void)i; |
| 6864 | return status; |
| 6865 | |
| 6866 | } /* End dot11f_unpack_measurement_report. */ |
| 6867 | |
| 6868 | static const tFFDefn FFS_MeasurementRequest[] = { |
| 6869 | { "Category", offsetof(tDot11fMeasurementRequest, Category), |
| 6870 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 6871 | { "Action", offsetof(tDot11fMeasurementRequest, Action), SigFfAction, |
| 6872 | DOT11F_FF_ACTION_LEN, }, |
| 6873 | { "DialogToken", offsetof(tDot11fMeasurementRequest, DialogToken), |
| 6874 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 6875 | { NULL, 0, 0, 0,}, |
| 6876 | }; |
| 6877 | |
| 6878 | static const tIEDefn IES_MeasurementRequest[] = { |
| 6879 | { offsetof(tDot11fMeasurementRequest, MeasurementRequest), |
| 6880 | offsetof(tDot11fIEMeasurementRequest, present), |
| 6881 | offsetof(tDot11fMeasurementRequest, num_MeasurementRequest), |
| 6882 | "MeasurementRequest", 4, 16, 18, SigIeMeasurementRequest, |
| 6883 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREQUEST, 1, }, |
| 6884 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6885 | |
| 6886 | uint32_t dot11f_unpack_measurement_request(tpAniSirGlobal pCtx, |
| 6887 | uint8_t *pBuf, uint32_t nBuf, |
| 6888 | tDot11fMeasurementRequest *pFrm) |
| 6889 | { |
| 6890 | uint32_t i = 0; |
| 6891 | uint32_t status = 0; |
| 6892 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6893 | FFS_MeasurementRequest, IES_MeasurementRequest, |
| 6894 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6895 | |
| 6896 | (void)i; |
| 6897 | return status; |
| 6898 | |
| 6899 | } /* End dot11f_unpack_measurement_request. */ |
| 6900 | |
| 6901 | static const tFFDefn FFS_NeighborReportRequest[] = { |
| 6902 | { "Category", offsetof(tDot11fNeighborReportRequest, Category), |
| 6903 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 6904 | { "Action", offsetof(tDot11fNeighborReportRequest, Action), SigFfAction, |
| 6905 | DOT11F_FF_ACTION_LEN, }, |
| 6906 | { "DialogToken", offsetof(tDot11fNeighborReportRequest, DialogToken), |
| 6907 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 6908 | { NULL, 0, 0, 0,}, |
| 6909 | }; |
| 6910 | |
| 6911 | static const tIEDefn IES_NeighborReportRequest[] = { |
| 6912 | { offsetof(tDot11fNeighborReportRequest, SSID), offsetof(tDot11fIESSID, |
| 6913 | present), 0, "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, |
| 6914 | 0, DOT11F_EID_SSID, 0, }, |
| 6915 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6916 | |
| 6917 | uint32_t dot11f_unpack_neighbor_report_request(tpAniSirGlobal pCtx, |
| 6918 | uint8_t *pBuf, uint32_t nBuf, |
| 6919 | tDot11fNeighborReportRequest *pFrm) |
| 6920 | { |
| 6921 | uint32_t i = 0; |
| 6922 | uint32_t status = 0; |
| 6923 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6924 | FFS_NeighborReportRequest, IES_NeighborReportRequest, |
| 6925 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6926 | |
| 6927 | (void)i; |
| 6928 | return status; |
| 6929 | |
| 6930 | } /* End dot11f_unpack_neighbor_report_request. */ |
| 6931 | |
| 6932 | static const tFFDefn FFS_NeighborReportResponse[] = { |
| 6933 | { "Category", offsetof(tDot11fNeighborReportResponse, Category), |
| 6934 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 6935 | { "Action", offsetof(tDot11fNeighborReportResponse, Action), SigFfAction, |
| 6936 | DOT11F_FF_ACTION_LEN, }, |
| 6937 | { "DialogToken", offsetof(tDot11fNeighborReportResponse, DialogToken), |
| 6938 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 6939 | { NULL, 0, 0, 0,}, |
| 6940 | }; |
| 6941 | |
| 6942 | static const tIEDefn IES_NeighborReportResponse[] = { |
| 6943 | { offsetof(tDot11fNeighborReportResponse, NeighborReport), |
| 6944 | offsetof(tDot11fIENeighborReport, present), |
| 6945 | offsetof(tDot11fNeighborReportResponse, num_NeighborReport), |
| 6946 | "NeighborReport", 15, 15, 548, SigIeNeighborReport, {0, 0, 0, 0, 0}, |
| 6947 | 0, DOT11F_EID_NEIGHBORREPORT, 0, }, |
| 6948 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6949 | |
| 6950 | uint32_t dot11f_unpack_neighbor_report_response(tpAniSirGlobal pCtx, |
| 6951 | uint8_t *pBuf, uint32_t nBuf, |
| 6952 | tDot11fNeighborReportResponse *pFrm) |
| 6953 | { |
| 6954 | uint32_t i = 0; |
| 6955 | uint32_t status = 0; |
| 6956 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6957 | FFS_NeighborReportResponse, IES_NeighborReportResponse, |
| 6958 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6959 | |
| 6960 | (void)i; |
| 6961 | return status; |
| 6962 | |
| 6963 | } /* End dot11f_unpack_neighbor_report_response. */ |
| 6964 | |
| 6965 | static const tFFDefn FFS_OperatingMode[] = { |
| 6966 | { "Category", offsetof(tDot11fOperatingMode, Category), SigFfCategory, |
| 6967 | DOT11F_FF_CATEGORY_LEN, }, |
| 6968 | { "Action", offsetof(tDot11fOperatingMode, Action), SigFfAction, |
| 6969 | DOT11F_FF_ACTION_LEN, }, |
| 6970 | { "OperatingMode", offsetof(tDot11fOperatingMode, OperatingMode), |
| 6971 | SigFfOperatingMode, DOT11F_FF_OPERATINGMODE_LEN, }, |
| 6972 | { NULL, 0, 0, 0,}, |
| 6973 | }; |
| 6974 | |
| 6975 | static const tIEDefn IES_OperatingMode[] = { |
| 6976 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 6977 | |
| 6978 | uint32_t dot11f_unpack_operating_mode(tpAniSirGlobal pCtx, |
| 6979 | uint8_t *pBuf, uint32_t nBuf, |
| 6980 | tDot11fOperatingMode *pFrm) |
| 6981 | { |
| 6982 | uint32_t i = 0; |
| 6983 | uint32_t status = 0; |
| 6984 | status = unpack_core(pCtx, pBuf, nBuf, |
| 6985 | FFS_OperatingMode, IES_OperatingMode, |
| 6986 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 6987 | |
| 6988 | (void)i; |
| 6989 | return status; |
| 6990 | |
| 6991 | } /* End dot11f_unpack_operating_mode. */ |
| 6992 | |
| 6993 | static const tFFDefn FFS_ProbeRequest[] = { |
| 6994 | { NULL, 0, 0, 0,}, |
| 6995 | }; |
| 6996 | |
| 6997 | static const tIEDefn IES_ProbeRequest[] = { |
| 6998 | { offsetof(tDot11fProbeRequest, SSID), offsetof(tDot11fIESSID, present), 0, |
| 6999 | "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, |
| 7000 | { offsetof(tDot11fProbeRequest, SuppRates), offsetof(tDot11fIESuppRates, |
| 7001 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 7002 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 7003 | { offsetof(tDot11fProbeRequest, RequestedInfo), |
| 7004 | offsetof(tDot11fIERequestedInfo, present), 0, "RequestedInfo", |
| 7005 | 0, 2, 257, SigIeRequestedInfo, {0, 0, 0, 0, 0}, |
| 7006 | 0, DOT11F_EID_REQUESTEDINFO, 0, }, |
| 7007 | { offsetof(tDot11fProbeRequest, ExtSuppRates), |
| 7008 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 7009 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 7010 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 7011 | { offsetof(tDot11fProbeRequest, DSParams), offsetof(tDot11fIEDSParams, |
| 7012 | present), 0, "DSParams", 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, |
| 7013 | 0, DOT11F_EID_DSPARAMS, 0, }, |
| 7014 | { offsetof(tDot11fProbeRequest, HTCaps), offsetof(tDot11fIEHTCaps, |
| 7015 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 7016 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 7017 | { offsetof(tDot11fProbeRequest, WscProbeReq), |
| 7018 | offsetof(tDot11fIEWscProbeReq, present), 0, "WscProbeReq", |
| 7019 | 0, 6, 286, SigIeWscProbeReq, {0, 80, 242, 4, 0}, |
| 7020 | 4, DOT11F_EID_WSCPROBEREQ, 0, }, |
| 7021 | { offsetof(tDot11fProbeRequest, WFATPC), offsetof(tDot11fIEWFATPC, |
| 7022 | present), 0, "WFATPC", 0, 9, 9, SigIeWFATPC, {0, 80, 242, 8, 0}, |
| 7023 | 5, DOT11F_EID_WFATPC, 0, }, |
| 7024 | { offsetof(tDot11fProbeRequest, P2PProbeReq), |
| 7025 | offsetof(tDot11fIEP2PProbeReq, present), 0, "P2PProbeReq", |
| 7026 | 0, 6, 43, SigIeP2PProbeReq, {80, 111, 154, 9, 0}, |
| 7027 | 4, DOT11F_EID_P2PPROBEREQ, 0, }, |
| 7028 | { offsetof(tDot11fProbeRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 7029 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 7030 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 7031 | { offsetof(tDot11fProbeRequest, ExtCap), offsetof(tDot11fIEExtCap, |
| 7032 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 7033 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 7034 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7035 | |
| 7036 | uint32_t dot11f_unpack_probe_request(tpAniSirGlobal pCtx, |
| 7037 | uint8_t *pBuf, uint32_t nBuf, |
| 7038 | tDot11fProbeRequest *pFrm) |
| 7039 | { |
| 7040 | uint32_t i = 0; |
| 7041 | uint32_t status = 0; |
| 7042 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7043 | FFS_ProbeRequest, IES_ProbeRequest, |
| 7044 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7045 | |
| 7046 | (void)i; |
| 7047 | return status; |
| 7048 | |
| 7049 | } /* End dot11f_unpack_probe_request. */ |
| 7050 | |
| 7051 | static const tFFDefn FFS_ProbeResponse[] = { |
| 7052 | { "TimeStamp", offsetof(tDot11fProbeResponse, TimeStamp), SigFfTimeStamp, |
| 7053 | DOT11F_FF_TIMESTAMP_LEN, }, |
| 7054 | { "BeaconInterval", offsetof(tDot11fProbeResponse, BeaconInterval), |
| 7055 | SigFfBeaconInterval, DOT11F_FF_BEACONINTERVAL_LEN, }, |
| 7056 | { "Capabilities", offsetof(tDot11fProbeResponse, Capabilities), |
| 7057 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 7058 | { NULL, 0, 0, 0,}, |
| 7059 | }; |
| 7060 | |
| 7061 | static const tIEDefn IES_ProbeResponse[] = { |
| 7062 | { offsetof(tDot11fProbeResponse, SSID), offsetof(tDot11fIESSID, present), |
| 7063 | 0, "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, |
| 7064 | { offsetof(tDot11fProbeResponse, SuppRates), offsetof(tDot11fIESuppRates, |
| 7065 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 7066 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 7067 | { offsetof(tDot11fProbeResponse, FHParamSet), |
| 7068 | offsetof(tDot11fIEFHParamSet, present), 0, "FHParamSet", |
| 7069 | 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, |
| 7070 | 0, DOT11F_EID_FHPARAMSET, 0, }, |
| 7071 | { offsetof(tDot11fProbeResponse, DSParams), offsetof(tDot11fIEDSParams, |
| 7072 | present), 0, "DSParams", 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, |
| 7073 | 0, DOT11F_EID_DSPARAMS, 0, }, |
| 7074 | { offsetof(tDot11fProbeResponse, CFParams), offsetof(tDot11fIECFParams, |
| 7075 | present), 0, "CFParams", 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, |
| 7076 | 0, DOT11F_EID_CFPARAMS, 0, }, |
| 7077 | { offsetof(tDot11fProbeResponse, IBSSParams), |
| 7078 | offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams", |
| 7079 | 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, |
| 7080 | 0, DOT11F_EID_IBSSPARAMS, 0, }, |
| 7081 | { offsetof(tDot11fProbeResponse, Country), offsetof(tDot11fIECountry, |
| 7082 | present), 0, "Country", 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, |
| 7083 | 0, DOT11F_EID_COUNTRY, 0, }, |
| 7084 | { offsetof(tDot11fProbeResponse, FHParams), offsetof(tDot11fIEFHParams, |
| 7085 | present), 0, "FHParams", 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, |
| 7086 | 0, DOT11F_EID_FHPARAMS, 0, }, |
| 7087 | { offsetof(tDot11fProbeResponse, FHPattTable), |
| 7088 | offsetof(tDot11fIEFHPattTable, present), 0, "FHPattTable", |
| 7089 | 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, |
| 7090 | 0, DOT11F_EID_FHPATTTABLE, 0, }, |
| 7091 | { offsetof(tDot11fProbeResponse, PowerConstraints), |
| 7092 | offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints", |
| 7093 | 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, |
| 7094 | 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, |
| 7095 | { offsetof(tDot11fProbeResponse, ChanSwitchAnn), |
| 7096 | offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn", |
| 7097 | 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, |
| 7098 | 0, DOT11F_EID_CHANSWITCHANN, 0, }, |
| 7099 | { offsetof(tDot11fProbeResponse, ext_chan_switch_ann), |
| 7100 | offsetof(tDot11fIEext_chan_switch_ann, present), 0, "ext_chan_switch_ann", |
| 7101 | 0, 6, 6, SigIeext_chan_switch_ann, {0, 0, 0, 0, 0}, |
| 7102 | 0, DOT11F_EID_EXT_CHAN_SWITCH_ANN, 0, }, |
| 7103 | { offsetof(tDot11fProbeResponse, Quiet), offsetof(tDot11fIEQuiet, |
| 7104 | present), 0, "Quiet", 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, |
| 7105 | 0, DOT11F_EID_QUIET, 0, }, |
| 7106 | { offsetof(tDot11fProbeResponse, TPCReport), offsetof(tDot11fIETPCReport, |
| 7107 | present), 0, "TPCReport", 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, |
| 7108 | 0, DOT11F_EID_TPCREPORT, 0, }, |
| 7109 | { offsetof(tDot11fProbeResponse, ERPInfo), offsetof(tDot11fIEERPInfo, |
| 7110 | present), 0, "ERPInfo", 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, |
| 7111 | 0, DOT11F_EID_ERPINFO, 0, }, |
| 7112 | { offsetof(tDot11fProbeResponse, ExtSuppRates), |
| 7113 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 7114 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 7115 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 7116 | { offsetof(tDot11fProbeResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque, |
| 7117 | present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, |
| 7118 | 0, DOT11F_EID_RSNOPAQUE, 0, }, |
| 7119 | { offsetof(tDot11fProbeResponse, QBSSLoad), offsetof(tDot11fIEQBSSLoad, |
| 7120 | present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, |
| 7121 | 0, DOT11F_EID_QBSSLOAD, 0, }, |
| 7122 | { offsetof(tDot11fProbeResponse, EDCAParamSet), |
| 7123 | offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet", |
| 7124 | 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, |
| 7125 | 0, DOT11F_EID_EDCAPARAMSET, 0, }, |
| 7126 | { offsetof(tDot11fProbeResponse, RRMEnabledCap), |
| 7127 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 7128 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 7129 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 7130 | { offsetof(tDot11fProbeResponse, APChannelReport), |
| 7131 | offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport", |
| 7132 | 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, |
| 7133 | 0, DOT11F_EID_APCHANNELREPORT, 0, }, |
| 7134 | { offsetof(tDot11fProbeResponse, MobilityDomain), |
| 7135 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 7136 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 7137 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 7138 | { offsetof(tDot11fProbeResponse, WPA), offsetof(tDot11fIEWPA, present), 0, |
| 7139 | "WPA", 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, |
| 7140 | { offsetof(tDot11fProbeResponse, HTCaps), offsetof(tDot11fIEHTCaps, |
| 7141 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 7142 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 7143 | { offsetof(tDot11fProbeResponse, HTInfo), offsetof(tDot11fIEHTInfo, |
| 7144 | present), 0, "HTInfo", 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, |
| 7145 | 0, DOT11F_EID_HTINFO, 0, }, |
| 7146 | { offsetof(tDot11fProbeResponse, sec_chan_offset_ele), |
| 7147 | offsetof(tDot11fIEsec_chan_offset_ele, present), 0, "sec_chan_offset_ele", |
| 7148 | 0, 3, 3, SigIesec_chan_offset_ele, {0, 0, 0, 0, 0}, |
| 7149 | 0, DOT11F_EID_SEC_CHAN_OFFSET_ELE, 0, }, |
| 7150 | { offsetof(tDot11fProbeResponse, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, |
| 7151 | present), 0, "WMMInfoAp", 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, |
| 7152 | 5, DOT11F_EID_WMMINFOAP, 0, }, |
| 7153 | { offsetof(tDot11fProbeResponse, WMMParams), offsetof(tDot11fIEWMMParams, |
| 7154 | present), 0, "WMMParams", 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, |
| 7155 | 5, DOT11F_EID_WMMPARAMS, 0, }, |
| 7156 | { offsetof(tDot11fProbeResponse, WMMCaps), offsetof(tDot11fIEWMMCaps, |
| 7157 | present), 0, "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, |
| 7158 | 5, DOT11F_EID_WMMCAPS, 0, }, |
| 7159 | { offsetof(tDot11fProbeResponse, WAPI), offsetof(tDot11fIEWAPI, present), |
| 7160 | 0, "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, |
| 7161 | 0, DOT11F_EID_WAPI, 0, }, |
| 7162 | { offsetof(tDot11fProbeResponse, ESERadMgmtCap), |
| 7163 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 7164 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 7165 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 7166 | { offsetof(tDot11fProbeResponse, ESETrafStrmMet), |
| 7167 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 7168 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 7169 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 7170 | { offsetof(tDot11fProbeResponse, ESETxmitPower), |
| 7171 | offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower", |
| 7172 | 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, |
| 7173 | 4, DOT11F_EID_ESETXMITPOWER, 0, }, |
| 7174 | { offsetof(tDot11fProbeResponse, WscProbeRes), |
| 7175 | offsetof(tDot11fIEWscProbeRes, present), 0, "WscProbeRes", |
| 7176 | 0, 6, 319, SigIeWscProbeRes, {0, 80, 242, 4, 0}, |
| 7177 | 4, DOT11F_EID_WSCPROBERES, 0, }, |
| 7178 | { offsetof(tDot11fProbeResponse, P2PProbeRes), |
| 7179 | offsetof(tDot11fIEP2PProbeRes, present), 0, "P2PProbeRes", |
| 7180 | 0, 6, 1141, SigIeP2PProbeRes, {80, 111, 154, 9, 0}, |
| 7181 | 4, DOT11F_EID_P2PPROBERES, 0, }, |
| 7182 | { offsetof(tDot11fProbeResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 7183 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 7184 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 7185 | { offsetof(tDot11fProbeResponse, VHTOperation), |
| 7186 | offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation", |
| 7187 | 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 7188 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 7189 | { offsetof(tDot11fProbeResponse, VHTExtBssLoad), |
| 7190 | offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad", |
| 7191 | 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, |
| 7192 | 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, |
| 7193 | { offsetof(tDot11fProbeResponse, ExtCap), offsetof(tDot11fIEExtCap, |
| 7194 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 7195 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 7196 | { offsetof(tDot11fProbeResponse, OBSSScanParameters), |
| 7197 | offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters", |
| 7198 | 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, |
| 7199 | 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, |
| 7200 | { offsetof(tDot11fProbeResponse, Vendor1IE), offsetof(tDot11fIEVendor1IE, |
| 7201 | present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, |
| 7202 | 3, DOT11F_EID_VENDOR1IE, 0, }, |
| 7203 | { offsetof(tDot11fProbeResponse, vendor2_ie), |
| 7204 | offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", |
| 7205 | 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 7206 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 7207 | { offsetof(tDot11fProbeResponse, Vendor3IE), offsetof(tDot11fIEVendor3IE, |
| 7208 | present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, |
| 7209 | 3, DOT11F_EID_VENDOR3IE, 0, }, |
| 7210 | { offsetof(tDot11fProbeResponse, ChannelSwitchWrapper), |
| 7211 | offsetof(tDot11fIEChannelSwitchWrapper, present), 0, |
| 7212 | "ChannelSwitchWrapper", 0, 2, 7, SigIeChannelSwitchWrapper, |
| 7213 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, |
| 7214 | { offsetof(tDot11fProbeResponse, QComVendorIE), |
| 7215 | offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE", |
| 7216 | 0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0}, |
| 7217 | 3, DOT11F_EID_QCOMVENDORIE, 0, }, |
| 7218 | { offsetof(tDot11fProbeResponse, ESEVersion), |
| 7219 | offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion", |
| 7220 | 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, |
| 7221 | 4, DOT11F_EID_ESEVERSION, 0, }, |
| 7222 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7223 | |
| 7224 | uint32_t dot11f_unpack_probe_response(tpAniSirGlobal pCtx, |
| 7225 | uint8_t *pBuf, uint32_t nBuf, |
| 7226 | tDot11fProbeResponse *pFrm) |
| 7227 | { |
| 7228 | uint32_t i = 0; |
| 7229 | uint32_t status = 0; |
| 7230 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7231 | FFS_ProbeResponse, IES_ProbeResponse, |
| 7232 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7233 | |
| 7234 | (void)i; |
| 7235 | return status; |
| 7236 | |
| 7237 | } /* End dot11f_unpack_probe_response. */ |
| 7238 | |
| 7239 | static const tFFDefn FFS_QosMapConfigure[] = { |
| 7240 | { "Category", offsetof(tDot11fQosMapConfigure, Category), SigFfCategory, |
| 7241 | DOT11F_FF_CATEGORY_LEN, }, |
| 7242 | { "Action", offsetof(tDot11fQosMapConfigure, Action), SigFfAction, |
| 7243 | DOT11F_FF_ACTION_LEN, }, |
| 7244 | { NULL, 0, 0, 0,}, |
| 7245 | }; |
| 7246 | |
| 7247 | static const tIEDefn IES_QosMapConfigure[] = { |
| 7248 | { offsetof(tDot11fQosMapConfigure, QosMapSet), |
| 7249 | offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet", |
| 7250 | 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 1, }, |
| 7251 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7252 | |
| 7253 | uint32_t dot11f_unpack_qos_map_configure(tpAniSirGlobal pCtx, |
| 7254 | uint8_t *pBuf, uint32_t nBuf, |
| 7255 | tDot11fQosMapConfigure *pFrm) |
| 7256 | { |
| 7257 | uint32_t i = 0; |
| 7258 | uint32_t status = 0; |
| 7259 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7260 | FFS_QosMapConfigure, IES_QosMapConfigure, |
| 7261 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7262 | |
| 7263 | (void)i; |
| 7264 | return status; |
| 7265 | |
| 7266 | } /* End dot11f_unpack_qos_map_configure. */ |
| 7267 | |
| 7268 | static const tFFDefn FFS_RadioMeasurementReport[] = { |
| 7269 | { "Category", offsetof(tDot11fRadioMeasurementReport, Category), |
| 7270 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 7271 | { "Action", offsetof(tDot11fRadioMeasurementReport, Action), SigFfAction, |
| 7272 | DOT11F_FF_ACTION_LEN, }, |
| 7273 | { "DialogToken", offsetof(tDot11fRadioMeasurementReport, DialogToken), |
| 7274 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7275 | { NULL, 0, 0, 0,}, |
| 7276 | }; |
| 7277 | |
| 7278 | static const tIEDefn IES_RadioMeasurementReport[] = { |
| 7279 | { offsetof(tDot11fRadioMeasurementReport, MeasurementReport), |
| 7280 | offsetof(tDot11fIEMeasurementReport, present), |
| 7281 | offsetof(tDot11fRadioMeasurementReport, num_MeasurementReport), |
| 7282 | "MeasurementReport", 4, 5, 31, SigIeMeasurementReport, {0, 0, 0, 0, 0}, |
| 7283 | 0, DOT11F_EID_MEASUREMENTREPORT, 1, }, |
| 7284 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7285 | |
| 7286 | uint32_t dot11f_unpack_radio_measurement_report(tpAniSirGlobal pCtx, |
| 7287 | uint8_t *pBuf, uint32_t nBuf, |
| 7288 | tDot11fRadioMeasurementReport *pFrm) |
| 7289 | { |
| 7290 | uint32_t i = 0; |
| 7291 | uint32_t status = 0; |
| 7292 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7293 | FFS_RadioMeasurementReport, IES_RadioMeasurementReport, |
| 7294 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7295 | |
| 7296 | (void)i; |
| 7297 | return status; |
| 7298 | |
| 7299 | } /* End dot11f_unpack_radio_measurement_report. */ |
| 7300 | |
| 7301 | static const tFFDefn FFS_RadioMeasurementRequest[] = { |
| 7302 | { "Category", offsetof(tDot11fRadioMeasurementRequest, Category), |
| 7303 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 7304 | { "Action", offsetof(tDot11fRadioMeasurementRequest, Action), SigFfAction, |
| 7305 | DOT11F_FF_ACTION_LEN, }, |
| 7306 | { "DialogToken", offsetof(tDot11fRadioMeasurementRequest, DialogToken), |
| 7307 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7308 | { "NumOfRepetitions", offsetof(tDot11fRadioMeasurementRequest, |
| 7309 | NumOfRepetitions), SigFfNumOfRepetitions, |
| 7310 | DOT11F_FF_NUMOFREPETITIONS_LEN, }, |
| 7311 | { NULL, 0, 0, 0,}, |
| 7312 | }; |
| 7313 | |
| 7314 | static const tIEDefn IES_RadioMeasurementRequest[] = { |
| 7315 | { offsetof(tDot11fRadioMeasurementRequest, MeasurementRequest), |
| 7316 | offsetof(tDot11fIEMeasurementRequest, present), |
| 7317 | offsetof(tDot11fRadioMeasurementRequest, num_MeasurementRequest), |
| 7318 | "MeasurementRequest", 2, 16, 18, SigIeMeasurementRequest, |
| 7319 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREQUEST, 1, }, |
| 7320 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7321 | |
| 7322 | uint32_t dot11f_unpack_radio_measurement_request(tpAniSirGlobal pCtx, |
| 7323 | uint8_t *pBuf, uint32_t nBuf, |
| 7324 | tDot11fRadioMeasurementRequest *pFrm) |
| 7325 | { |
| 7326 | uint32_t i = 0; |
| 7327 | uint32_t status = 0; |
| 7328 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7329 | FFS_RadioMeasurementRequest, IES_RadioMeasurementRequest, |
| 7330 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7331 | |
| 7332 | (void)i; |
| 7333 | return status; |
| 7334 | |
| 7335 | } /* End dot11f_unpack_radio_measurement_request. */ |
| 7336 | |
| 7337 | static const tFFDefn FFS_ReAssocRequest[] = { |
| 7338 | { "Capabilities", offsetof(tDot11fReAssocRequest, Capabilities), |
| 7339 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 7340 | { "ListenInterval", offsetof(tDot11fReAssocRequest, ListenInterval), |
| 7341 | SigFfListenInterval, DOT11F_FF_LISTENINTERVAL_LEN, }, |
| 7342 | { "CurrentAPAddress", offsetof(tDot11fReAssocRequest, CurrentAPAddress), |
| 7343 | SigFfCurrentAPAddress, DOT11F_FF_CURRENTAPADDRESS_LEN, }, |
| 7344 | { NULL, 0, 0, 0,}, |
| 7345 | }; |
| 7346 | |
| 7347 | static const tIEDefn IES_ReAssocRequest[] = { |
| 7348 | { offsetof(tDot11fReAssocRequest, SSID), offsetof(tDot11fIESSID, present), |
| 7349 | 0, "SSID", 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, |
| 7350 | { offsetof(tDot11fReAssocRequest, SuppRates), |
| 7351 | offsetof(tDot11fIESuppRates, present), 0, "SuppRates", |
| 7352 | 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, |
| 7353 | { offsetof(tDot11fReAssocRequest, ExtSuppRates), |
| 7354 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 7355 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 7356 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 7357 | { offsetof(tDot11fReAssocRequest, PowerCaps), |
| 7358 | offsetof(tDot11fIEPowerCaps, present), 0, "PowerCaps", |
| 7359 | 0, 4, 4, SigIePowerCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCAPS, 0, }, |
| 7360 | { offsetof(tDot11fReAssocRequest, SuppChannels), |
| 7361 | offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", |
| 7362 | 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, |
| 7363 | 0, DOT11F_EID_SUPPCHANNELS, 0, }, |
| 7364 | { offsetof(tDot11fReAssocRequest, RSNOpaque), |
| 7365 | offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", |
| 7366 | 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, |
| 7367 | 0, DOT11F_EID_RSNOPAQUE, 0, }, |
| 7368 | { offsetof(tDot11fReAssocRequest, QOSCapsStation), |
| 7369 | offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation", |
| 7370 | 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, |
| 7371 | 0, DOT11F_EID_QOSCAPSSTATION, 0, }, |
| 7372 | { offsetof(tDot11fReAssocRequest, RRMEnabledCap), |
| 7373 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 7374 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 7375 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 7376 | { offsetof(tDot11fReAssocRequest, MobilityDomain), |
| 7377 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 7378 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 7379 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 7380 | { offsetof(tDot11fReAssocRequest, FTInfo), offsetof(tDot11fIEFTInfo, |
| 7381 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 7382 | 0, DOT11F_EID_FTINFO, 0, }, |
| 7383 | { offsetof(tDot11fReAssocRequest, RICDataDesc), |
| 7384 | offsetof(tDot11fIERICDataDesc, present), |
| 7385 | offsetof(tDot11fReAssocRequest, num_RICDataDesc), "RICDataDesc", |
| 7386 | 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, |
| 7387 | 0, DOT11F_EID_RICDATADESC, 0, }, |
| 7388 | { offsetof(tDot11fReAssocRequest, WPAOpaque), |
| 7389 | offsetof(tDot11fIEWPAOpaque, present), 0, "WPAOpaque", |
| 7390 | 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, |
| 7391 | 4, DOT11F_EID_WPAOPAQUE, 0, }, |
| 7392 | { offsetof(tDot11fReAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, |
| 7393 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 7394 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 7395 | { offsetof(tDot11fReAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, |
| 7396 | present), 0, "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, |
| 7397 | 5, DOT11F_EID_WMMCAPS, 0, }, |
| 7398 | { offsetof(tDot11fReAssocRequest, WMMInfoStation), |
| 7399 | offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation", |
| 7400 | 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, |
| 7401 | 5, DOT11F_EID_WMMINFOSTATION, 0, }, |
| 7402 | { offsetof(tDot11fReAssocRequest, WscIEOpaque), |
| 7403 | offsetof(tDot11fIEWscIEOpaque, present), 0, "WscIEOpaque", |
| 7404 | 0, 8, 255, SigIeWscIEOpaque, {0, 80, 242, 4, 0}, |
| 7405 | 4, DOT11F_EID_WSCIEOPAQUE, 0, }, |
| 7406 | { offsetof(tDot11fReAssocRequest, WAPIOpaque), |
| 7407 | offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque", |
| 7408 | 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, |
| 7409 | 0, DOT11F_EID_WAPIOPAQUE, 0, }, |
| 7410 | { offsetof(tDot11fReAssocRequest, WAPI), offsetof(tDot11fIEWAPI, present), |
| 7411 | 0, "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, |
| 7412 | 0, DOT11F_EID_WAPI, 0, }, |
| 7413 | { offsetof(tDot11fReAssocRequest, ESERadMgmtCap), |
| 7414 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 7415 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 7416 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 7417 | { offsetof(tDot11fReAssocRequest, ESEVersion), |
| 7418 | offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion", |
| 7419 | 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, |
| 7420 | 4, DOT11F_EID_ESEVERSION, 0, }, |
| 7421 | { offsetof(tDot11fReAssocRequest, ESECckmOpaque), |
| 7422 | offsetof(tDot11fIEESECckmOpaque, present), 0, "ESECckmOpaque", |
| 7423 | 0, 12, 26, SigIeESECckmOpaque, {0, 64, 150, 0, 0}, |
| 7424 | 4, DOT11F_EID_ESECCKMOPAQUE, 0, }, |
| 7425 | { offsetof(tDot11fReAssocRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 7426 | present), offsetof(tDot11fReAssocRequest, num_WMMTSPEC), "WMMTSPEC", |
| 7427 | 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 7428 | 5, DOT11F_EID_WMMTSPEC, 0, }, |
| 7429 | { offsetof(tDot11fReAssocRequest, ESETrafStrmRateSet), |
| 7430 | offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet", |
| 7431 | 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, |
| 7432 | 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, |
| 7433 | { offsetof(tDot11fReAssocRequest, P2PIEOpaque), |
| 7434 | offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque", |
| 7435 | 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, |
| 7436 | 4, DOT11F_EID_P2PIEOPAQUE, 0, }, |
| 7437 | { offsetof(tDot11fReAssocRequest, WFDIEOpaque), |
| 7438 | offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque", |
| 7439 | 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, |
| 7440 | 4, DOT11F_EID_WFDIEOPAQUE, 0, }, |
| 7441 | { offsetof(tDot11fReAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 7442 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 7443 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 7444 | { offsetof(tDot11fReAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, |
| 7445 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 7446 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 7447 | { offsetof(tDot11fReAssocRequest, OperatingMode), |
| 7448 | offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", |
| 7449 | 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, |
| 7450 | 0, DOT11F_EID_OPERATINGMODE, 0, }, |
| 7451 | { offsetof(tDot11fReAssocRequest, QosMapSet), |
| 7452 | offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet", |
| 7453 | 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, |
| 7454 | { offsetof(tDot11fReAssocRequest, vendor2_ie), |
| 7455 | offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", |
| 7456 | 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 7457 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 7458 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7459 | |
| 7460 | uint32_t dot11f_unpack_re_assoc_request(tpAniSirGlobal pCtx, |
| 7461 | uint8_t *pBuf, uint32_t nBuf, |
| 7462 | tDot11fReAssocRequest *pFrm) |
| 7463 | { |
| 7464 | uint32_t i = 0; |
| 7465 | uint32_t status = 0; |
| 7466 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7467 | FFS_ReAssocRequest, IES_ReAssocRequest, |
| 7468 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7469 | |
| 7470 | (void)i; |
| 7471 | return status; |
| 7472 | |
| 7473 | } /* End dot11f_unpack_re_assoc_request. */ |
| 7474 | |
| 7475 | static const tFFDefn FFS_ReAssocResponse[] = { |
| 7476 | { "Capabilities", offsetof(tDot11fReAssocResponse, Capabilities), |
| 7477 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 7478 | { "Status", offsetof(tDot11fReAssocResponse, Status), SigFfStatus, |
| 7479 | DOT11F_FF_STATUS_LEN, }, |
| 7480 | { "AID", offsetof(tDot11fReAssocResponse, AID), SigFfAID, |
| 7481 | DOT11F_FF_AID_LEN, }, |
| 7482 | { NULL, 0, 0, 0,}, |
| 7483 | }; |
| 7484 | |
| 7485 | static const tIEDefn IES_ReAssocResponse[] = { |
| 7486 | { offsetof(tDot11fReAssocResponse, SuppRates), |
| 7487 | offsetof(tDot11fIESuppRates, present), 0, "SuppRates", |
| 7488 | 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, |
| 7489 | { offsetof(tDot11fReAssocResponse, ExtSuppRates), |
| 7490 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 7491 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 7492 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 7493 | { offsetof(tDot11fReAssocResponse, EDCAParamSet), |
| 7494 | offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet", |
| 7495 | 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, |
| 7496 | 0, DOT11F_EID_EDCAPARAMSET, 0, }, |
| 7497 | { offsetof(tDot11fReAssocResponse, RCPIIE), offsetof(tDot11fIERCPIIE, |
| 7498 | present), 0, "RCPIIE", 0, 3, 3, SigIeRCPIIE, {0, 0, 0, 0, 0}, |
| 7499 | 0, DOT11F_EID_RCPIIE, 0, }, |
| 7500 | { offsetof(tDot11fReAssocResponse, RSNIIE), offsetof(tDot11fIERSNIIE, |
| 7501 | present), 0, "RSNIIE", 0, 3, 3, SigIeRSNIIE, {0, 0, 0, 0, 0}, |
| 7502 | 0, DOT11F_EID_RSNIIE, 0, }, |
| 7503 | { offsetof(tDot11fReAssocResponse, RRMEnabledCap), |
| 7504 | offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", |
| 7505 | 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, |
| 7506 | 0, DOT11F_EID_RRMENABLEDCAP, 0, }, |
| 7507 | { offsetof(tDot11fReAssocResponse, RSNOpaque), |
| 7508 | offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", |
| 7509 | 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, |
| 7510 | 0, DOT11F_EID_RSNOPAQUE, 0, }, |
| 7511 | { offsetof(tDot11fReAssocResponse, MobilityDomain), |
| 7512 | offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", |
| 7513 | 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, |
| 7514 | 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, |
| 7515 | { offsetof(tDot11fReAssocResponse, FTInfo), offsetof(tDot11fIEFTInfo, |
| 7516 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 7517 | 0, DOT11F_EID_FTINFO, 0, }, |
| 7518 | { offsetof(tDot11fReAssocResponse, RICDataDesc), |
| 7519 | offsetof(tDot11fIERICDataDesc, present), |
| 7520 | offsetof(tDot11fReAssocResponse, num_RICDataDesc), "RICDataDesc", |
| 7521 | 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, |
| 7522 | 0, DOT11F_EID_RICDATADESC, 0, }, |
| 7523 | { offsetof(tDot11fReAssocResponse, WPA), offsetof(tDot11fIEWPA, present), |
| 7524 | 0, "WPA", 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, |
| 7525 | { offsetof(tDot11fReAssocResponse, TimeoutInterval), |
| 7526 | offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval", |
| 7527 | 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, |
| 7528 | 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, |
| 7529 | { offsetof(tDot11fReAssocResponse, HTCaps), offsetof(tDot11fIEHTCaps, |
| 7530 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 7531 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 7532 | { offsetof(tDot11fReAssocResponse, HTInfo), offsetof(tDot11fIEHTInfo, |
| 7533 | present), 0, "HTInfo", 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, |
| 7534 | 0, DOT11F_EID_HTINFO, 0, }, |
| 7535 | { offsetof(tDot11fReAssocResponse, WMMParams), |
| 7536 | offsetof(tDot11fIEWMMParams, present), 0, "WMMParams", |
| 7537 | 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, |
| 7538 | 5, DOT11F_EID_WMMPARAMS, 0, }, |
| 7539 | { offsetof(tDot11fReAssocResponse, ESERadMgmtCap), |
| 7540 | offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", |
| 7541 | 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, |
| 7542 | 4, DOT11F_EID_ESERADMGMTCAP, 0, }, |
| 7543 | { offsetof(tDot11fReAssocResponse, ESETrafStrmMet), |
| 7544 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 7545 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 7546 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 7547 | { offsetof(tDot11fReAssocResponse, ESETxmitPower), |
| 7548 | offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower", |
| 7549 | 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, |
| 7550 | 4, DOT11F_EID_ESETXMITPOWER, 0, }, |
| 7551 | { offsetof(tDot11fReAssocResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 7552 | present), offsetof(tDot11fReAssocResponse, num_WMMTSPEC), "WMMTSPEC", |
| 7553 | 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 7554 | 5, DOT11F_EID_WMMTSPEC, 0, }, |
| 7555 | { offsetof(tDot11fReAssocResponse, ESETrafStrmRateSet), |
| 7556 | offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet", |
| 7557 | 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, |
| 7558 | 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, |
| 7559 | { offsetof(tDot11fReAssocResponse, WscReassocRes), |
| 7560 | offsetof(tDot11fIEWscReassocRes, present), 0, "WscReassocRes", |
| 7561 | 0, 6, 37, SigIeWscReassocRes, {0, 80, 242, 4, 0}, |
| 7562 | 4, DOT11F_EID_WSCREASSOCRES, 0, }, |
| 7563 | { offsetof(tDot11fReAssocResponse, P2PAssocRes), |
| 7564 | offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes", |
| 7565 | 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, |
| 7566 | 4, DOT11F_EID_P2PASSOCRES, 0, }, |
| 7567 | { offsetof(tDot11fReAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 7568 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 7569 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 7570 | { offsetof(tDot11fReAssocResponse, VHTOperation), |
| 7571 | offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation", |
| 7572 | 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 7573 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 7574 | { offsetof(tDot11fReAssocResponse, ExtCap), offsetof(tDot11fIEExtCap, |
| 7575 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 7576 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 7577 | { offsetof(tDot11fReAssocResponse, OBSSScanParameters), |
| 7578 | offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters", |
| 7579 | 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, |
| 7580 | 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, |
| 7581 | { offsetof(tDot11fReAssocResponse, QosMapSet), |
| 7582 | offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet", |
| 7583 | 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, |
| 7584 | { offsetof(tDot11fReAssocResponse, vendor2_ie), |
| 7585 | offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", |
| 7586 | 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, |
| 7587 | 3, DOT11F_EID_VENDOR2_IE, 0, }, |
| 7588 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7589 | |
| 7590 | uint32_t dot11f_unpack_re_assoc_response(tpAniSirGlobal pCtx, |
| 7591 | uint8_t *pBuf, uint32_t nBuf, |
| 7592 | tDot11fReAssocResponse *pFrm) |
| 7593 | { |
| 7594 | uint32_t i = 0; |
| 7595 | uint32_t status = 0; |
| 7596 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7597 | FFS_ReAssocResponse, IES_ReAssocResponse, |
| 7598 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7599 | |
| 7600 | (void)i; |
| 7601 | return status; |
| 7602 | |
| 7603 | } /* End dot11f_unpack_re_assoc_response. */ |
| 7604 | |
| 7605 | static const tFFDefn FFS_SMPowerSave[] = { |
| 7606 | { "Category", offsetof(tDot11fSMPowerSave, Category), SigFfCategory, |
| 7607 | DOT11F_FF_CATEGORY_LEN, }, |
| 7608 | { "Action", offsetof(tDot11fSMPowerSave, Action), SigFfAction, |
| 7609 | DOT11F_FF_ACTION_LEN, }, |
| 7610 | { "SMPowerModeSet", offsetof(tDot11fSMPowerSave, SMPowerModeSet), |
| 7611 | SigFfSMPowerModeSet, DOT11F_FF_SMPOWERMODESET_LEN, }, |
| 7612 | { NULL, 0, 0, 0,}, |
| 7613 | }; |
| 7614 | |
| 7615 | static const tIEDefn IES_SMPowerSave[] = { |
| 7616 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7617 | |
| 7618 | uint32_t dot11f_unpack_sm_power_save(tpAniSirGlobal pCtx, |
| 7619 | uint8_t *pBuf, uint32_t nBuf, |
| 7620 | tDot11fSMPowerSave *pFrm) |
| 7621 | { |
| 7622 | uint32_t i = 0; |
| 7623 | uint32_t status = 0; |
| 7624 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7625 | FFS_SMPowerSave, IES_SMPowerSave, |
| 7626 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7627 | |
| 7628 | (void)i; |
| 7629 | return status; |
| 7630 | |
| 7631 | } /* End dot11f_unpack_sm_power_save. */ |
| 7632 | |
| 7633 | static const tFFDefn FFS_SaQueryReq[] = { |
| 7634 | { "Category", offsetof(tDot11fSaQueryReq, Category), SigFfCategory, |
| 7635 | DOT11F_FF_CATEGORY_LEN, }, |
| 7636 | { "Action", offsetof(tDot11fSaQueryReq, Action), SigFfAction, |
| 7637 | DOT11F_FF_ACTION_LEN, }, |
| 7638 | { "TransactionId", offsetof(tDot11fSaQueryReq, TransactionId), |
| 7639 | SigFfTransactionId, DOT11F_FF_TRANSACTIONID_LEN, }, |
| 7640 | { NULL, 0, 0, 0,}, |
| 7641 | }; |
| 7642 | |
| 7643 | static const tIEDefn IES_SaQueryReq[] = { |
| 7644 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7645 | |
| 7646 | uint32_t dot11f_unpack_sa_query_req(tpAniSirGlobal pCtx, |
| 7647 | uint8_t *pBuf, uint32_t nBuf, |
| 7648 | tDot11fSaQueryReq *pFrm) |
| 7649 | { |
| 7650 | uint32_t i = 0; |
| 7651 | uint32_t status = 0; |
| 7652 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7653 | FFS_SaQueryReq, IES_SaQueryReq, |
| 7654 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7655 | |
| 7656 | (void)i; |
| 7657 | return status; |
| 7658 | |
| 7659 | } /* End dot11f_unpack_sa_query_req. */ |
| 7660 | |
| 7661 | static const tFFDefn FFS_SaQueryRsp[] = { |
| 7662 | { "Category", offsetof(tDot11fSaQueryRsp, Category), SigFfCategory, |
| 7663 | DOT11F_FF_CATEGORY_LEN, }, |
| 7664 | { "Action", offsetof(tDot11fSaQueryRsp, Action), SigFfAction, |
| 7665 | DOT11F_FF_ACTION_LEN, }, |
| 7666 | { "TransactionId", offsetof(tDot11fSaQueryRsp, TransactionId), |
| 7667 | SigFfTransactionId, DOT11F_FF_TRANSACTIONID_LEN, }, |
| 7668 | { NULL, 0, 0, 0,}, |
| 7669 | }; |
| 7670 | |
| 7671 | static const tIEDefn IES_SaQueryRsp[] = { |
| 7672 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7673 | |
| 7674 | uint32_t dot11f_unpack_sa_query_rsp(tpAniSirGlobal pCtx, |
| 7675 | uint8_t *pBuf, uint32_t nBuf, |
| 7676 | tDot11fSaQueryRsp *pFrm) |
| 7677 | { |
| 7678 | uint32_t i = 0; |
| 7679 | uint32_t status = 0; |
| 7680 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7681 | FFS_SaQueryRsp, IES_SaQueryRsp, |
| 7682 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7683 | |
| 7684 | (void)i; |
| 7685 | return status; |
| 7686 | |
| 7687 | } /* End dot11f_unpack_sa_query_rsp. */ |
| 7688 | |
| 7689 | static const tFFDefn FFS_TDLSDisReq[] = { |
| 7690 | { "Category", offsetof(tDot11fTDLSDisReq, Category), SigFfCategory, |
| 7691 | DOT11F_FF_CATEGORY_LEN, }, |
| 7692 | { "Action", offsetof(tDot11fTDLSDisReq, Action), SigFfAction, |
| 7693 | DOT11F_FF_ACTION_LEN, }, |
| 7694 | { "DialogToken", offsetof(tDot11fTDLSDisReq, DialogToken), |
| 7695 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7696 | { NULL, 0, 0, 0,}, |
| 7697 | }; |
| 7698 | |
| 7699 | static const tIEDefn IES_TDLSDisReq[] = { |
| 7700 | { offsetof(tDot11fTDLSDisReq, LinkIdentifier), |
| 7701 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 7702 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 7703 | 0, DOT11F_EID_LINKIDENTIFIER, 1, }, |
| 7704 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7705 | |
| 7706 | uint32_t dot11f_unpack_tdls_dis_req(tpAniSirGlobal pCtx, |
| 7707 | uint8_t *pBuf, uint32_t nBuf, |
| 7708 | tDot11fTDLSDisReq *pFrm) |
| 7709 | { |
| 7710 | uint32_t i = 0; |
| 7711 | uint32_t status = 0; |
| 7712 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7713 | FFS_TDLSDisReq, IES_TDLSDisReq, |
| 7714 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7715 | |
| 7716 | (void)i; |
| 7717 | return status; |
| 7718 | |
| 7719 | } /* End dot11f_unpack_tdls_dis_req. */ |
| 7720 | |
| 7721 | static const tFFDefn FFS_TDLSDisRsp[] = { |
| 7722 | { "Category", offsetof(tDot11fTDLSDisRsp, Category), SigFfCategory, |
| 7723 | DOT11F_FF_CATEGORY_LEN, }, |
| 7724 | { "Action", offsetof(tDot11fTDLSDisRsp, Action), SigFfAction, |
| 7725 | DOT11F_FF_ACTION_LEN, }, |
| 7726 | { "DialogToken", offsetof(tDot11fTDLSDisRsp, DialogToken), |
| 7727 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7728 | { "Capabilities", offsetof(tDot11fTDLSDisRsp, Capabilities), |
| 7729 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 7730 | { NULL, 0, 0, 0,}, |
| 7731 | }; |
| 7732 | |
| 7733 | static const tIEDefn IES_TDLSDisRsp[] = { |
| 7734 | { offsetof(tDot11fTDLSDisRsp, SuppRates), offsetof(tDot11fIESuppRates, |
| 7735 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 7736 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 7737 | { offsetof(tDot11fTDLSDisRsp, ExtSuppRates), |
| 7738 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 7739 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 7740 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 7741 | { offsetof(tDot11fTDLSDisRsp, SuppChannels), |
| 7742 | offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", |
| 7743 | 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, |
| 7744 | 0, DOT11F_EID_SUPPCHANNELS, 0, }, |
| 7745 | { offsetof(tDot11fTDLSDisRsp, SuppOperatingClasses), |
| 7746 | offsetof(tDot11fIESuppOperatingClasses, present), 0, |
| 7747 | "SuppOperatingClasses", 0, 3, 34, SigIeSuppOperatingClasses, |
| 7748 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, }, |
| 7749 | { offsetof(tDot11fTDLSDisRsp, RSN), offsetof(tDot11fIERSN, present), 0, |
| 7750 | "RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, |
| 7751 | { offsetof(tDot11fTDLSDisRsp, ExtCap), offsetof(tDot11fIEExtCap, present), |
| 7752 | 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 7753 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 7754 | { offsetof(tDot11fTDLSDisRsp, FTInfo), offsetof(tDot11fIEFTInfo, present), |
| 7755 | 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 7756 | 0, DOT11F_EID_FTINFO, 0, }, |
| 7757 | { offsetof(tDot11fTDLSDisRsp, TimeoutInterval), |
| 7758 | offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval", |
| 7759 | 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, |
| 7760 | 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, |
| 7761 | { offsetof(tDot11fTDLSDisRsp, RICData), offsetof(tDot11fIERICData, |
| 7762 | present), 0, "RICData", 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, |
| 7763 | 0, DOT11F_EID_RICDATA, 0, }, |
| 7764 | { offsetof(tDot11fTDLSDisRsp, HTCaps), offsetof(tDot11fIEHTCaps, present), |
| 7765 | 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 7766 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 7767 | { offsetof(tDot11fTDLSDisRsp, ht2040_bss_coexistence), |
| 7768 | offsetof(tDot11fIEht2040_bss_coexistence, present), 0, |
| 7769 | "ht2040_bss_coexistence", 0, 3, 3, SigIeht2040_bss_coexistence, |
| 7770 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040_BSS_COEXISTENCE, 0, }, |
| 7771 | { offsetof(tDot11fTDLSDisRsp, LinkIdentifier), |
| 7772 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 7773 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 7774 | 0, DOT11F_EID_LINKIDENTIFIER, 1, }, |
| 7775 | { offsetof(tDot11fTDLSDisRsp, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 7776 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 7777 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 7778 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7779 | |
| 7780 | uint32_t dot11f_unpack_tdls_dis_rsp(tpAniSirGlobal pCtx, |
| 7781 | uint8_t *pBuf, uint32_t nBuf, |
| 7782 | tDot11fTDLSDisRsp *pFrm) |
| 7783 | { |
| 7784 | uint32_t i = 0; |
| 7785 | uint32_t status = 0; |
| 7786 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7787 | FFS_TDLSDisRsp, IES_TDLSDisRsp, |
| 7788 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7789 | |
| 7790 | (void)i; |
| 7791 | return status; |
| 7792 | |
| 7793 | } /* End dot11f_unpack_tdls_dis_rsp. */ |
| 7794 | |
| 7795 | static const tFFDefn FFS_TDLSPeerTrafficInd[] = { |
| 7796 | { "Category", offsetof(tDot11fTDLSPeerTrafficInd, Category), |
| 7797 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 7798 | { "Action", offsetof(tDot11fTDLSPeerTrafficInd, Action), SigFfAction, |
| 7799 | DOT11F_FF_ACTION_LEN, }, |
| 7800 | { "DialogToken", offsetof(tDot11fTDLSPeerTrafficInd, DialogToken), |
| 7801 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7802 | { NULL, 0, 0, 0,}, |
| 7803 | }; |
| 7804 | |
| 7805 | static const tIEDefn IES_TDLSPeerTrafficInd[] = { |
| 7806 | { offsetof(tDot11fTDLSPeerTrafficInd, LinkIdentifier), |
| 7807 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 7808 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 7809 | 0, DOT11F_EID_LINKIDENTIFIER, 1, }, |
| 7810 | { offsetof(tDot11fTDLSPeerTrafficInd, PTIControl), |
| 7811 | offsetof(tDot11fIEPTIControl, present), 0, "PTIControl", |
| 7812 | 0, 5, 5, SigIePTIControl, {0, 0, 0, 0, 0}, |
| 7813 | 0, DOT11F_EID_PTICONTROL, 0, }, |
| 7814 | { offsetof(tDot11fTDLSPeerTrafficInd, PUBufferStatus), |
| 7815 | offsetof(tDot11fIEPUBufferStatus, present), 0, "PUBufferStatus", |
| 7816 | 0, 3, 3, SigIePUBufferStatus, {0, 0, 0, 0, 0}, |
| 7817 | 0, DOT11F_EID_PUBUFFERSTATUS, 1, }, |
| 7818 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7819 | |
| 7820 | uint32_t dot11f_unpack_tdls_peer_traffic_ind(tpAniSirGlobal pCtx, |
| 7821 | uint8_t *pBuf, uint32_t nBuf, |
| 7822 | tDot11fTDLSPeerTrafficInd *pFrm) |
| 7823 | { |
| 7824 | uint32_t i = 0; |
| 7825 | uint32_t status = 0; |
| 7826 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7827 | FFS_TDLSPeerTrafficInd, IES_TDLSPeerTrafficInd, |
| 7828 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7829 | |
| 7830 | (void)i; |
| 7831 | return status; |
| 7832 | |
| 7833 | } /* End dot11f_unpack_tdls_peer_traffic_ind. */ |
| 7834 | |
| 7835 | static const tFFDefn FFS_TDLSPeerTrafficRsp[] = { |
| 7836 | { "Category", offsetof(tDot11fTDLSPeerTrafficRsp, Category), |
| 7837 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 7838 | { "Action", offsetof(tDot11fTDLSPeerTrafficRsp, Action), SigFfAction, |
| 7839 | DOT11F_FF_ACTION_LEN, }, |
| 7840 | { "DialogToken", offsetof(tDot11fTDLSPeerTrafficRsp, DialogToken), |
| 7841 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7842 | { NULL, 0, 0, 0,}, |
| 7843 | }; |
| 7844 | |
| 7845 | static const tIEDefn IES_TDLSPeerTrafficRsp[] = { |
| 7846 | { offsetof(tDot11fTDLSPeerTrafficRsp, LinkIdentifier), |
| 7847 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 7848 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 7849 | 0, DOT11F_EID_LINKIDENTIFIER, 1, }, |
| 7850 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7851 | |
| 7852 | uint32_t dot11f_unpack_tdls_peer_traffic_rsp(tpAniSirGlobal pCtx, |
| 7853 | uint8_t *pBuf, uint32_t nBuf, |
| 7854 | tDot11fTDLSPeerTrafficRsp *pFrm) |
| 7855 | { |
| 7856 | uint32_t i = 0; |
| 7857 | uint32_t status = 0; |
| 7858 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7859 | FFS_TDLSPeerTrafficRsp, IES_TDLSPeerTrafficRsp, |
| 7860 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7861 | |
| 7862 | (void)i; |
| 7863 | return status; |
| 7864 | |
| 7865 | } /* End dot11f_unpack_tdls_peer_traffic_rsp. */ |
| 7866 | |
| 7867 | static const tFFDefn FFS_TDLSSetupCnf[] = { |
| 7868 | { "Category", offsetof(tDot11fTDLSSetupCnf, Category), SigFfCategory, |
| 7869 | DOT11F_FF_CATEGORY_LEN, }, |
| 7870 | { "Action", offsetof(tDot11fTDLSSetupCnf, Action), SigFfAction, |
| 7871 | DOT11F_FF_ACTION_LEN, }, |
| 7872 | { "Status", offsetof(tDot11fTDLSSetupCnf, Status), SigFfStatus, |
| 7873 | DOT11F_FF_STATUS_LEN, }, |
| 7874 | { "DialogToken", offsetof(tDot11fTDLSSetupCnf, DialogToken), |
| 7875 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7876 | { NULL, 0, 0, 0,}, |
| 7877 | }; |
| 7878 | |
| 7879 | static const tIEDefn IES_TDLSSetupCnf[] = { |
| 7880 | { offsetof(tDot11fTDLSSetupCnf, RSN), offsetof(tDot11fIERSN, present), 0, |
| 7881 | "RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, |
| 7882 | { offsetof(tDot11fTDLSSetupCnf, EDCAParamSet), |
| 7883 | offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet", |
| 7884 | 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, |
| 7885 | 0, DOT11F_EID_EDCAPARAMSET, 0, }, |
| 7886 | { offsetof(tDot11fTDLSSetupCnf, FTInfo), offsetof(tDot11fIEFTInfo, |
| 7887 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 7888 | 0, DOT11F_EID_FTINFO, 0, }, |
| 7889 | { offsetof(tDot11fTDLSSetupCnf, TimeoutInterval), |
| 7890 | offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval", |
| 7891 | 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, |
| 7892 | 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, |
| 7893 | { offsetof(tDot11fTDLSSetupCnf, HTInfo), offsetof(tDot11fIEHTInfo, |
| 7894 | present), 0, "HTInfo", 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, |
| 7895 | 0, DOT11F_EID_HTINFO, 0, }, |
| 7896 | { offsetof(tDot11fTDLSSetupCnf, LinkIdentifier), |
| 7897 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 7898 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 7899 | 0, DOT11F_EID_LINKIDENTIFIER, 0, }, |
| 7900 | { offsetof(tDot11fTDLSSetupCnf, WMMParams), offsetof(tDot11fIEWMMParams, |
| 7901 | present), 0, "WMMParams", 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, |
| 7902 | 5, DOT11F_EID_WMMPARAMS, 0, }, |
| 7903 | { offsetof(tDot11fTDLSSetupCnf, VHTOperation), |
| 7904 | offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation", |
| 7905 | 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, |
| 7906 | 0, DOT11F_EID_VHTOPERATION, 0, }, |
| 7907 | { offsetof(tDot11fTDLSSetupCnf, OperatingMode), |
| 7908 | offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", |
| 7909 | 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, |
| 7910 | 0, DOT11F_EID_OPERATINGMODE, 0, }, |
| 7911 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7912 | |
| 7913 | uint32_t dot11f_unpack_tdls_setup_cnf(tpAniSirGlobal pCtx, |
| 7914 | uint8_t *pBuf, uint32_t nBuf, |
| 7915 | tDot11fTDLSSetupCnf *pFrm) |
| 7916 | { |
| 7917 | uint32_t i = 0; |
| 7918 | uint32_t status = 0; |
| 7919 | status = unpack_core(pCtx, pBuf, nBuf, |
| 7920 | FFS_TDLSSetupCnf, IES_TDLSSetupCnf, |
| 7921 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 7922 | |
| 7923 | (void)i; |
| 7924 | return status; |
| 7925 | |
| 7926 | } /* End dot11f_unpack_tdls_setup_cnf. */ |
| 7927 | |
| 7928 | static const tFFDefn FFS_TDLSSetupReq[] = { |
| 7929 | { "Category", offsetof(tDot11fTDLSSetupReq, Category), SigFfCategory, |
| 7930 | DOT11F_FF_CATEGORY_LEN, }, |
| 7931 | { "Action", offsetof(tDot11fTDLSSetupReq, Action), SigFfAction, |
| 7932 | DOT11F_FF_ACTION_LEN, }, |
| 7933 | { "DialogToken", offsetof(tDot11fTDLSSetupReq, DialogToken), |
| 7934 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 7935 | { "Capabilities", offsetof(tDot11fTDLSSetupReq, Capabilities), |
| 7936 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 7937 | { NULL, 0, 0, 0,}, |
| 7938 | }; |
| 7939 | |
| 7940 | static const tIEDefn IES_TDLSSetupReq[] = { |
| 7941 | { offsetof(tDot11fTDLSSetupReq, SuppRates), offsetof(tDot11fIESuppRates, |
| 7942 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 7943 | 0, DOT11F_EID_SUPPRATES, 1, }, |
| 7944 | { offsetof(tDot11fTDLSSetupReq, Country), offsetof(tDot11fIECountry, |
| 7945 | present), 0, "Country", 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, |
| 7946 | 0, DOT11F_EID_COUNTRY, 0, }, |
| 7947 | { offsetof(tDot11fTDLSSetupReq, ExtSuppRates), |
| 7948 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 7949 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 7950 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 7951 | { offsetof(tDot11fTDLSSetupReq, SuppChannels), |
| 7952 | offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", |
| 7953 | 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, |
| 7954 | 0, DOT11F_EID_SUPPCHANNELS, 0, }, |
| 7955 | { offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0, |
| 7956 | "RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, |
| 7957 | { offsetof(tDot11fTDLSSetupReq, ExtCap), offsetof(tDot11fIEExtCap, |
| 7958 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 7959 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 7960 | { offsetof(tDot11fTDLSSetupReq, SuppOperatingClasses), |
| 7961 | offsetof(tDot11fIESuppOperatingClasses, present), 0, |
| 7962 | "SuppOperatingClasses", 0, 3, 34, SigIeSuppOperatingClasses, |
| 7963 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, }, |
| 7964 | { offsetof(tDot11fTDLSSetupReq, QOSCapsStation), |
| 7965 | offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation", |
| 7966 | 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, |
| 7967 | 0, DOT11F_EID_QOSCAPSSTATION, 0, }, |
| 7968 | { offsetof(tDot11fTDLSSetupReq, FTInfo), offsetof(tDot11fIEFTInfo, |
| 7969 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 7970 | 0, DOT11F_EID_FTINFO, 0, }, |
| 7971 | { offsetof(tDot11fTDLSSetupReq, TimeoutInterval), |
| 7972 | offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval", |
| 7973 | 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, |
| 7974 | 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, |
| 7975 | { offsetof(tDot11fTDLSSetupReq, RICData), offsetof(tDot11fIERICData, |
| 7976 | present), 0, "RICData", 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, |
| 7977 | 0, DOT11F_EID_RICDATA, 0, }, |
| 7978 | { offsetof(tDot11fTDLSSetupReq, HTCaps), offsetof(tDot11fIEHTCaps, |
| 7979 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 7980 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 7981 | { offsetof(tDot11fTDLSSetupReq, ht2040_bss_coexistence), |
| 7982 | offsetof(tDot11fIEht2040_bss_coexistence, present), 0, |
| 7983 | "ht2040_bss_coexistence", 0, 3, 3, SigIeht2040_bss_coexistence, |
| 7984 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040_BSS_COEXISTENCE, 0, }, |
| 7985 | { offsetof(tDot11fTDLSSetupReq, LinkIdentifier), |
| 7986 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 7987 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 7988 | 0, DOT11F_EID_LINKIDENTIFIER, 1, }, |
| 7989 | { offsetof(tDot11fTDLSSetupReq, WMMInfoStation), |
| 7990 | offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation", |
| 7991 | 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, |
| 7992 | 5, DOT11F_EID_WMMINFOSTATION, 0, }, |
| 7993 | { offsetof(tDot11fTDLSSetupReq, AID), offsetof(tDot11fIEAID, present), 0, |
| 7994 | "AID", 0, 4, 4, SigIeAID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_AID, 0, }, |
| 7995 | { offsetof(tDot11fTDLSSetupReq, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 7996 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 7997 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 7998 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 7999 | |
| 8000 | uint32_t dot11f_unpack_tdls_setup_req(tpAniSirGlobal pCtx, |
| 8001 | uint8_t *pBuf, uint32_t nBuf, |
| 8002 | tDot11fTDLSSetupReq *pFrm) |
| 8003 | { |
| 8004 | uint32_t i = 0; |
| 8005 | uint32_t status = 0; |
| 8006 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8007 | FFS_TDLSSetupReq, IES_TDLSSetupReq, |
| 8008 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8009 | |
| 8010 | (void)i; |
| 8011 | return status; |
| 8012 | |
| 8013 | } /* End dot11f_unpack_tdls_setup_req. */ |
| 8014 | |
| 8015 | static const tFFDefn FFS_TDLSSetupRsp[] = { |
| 8016 | { "Category", offsetof(tDot11fTDLSSetupRsp, Category), SigFfCategory, |
| 8017 | DOT11F_FF_CATEGORY_LEN, }, |
| 8018 | { "Action", offsetof(tDot11fTDLSSetupRsp, Action), SigFfAction, |
| 8019 | DOT11F_FF_ACTION_LEN, }, |
| 8020 | { "Status", offsetof(tDot11fTDLSSetupRsp, Status), SigFfStatus, |
| 8021 | DOT11F_FF_STATUS_LEN, }, |
| 8022 | { "DialogToken", offsetof(tDot11fTDLSSetupRsp, DialogToken), |
| 8023 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 8024 | { "Capabilities", offsetof(tDot11fTDLSSetupRsp, Capabilities), |
| 8025 | SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 8026 | { NULL, 0, 0, 0,}, |
| 8027 | }; |
| 8028 | |
| 8029 | static const tIEDefn IES_TDLSSetupRsp[] = { |
| 8030 | { offsetof(tDot11fTDLSSetupRsp, SuppRates), offsetof(tDot11fIESuppRates, |
| 8031 | present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, |
| 8032 | 0, DOT11F_EID_SUPPRATES, 0, }, |
| 8033 | { offsetof(tDot11fTDLSSetupRsp, Country), offsetof(tDot11fIECountry, |
| 8034 | present), 0, "Country", 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, |
| 8035 | 0, DOT11F_EID_COUNTRY, 0, }, |
| 8036 | { offsetof(tDot11fTDLSSetupRsp, ExtSuppRates), |
| 8037 | offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", |
| 8038 | 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, |
| 8039 | 0, DOT11F_EID_EXTSUPPRATES, 0, }, |
| 8040 | { offsetof(tDot11fTDLSSetupRsp, SuppChannels), |
| 8041 | offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", |
| 8042 | 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, |
| 8043 | 0, DOT11F_EID_SUPPCHANNELS, 0, }, |
| 8044 | { offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0, |
| 8045 | "RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, |
| 8046 | { offsetof(tDot11fTDLSSetupRsp, ExtCap), offsetof(tDot11fIEExtCap, |
| 8047 | present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, {0, 0, 0, 0, 0}, |
| 8048 | 0, DOT11F_EID_EXTCAP, 0, }, |
| 8049 | { offsetof(tDot11fTDLSSetupRsp, SuppOperatingClasses), |
| 8050 | offsetof(tDot11fIESuppOperatingClasses, present), 0, |
| 8051 | "SuppOperatingClasses", 0, 3, 34, SigIeSuppOperatingClasses, |
| 8052 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, }, |
| 8053 | { offsetof(tDot11fTDLSSetupRsp, QOSCapsStation), |
| 8054 | offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation", |
| 8055 | 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, |
| 8056 | 0, DOT11F_EID_QOSCAPSSTATION, 0, }, |
| 8057 | { offsetof(tDot11fTDLSSetupRsp, FTInfo), offsetof(tDot11fIEFTInfo, |
| 8058 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 8059 | 0, DOT11F_EID_FTINFO, 0, }, |
| 8060 | { offsetof(tDot11fTDLSSetupRsp, TimeoutInterval), |
| 8061 | offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval", |
| 8062 | 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, |
| 8063 | 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, |
| 8064 | { offsetof(tDot11fTDLSSetupRsp, RICData), offsetof(tDot11fIERICData, |
| 8065 | present), 0, "RICData", 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, |
| 8066 | 0, DOT11F_EID_RICDATA, 0, }, |
| 8067 | { offsetof(tDot11fTDLSSetupRsp, HTCaps), offsetof(tDot11fIEHTCaps, |
| 8068 | present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, |
| 8069 | 0, DOT11F_EID_HTCAPS, 0, }, |
| 8070 | { offsetof(tDot11fTDLSSetupRsp, ht2040_bss_coexistence), |
| 8071 | offsetof(tDot11fIEht2040_bss_coexistence, present), 0, |
| 8072 | "ht2040_bss_coexistence", 0, 3, 3, SigIeht2040_bss_coexistence, |
| 8073 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040_BSS_COEXISTENCE, 0, }, |
| 8074 | { offsetof(tDot11fTDLSSetupRsp, LinkIdentifier), |
| 8075 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 8076 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 8077 | 0, DOT11F_EID_LINKIDENTIFIER, 0, }, |
| 8078 | { offsetof(tDot11fTDLSSetupRsp, WMMInfoStation), |
| 8079 | offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation", |
| 8080 | 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, |
| 8081 | 5, DOT11F_EID_WMMINFOSTATION, 0, }, |
| 8082 | { offsetof(tDot11fTDLSSetupRsp, AID), offsetof(tDot11fIEAID, present), 0, |
| 8083 | "AID", 0, 4, 4, SigIeAID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_AID, 0, }, |
| 8084 | { offsetof(tDot11fTDLSSetupRsp, VHTCaps), offsetof(tDot11fIEVHTCaps, |
| 8085 | present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, |
| 8086 | 0, DOT11F_EID_VHTCAPS, 0, }, |
| 8087 | { offsetof(tDot11fTDLSSetupRsp, OperatingMode), |
| 8088 | offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", |
| 8089 | 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, |
| 8090 | 0, DOT11F_EID_OPERATINGMODE, 0, }, |
| 8091 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8092 | |
| 8093 | uint32_t dot11f_unpack_tdls_setup_rsp(tpAniSirGlobal pCtx, |
| 8094 | uint8_t *pBuf, uint32_t nBuf, |
| 8095 | tDot11fTDLSSetupRsp *pFrm) |
| 8096 | { |
| 8097 | uint32_t i = 0; |
| 8098 | uint32_t status = 0; |
| 8099 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8100 | FFS_TDLSSetupRsp, IES_TDLSSetupRsp, |
| 8101 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8102 | |
| 8103 | (void)i; |
| 8104 | return status; |
| 8105 | |
| 8106 | } /* End dot11f_unpack_tdls_setup_rsp. */ |
| 8107 | |
| 8108 | static const tFFDefn FFS_TDLSTeardown[] = { |
| 8109 | { "Category", offsetof(tDot11fTDLSTeardown, Category), SigFfCategory, |
| 8110 | DOT11F_FF_CATEGORY_LEN, }, |
| 8111 | { "Action", offsetof(tDot11fTDLSTeardown, Action), SigFfAction, |
| 8112 | DOT11F_FF_ACTION_LEN, }, |
| 8113 | { "Reason", offsetof(tDot11fTDLSTeardown, Reason), SigFfReason, |
| 8114 | DOT11F_FF_REASON_LEN, }, |
| 8115 | { NULL, 0, 0, 0,}, |
| 8116 | }; |
| 8117 | |
| 8118 | static const tIEDefn IES_TDLSTeardown[] = { |
| 8119 | { offsetof(tDot11fTDLSTeardown, FTInfo), offsetof(tDot11fIEFTInfo, |
| 8120 | present), 0, "FTInfo", 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, |
| 8121 | 0, DOT11F_EID_FTINFO, 0, }, |
| 8122 | { offsetof(tDot11fTDLSTeardown, LinkIdentifier), |
| 8123 | offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier", |
| 8124 | 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, |
| 8125 | 0, DOT11F_EID_LINKIDENTIFIER, 1, }, |
| 8126 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8127 | |
| 8128 | uint32_t dot11f_unpack_tdls_teardown(tpAniSirGlobal pCtx, |
| 8129 | uint8_t *pBuf, uint32_t nBuf, |
| 8130 | tDot11fTDLSTeardown *pFrm) |
| 8131 | { |
| 8132 | uint32_t i = 0; |
| 8133 | uint32_t status = 0; |
| 8134 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8135 | FFS_TDLSTeardown, IES_TDLSTeardown, |
| 8136 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8137 | |
| 8138 | (void)i; |
| 8139 | return status; |
| 8140 | |
| 8141 | } /* End dot11f_unpack_tdls_teardown. */ |
| 8142 | |
| 8143 | static const tFFDefn FFS_TPCReport[] = { |
| 8144 | { "Category", offsetof(tDot11fTPCReport, Category), SigFfCategory, |
| 8145 | DOT11F_FF_CATEGORY_LEN, }, |
| 8146 | { "Action", offsetof(tDot11fTPCReport, Action), SigFfAction, |
| 8147 | DOT11F_FF_ACTION_LEN, }, |
| 8148 | { "DialogToken", offsetof(tDot11fTPCReport, DialogToken), |
| 8149 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 8150 | { NULL, 0, 0, 0,}, |
| 8151 | }; |
| 8152 | |
| 8153 | static const tIEDefn IES_TPCReport[] = { |
| 8154 | { offsetof(tDot11fTPCReport, TPCReport), offsetof(tDot11fIETPCReport, |
| 8155 | present), 0, "TPCReport", 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, |
| 8156 | 0, DOT11F_EID_TPCREPORT, 1, }, |
| 8157 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8158 | |
| 8159 | uint32_t dot11f_unpack_tpc_report(tpAniSirGlobal pCtx, |
| 8160 | uint8_t *pBuf, uint32_t nBuf, |
| 8161 | tDot11fTPCReport *pFrm) |
| 8162 | { |
| 8163 | uint32_t i = 0; |
| 8164 | uint32_t status = 0; |
| 8165 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8166 | FFS_TPCReport, IES_TPCReport, |
| 8167 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8168 | |
| 8169 | (void)i; |
| 8170 | return status; |
| 8171 | |
| 8172 | } /* End dot11f_unpack_tpc_report. */ |
| 8173 | |
| 8174 | static const tFFDefn FFS_TPCRequest[] = { |
| 8175 | { "Category", offsetof(tDot11fTPCRequest, Category), SigFfCategory, |
| 8176 | DOT11F_FF_CATEGORY_LEN, }, |
| 8177 | { "Action", offsetof(tDot11fTPCRequest, Action), SigFfAction, |
| 8178 | DOT11F_FF_ACTION_LEN, }, |
| 8179 | { "DialogToken", offsetof(tDot11fTPCRequest, DialogToken), |
| 8180 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 8181 | { NULL, 0, 0, 0,}, |
| 8182 | }; |
| 8183 | |
| 8184 | static const tIEDefn IES_TPCRequest[] = { |
| 8185 | { offsetof(tDot11fTPCRequest, TPCRequest), offsetof(tDot11fIETPCRequest, |
| 8186 | present), 0, "TPCRequest", 0, 2, 2, SigIeTPCRequest, {0, 0, 0, 0, 0}, |
| 8187 | 0, DOT11F_EID_TPCREQUEST, 1, }, |
| 8188 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8189 | |
| 8190 | uint32_t dot11f_unpack_tpc_request(tpAniSirGlobal pCtx, |
| 8191 | uint8_t *pBuf, uint32_t nBuf, |
| 8192 | tDot11fTPCRequest *pFrm) |
| 8193 | { |
| 8194 | uint32_t i = 0; |
| 8195 | uint32_t status = 0; |
| 8196 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8197 | FFS_TPCRequest, IES_TPCRequest, |
| 8198 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8199 | |
| 8200 | (void)i; |
| 8201 | return status; |
| 8202 | |
| 8203 | } /* End dot11f_unpack_tpc_request. */ |
| 8204 | |
| 8205 | static const tFFDefn FFS_TimingAdvertisementFrame[] = { |
| 8206 | { "TimeStamp", offsetof(tDot11fTimingAdvertisementFrame, TimeStamp), |
| 8207 | SigFfTimeStamp, DOT11F_FF_TIMESTAMP_LEN, }, |
| 8208 | { "Capabilities", offsetof(tDot11fTimingAdvertisementFrame, |
| 8209 | Capabilities), SigFfCapabilities, DOT11F_FF_CAPABILITIES_LEN, }, |
| 8210 | { NULL, 0, 0, 0,}, |
| 8211 | }; |
| 8212 | |
| 8213 | static const tIEDefn IES_TimingAdvertisementFrame[] = { |
| 8214 | { offsetof(tDot11fTimingAdvertisementFrame, Country), |
| 8215 | offsetof(tDot11fIECountry, present), 0, "Country", 0, 5, 257, SigIeCountry, |
| 8216 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, }, |
| 8217 | { offsetof(tDot11fTimingAdvertisementFrame, PowerConstraints), |
| 8218 | offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints", |
| 8219 | 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, |
| 8220 | 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, |
| 8221 | { offsetof(tDot11fTimingAdvertisementFrame, TimeAdvertisement), |
| 8222 | offsetof(tDot11fIETimeAdvertisement, present), 0, "TimeAdvertisement", |
| 8223 | 0, 18, 18, SigIeTimeAdvertisement, {0, 0, 0, 0, 0}, |
| 8224 | 0, DOT11F_EID_TIMEADVERTISEMENT, 0, }, |
| 8225 | { offsetof(tDot11fTimingAdvertisementFrame, ExtCap), |
| 8226 | offsetof(tDot11fIEExtCap, present), 0, "ExtCap", 0, 10, 11, SigIeExtCap, |
| 8227 | {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, |
| 8228 | { offsetof(tDot11fTimingAdvertisementFrame, Vendor1IE), |
| 8229 | offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", |
| 8230 | 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, |
| 8231 | 3, DOT11F_EID_VENDOR1IE, 0, }, |
| 8232 | { offsetof(tDot11fTimingAdvertisementFrame, Vendor3IE), |
| 8233 | offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE", |
| 8234 | 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, |
| 8235 | 3, DOT11F_EID_VENDOR3IE, 0, }, |
| 8236 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8237 | |
| 8238 | uint32_t dot11f_unpack_timing_advertisement_frame(tpAniSirGlobal pCtx, |
| 8239 | uint8_t *pBuf, uint32_t nBuf, |
| 8240 | tDot11fTimingAdvertisementFrame *pFrm) |
| 8241 | { |
| 8242 | uint32_t i = 0; |
| 8243 | uint32_t status = 0; |
| 8244 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8245 | FFS_TimingAdvertisementFrame, IES_TimingAdvertisementFrame, |
| 8246 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8247 | |
| 8248 | (void)i; |
| 8249 | return status; |
| 8250 | |
| 8251 | } /* End dot11f_unpack_timing_advertisement_frame. */ |
| 8252 | |
| 8253 | static const tFFDefn FFS_VHTGidManagementActionFrame[] = { |
| 8254 | { "Category", offsetof(tDot11fVHTGidManagementActionFrame, Category), |
| 8255 | SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 8256 | { "Action", offsetof(tDot11fVHTGidManagementActionFrame, Action), |
| 8257 | SigFfAction, DOT11F_FF_ACTION_LEN, }, |
| 8258 | { "VhtMembershipStatusArray", |
| 8259 | offsetof(tDot11fVHTGidManagementActionFrame, VhtMembershipStatusArray), |
| 8260 | SigFfVhtMembershipStatusArray, |
| 8261 | DOT11F_FF_VHTMEMBERSHIPSTATUSARRAY_LEN, }, |
| 8262 | { "VhtUserPositionArray", offsetof(tDot11fVHTGidManagementActionFrame, |
| 8263 | VhtUserPositionArray), SigFfVhtUserPositionArray, |
| 8264 | DOT11F_FF_VHTUSERPOSITIONARRAY_LEN, }, |
| 8265 | { NULL, 0, 0, 0,}, |
| 8266 | }; |
| 8267 | |
| 8268 | static const tIEDefn IES_VHTGidManagementActionFrame[] = { |
| 8269 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8270 | |
| 8271 | uint32_t dot11f_unpack_vht_gid_management_action_frame(tpAniSirGlobal pCtx, |
| 8272 | uint8_t *pBuf, uint32_t nBuf, |
| 8273 | tDot11fVHTGidManagementActionFrame *pFrm) |
| 8274 | { |
| 8275 | uint32_t i = 0; |
| 8276 | uint32_t status = 0; |
| 8277 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8278 | FFS_VHTGidManagementActionFrame, IES_VHTGidManagementActionFrame, |
| 8279 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8280 | |
| 8281 | (void)i; |
| 8282 | return status; |
| 8283 | |
| 8284 | } /* End dot11f_unpack_vht_gid_management_action_frame. */ |
| 8285 | |
| 8286 | static const tFFDefn FFS_WMMAddTSRequest[] = { |
| 8287 | { "Category", offsetof(tDot11fWMMAddTSRequest, Category), SigFfCategory, |
| 8288 | DOT11F_FF_CATEGORY_LEN, }, |
| 8289 | { "Action", offsetof(tDot11fWMMAddTSRequest, Action), SigFfAction, |
| 8290 | DOT11F_FF_ACTION_LEN, }, |
| 8291 | { "DialogToken", offsetof(tDot11fWMMAddTSRequest, DialogToken), |
| 8292 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 8293 | { "StatusCode", offsetof(tDot11fWMMAddTSRequest, StatusCode), |
| 8294 | SigFfStatusCode, DOT11F_FF_STATUSCODE_LEN, }, |
| 8295 | { NULL, 0, 0, 0,}, |
| 8296 | }; |
| 8297 | |
| 8298 | static const tIEDefn IES_WMMAddTSRequest[] = { |
| 8299 | { offsetof(tDot11fWMMAddTSRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 8300 | present), 0, "WMMTSPEC", 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 8301 | 5, DOT11F_EID_WMMTSPEC, 1, }, |
| 8302 | { offsetof(tDot11fWMMAddTSRequest, ESETrafStrmRateSet), |
| 8303 | offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet", |
| 8304 | 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, |
| 8305 | 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, |
| 8306 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8307 | |
| 8308 | uint32_t dot11f_unpack_wmm_add_ts_request(tpAniSirGlobal pCtx, |
| 8309 | uint8_t *pBuf, uint32_t nBuf, |
| 8310 | tDot11fWMMAddTSRequest *pFrm) |
| 8311 | { |
| 8312 | uint32_t i = 0; |
| 8313 | uint32_t status = 0; |
| 8314 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8315 | FFS_WMMAddTSRequest, IES_WMMAddTSRequest, |
| 8316 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8317 | |
| 8318 | (void)i; |
| 8319 | return status; |
| 8320 | |
| 8321 | } /* End dot11f_unpack_wmm_add_ts_request. */ |
| 8322 | |
| 8323 | static const tFFDefn FFS_WMMAddTSResponse[] = { |
| 8324 | { "Category", offsetof(tDot11fWMMAddTSResponse, Category), SigFfCategory, |
| 8325 | DOT11F_FF_CATEGORY_LEN, }, |
| 8326 | { "Action", offsetof(tDot11fWMMAddTSResponse, Action), SigFfAction, |
| 8327 | DOT11F_FF_ACTION_LEN, }, |
| 8328 | { "DialogToken", offsetof(tDot11fWMMAddTSResponse, DialogToken), |
| 8329 | SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 8330 | { "StatusCode", offsetof(tDot11fWMMAddTSResponse, StatusCode), |
| 8331 | SigFfStatusCode, DOT11F_FF_STATUSCODE_LEN, }, |
| 8332 | { NULL, 0, 0, 0,}, |
| 8333 | }; |
| 8334 | |
| 8335 | static const tIEDefn IES_WMMAddTSResponse[] = { |
| 8336 | { offsetof(tDot11fWMMAddTSResponse, WMMTSPEC), |
| 8337 | offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC", |
| 8338 | 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 8339 | 5, DOT11F_EID_WMMTSPEC, 0, }, |
| 8340 | { offsetof(tDot11fWMMAddTSResponse, ESETrafStrmMet), |
| 8341 | offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet", |
| 8342 | 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, |
| 8343 | 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, |
| 8344 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8345 | |
| 8346 | uint32_t dot11f_unpack_wmm_add_ts_response(tpAniSirGlobal pCtx, |
| 8347 | uint8_t *pBuf, uint32_t nBuf, |
| 8348 | tDot11fWMMAddTSResponse *pFrm) |
| 8349 | { |
| 8350 | uint32_t i = 0; |
| 8351 | uint32_t status = 0; |
| 8352 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8353 | FFS_WMMAddTSResponse, IES_WMMAddTSResponse, |
| 8354 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8355 | |
| 8356 | (void)i; |
| 8357 | return status; |
| 8358 | |
| 8359 | } /* End dot11f_unpack_wmm_add_ts_response. */ |
| 8360 | |
| 8361 | static const tFFDefn FFS_WMMDelTS[] = { |
| 8362 | { "Category", offsetof(tDot11fWMMDelTS, Category), SigFfCategory, |
| 8363 | DOT11F_FF_CATEGORY_LEN, }, |
| 8364 | { "Action", offsetof(tDot11fWMMDelTS, Action), SigFfAction, |
| 8365 | DOT11F_FF_ACTION_LEN, }, |
| 8366 | { "DialogToken", offsetof(tDot11fWMMDelTS, DialogToken), SigFfDialogToken, |
| 8367 | DOT11F_FF_DIALOGTOKEN_LEN, }, |
| 8368 | { "StatusCode", offsetof(tDot11fWMMDelTS, StatusCode), SigFfStatusCode, |
| 8369 | DOT11F_FF_STATUSCODE_LEN, }, |
| 8370 | { NULL, 0, 0, 0,}, |
| 8371 | }; |
| 8372 | |
| 8373 | static const tIEDefn IES_WMMDelTS[] = { |
| 8374 | { offsetof(tDot11fWMMDelTS, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, |
| 8375 | present), 0, "WMMTSPEC", 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, |
| 8376 | 5, DOT11F_EID_WMMTSPEC, 1, }, |
| 8377 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8378 | |
| 8379 | uint32_t dot11f_unpack_wmm_del_ts(tpAniSirGlobal pCtx, |
| 8380 | uint8_t *pBuf, uint32_t nBuf, |
| 8381 | tDot11fWMMDelTS *pFrm) |
| 8382 | { |
| 8383 | uint32_t i = 0; |
| 8384 | uint32_t status = 0; |
| 8385 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8386 | FFS_WMMDelTS, IES_WMMDelTS, |
| 8387 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8388 | |
| 8389 | (void)i; |
| 8390 | return status; |
| 8391 | |
| 8392 | } /* End dot11f_unpack_wmm_del_ts. */ |
| 8393 | |
| 8394 | static const tFFDefn FFS_ht2040_bss_coexistence_mgmt_action_frame[] = { |
| 8395 | { "Category", offsetof(tDot11fht2040_bss_coexistence_mgmt_action_frame, |
| 8396 | Category), SigFfCategory, DOT11F_FF_CATEGORY_LEN, }, |
| 8397 | { "Action", offsetof(tDot11fht2040_bss_coexistence_mgmt_action_frame, |
| 8398 | Action), SigFfAction, DOT11F_FF_ACTION_LEN, }, |
| 8399 | { NULL, 0, 0, 0,}, |
| 8400 | }; |
| 8401 | |
| 8402 | static const tIEDefn IES_ht2040_bss_coexistence_mgmt_action_frame[] = { |
| 8403 | { offsetof(tDot11fht2040_bss_coexistence_mgmt_action_frame, |
| 8404 | ht2040_bss_coexistence), offsetof(tDot11fIEht2040_bss_coexistence, |
| 8405 | present), 0, "ht2040_bss_coexistence", |
| 8406 | 0, 3, 3, SigIeht2040_bss_coexistence, {0, 0, 0, 0, 0}, |
| 8407 | 0, DOT11F_EID_HT2040_BSS_COEXISTENCE, 1, }, |
| 8408 | { offsetof(tDot11fht2040_bss_coexistence_mgmt_action_frame, |
| 8409 | ht2040_bss_intolerant_report), |
| 8410 | offsetof(tDot11fIEht2040_bss_intolerant_report, present), 0, |
| 8411 | "ht2040_bss_intolerant_report", |
| 8412 | 0, 3, 53, SigIeht2040_bss_intolerant_report, {0, 0, 0, 0, 0}, |
| 8413 | 0, DOT11F_EID_HT2040_BSS_INTOLERANT_REPORT, 1, }, |
| 8414 | {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; |
| 8415 | |
| 8416 | uint32_t dot11f_unpack_ht2040_bss_coexistence_mgmt_action_frame(tpAniSirGlobal pCtx, |
| 8417 | uint8_t *pBuf, uint32_t nBuf, |
| 8418 | tDot11fht2040_bss_coexistence_mgmt_action_frame *pFrm) |
| 8419 | { |
| 8420 | uint32_t i = 0; |
| 8421 | uint32_t status = 0; |
| 8422 | status = unpack_core(pCtx, pBuf, nBuf, |
| 8423 | FFS_ht2040_bss_coexistence_mgmt_action_frame, IES_ht2040_bss_coexistence_mgmt_action_frame, |
| 8424 | (uint8_t *)pFrm, sizeof(*pFrm)); |
| 8425 | |
| 8426 | (void)i; |
| 8427 | return status; |
| 8428 | |
| 8429 | } /* End dot11f_unpack_ht2040_bss_coexistence_mgmt_action_frame. */ |
| 8430 | |
| 8431 | static uint32_t unpack_core(tpAniSirGlobal pCtx, |
| 8432 | uint8_t *pBuf, |
| 8433 | uint32_t nBuf, |
| 8434 | const tFFDefn FFs[], |
| 8435 | const tIEDefn IEs[], |
| 8436 | uint8_t *pFrm, |
| 8437 | size_t nFrm) |
| 8438 | { |
| 8439 | const tFFDefn *pFf; |
| 8440 | const tIEDefn *pIe; |
| 8441 | uint8_t *pBufRemaining; |
| 8442 | uint32_t nBufRemaining, status; |
| 8443 | uint8_t eid, len; |
| 8444 | tFRAMES_BOOL *pfFound; |
| 8445 | uint32_t countOffset = 0; |
| 8446 | |
| 8447 | DOT11F_PARAMETER_CHECK(pBuf, nBuf, pFrm, nFrm); |
| 8448 | (void)nFrm; |
| 8449 | |
| 8450 | (void)pCtx; |
| 8451 | status = DOT11F_PARSE_SUCCESS; |
| 8452 | pBufRemaining = pBuf; |
| 8453 | nBufRemaining = nBuf; |
| 8454 | |
| 8455 | pIe = &IEs[0]; |
| 8456 | while (0xff != pIe->eid) { |
| 8457 | pfFound = (tFRAMES_BOOL *)(pFrm + pIe->offset + |
| 8458 | pIe->presenceOffset); |
| 8459 | *pfFound = 0U; |
| 8460 | if (pIe->countOffset) |
| 8461 | *(uint16_t *)(pFrm + pIe->countOffset) = 0U; |
| 8462 | ++pIe; |
| 8463 | } |
| 8464 | |
| 8465 | pFf = &FFs[0]; |
| 8466 | while (pFf->size) { |
| 8467 | if (pFf->size > nBufRemaining) { |
| 8468 | FRAMES_LOG3(pCtx, FRLOGE, FRFL("Fixed field %s is %d" |
| 8469 | "bytes in size, but there are only %d bytes left i" |
| 8470 | "n this frame.\n"), pFf->name, pFf->size, |
| 8471 | nBufRemaining); |
| 8472 | FRAMES_DBG_BREAK(); |
| 8473 | return DOT11F_MISSING_FIXED_FIELD; |
| 8474 | } |
| 8475 | |
| 8476 | switch (pFf->sig) { |
| 8477 | |
| 8478 | case SigFfAID: |
| 8479 | dot11f_unpack_ff_common_func(pCtx, |
| 8480 | pBufRemaining, (uint16_t *)&(((tDot11fFfAID *) |
| 8481 | (pFrm + pFf->offset))->associd)); |
| 8482 | break; |
| 8483 | case SigFfAction: |
| 8484 | dot11f_unpack_ff_action(pCtx, |
| 8485 | pBufRemaining, (tDot11fFfAction *) |
| 8486 | (pFrm + pFf->offset)); |
| 8487 | break; |
| 8488 | case SigFfAuthAlgo: |
| 8489 | dot11f_unpack_ff_common_func(pCtx, |
| 8490 | pBufRemaining, (uint16_t *)&(((tDot11fFfAuthAlgo *) |
| 8491 | (pFrm + pFf->offset))->algo)); |
| 8492 | break; |
| 8493 | case SigFfAuthSeqNo: |
| 8494 | dot11f_unpack_ff_common_func(pCtx, |
| 8495 | pBufRemaining, (uint16_t *)&(((tDot11fFfAuthSeqNo *) |
| 8496 | (pFrm + pFf->offset))->no)); |
| 8497 | break; |
| 8498 | case SigFfBeaconInterval: |
| 8499 | dot11f_unpack_ff_common_func(pCtx, |
| 8500 | pBufRemaining, (uint16_t *)&(((tDot11fFfBeaconInterval *) |
| 8501 | (pFrm + pFf->offset))->interval)); |
| 8502 | break; |
| 8503 | case SigFfCapabilities: |
| 8504 | dot11f_unpack_ff_capabilities(pCtx, |
| 8505 | pBufRemaining, (tDot11fFfCapabilities *) |
| 8506 | (pFrm + pFf->offset)); |
| 8507 | break; |
| 8508 | case SigFfCategory: |
| 8509 | dot11f_unpack_ff_category(pCtx, |
| 8510 | pBufRemaining, (tDot11fFfCategory *) |
| 8511 | (pFrm + pFf->offset)); |
| 8512 | break; |
| 8513 | case SigFfCurrentAPAddress: |
| 8514 | dot11f_unpack_ff_current_ap_address(pCtx, |
| 8515 | pBufRemaining, (tDot11fFfCurrentAPAddress *) |
| 8516 | (pFrm + pFf->offset)); |
| 8517 | break; |
| 8518 | case SigFfDialogToken: |
| 8519 | dot11f_unpack_ff_dialog_token(pCtx, |
| 8520 | pBufRemaining, (tDot11fFfDialogToken *) |
| 8521 | (pFrm + pFf->offset)); |
| 8522 | break; |
| 8523 | case SigFfLinkMargin: |
| 8524 | dot11f_unpack_ff_link_margin(pCtx, |
| 8525 | pBufRemaining, (tDot11fFfLinkMargin *) |
| 8526 | (pFrm + pFf->offset)); |
| 8527 | break; |
| 8528 | case SigFfListenInterval: |
| 8529 | dot11f_unpack_ff_common_func(pCtx, |
| 8530 | pBufRemaining, (uint16_t *)&(((tDot11fFfListenInterval *) |
| 8531 | (pFrm + pFf->offset))->interval)); |
| 8532 | break; |
| 8533 | case SigFfMaxTxPower: |
| 8534 | dot11f_unpack_ff_max_tx_power(pCtx, |
| 8535 | pBufRemaining, (tDot11fFfMaxTxPower *) |
| 8536 | (pFrm + pFf->offset)); |
| 8537 | break; |
| 8538 | case SigFfNumOfRepetitions: |
| 8539 | dot11f_unpack_ff_num_of_repetitions(pCtx, |
| 8540 | pBufRemaining, (tDot11fFfNumOfRepetitions *) |
| 8541 | (pFrm + pFf->offset)); |
| 8542 | break; |
| 8543 | case SigFfOperatingMode: |
| 8544 | dot11f_unpack_ff_operating_mode(pCtx, |
| 8545 | pBufRemaining, (tDot11fFfOperatingMode *) |
| 8546 | (pFrm + pFf->offset)); |
| 8547 | break; |
| 8548 | case SigFfRCPI: |
| 8549 | dot11f_unpack_ff_rcpi(pCtx, |
| 8550 | pBufRemaining, (tDot11fFfRCPI *) |
| 8551 | (pFrm + pFf->offset)); |
| 8552 | break; |
| 8553 | case SigFfRSNI: |
| 8554 | dot11f_unpack_ff_rsni(pCtx, |
| 8555 | pBufRemaining, (tDot11fFfRSNI *) |
| 8556 | (pFrm + pFf->offset)); |
| 8557 | break; |
| 8558 | case SigFfReason: |
| 8559 | dot11f_unpack_ff_common_func(pCtx, |
| 8560 | pBufRemaining, (uint16_t *)&(((tDot11fFfReason *) |
| 8561 | (pFrm + pFf->offset))->code)); |
| 8562 | break; |
| 8563 | case SigFfRxAntennaId: |
| 8564 | dot11f_unpack_ff_rx_antenna_id(pCtx, |
| 8565 | pBufRemaining, (tDot11fFfRxAntennaId *) |
| 8566 | (pFrm + pFf->offset)); |
| 8567 | break; |
| 8568 | case SigFfSMPowerModeSet: |
| 8569 | dot11f_unpack_ff_sm_power_mode_set(pCtx, |
| 8570 | pBufRemaining, (tDot11fFfSMPowerModeSet *) |
| 8571 | (pFrm + pFf->offset)); |
| 8572 | break; |
| 8573 | case SigFfStatus: |
| 8574 | dot11f_unpack_ff_common_func(pCtx, |
| 8575 | pBufRemaining, (uint16_t *)&(((tDot11fFfStatus *) |
| 8576 | (pFrm + pFf->offset))->status)); |
| 8577 | break; |
| 8578 | case SigFfStatusCode: |
| 8579 | dot11f_unpack_ff_status_code(pCtx, |
| 8580 | pBufRemaining, (tDot11fFfStatusCode *) |
| 8581 | (pFrm + pFf->offset)); |
| 8582 | break; |
| 8583 | case SigFfTPCEleID: |
| 8584 | dot11f_unpack_ff_tpc_ele_id(pCtx, |
| 8585 | pBufRemaining, (tDot11fFfTPCEleID *) |
| 8586 | (pFrm + pFf->offset)); |
| 8587 | break; |
| 8588 | case SigFfTPCEleLen: |
| 8589 | dot11f_unpack_ff_tpc_ele_len(pCtx, |
| 8590 | pBufRemaining, (tDot11fFfTPCEleLen *) |
| 8591 | (pFrm + pFf->offset)); |
| 8592 | break; |
| 8593 | case SigFfTSInfo: |
| 8594 | dot11f_unpack_ff_ts_info(pCtx, |
| 8595 | pBufRemaining, (tDot11fFfTSInfo *) |
| 8596 | (pFrm + pFf->offset)); |
| 8597 | break; |
| 8598 | case SigFfTimeStamp: |
| 8599 | dot11f_unpack_ff_time_stamp(pCtx, |
| 8600 | pBufRemaining, (tDot11fFfTimeStamp *) |
| 8601 | (pFrm + pFf->offset)); |
| 8602 | break; |
| 8603 | case SigFfTransactionId: |
| 8604 | dot11f_unpack_ff_transaction_id(pCtx, |
| 8605 | pBufRemaining, (tDot11fFfTransactionId *) |
| 8606 | (pFrm + pFf->offset)); |
| 8607 | break; |
| 8608 | case SigFfTxAntennaId: |
| 8609 | dot11f_unpack_ff_tx_antenna_id(pCtx, |
| 8610 | pBufRemaining, (tDot11fFfTxAntennaId *) |
| 8611 | (pFrm + pFf->offset)); |
| 8612 | break; |
| 8613 | case SigFfTxPower: |
| 8614 | dot11f_unpack_ff_tx_power(pCtx, |
| 8615 | pBufRemaining, (tDot11fFfTxPower *) |
| 8616 | (pFrm + pFf->offset)); |
| 8617 | break; |
| 8618 | case SigFfVhtMembershipStatusArray: |
| 8619 | dot11f_unpack_ff_vht_membership_status_array(pCtx, |
| 8620 | pBufRemaining, (tDot11fFfVhtMembershipStatusArray *) |
| 8621 | (pFrm + pFf->offset)); |
| 8622 | break; |
| 8623 | case SigFfVhtUserPositionArray: |
| 8624 | dot11f_unpack_ff_vht_user_position_array(pCtx, |
| 8625 | pBufRemaining, (tDot11fFfVhtUserPositionArray *) |
| 8626 | (pFrm + pFf->offset)); |
| 8627 | break; |
| 8628 | default: |
| 8629 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR: I don'" |
| 8630 | "t know about the FF signature %d-- this is most " |
| 8631 | "likely a 'framesc' bug.\n"), pFf->sig); |
| 8632 | return DOT11F_INTERNAL_ERROR; |
| 8633 | } |
| 8634 | |
| 8635 | pBufRemaining += pFf->size; |
| 8636 | nBufRemaining -= pFf->size; |
| 8637 | ++pFf; |
| 8638 | } |
| 8639 | |
| 8640 | while (nBufRemaining) { |
| 8641 | if (1 == nBufRemaining) { |
| 8642 | FRAMES_LOG0(pCtx, FRLOGE, FRFL("This frame reports " |
| 8643 | "only one byte remaining after it's fixed fields.\n")); |
| 8644 | status |= DOT11F_INCOMPLETE_IE; |
| 8645 | FRAMES_DBG_BREAK(); |
| 8646 | goto MandatoryCheck; |
| 8647 | } |
| 8648 | |
| 8649 | pIe = find_ie_defn(pCtx, pBufRemaining, nBufRemaining, IEs); |
| 8650 | |
| 8651 | eid = *pBufRemaining++; --nBufRemaining; |
| 8652 | len = *pBufRemaining++; --nBufRemaining; |
| 8653 | |
| 8654 | if (pIe && pIe->noui) { |
| 8655 | if (pIe->noui > nBufRemaining) { |
| 8656 | FRAMES_LOG3(pCtx, FRLOGW, FRFL("IE %d reports " |
| 8657 | "length %d, but it has an OUI of %d bytes.\n"), |
| 8658 | eid, len, pIe->noui); |
| 8659 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 8660 | FRAMES_LOG2(pCtx, FRLOG1, FRFL("We've parsed %d by" |
| 8661 | "tes of this buffer, and show %d left.\n"), |
| 8662 | pBufRemaining - pBuf, nBufRemaining); |
| 8663 | status |= DOT11F_INCOMPLETE_IE; |
| 8664 | FRAMES_DBG_BREAK(); |
| 8665 | goto MandatoryCheck; |
| 8666 | } |
| 8667 | pBufRemaining += pIe->noui; |
| 8668 | nBufRemaining -= pIe->noui; |
| 8669 | len -= pIe->noui; |
| 8670 | } |
| 8671 | |
| 8672 | if (len > nBufRemaining) { |
| 8673 | FRAMES_LOG3(pCtx, FRLOGW, FRFL("IE %d reports length %" |
| 8674 | "d, but there are only %d bytes remaining in this" |
| 8675 | " frame.\n"), eid, len, nBufRemaining); |
| 8676 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 8677 | FRAMES_LOG2(pCtx, FRLOG1, FRFL("We've parsed %d by" |
| 8678 | "tes of this buffer, and show %d left.\n"), |
| 8679 | pBufRemaining - pBuf, nBufRemaining); |
| 8680 | status |= DOT11F_INCOMPLETE_IE; |
| 8681 | FRAMES_DBG_BREAK(); |
| 8682 | goto MandatoryCheck; |
| 8683 | } |
| 8684 | |
| 8685 | if (pIe) { |
| 8686 | if (nBufRemaining < pIe->minSize - pIe->noui - 2U) { |
| 8687 | FRAMES_LOG3(pCtx, FRLOGW, FRFL("The IE %s must be " |
| 8688 | "at least %d bytes in size, but there are onl" |
| 8689 | "y %d bytes remaining in this frame.\n"), |
| 8690 | pIe->name, pIe->minSize, nBufRemaining); |
| 8691 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 8692 | status |= DOT11F_INCOMPLETE_IE; |
| 8693 | FRAMES_DBG_BREAK(); |
| 8694 | goto MandatoryCheck; |
| 8695 | } else { |
| 8696 | if (len > pIe->maxSize - pIe->noui - 2U) { |
| 8697 | FRAMES_LOG1(pCtx, FRLOGW, FRFL("The IE %s reports " |
| 8698 | "an unexpectedly large size; it is presumably " |
| 8699 | "more up-to-date than this parser, but this wa" |
| 8700 | "rning may also indicate a corrupt frame.\n"), |
| 8701 | pIe->name); |
| 8702 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 8703 | } |
| 8704 | |
| 8705 | countOffset = ((0 != pIe->arraybound) * |
| 8706 | (*(uint16_t *)(pFrm + pIe->countOffset))); |
| 8707 | switch (pIe->sig) { |
| 8708 | case SigIeCondensedCountryStr: |
| 8709 | status |= |
| 8710 | dot11f_unpack_ie_condensed_country_str( |
| 8711 | pCtx, pBufRemaining, len, |
| 8712 | (tDot11fIECondensedCountryStr *) |
| 8713 | (pFrm + pIe->offset + |
| 8714 | sizeof(tDot11fIECondensedCountryStr) * |
| 8715 | countOffset)); |
| 8716 | break; |
| 8717 | case SigIeGTK: |
| 8718 | status |= |
| 8719 | dot11f_unpack_ie_gtk( |
| 8720 | pCtx, pBufRemaining, len, |
| 8721 | (tDot11fIEGTK *) |
| 8722 | (pFrm + pIe->offset + |
| 8723 | sizeof(tDot11fIEGTK) * |
| 8724 | countOffset)); |
| 8725 | break; |
| 8726 | case SigIeIGTK: |
| 8727 | status |= |
| 8728 | dot11f_unpack_ie_igtk( |
| 8729 | pCtx, pBufRemaining, len, |
| 8730 | (tDot11fIEIGTK *) |
| 8731 | (pFrm + pIe->offset + |
| 8732 | sizeof(tDot11fIEIGTK) * |
| 8733 | countOffset)); |
| 8734 | break; |
| 8735 | case SigIeR0KH_ID: |
| 8736 | status |= |
| 8737 | dot11f_unpack_ie_r0_kh_id( |
| 8738 | pCtx, pBufRemaining, len, |
| 8739 | (tDot11fIER0KH_ID *) |
| 8740 | (pFrm + pIe->offset + |
| 8741 | sizeof(tDot11fIER0KH_ID) * |
| 8742 | countOffset)); |
| 8743 | break; |
| 8744 | case SigIeR1KH_ID: |
| 8745 | status |= |
| 8746 | dot11f_unpack_ie_r1_kh_id( |
| 8747 | pCtx, pBufRemaining, len, |
| 8748 | (tDot11fIER1KH_ID *) |
| 8749 | (pFrm + pIe->offset + |
| 8750 | sizeof(tDot11fIER1KH_ID) * |
| 8751 | countOffset)); |
| 8752 | break; |
| 8753 | case SigIeTSFInfo: |
| 8754 | status |= |
| 8755 | dot11f_unpack_ie_tsf_info( |
| 8756 | pCtx, pBufRemaining, len, |
| 8757 | (tDot11fIETSFInfo *) |
| 8758 | (pFrm + pIe->offset + |
| 8759 | sizeof(tDot11fIETSFInfo) * |
| 8760 | countOffset)); |
| 8761 | break; |
| 8762 | case SigIeAPChannelReport: |
| 8763 | status |= |
| 8764 | dot11f_unpack_ie_ap_channel_report( |
| 8765 | pCtx, pBufRemaining, len, |
| 8766 | (tDot11fIEAPChannelReport *) |
| 8767 | (pFrm + pIe->offset + |
| 8768 | sizeof(tDot11fIEAPChannelReport) * |
| 8769 | countOffset)); |
| 8770 | break; |
| 8771 | case SigIeBcnReportingDetail: |
| 8772 | status |= |
| 8773 | dot11f_unpack_ie_bcn_reporting_detail( |
| 8774 | pCtx, pBufRemaining, len, |
| 8775 | (tDot11fIEBcnReportingDetail *) |
| 8776 | (pFrm + pIe->offset + |
| 8777 | sizeof(tDot11fIEBcnReportingDetail) * |
| 8778 | countOffset)); |
| 8779 | break; |
| 8780 | case SigIeBeaconReportFrmBody: |
| 8781 | status |= |
| 8782 | dot11f_unpack_ie_beacon_report_frm_body( |
| 8783 | pCtx, pBufRemaining, len, |
| 8784 | (tDot11fIEBeaconReportFrmBody *) |
| 8785 | (pFrm + pIe->offset + |
| 8786 | sizeof(tDot11fIEBeaconReportFrmBody) * |
| 8787 | countOffset)); |
| 8788 | break; |
| 8789 | case SigIeBeaconReporting: |
| 8790 | status |= |
| 8791 | dot11f_unpack_ie_beacon_reporting( |
| 8792 | pCtx, pBufRemaining, len, |
| 8793 | (tDot11fIEBeaconReporting *) |
| 8794 | (pFrm + pIe->offset + |
| 8795 | sizeof(tDot11fIEBeaconReporting) * |
| 8796 | countOffset)); |
| 8797 | break; |
| 8798 | case SigIeMeasurementPilot: |
| 8799 | status |= |
| 8800 | dot11f_unpack_ie_measurement_pilot( |
| 8801 | pCtx, pBufRemaining, len, |
| 8802 | (tDot11fIEMeasurementPilot *) |
| 8803 | (pFrm + pIe->offset + |
| 8804 | sizeof(tDot11fIEMeasurementPilot) * |
| 8805 | countOffset)); |
| 8806 | break; |
| 8807 | case SigIeMultiBssid: |
| 8808 | status |= |
| 8809 | dot11f_unpack_ie_multi_bssid( |
| 8810 | pCtx, pBufRemaining, len, |
| 8811 | (tDot11fIEMultiBssid *) |
| 8812 | (pFrm + pIe->offset + |
| 8813 | sizeof(tDot11fIEMultiBssid) * |
| 8814 | countOffset)); |
| 8815 | break; |
| 8816 | case SigIeRICData: |
| 8817 | status |= |
| 8818 | dot11f_unpack_ie_ric_data( |
| 8819 | pCtx, pBufRemaining, len, |
| 8820 | (tDot11fIERICData *) |
| 8821 | (pFrm + pIe->offset + |
| 8822 | sizeof(tDot11fIERICData) * |
| 8823 | countOffset)); |
| 8824 | break; |
| 8825 | case SigIeRICDescriptor: |
| 8826 | status |= |
| 8827 | dot11f_unpack_ie_ric_descriptor( |
| 8828 | pCtx, pBufRemaining, len, |
| 8829 | (tDot11fIERICDescriptor *) |
| 8830 | (pFrm + pIe->offset + |
| 8831 | sizeof(tDot11fIERICDescriptor) * |
| 8832 | countOffset)); |
| 8833 | break; |
| 8834 | case SigIeRRMEnabledCap: |
| 8835 | status |= |
| 8836 | dot11f_unpack_ie_rrm_enabled_cap( |
| 8837 | pCtx, pBufRemaining, len, |
| 8838 | (tDot11fIERRMEnabledCap *) |
| 8839 | (pFrm + pIe->offset + |
| 8840 | sizeof(tDot11fIERRMEnabledCap) * |
| 8841 | countOffset)); |
| 8842 | break; |
| 8843 | case SigIeRequestedInfo: |
| 8844 | status |= |
| 8845 | dot11f_unpack_ie_requested_info( |
| 8846 | pCtx, pBufRemaining, len, |
| 8847 | (tDot11fIERequestedInfo *) |
| 8848 | (pFrm + pIe->offset + |
| 8849 | sizeof(tDot11fIERequestedInfo) * |
| 8850 | countOffset)); |
| 8851 | break; |
| 8852 | case SigIeSSID: |
| 8853 | status |= |
| 8854 | dot11f_unpack_ie_ssid( |
| 8855 | pCtx, pBufRemaining, len, |
| 8856 | (tDot11fIESSID *) |
| 8857 | (pFrm + pIe->offset + |
| 8858 | sizeof(tDot11fIESSID) * |
| 8859 | countOffset)); |
| 8860 | break; |
| 8861 | case SigIeSchedule: |
| 8862 | status |= |
| 8863 | dot11f_unpack_ie_schedule( |
| 8864 | pCtx, pBufRemaining, len, |
| 8865 | (tDot11fIESchedule *) |
| 8866 | (pFrm + pIe->offset + |
| 8867 | sizeof(tDot11fIESchedule) * |
| 8868 | countOffset)); |
| 8869 | break; |
| 8870 | case SigIeTCLAS: |
| 8871 | status |= |
| 8872 | dot11f_unpack_ie_tclas( |
| 8873 | pCtx, pBufRemaining, len, |
| 8874 | (tDot11fIETCLAS *) |
| 8875 | (pFrm + pIe->offset + |
| 8876 | sizeof(tDot11fIETCLAS) * |
| 8877 | countOffset)); |
| 8878 | break; |
| 8879 | case SigIeTCLASSPROC: |
| 8880 | status |= dot11f_unpack_ie_common_func(pCtx, pBufRemaining, len, |
| 8881 | (uint8_t *) &(((tDot11fIETCLASSPROC *)(pFrm + pIe->offset + sizeof(tDot11fIETCLASSPROC)*countOffset))->present), |
| 8882 | (uint8_t *) &(((tDot11fIETCLASSPROC *)(pFrm + pIe->offset + sizeof(tDot11fIETCLASSPROC)*countOffset))->processing)); |
| 8883 | break; |
| 8884 | case SigIeTSDelay: |
| 8885 | status |= |
| 8886 | dot11f_unpack_ie_ts_delay( |
| 8887 | pCtx, pBufRemaining, len, |
| 8888 | (tDot11fIETSDelay *) |
| 8889 | (pFrm + pIe->offset + |
| 8890 | sizeof(tDot11fIETSDelay) * |
| 8891 | countOffset)); |
| 8892 | break; |
| 8893 | case SigIeTSPEC: |
| 8894 | status |= |
| 8895 | dot11f_unpack_ie_tspec( |
| 8896 | pCtx, pBufRemaining, len, |
| 8897 | (tDot11fIETSPEC *) |
| 8898 | (pFrm + pIe->offset + |
| 8899 | sizeof(tDot11fIETSPEC) * |
| 8900 | countOffset)); |
| 8901 | break; |
| 8902 | case SigIeVHTCaps: |
| 8903 | status |= |
| 8904 | dot11f_unpack_ie_vht_caps( |
| 8905 | pCtx, pBufRemaining, len, |
| 8906 | (tDot11fIEVHTCaps *) |
| 8907 | (pFrm + pIe->offset + |
| 8908 | sizeof(tDot11fIEVHTCaps) * |
| 8909 | countOffset)); |
| 8910 | break; |
| 8911 | case SigIeVHTOperation: |
| 8912 | status |= |
| 8913 | dot11f_unpack_ie_vht_operation( |
| 8914 | pCtx, pBufRemaining, len, |
| 8915 | (tDot11fIEVHTOperation *) |
| 8916 | (pFrm + pIe->offset + |
| 8917 | sizeof(tDot11fIEVHTOperation) * |
| 8918 | countOffset)); |
| 8919 | break; |
| 8920 | case SigIeWMMSchedule: |
| 8921 | status |= |
| 8922 | dot11f_unpack_ie_wmm_schedule( |
| 8923 | pCtx, pBufRemaining, len, |
| 8924 | (tDot11fIEWMMSchedule *) |
| 8925 | (pFrm + pIe->offset + |
| 8926 | sizeof(tDot11fIEWMMSchedule) * |
| 8927 | countOffset)); |
| 8928 | break; |
| 8929 | case SigIeWMMTCLAS: |
| 8930 | status |= |
| 8931 | dot11f_unpack_ie_wmmtclas( |
| 8932 | pCtx, pBufRemaining, len, |
| 8933 | (tDot11fIEWMMTCLAS *) |
| 8934 | (pFrm + pIe->offset + |
| 8935 | sizeof(tDot11fIEWMMTCLAS) * |
| 8936 | countOffset)); |
| 8937 | break; |
| 8938 | case SigIeWMMTCLASPROC: |
| 8939 | status |= |
| 8940 | dot11f_unpack_ie_wmmtclasproc( |
| 8941 | pCtx, pBufRemaining, len, |
| 8942 | (tDot11fIEWMMTCLASPROC *) |
| 8943 | (pFrm + pIe->offset + |
| 8944 | sizeof(tDot11fIEWMMTCLASPROC) * |
| 8945 | countOffset)); |
| 8946 | break; |
| 8947 | case SigIeWMMTSDelay: |
| 8948 | status |= |
| 8949 | dot11f_unpack_ie_wmmts_delay( |
| 8950 | pCtx, pBufRemaining, len, |
| 8951 | (tDot11fIEWMMTSDelay *) |
| 8952 | (pFrm + pIe->offset + |
| 8953 | sizeof(tDot11fIEWMMTSDelay) * |
| 8954 | countOffset)); |
| 8955 | break; |
| 8956 | case SigIeWMMTSPEC: |
| 8957 | status |= |
| 8958 | dot11f_unpack_ie_wmmtspec( |
| 8959 | pCtx, pBufRemaining, len, |
| 8960 | (tDot11fIEWMMTSPEC *) |
| 8961 | (pFrm + pIe->offset + |
| 8962 | sizeof(tDot11fIEWMMTSPEC) * |
| 8963 | countOffset)); |
| 8964 | break; |
| 8965 | case SigIeWiderBWChanSwitchAnn: |
| 8966 | status |= |
| 8967 | dot11f_unpack_ie_wider_bw_chan_switch_ann( |
| 8968 | pCtx, pBufRemaining, len, |
| 8969 | (tDot11fIEWiderBWChanSwitchAnn *) |
| 8970 | (pFrm + pIe->offset + |
| 8971 | sizeof(tDot11fIEWiderBWChanSwitchAnn) * |
| 8972 | countOffset)); |
| 8973 | break; |
| 8974 | case SigIeAID: |
| 8975 | status |= |
| 8976 | dot11f_unpack_ie_aid( |
| 8977 | pCtx, pBufRemaining, len, |
| 8978 | (tDot11fIEAID *) |
| 8979 | (pFrm + pIe->offset + |
| 8980 | sizeof(tDot11fIEAID) * |
| 8981 | countOffset)); |
| 8982 | break; |
| 8983 | case SigIeCFParams: |
| 8984 | status |= |
| 8985 | dot11f_unpack_ie_cf_params( |
| 8986 | pCtx, pBufRemaining, len, |
| 8987 | (tDot11fIECFParams *) |
| 8988 | (pFrm + pIe->offset + |
| 8989 | sizeof(tDot11fIECFParams) * |
| 8990 | countOffset)); |
| 8991 | break; |
| 8992 | case SigIeChallengeText: |
| 8993 | status |= |
| 8994 | dot11f_unpack_ie_challenge_text( |
| 8995 | pCtx, pBufRemaining, len, |
| 8996 | (tDot11fIEChallengeText *) |
| 8997 | (pFrm + pIe->offset + |
| 8998 | sizeof(tDot11fIEChallengeText) * |
| 8999 | countOffset)); |
| 9000 | break; |
| 9001 | case SigIeChanSwitchAnn: |
| 9002 | status |= |
| 9003 | dot11f_unpack_ie_chan_switch_ann( |
| 9004 | pCtx, pBufRemaining, len, |
| 9005 | (tDot11fIEChanSwitchAnn *) |
| 9006 | (pFrm + pIe->offset + |
| 9007 | sizeof(tDot11fIEChanSwitchAnn) * |
| 9008 | countOffset)); |
| 9009 | break; |
| 9010 | case SigIeChannelSwitchWrapper: |
| 9011 | status |= |
| 9012 | dot11f_unpack_ie_channel_switch_wrapper( |
| 9013 | pCtx, pBufRemaining, len, |
| 9014 | (tDot11fIEChannelSwitchWrapper *) |
| 9015 | (pFrm + pIe->offset + |
| 9016 | sizeof(tDot11fIEChannelSwitchWrapper) * |
| 9017 | countOffset)); |
| 9018 | break; |
| 9019 | case SigIeCountry: |
| 9020 | status |= |
| 9021 | dot11f_unpack_ie_country( |
| 9022 | pCtx, pBufRemaining, len, |
| 9023 | (tDot11fIECountry *) |
| 9024 | (pFrm + pIe->offset + |
| 9025 | sizeof(tDot11fIECountry) * |
| 9026 | countOffset)); |
| 9027 | break; |
| 9028 | case SigIeDSParams: |
| 9029 | status |= dot11f_unpack_ie_common_func(pCtx, pBufRemaining, len, |
| 9030 | (uint8_t *) &(((tDot11fIEDSParams *)(pFrm + pIe->offset + sizeof(tDot11fIEDSParams)*countOffset))->present), |
| 9031 | (uint8_t *) &(((tDot11fIEDSParams *)(pFrm + pIe->offset + sizeof(tDot11fIEDSParams)*countOffset))->curr_channel)); |
| 9032 | break; |
| 9033 | case SigIeEDCAParamSet: |
| 9034 | status |= |
| 9035 | dot11f_unpack_ie_edca_param_set( |
| 9036 | pCtx, pBufRemaining, len, |
| 9037 | (tDot11fIEEDCAParamSet *) |
| 9038 | (pFrm + pIe->offset + |
| 9039 | sizeof(tDot11fIEEDCAParamSet) * |
| 9040 | countOffset)); |
| 9041 | break; |
| 9042 | case SigIeERPInfo: |
| 9043 | status |= |
| 9044 | dot11f_unpack_ie_erp_info( |
| 9045 | pCtx, pBufRemaining, len, |
| 9046 | (tDot11fIEERPInfo *) |
| 9047 | (pFrm + pIe->offset + |
| 9048 | sizeof(tDot11fIEERPInfo) * |
| 9049 | countOffset)); |
| 9050 | break; |
| 9051 | case SigIeESECckmOpaque: |
| 9052 | status |= |
| 9053 | dot11f_unpack_ie_ese_cckm_opaque( |
| 9054 | pCtx, pBufRemaining, len, |
| 9055 | (tDot11fIEESECckmOpaque *) |
| 9056 | (pFrm + pIe->offset + |
| 9057 | sizeof(tDot11fIEESECckmOpaque) * |
| 9058 | countOffset)); |
| 9059 | break; |
| 9060 | case SigIeESERadMgmtCap: |
| 9061 | status |= |
| 9062 | dot11f_unpack_ie_ese_rad_mgmt_cap( |
| 9063 | pCtx, pBufRemaining, len, |
| 9064 | (tDot11fIEESERadMgmtCap *) |
| 9065 | (pFrm + pIe->offset + |
| 9066 | sizeof(tDot11fIEESERadMgmtCap) * |
| 9067 | countOffset)); |
| 9068 | break; |
| 9069 | case SigIeESETrafStrmMet: |
| 9070 | status |= |
| 9071 | dot11f_unpack_ie_ese_traf_strm_met( |
| 9072 | pCtx, pBufRemaining, len, |
| 9073 | (tDot11fIEESETrafStrmMet *) |
| 9074 | (pFrm + pIe->offset + |
| 9075 | sizeof(tDot11fIEESETrafStrmMet) * |
| 9076 | countOffset)); |
| 9077 | break; |
| 9078 | case SigIeESETrafStrmRateSet: |
| 9079 | status |= |
| 9080 | dot11f_unpack_ie_ese_traf_strm_rate_set( |
| 9081 | pCtx, pBufRemaining, len, |
| 9082 | (tDot11fIEESETrafStrmRateSet *) |
| 9083 | (pFrm + pIe->offset + |
| 9084 | sizeof(tDot11fIEESETrafStrmRateSet) * |
| 9085 | countOffset)); |
| 9086 | break; |
| 9087 | case SigIeESETxmitPower: |
| 9088 | status |= |
| 9089 | dot11f_unpack_ie_ese_txmit_power( |
| 9090 | pCtx, pBufRemaining, len, |
| 9091 | (tDot11fIEESETxmitPower *) |
| 9092 | (pFrm + pIe->offset + |
| 9093 | sizeof(tDot11fIEESETxmitPower) * |
| 9094 | countOffset)); |
| 9095 | break; |
| 9096 | case SigIeESEVersion: |
| 9097 | status |= |
| 9098 | dot11f_unpack_ie_ese_version( |
| 9099 | pCtx, pBufRemaining, len, |
| 9100 | (tDot11fIEESEVersion *) |
| 9101 | (pFrm + pIe->offset + |
| 9102 | sizeof(tDot11fIEESEVersion) * |
| 9103 | countOffset)); |
| 9104 | break; |
| 9105 | case SigIeExtCap: |
| 9106 | status |= |
| 9107 | dot11f_unpack_ie_ext_cap( |
| 9108 | pCtx, pBufRemaining, len, |
| 9109 | (tDot11fIEExtCap *) |
| 9110 | (pFrm + pIe->offset + |
| 9111 | sizeof(tDot11fIEExtCap) * |
| 9112 | countOffset)); |
| 9113 | break; |
| 9114 | case SigIeExtSuppRates: |
| 9115 | status |= |
| 9116 | dot11f_unpack_ie_ext_supp_rates( |
| 9117 | pCtx, pBufRemaining, len, |
| 9118 | (tDot11fIEExtSuppRates *) |
| 9119 | (pFrm + pIe->offset + |
| 9120 | sizeof(tDot11fIEExtSuppRates) * |
| 9121 | countOffset)); |
| 9122 | break; |
| 9123 | case SigIeFHParamSet: |
| 9124 | status |= |
| 9125 | dot11f_unpack_ie_fh_param_set( |
| 9126 | pCtx, pBufRemaining, len, |
| 9127 | (tDot11fIEFHParamSet *) |
| 9128 | (pFrm + pIe->offset + |
| 9129 | sizeof(tDot11fIEFHParamSet) * |
| 9130 | countOffset)); |
| 9131 | break; |
| 9132 | case SigIeFHParams: |
| 9133 | status |= |
| 9134 | dot11f_unpack_ie_fh_params( |
| 9135 | pCtx, pBufRemaining, len, |
| 9136 | (tDot11fIEFHParams *) |
| 9137 | (pFrm + pIe->offset + |
| 9138 | sizeof(tDot11fIEFHParams) * |
| 9139 | countOffset)); |
| 9140 | break; |
| 9141 | case SigIeFHPattTable: |
| 9142 | status |= |
| 9143 | dot11f_unpack_ie_fh_patt_table( |
| 9144 | pCtx, pBufRemaining, len, |
| 9145 | (tDot11fIEFHPattTable *) |
| 9146 | (pFrm + pIe->offset + |
| 9147 | sizeof(tDot11fIEFHPattTable) * |
| 9148 | countOffset)); |
| 9149 | break; |
| 9150 | case SigIeFTInfo: |
| 9151 | status |= |
| 9152 | dot11f_unpack_ie_ft_info( |
| 9153 | pCtx, pBufRemaining, len, |
| 9154 | (tDot11fIEFTInfo *) |
| 9155 | (pFrm + pIe->offset + |
| 9156 | sizeof(tDot11fIEFTInfo) * |
| 9157 | countOffset)); |
| 9158 | break; |
| 9159 | case SigIeHTCaps: |
| 9160 | status |= |
| 9161 | dot11f_unpack_ie_ht_caps( |
| 9162 | pCtx, pBufRemaining, len, |
| 9163 | (tDot11fIEHTCaps *) |
| 9164 | (pFrm + pIe->offset + |
| 9165 | sizeof(tDot11fIEHTCaps) * |
| 9166 | countOffset)); |
| 9167 | break; |
| 9168 | case SigIeHTInfo: |
| 9169 | status |= |
| 9170 | dot11f_unpack_ie_ht_info( |
| 9171 | pCtx, pBufRemaining, len, |
| 9172 | (tDot11fIEHTInfo *) |
| 9173 | (pFrm + pIe->offset + |
| 9174 | sizeof(tDot11fIEHTInfo) * |
| 9175 | countOffset)); |
| 9176 | break; |
| 9177 | case SigIeIBSSParams: |
| 9178 | status |= |
| 9179 | dot11f_unpack_ie_ibss_params( |
| 9180 | pCtx, pBufRemaining, len, |
| 9181 | (tDot11fIEIBSSParams *) |
| 9182 | (pFrm + pIe->offset + |
| 9183 | sizeof(tDot11fIEIBSSParams) * |
| 9184 | countOffset)); |
| 9185 | break; |
| 9186 | case SigIeLinkIdentifier: |
| 9187 | status |= |
| 9188 | dot11f_unpack_ie_link_identifier( |
| 9189 | pCtx, pBufRemaining, len, |
| 9190 | (tDot11fIELinkIdentifier *) |
| 9191 | (pFrm + pIe->offset + |
| 9192 | sizeof(tDot11fIELinkIdentifier) * |
| 9193 | countOffset)); |
| 9194 | break; |
| 9195 | case SigIeMeasurementReport: |
| 9196 | status |= |
| 9197 | dot11f_unpack_ie_measurement_report( |
| 9198 | pCtx, pBufRemaining, len, |
| 9199 | (tDot11fIEMeasurementReport *) |
| 9200 | (pFrm + pIe->offset + |
| 9201 | sizeof(tDot11fIEMeasurementReport) * |
| 9202 | countOffset)); |
| 9203 | break; |
| 9204 | case SigIeMeasurementRequest: |
| 9205 | status |= |
| 9206 | dot11f_unpack_ie_measurement_request( |
| 9207 | pCtx, pBufRemaining, len, |
| 9208 | (tDot11fIEMeasurementRequest *) |
| 9209 | (pFrm + pIe->offset + |
| 9210 | sizeof(tDot11fIEMeasurementRequest) * |
| 9211 | countOffset)); |
| 9212 | break; |
| 9213 | case SigIeMobilityDomain: |
| 9214 | status |= |
| 9215 | dot11f_unpack_ie_mobility_domain( |
| 9216 | pCtx, pBufRemaining, len, |
| 9217 | (tDot11fIEMobilityDomain *) |
| 9218 | (pFrm + pIe->offset + |
| 9219 | sizeof(tDot11fIEMobilityDomain) * |
| 9220 | countOffset)); |
| 9221 | break; |
| 9222 | case SigIeNeighborReport: |
| 9223 | if (countOffset < MAX_SUPPORTED_NEIGHBOR_RPT) { |
| 9224 | status |= |
| 9225 | dot11f_unpack_ie_neighbor_report( |
| 9226 | pCtx, pBufRemaining, len, |
| 9227 | (tDot11fIENeighborReport *) |
| 9228 | (pFrm + pIe->offset + |
| 9229 | sizeof(tDot11fIENeighborReport) * |
| 9230 | countOffset)); |
| 9231 | } else { |
| 9232 | status |= DOT11F_BUFFER_OVERFLOW; |
| 9233 | } |
| 9234 | break; |
| 9235 | case SigIeOBSSScanParameters: |
| 9236 | status |= |
| 9237 | dot11f_unpack_ie_obss_scan_parameters( |
| 9238 | pCtx, pBufRemaining, len, |
| 9239 | (tDot11fIEOBSSScanParameters *) |
| 9240 | (pFrm + pIe->offset + |
| 9241 | sizeof(tDot11fIEOBSSScanParameters) * |
| 9242 | countOffset)); |
| 9243 | break; |
| 9244 | case SigIeOperatingMode: |
| 9245 | status |= |
| 9246 | dot11f_unpack_ie_operating_mode( |
| 9247 | pCtx, pBufRemaining, len, |
| 9248 | (tDot11fIEOperatingMode *) |
| 9249 | (pFrm + pIe->offset + |
| 9250 | sizeof(tDot11fIEOperatingMode) * |
| 9251 | countOffset)); |
| 9252 | break; |
| 9253 | case SigIeP2PAssocReq: |
| 9254 | status |= |
| 9255 | dot11f_unpack_ie_p2_p_assoc_req( |
| 9256 | pCtx, pBufRemaining, len, |
| 9257 | (tDot11fIEP2PAssocReq *) |
| 9258 | (pFrm + pIe->offset + |
| 9259 | sizeof(tDot11fIEP2PAssocReq) * |
| 9260 | countOffset)); |
| 9261 | break; |
| 9262 | case SigIeP2PAssocRes: |
| 9263 | status |= |
| 9264 | dot11f_unpack_ie_p2_p_assoc_res( |
| 9265 | pCtx, pBufRemaining, len, |
| 9266 | (tDot11fIEP2PAssocRes *) |
| 9267 | (pFrm + pIe->offset + |
| 9268 | sizeof(tDot11fIEP2PAssocRes) * |
| 9269 | countOffset)); |
| 9270 | break; |
| 9271 | case SigIeP2PBeacon: |
| 9272 | status |= |
| 9273 | dot11f_unpack_ie_p2_p_beacon( |
| 9274 | pCtx, pBufRemaining, len, |
| 9275 | (tDot11fIEP2PBeacon *) |
| 9276 | (pFrm + pIe->offset + |
| 9277 | sizeof(tDot11fIEP2PBeacon) * |
| 9278 | countOffset)); |
| 9279 | break; |
| 9280 | case SigIeP2PBeaconProbeRes: |
| 9281 | status |= |
| 9282 | dot11f_unpack_ie_p2_p_beacon_probe_res( |
| 9283 | pCtx, pBufRemaining, len, |
| 9284 | (tDot11fIEP2PBeaconProbeRes *) |
| 9285 | (pFrm + pIe->offset + |
| 9286 | sizeof(tDot11fIEP2PBeaconProbeRes) * |
| 9287 | countOffset)); |
| 9288 | break; |
| 9289 | case SigIeP2PDeAuth: |
| 9290 | status |= |
| 9291 | dot11f_unpack_ie_p2_p_de_auth( |
| 9292 | pCtx, pBufRemaining, len, |
| 9293 | (tDot11fIEP2PDeAuth *) |
| 9294 | (pFrm + pIe->offset + |
| 9295 | sizeof(tDot11fIEP2PDeAuth) * |
| 9296 | countOffset)); |
| 9297 | break; |
| 9298 | case SigIeP2PDisAssoc: |
| 9299 | status |= |
| 9300 | dot11f_unpack_ie_p2_p_dis_assoc( |
| 9301 | pCtx, pBufRemaining, len, |
| 9302 | (tDot11fIEP2PDisAssoc *) |
| 9303 | (pFrm + pIe->offset + |
| 9304 | sizeof(tDot11fIEP2PDisAssoc) * |
| 9305 | countOffset)); |
| 9306 | break; |
| 9307 | case SigIeP2PIEOpaque: |
| 9308 | status |= |
| 9309 | dot11f_unpack_ie_p2_pie_opaque( |
| 9310 | pCtx, pBufRemaining, len, |
| 9311 | (tDot11fIEP2PIEOpaque *) |
| 9312 | (pFrm + pIe->offset + |
| 9313 | sizeof(tDot11fIEP2PIEOpaque) * |
| 9314 | countOffset)); |
| 9315 | break; |
| 9316 | case SigIeP2PProbeReq: |
| 9317 | status |= |
| 9318 | dot11f_unpack_ie_p2_p_probe_req( |
| 9319 | pCtx, pBufRemaining, len, |
| 9320 | (tDot11fIEP2PProbeReq *) |
| 9321 | (pFrm + pIe->offset + |
| 9322 | sizeof(tDot11fIEP2PProbeReq) * |
| 9323 | countOffset)); |
| 9324 | break; |
| 9325 | case SigIeP2PProbeRes: |
| 9326 | status |= |
| 9327 | dot11f_unpack_ie_p2_p_probe_res( |
| 9328 | pCtx, pBufRemaining, len, |
| 9329 | (tDot11fIEP2PProbeRes *) |
| 9330 | (pFrm + pIe->offset + |
| 9331 | sizeof(tDot11fIEP2PProbeRes) * |
| 9332 | countOffset)); |
| 9333 | break; |
| 9334 | case SigIePTIControl: |
| 9335 | status |= |
| 9336 | dot11f_unpack_ie_pti_control( |
| 9337 | pCtx, pBufRemaining, len, |
| 9338 | (tDot11fIEPTIControl *) |
| 9339 | (pFrm + pIe->offset + |
| 9340 | sizeof(tDot11fIEPTIControl) * |
| 9341 | countOffset)); |
| 9342 | break; |
| 9343 | case SigIePUBufferStatus: |
| 9344 | status |= |
| 9345 | dot11f_unpack_ie_pu_buffer_status( |
| 9346 | pCtx, pBufRemaining, len, |
| 9347 | (tDot11fIEPUBufferStatus *) |
| 9348 | (pFrm + pIe->offset + |
| 9349 | sizeof(tDot11fIEPUBufferStatus) * |
| 9350 | countOffset)); |
| 9351 | break; |
| 9352 | case SigIePowerCaps: |
| 9353 | status |= |
| 9354 | dot11f_unpack_ie_power_caps( |
| 9355 | pCtx, pBufRemaining, len, |
| 9356 | (tDot11fIEPowerCaps *) |
| 9357 | (pFrm + pIe->offset + |
| 9358 | sizeof(tDot11fIEPowerCaps) * |
| 9359 | countOffset)); |
| 9360 | break; |
| 9361 | case SigIePowerConstraints: |
| 9362 | status |= |
| 9363 | dot11f_unpack_ie_power_constraints( |
| 9364 | pCtx, pBufRemaining, len, |
| 9365 | (tDot11fIEPowerConstraints *) |
| 9366 | (pFrm + pIe->offset + |
| 9367 | sizeof(tDot11fIEPowerConstraints) * |
| 9368 | countOffset)); |
| 9369 | break; |
| 9370 | case SigIeQBSSLoad: |
| 9371 | status |= |
| 9372 | dot11f_unpack_ie_qbss_load( |
| 9373 | pCtx, pBufRemaining, len, |
| 9374 | (tDot11fIEQBSSLoad *) |
| 9375 | (pFrm + pIe->offset + |
| 9376 | sizeof(tDot11fIEQBSSLoad) * |
| 9377 | countOffset)); |
| 9378 | break; |
| 9379 | case SigIeQComVendorIE: |
| 9380 | status |= |
| 9381 | dot11f_unpack_ie_QComVendorIE( |
| 9382 | pCtx, pBufRemaining, len, |
| 9383 | (tDot11fIEQComVendorIE *) |
| 9384 | (pFrm + pIe->offset + |
| 9385 | sizeof(tDot11fIEQComVendorIE) * |
| 9386 | countOffset)); |
| 9387 | break; |
| 9388 | case SigIeQOSCapsAp: |
| 9389 | status |= |
| 9390 | dot11f_unpack_ie_qos_caps_ap( |
| 9391 | pCtx, pBufRemaining, len, |
| 9392 | (tDot11fIEQOSCapsAp *) |
| 9393 | (pFrm + pIe->offset + |
| 9394 | sizeof(tDot11fIEQOSCapsAp) * |
| 9395 | countOffset)); |
| 9396 | break; |
| 9397 | case SigIeQOSCapsStation: |
| 9398 | status |= |
| 9399 | dot11f_unpack_ie_qos_caps_station( |
| 9400 | pCtx, pBufRemaining, len, |
| 9401 | (tDot11fIEQOSCapsStation *) |
| 9402 | (pFrm + pIe->offset + |
| 9403 | sizeof(tDot11fIEQOSCapsStation) * |
| 9404 | countOffset)); |
| 9405 | break; |
| 9406 | case SigIeQosMapSet: |
| 9407 | status |= |
| 9408 | dot11f_unpack_ie_qos_map_set( |
| 9409 | pCtx, pBufRemaining, len, |
| 9410 | (tDot11fIEQosMapSet *) |
| 9411 | (pFrm + pIe->offset + |
| 9412 | sizeof(tDot11fIEQosMapSet) * |
| 9413 | countOffset)); |
| 9414 | break; |
| 9415 | case SigIeQuiet: |
| 9416 | status |= |
| 9417 | dot11f_unpack_ie_quiet( |
| 9418 | pCtx, pBufRemaining, len, |
| 9419 | (tDot11fIEQuiet *) |
| 9420 | (pFrm + pIe->offset + |
| 9421 | sizeof(tDot11fIEQuiet) * |
| 9422 | countOffset)); |
| 9423 | break; |
| 9424 | case SigIeRCPIIE: |
| 9425 | status |= |
| 9426 | dot11f_unpack_ie_rcpiie( |
| 9427 | pCtx, pBufRemaining, len, |
| 9428 | (tDot11fIERCPIIE *) |
| 9429 | (pFrm + pIe->offset + |
| 9430 | sizeof(tDot11fIERCPIIE) * |
| 9431 | countOffset)); |
| 9432 | break; |
| 9433 | case SigIeRICDataDesc: |
| 9434 | /* reset the pointers back since this is a container IE and it doesnt have its own EID and Len. */ |
| 9435 | pBufRemaining -= 2; |
| 9436 | nBufRemaining += 2; |
| 9437 | if (pIe && pIe->noui) { |
| 9438 | pBufRemaining -= pIe->noui; |
| 9439 | nBufRemaining += pIe->noui; |
| 9440 | len += pIe->noui; |
| 9441 | } |
| 9442 | status |= get_container_ies_len(pCtx, pBufRemaining, nBufRemaining, &len, IES_RICDataDesc); |
| 9443 | if (status != DOT11F_PARSE_SUCCESS && status != DOT11F_UNKNOWN_IES) |
| 9444 | break; |
| 9445 | status |= |
| 9446 | dot11f_unpack_ie_ric_data_desc( |
| 9447 | pCtx, pBufRemaining, len, |
| 9448 | (tDot11fIERICDataDesc *) |
| 9449 | (pFrm + pIe->offset + |
| 9450 | sizeof(tDot11fIERICDataDesc) * |
| 9451 | countOffset)); |
| 9452 | break; |
| 9453 | case SigIeRSN: |
| 9454 | status |= |
| 9455 | dot11f_unpack_ie_rsn( |
| 9456 | pCtx, pBufRemaining, len, |
| 9457 | (tDot11fIERSN *) |
| 9458 | (pFrm + pIe->offset + |
| 9459 | sizeof(tDot11fIERSN) * |
| 9460 | countOffset)); |
| 9461 | break; |
| 9462 | case SigIeRSNIIE: |
| 9463 | status |= |
| 9464 | dot11f_unpack_ie_rsniie( |
| 9465 | pCtx, pBufRemaining, len, |
| 9466 | (tDot11fIERSNIIE *) |
| 9467 | (pFrm + pIe->offset + |
| 9468 | sizeof(tDot11fIERSNIIE) * |
| 9469 | countOffset)); |
| 9470 | break; |
| 9471 | case SigIeRSNOpaque: |
| 9472 | status |= |
| 9473 | dot11f_unpack_ie_rsn_opaque( |
| 9474 | pCtx, pBufRemaining, len, |
| 9475 | (tDot11fIERSNOpaque *) |
| 9476 | (pFrm + pIe->offset + |
| 9477 | sizeof(tDot11fIERSNOpaque) * |
| 9478 | countOffset)); |
| 9479 | break; |
| 9480 | case SigIeSuppChannels: |
| 9481 | status |= |
| 9482 | dot11f_unpack_ie_supp_channels( |
| 9483 | pCtx, pBufRemaining, len, |
| 9484 | (tDot11fIESuppChannels *) |
| 9485 | (pFrm + pIe->offset + |
| 9486 | sizeof(tDot11fIESuppChannels) * |
| 9487 | countOffset)); |
| 9488 | break; |
| 9489 | case SigIeSuppOperatingClasses: |
| 9490 | status |= |
| 9491 | dot11f_unpack_ie_supp_operating_classes( |
| 9492 | pCtx, pBufRemaining, len, |
| 9493 | (tDot11fIESuppOperatingClasses *) |
| 9494 | (pFrm + pIe->offset + |
| 9495 | sizeof(tDot11fIESuppOperatingClasses) * |
| 9496 | countOffset)); |
| 9497 | break; |
| 9498 | case SigIeSuppRates: |
| 9499 | status |= |
| 9500 | dot11f_unpack_ie_supp_rates( |
| 9501 | pCtx, pBufRemaining, len, |
| 9502 | (tDot11fIESuppRates *) |
| 9503 | (pFrm + pIe->offset + |
| 9504 | sizeof(tDot11fIESuppRates) * |
| 9505 | countOffset)); |
| 9506 | break; |
| 9507 | case SigIeTIM: |
| 9508 | status |= |
| 9509 | dot11f_unpack_ie_tim( |
| 9510 | pCtx, pBufRemaining, len, |
| 9511 | (tDot11fIETIM *) |
| 9512 | (pFrm + pIe->offset + |
| 9513 | sizeof(tDot11fIETIM) * |
| 9514 | countOffset)); |
| 9515 | break; |
| 9516 | case SigIeTPCReport: |
| 9517 | status |= |
| 9518 | dot11f_unpack_ie_tpc_report( |
| 9519 | pCtx, pBufRemaining, len, |
| 9520 | (tDot11fIETPCReport *) |
| 9521 | (pFrm + pIe->offset + |
| 9522 | sizeof(tDot11fIETPCReport) * |
| 9523 | countOffset)); |
| 9524 | break; |
| 9525 | case SigIeTPCRequest: |
| 9526 | status |= |
| 9527 | dot11f_unpack_ie_tpc_request( |
| 9528 | pCtx, pBufRemaining, len, |
| 9529 | (tDot11fIETPCRequest *) |
| 9530 | (pFrm + pIe->offset + |
| 9531 | sizeof(tDot11fIETPCRequest) * |
| 9532 | countOffset)); |
| 9533 | break; |
| 9534 | case SigIeTimeAdvertisement: |
| 9535 | status |= |
| 9536 | dot11f_unpack_ie_time_advertisement( |
| 9537 | pCtx, pBufRemaining, len, |
| 9538 | (tDot11fIETimeAdvertisement *) |
| 9539 | (pFrm + pIe->offset + |
| 9540 | sizeof(tDot11fIETimeAdvertisement) * |
| 9541 | countOffset)); |
| 9542 | break; |
| 9543 | case SigIeTimeoutInterval: |
| 9544 | status |= |
| 9545 | dot11f_unpack_ie_timeout_interval( |
| 9546 | pCtx, pBufRemaining, len, |
| 9547 | (tDot11fIETimeoutInterval *) |
| 9548 | (pFrm + pIe->offset + |
| 9549 | sizeof(tDot11fIETimeoutInterval) * |
| 9550 | countOffset)); |
| 9551 | break; |
| 9552 | case SigIeVHTExtBssLoad: |
| 9553 | status |= |
| 9554 | dot11f_unpack_ie_vht_ext_bss_load( |
| 9555 | pCtx, pBufRemaining, len, |
| 9556 | (tDot11fIEVHTExtBssLoad *) |
| 9557 | (pFrm + pIe->offset + |
| 9558 | sizeof(tDot11fIEVHTExtBssLoad) * |
| 9559 | countOffset)); |
| 9560 | break; |
| 9561 | case SigIeVendor1IE: |
| 9562 | status |= |
| 9563 | dot11f_unpack_ie_vendor1_ie( |
| 9564 | pCtx, pBufRemaining, len, |
| 9565 | (tDot11fIEVendor1IE *) |
| 9566 | (pFrm + pIe->offset + |
| 9567 | sizeof(tDot11fIEVendor1IE) * |
| 9568 | countOffset)); |
| 9569 | break; |
| 9570 | case SigIeVendor3IE: |
| 9571 | status |= |
| 9572 | dot11f_unpack_ie_vendor3_ie( |
| 9573 | pCtx, pBufRemaining, len, |
| 9574 | (tDot11fIEVendor3IE *) |
| 9575 | (pFrm + pIe->offset + |
| 9576 | sizeof(tDot11fIEVendor3IE) * |
| 9577 | countOffset)); |
| 9578 | break; |
| 9579 | case SigIeWAPI: |
| 9580 | status |= |
| 9581 | dot11f_unpack_ie_wapi( |
| 9582 | pCtx, pBufRemaining, len, |
| 9583 | (tDot11fIEWAPI *) |
| 9584 | (pFrm + pIe->offset + |
| 9585 | sizeof(tDot11fIEWAPI) * |
| 9586 | countOffset)); |
| 9587 | break; |
| 9588 | case SigIeWAPIOpaque: |
| 9589 | status |= |
| 9590 | dot11f_unpack_ie_wapi_opaque( |
| 9591 | pCtx, pBufRemaining, len, |
| 9592 | (tDot11fIEWAPIOpaque *) |
| 9593 | (pFrm + pIe->offset + |
| 9594 | sizeof(tDot11fIEWAPIOpaque) * |
| 9595 | countOffset)); |
| 9596 | break; |
| 9597 | case SigIeWFATPC: |
| 9598 | status |= |
| 9599 | dot11f_unpack_ie_wfatpc( |
| 9600 | pCtx, pBufRemaining, len, |
| 9601 | (tDot11fIEWFATPC *) |
| 9602 | (pFrm + pIe->offset + |
| 9603 | sizeof(tDot11fIEWFATPC) * |
| 9604 | countOffset)); |
| 9605 | break; |
| 9606 | case SigIeWFDIEOpaque: |
| 9607 | status |= |
| 9608 | dot11f_unpack_ie_wfdie_opaque( |
| 9609 | pCtx, pBufRemaining, len, |
| 9610 | (tDot11fIEWFDIEOpaque *) |
| 9611 | (pFrm + pIe->offset + |
| 9612 | sizeof(tDot11fIEWFDIEOpaque) * |
| 9613 | countOffset)); |
| 9614 | break; |
| 9615 | case SigIeWMMCaps: |
| 9616 | status |= |
| 9617 | dot11f_unpack_ie_wmm_caps( |
| 9618 | pCtx, pBufRemaining, len, |
| 9619 | (tDot11fIEWMMCaps *) |
| 9620 | (pFrm + pIe->offset + |
| 9621 | sizeof(tDot11fIEWMMCaps) * |
| 9622 | countOffset)); |
| 9623 | break; |
| 9624 | case SigIeWMMInfoAp: |
| 9625 | status |= |
| 9626 | dot11f_unpack_ie_wmm_info_ap( |
| 9627 | pCtx, pBufRemaining, len, |
| 9628 | (tDot11fIEWMMInfoAp *) |
| 9629 | (pFrm + pIe->offset + |
| 9630 | sizeof(tDot11fIEWMMInfoAp) * |
| 9631 | countOffset)); |
| 9632 | break; |
| 9633 | case SigIeWMMInfoStation: |
| 9634 | status |= |
| 9635 | dot11f_unpack_ie_wmm_info_station( |
| 9636 | pCtx, pBufRemaining, len, |
| 9637 | (tDot11fIEWMMInfoStation *) |
| 9638 | (pFrm + pIe->offset + |
| 9639 | sizeof(tDot11fIEWMMInfoStation) * |
| 9640 | countOffset)); |
| 9641 | break; |
| 9642 | case SigIeWMMParams: |
| 9643 | status |= |
| 9644 | dot11f_unpack_ie_wmm_params( |
| 9645 | pCtx, pBufRemaining, len, |
| 9646 | (tDot11fIEWMMParams *) |
| 9647 | (pFrm + pIe->offset + |
| 9648 | sizeof(tDot11fIEWMMParams) * |
| 9649 | countOffset)); |
| 9650 | break; |
| 9651 | case SigIeWPA: |
| 9652 | status |= |
| 9653 | dot11f_unpack_ie_wpa( |
| 9654 | pCtx, pBufRemaining, len, |
| 9655 | (tDot11fIEWPA *) |
| 9656 | (pFrm + pIe->offset + |
| 9657 | sizeof(tDot11fIEWPA) * |
| 9658 | countOffset)); |
| 9659 | break; |
| 9660 | case SigIeWPAOpaque: |
| 9661 | status |= |
| 9662 | dot11f_unpack_ie_wpa_opaque( |
| 9663 | pCtx, pBufRemaining, len, |
| 9664 | (tDot11fIEWPAOpaque *) |
| 9665 | (pFrm + pIe->offset + |
| 9666 | sizeof(tDot11fIEWPAOpaque) * |
| 9667 | countOffset)); |
| 9668 | break; |
| 9669 | case SigIeWSC: |
| 9670 | status |= |
| 9671 | dot11f_unpack_ie_wsc( |
| 9672 | pCtx, pBufRemaining, len, |
| 9673 | (tDot11fIEWSC *) |
| 9674 | (pFrm + pIe->offset + |
| 9675 | sizeof(tDot11fIEWSC) * |
| 9676 | countOffset)); |
| 9677 | break; |
| 9678 | case SigIeWscAssocReq: |
| 9679 | status |= |
| 9680 | dot11f_unpack_ie_wsc_assoc_req( |
| 9681 | pCtx, pBufRemaining, len, |
| 9682 | (tDot11fIEWscAssocReq *) |
| 9683 | (pFrm + pIe->offset + |
| 9684 | sizeof(tDot11fIEWscAssocReq) * |
| 9685 | countOffset)); |
| 9686 | break; |
| 9687 | case SigIeWscAssocRes: |
| 9688 | status |= |
| 9689 | dot11f_unpack_ie_wsc_assoc_res( |
| 9690 | pCtx, pBufRemaining, len, |
| 9691 | (tDot11fIEWscAssocRes *) |
| 9692 | (pFrm + pIe->offset + |
| 9693 | sizeof(tDot11fIEWscAssocRes) * |
| 9694 | countOffset)); |
| 9695 | break; |
| 9696 | case SigIeWscBeacon: |
| 9697 | status |= |
| 9698 | dot11f_unpack_ie_wsc_beacon( |
| 9699 | pCtx, pBufRemaining, len, |
| 9700 | (tDot11fIEWscBeacon *) |
| 9701 | (pFrm + pIe->offset + |
| 9702 | sizeof(tDot11fIEWscBeacon) * |
| 9703 | countOffset)); |
| 9704 | break; |
| 9705 | case SigIeWscBeaconProbeRes: |
| 9706 | status |= |
| 9707 | dot11f_unpack_ie_wsc_beacon_probe_res( |
| 9708 | pCtx, pBufRemaining, len, |
| 9709 | (tDot11fIEWscBeaconProbeRes *) |
| 9710 | (pFrm + pIe->offset + |
| 9711 | sizeof(tDot11fIEWscBeaconProbeRes) * |
| 9712 | countOffset)); |
| 9713 | break; |
| 9714 | case SigIeWscIEOpaque: |
| 9715 | status |= |
| 9716 | dot11f_unpack_ie_wsc_ie_opaque( |
| 9717 | pCtx, pBufRemaining, len, |
| 9718 | (tDot11fIEWscIEOpaque *) |
| 9719 | (pFrm + pIe->offset + |
| 9720 | sizeof(tDot11fIEWscIEOpaque) * |
| 9721 | countOffset)); |
| 9722 | break; |
| 9723 | case SigIeWscProbeReq: |
| 9724 | status |= |
| 9725 | dot11f_unpack_ie_wsc_probe_req( |
| 9726 | pCtx, pBufRemaining, len, |
| 9727 | (tDot11fIEWscProbeReq *) |
| 9728 | (pFrm + pIe->offset + |
| 9729 | sizeof(tDot11fIEWscProbeReq) * |
| 9730 | countOffset)); |
| 9731 | break; |
| 9732 | case SigIeWscProbeRes: |
| 9733 | status |= |
| 9734 | dot11f_unpack_ie_wsc_probe_res( |
| 9735 | pCtx, pBufRemaining, len, |
| 9736 | (tDot11fIEWscProbeRes *) |
| 9737 | (pFrm + pIe->offset + |
| 9738 | sizeof(tDot11fIEWscProbeRes) * |
| 9739 | countOffset)); |
| 9740 | break; |
| 9741 | case SigIeWscReassocRes: |
| 9742 | status |= |
| 9743 | dot11f_unpack_ie_wsc_reassoc_res( |
| 9744 | pCtx, pBufRemaining, len, |
| 9745 | (tDot11fIEWscReassocRes *) |
| 9746 | (pFrm + pIe->offset + |
| 9747 | sizeof(tDot11fIEWscReassocRes) * |
| 9748 | countOffset)); |
| 9749 | break; |
| 9750 | case SigIeext_chan_switch_ann: |
| 9751 | status |= |
| 9752 | dot11f_unpack_ie_ext_chan_switch_ann( |
| 9753 | pCtx, pBufRemaining, len, |
| 9754 | (tDot11fIEext_chan_switch_ann *) |
| 9755 | (pFrm + pIe->offset + |
| 9756 | sizeof(tDot11fIEext_chan_switch_ann) * |
| 9757 | countOffset)); |
| 9758 | break; |
| 9759 | case SigIeht2040_bss_coexistence: |
| 9760 | status |= |
| 9761 | dot11f_unpack_ie_ht2040_bss_coexistence( |
| 9762 | pCtx, pBufRemaining, len, |
| 9763 | (tDot11fIEht2040_bss_coexistence *) |
| 9764 | (pFrm + pIe->offset + |
| 9765 | sizeof(tDot11fIEht2040_bss_coexistence) * |
| 9766 | countOffset)); |
| 9767 | break; |
| 9768 | case SigIeht2040_bss_intolerant_report: |
| 9769 | status |= |
| 9770 | dot11f_unpack_ie_ht2040_bss_intolerant_report( |
| 9771 | pCtx, pBufRemaining, len, |
| 9772 | (tDot11fIEht2040_bss_intolerant_report *) |
| 9773 | (pFrm + pIe->offset + |
| 9774 | sizeof(tDot11fIEht2040_bss_intolerant_report) * |
| 9775 | countOffset)); |
| 9776 | break; |
| 9777 | case SigIesec_chan_offset_ele: |
| 9778 | status |= |
| 9779 | dot11f_unpack_ie_sec_chan_offset_ele( |
| 9780 | pCtx, pBufRemaining, len, |
| 9781 | (tDot11fIEsec_chan_offset_ele *) |
| 9782 | (pFrm + pIe->offset + |
| 9783 | sizeof(tDot11fIEsec_chan_offset_ele) * |
| 9784 | countOffset)); |
| 9785 | break; |
| 9786 | case SigIevendor2_ie: |
| 9787 | status |= |
| 9788 | dot11f_unpack_ie_vendor2_ie( |
| 9789 | pCtx, pBufRemaining, len, |
| 9790 | (tDot11fIEvendor2_ie *) |
| 9791 | (pFrm + pIe->offset + |
| 9792 | sizeof(tDot11fIEvendor2_ie) * |
| 9793 | countOffset)); |
| 9794 | break; |
| 9795 | default: |
| 9796 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR" |
| 9797 | ": I don't know about the IE signature %d" |
| 9798 | "-- this is most likely a 'framesc' bug.\n"), |
| 9799 | pIe->sig); |
| 9800 | FRAMES_DBG_BREAK(); |
| 9801 | return DOT11F_INTERNAL_ERROR; |
| 9802 | } |
| 9803 | if (pIe->arraybound) |
| 9804 | (++(*(uint16_t *)(pFrm + pIe->countOffset))); |
| 9805 | } |
| 9806 | } else { |
| 9807 | FRAMES_LOG2(pCtx, FRLOG3, FRFL("Skipping unknown IE %d" |
| 9808 | " (length %d)\n"), eid, len); |
| 9809 | FRAMES_DUMP(pCtx, FRLOG3, pBufRemaining - 2, len); |
| 9810 | status |= DOT11F_UNKNOWN_IES; |
| 9811 | } |
| 9812 | |
| 9813 | pBufRemaining += len; |
| 9814 | |
| 9815 | if (len > nBufRemaining) { |
| 9816 | FRAMES_LOG0(pCtx, FRLOGW, FRFL("This IE extends past " |
| 9817 | "the buffer as it was defined to us. This could" |
| 9818 | "mean a corrupt frame, or just an incorrect leng" |
| 9819 | "th parameter.\n")); |
| 9820 | FRAMES_DBG_BREAK(); |
| 9821 | status |= DOT11F_LAST_IE_TOO_LONG; |
| 9822 | goto MandatoryCheck; |
| 9823 | } |
| 9824 | |
| 9825 | nBufRemaining -= len; |
| 9826 | |
| 9827 | } |
| 9828 | |
| 9829 | MandatoryCheck: |
| 9830 | pIe = &IEs[0]; |
| 9831 | while (0xff != pIe->eid) { |
| 9832 | if (pIe->fMandatory) { |
| 9833 | pfFound = (tFRAMES_BOOL *)(pFrm + pIe->offset + |
| 9834 | pIe->presenceOffset); |
| 9835 | if (!*pfFound) { |
| 9836 | FRAMES_LOG1(pCtx, FRLOGW, FRFL("ERROR: The mandato" |
| 9837 | "ry IE %s wasn't seen.\n"), |
| 9838 | pIe->name); |
| 9839 | FRAMES_DBG_BREAK(); |
| 9840 | status |= DOT11F_MANDATORY_IE_MISSING; |
| 9841 | } |
| 9842 | } |
| 9843 | ++pIe; |
| 9844 | } |
| 9845 | |
| 9846 | return status; |
| 9847 | } /* End unpack_core. */ |
| 9848 | |
| 9849 | static uint32_t unpack_tlv_core(tpAniSirGlobal pCtx, |
| 9850 | uint8_t *pBuf, |
| 9851 | uint32_t nBuf, |
| 9852 | const tTLVDefn TLVs[], |
| 9853 | uint8_t *pFrm, |
| 9854 | size_t nFrm) |
| 9855 | { |
| 9856 | const tTLVDefn *pTlv; |
| 9857 | uint32_t nBufRemaining, status, npec; |
| 9858 | uint16_t id, len; |
| 9859 | uint8_t *pBufRemaining, *pfFound; |
| 9860 | |
| 9861 | (void)pCtx; /* Shutup the compiler */ |
| 9862 | (void)nFrm; |
| 9863 | status = DOT11F_PARSE_SUCCESS; |
| 9864 | pBufRemaining = pBuf; |
| 9865 | nBufRemaining = nBuf; |
| 9866 | |
| 9867 | /* While we have data... */ |
| 9868 | while (nBufRemaining) { |
| 9869 | if (3 > nBufRemaining) { |
| 9870 | FRAMES_LOG0(pCtx, FRLOGE, FRFL("This frame reports " |
| 9871 | "fewer three byte(s) remaining.\n")); |
| 9872 | status |= DOT11F_INCOMPLETE_TLV; |
| 9873 | FRAMES_DBG_BREAK(); |
| 9874 | goto MandatoryCheck; |
| 9875 | } |
| 9876 | |
| 9877 | npec = 0U; |
| 9878 | |
| 9879 | /* Look for a matching TLV definition, */ |
| 9880 | pTlv = find_tlv_defn(pCtx, pBufRemaining, nBufRemaining, TLVs); |
| 9881 | /* consume the type, */ |
| 9882 | if (pTlv) { |
| 9883 | if (pTlv->sType == 2) { |
| 9884 | framesntohs(pCtx, &id, pBufRemaining, pTlv->fMsb); |
| 9885 | pBufRemaining += 2; |
| 9886 | nBufRemaining -= 2; |
| 9887 | } else { |
| 9888 | id = *pBufRemaining; |
| 9889 | pBufRemaining += 1; |
| 9890 | nBufRemaining -= 1; |
| 9891 | } |
| 9892 | /* & length, */ |
| 9893 | if (pTlv->sLen == 2) { |
| 9894 | framesntohs(pCtx, &len, pBufRemaining, pTlv->fMsb); |
| 9895 | if (2 > nBufRemaining) { |
| 9896 | FRAMES_LOG0(pCtx, FRLOGE, FRFL("This frame reports " |
| 9897 | "fewer two byte(s) remaining.\n")); |
| 9898 | status |= DOT11F_INCOMPLETE_TLV; |
| 9899 | FRAMES_DBG_BREAK(); |
| 9900 | goto MandatoryCheck; |
| 9901 | } |
| 9902 | pBufRemaining += 2; |
| 9903 | nBufRemaining -= 2; |
| 9904 | } else { |
| 9905 | len = *pBufRemaining; |
| 9906 | pBufRemaining += 1; |
| 9907 | nBufRemaining -= 1; |
| 9908 | } |
| 9909 | } else { |
| 9910 | pBufRemaining += TLVs[0].sType; |
| 9911 | nBufRemaining -= TLVs[0].sType; |
| 9912 | framesntohs(pCtx, &len, pBufRemaining, (TLVs[0].sType == 2)); |
| 9913 | if (2 > nBufRemaining) { |
| 9914 | FRAMES_LOG0(pCtx, FRLOGE, FRFL("This frame reports " |
| 9915 | "fewer two byte(s) remaining.\n")); |
| 9916 | status |= DOT11F_INCOMPLETE_TLV; |
| 9917 | FRAMES_DBG_BREAK(); |
| 9918 | goto MandatoryCheck; |
| 9919 | } |
| 9920 | pBufRemaining += 2; |
| 9921 | nBufRemaining -= 2; |
| 9922 | } |
| 9923 | |
| 9924 | if (pTlv && pTlv->pec) { |
| 9925 | npec = 3U; |
| 9926 | if (3 > nBufRemaining) { |
| 9927 | FRAMES_LOG2(pCtx, FRLOGW, FRFL("TLV %d reports length" |
| 9928 | "%d, but it has a Private Enterprise Code (3 byte" |
| 9929 | "s.\n"), id, len); |
| 9930 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 9931 | FRAMES_LOG2(pCtx, FRLOG1, FRFL("We've parsed %d bytes" |
| 9932 | "of this buffer, and show %d left.\n"), |
| 9933 | pBufRemaining - pBuf, nBufRemaining); |
| 9934 | status |= DOT11F_INCOMPLETE_TLV; |
| 9935 | FRAMES_DBG_BREAK(); |
| 9936 | goto MandatoryCheck; |
| 9937 | } |
| 9938 | pBufRemaining += 3; |
| 9939 | nBufRemaining -= 3; |
| 9940 | len -= 3; |
| 9941 | } |
| 9942 | |
| 9943 | /* Whether we found a hit or not, we can validate the reported */ |
| 9944 | /* length of this TLV: */ |
| 9945 | if (len > nBufRemaining) { |
| 9946 | FRAMES_LOG3(pCtx, FRLOGW, FRFL("TLV %d reports length %" |
| 9947 | "d, but there are only %d bytes remaining in this f" |
| 9948 | "rame.\n"), id, len, nBufRemaining); |
| 9949 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 9950 | FRAMES_LOG2(pCtx, FRLOG1, FRFL("We've parsed %d bytes" |
| 9951 | " of this buffer, and show %d left.\n"), |
| 9952 | pBufRemaining - pBuf, nBufRemaining); |
| 9953 | status |= DOT11F_INCOMPLETE_TLV; |
| 9954 | FRAMES_DBG_BREAK(); |
| 9955 | goto MandatoryCheck; |
| 9956 | } |
| 9957 | |
| 9958 | /* Now, *if* we found a hit... */ |
| 9959 | if (pTlv) { |
| 9960 | if (len < pTlv->minSize - npec) { |
| 9961 | FRAMES_LOG3(pCtx, FRLOGW, FRFL("The IE %s must be " |
| 9962 | "at least %d bytes in size, but the size is only " |
| 9963 | "%d bytes.\n"), |
| 9964 | pTlv->name, pTlv->minSize, len); |
| 9965 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 9966 | status |= DOT11F_INCOMPLETE_TLV; |
| 9967 | FRAMES_DBG_BREAK(); |
| 9968 | goto MandatoryCheck; |
| 9969 | } |
| 9970 | if (nBufRemaining < pTlv->minSize - npec - (pTlv->sType + pTlv->sLen)) { |
| 9971 | FRAMES_LOG3(pCtx, FRLOGW, FRFL("The IE %s must be " |
| 9972 | "at least %d bytes in size, but there are only " |
| 9973 | "%d bytes remaining in this frame.\n"), |
| 9974 | pTlv->name, pTlv->minSize, nBufRemaining); |
| 9975 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 9976 | status |= DOT11F_INCOMPLETE_TLV; |
| 9977 | FRAMES_DBG_BREAK(); |
| 9978 | goto MandatoryCheck; |
| 9979 | } else if (len > pTlv->maxSize - npec - (pTlv->sType + pTlv->sLen)) { |
| 9980 | FRAMES_LOG1(pCtx, FRLOGW, FRFL("The TLV %s reports " |
| 9981 | "an illegally large size; this TLV is presumably" |
| 9982 | "corrupt or otherwise invalid & will be skipped " |
| 9983 | "ipped.\n"), pTlv->name); |
| 9984 | FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); |
| 9985 | FRAMES_LOG2(pCtx, FRLOG1, FRFL("We've parsed %d by" |
| 9986 | "tes of this buffer, and show %d left.\n"), |
| 9987 | pBufRemaining - pBuf, nBufRemaining); |
| 9988 | FRAMES_DBG_BREAK(); |
| 9989 | status |= DOT11F_SKIPPED_BAD_TLV; |
| 9990 | } else { |
| 9991 | switch (pTlv->sig) { |
| 9992 | case SigTlvAuthorizedMACs: |
| 9993 | status |= |
| 9994 | dot11f_unpack_tlv_authorized_ma_cs(pCtx, |
| 9995 | pBufRemaining, len, |
| 9996 | (tDot11fTLVAuthorizedMACs *) |
| 9997 | (pFrm + pTlv->offset)); |
| 9998 | break; |
| 9999 | case SigTlvRequestToEnroll: |
| 10000 | status |= |
| 10001 | dot11f_unpack_tlv_common_func(pCtx, |
| 10002 | pBufRemaining, len, |
| 10003 | (uint8_t *)&(((tDot11fTLVRequestToEnroll *) |
| 10004 | (pFrm + pTlv->offset))->present), |
| 10005 | (uint8_t *)&(((tDot11fTLVRequestToEnroll *) |
| 10006 | (pFrm + pTlv->offset))->req)); |
| 10007 | break; |
| 10008 | case SigTlvVersion2: |
| 10009 | status |= |
| 10010 | dot11f_unpack_tlv_version2(pCtx, |
| 10011 | pBufRemaining, len, |
| 10012 | (tDot11fTLVVersion2 *) |
| 10013 | (pFrm + pTlv->offset)); |
| 10014 | break; |
| 10015 | case SigTlvAPSetupLocked: |
| 10016 | status |= |
| 10017 | dot11f_unpack_tlv_common_func(pCtx, |
| 10018 | pBufRemaining, len, |
| 10019 | (uint8_t *)&(((tDot11fTLVAPSetupLocked *) |
| 10020 | (pFrm + pTlv->offset))->present), |
| 10021 | (uint8_t *)&(((tDot11fTLVAPSetupLocked *) |
| 10022 | (pFrm + pTlv->offset))->fLocked)); |
| 10023 | break; |
| 10024 | case SigTlvAssociationState: |
| 10025 | status |= |
| 10026 | dot11f_unpack_tlv_common_func2(pCtx, |
| 10027 | pBufRemaining, len, |
| 10028 | (uint8_t *)&(((tDot11fTLVAssociationState *) |
| 10029 | (pFrm + pTlv->offset))->present), |
| 10030 | (uint16_t *)&(((tDot11fTLVAssociationState *) |
| 10031 | (pFrm + pTlv->offset))->state)); |
| 10032 | break; |
| 10033 | case SigTlvConfigMethods: |
| 10034 | status |= |
| 10035 | dot11f_unpack_tlv_common_func2(pCtx, |
| 10036 | pBufRemaining, len, |
| 10037 | (uint8_t *)&(((tDot11fTLVConfigMethods *) |
| 10038 | (pFrm + pTlv->offset))->present), |
| 10039 | (uint16_t *)&(((tDot11fTLVConfigMethods *) |
| 10040 | (pFrm + pTlv->offset))->methods)); |
| 10041 | break; |
| 10042 | case SigTlvConfigurationError: |
| 10043 | status |= |
| 10044 | dot11f_unpack_tlv_common_func2(pCtx, |
| 10045 | pBufRemaining, len, |
| 10046 | (uint8_t *)&(((tDot11fTLVConfigurationError *) |
| 10047 | (pFrm + pTlv->offset))->present), |
| 10048 | (uint16_t *)&(((tDot11fTLVConfigurationError *) |
| 10049 | (pFrm + pTlv->offset))->error)); |
| 10050 | break; |
| 10051 | case SigTlvDeviceName: |
| 10052 | status |= |
| 10053 | dot11f_unpack_tlv_device_name(pCtx, |
| 10054 | pBufRemaining, len, |
| 10055 | (tDot11fTLVDeviceName *) |
| 10056 | (pFrm + pTlv->offset)); |
| 10057 | break; |
| 10058 | case SigTlvDevicePasswordID: |
| 10059 | status |= |
| 10060 | dot11f_unpack_tlv_common_func2(pCtx, |
| 10061 | pBufRemaining, len, |
| 10062 | (uint8_t *)&(((tDot11fTLVDevicePasswordID *) |
| 10063 | (pFrm + pTlv->offset))->present), |
| 10064 | (uint16_t *)&(((tDot11fTLVDevicePasswordID *) |
| 10065 | (pFrm + pTlv->offset))->id)); |
| 10066 | break; |
| 10067 | case SigTlvExtendedListenTiming: |
| 10068 | status |= |
| 10069 | dot11f_unpack_tlv_extended_listen_timing(pCtx, |
| 10070 | pBufRemaining, len, |
| 10071 | (tDot11fTLVExtendedListenTiming *) |
| 10072 | (pFrm + pTlv->offset)); |
| 10073 | break; |
| 10074 | case SigTlvListenChannel: |
| 10075 | status |= |
| 10076 | dot11f_unpack_tlv_listen_channel(pCtx, |
| 10077 | pBufRemaining, len, |
| 10078 | (tDot11fTLVListenChannel *) |
| 10079 | (pFrm + pTlv->offset)); |
| 10080 | break; |
| 10081 | case SigTlvManufacturer: |
| 10082 | status |= |
| 10083 | dot11f_unpack_tlv_manufacturer(pCtx, |
| 10084 | pBufRemaining, len, |
| 10085 | (tDot11fTLVManufacturer *) |
| 10086 | (pFrm + pTlv->offset)); |
| 10087 | break; |
| 10088 | case SigTlvMinorReasonCode: |
| 10089 | status |= |
| 10090 | dot11f_unpack_tlv_common_func(pCtx, |
| 10091 | pBufRemaining, len, |
| 10092 | (uint8_t *)&(((tDot11fTLVMinorReasonCode *) |
| 10093 | (pFrm + pTlv->offset))->present), |
| 10094 | (uint8_t *)&(((tDot11fTLVMinorReasonCode *) |
| 10095 | (pFrm + pTlv->offset))->minorReasonCode)); |
| 10096 | break; |
| 10097 | case SigTlvModelName: |
| 10098 | status |= |
| 10099 | dot11f_unpack_tlv_model_name(pCtx, |
| 10100 | pBufRemaining, len, |
| 10101 | (tDot11fTLVModelName *) |
| 10102 | (pFrm + pTlv->offset)); |
| 10103 | break; |
| 10104 | case SigTlvModelNumber: |
| 10105 | status |= |
| 10106 | dot11f_unpack_tlv_model_number(pCtx, |
| 10107 | pBufRemaining, len, |
| 10108 | (tDot11fTLVModelNumber *) |
| 10109 | (pFrm + pTlv->offset)); |
| 10110 | break; |
| 10111 | case SigTlvNoticeOfAbsence: |
| 10112 | status |= |
| 10113 | dot11f_unpack_tlv_notice_of_absence(pCtx, |
| 10114 | pBufRemaining, len, |
| 10115 | (tDot11fTLVNoticeOfAbsence *) |
| 10116 | (pFrm + pTlv->offset)); |
| 10117 | break; |
| 10118 | case SigTlvOperatingChannel: |
| 10119 | status |= |
| 10120 | dot11f_unpack_tlv_operating_channel(pCtx, |
| 10121 | pBufRemaining, len, |
| 10122 | (tDot11fTLVOperatingChannel *) |
| 10123 | (pFrm + pTlv->offset)); |
| 10124 | break; |
| 10125 | case SigTlvP2PCapability: |
| 10126 | status |= |
| 10127 | dot11f_unpack_tlv_p2_p_capability(pCtx, |
| 10128 | pBufRemaining, len, |
| 10129 | (tDot11fTLVP2PCapability *) |
| 10130 | (pFrm + pTlv->offset)); |
| 10131 | break; |
| 10132 | case SigTlvP2PDeviceId: |
| 10133 | status |= |
| 10134 | dot11f_unpack_tlv_p2_p_device_id(pCtx, |
| 10135 | pBufRemaining, len, |
| 10136 | (tDot11fTLVP2PDeviceId *) |
| 10137 | (pFrm + pTlv->offset)); |
| 10138 | break; |
| 10139 | case SigTlvP2PDeviceInfo: |
| 10140 | status |= |
| 10141 | dot11f_unpack_tlv_p2_p_device_info(pCtx, |
| 10142 | pBufRemaining, len, |
| 10143 | (tDot11fTLVP2PDeviceInfo *) |
| 10144 | (pFrm + pTlv->offset)); |
| 10145 | break; |
| 10146 | case SigTlvP2PGroupInfo: |
| 10147 | status |= |
| 10148 | dot11f_unpack_tlv_p2_p_group_info(pCtx, |
| 10149 | pBufRemaining, len, |
| 10150 | (tDot11fTLVP2PGroupInfo *) |
| 10151 | (pFrm + pTlv->offset)); |
| 10152 | break; |
| 10153 | case SigTlvP2PStatus: |
| 10154 | status |= |
| 10155 | dot11f_unpack_tlv_common_func(pCtx, |
| 10156 | pBufRemaining, len, |
| 10157 | (uint8_t *)&(((tDot11fTLVP2PStatus *) |
| 10158 | (pFrm + pTlv->offset))->present), |
| 10159 | (uint8_t *)&(((tDot11fTLVP2PStatus *) |
| 10160 | (pFrm + pTlv->offset))->status)); |
| 10161 | break; |
| 10162 | case SigTlvPrimaryDeviceType: |
| 10163 | status |= |
| 10164 | dot11f_unpack_tlv_primary_device_type(pCtx, |
| 10165 | pBufRemaining, len, |
| 10166 | (tDot11fTLVPrimaryDeviceType *) |
| 10167 | (pFrm + pTlv->offset)); |
| 10168 | break; |
| 10169 | case SigTlvRFBands: |
| 10170 | status |= |
| 10171 | dot11f_unpack_tlv_common_func(pCtx, |
| 10172 | pBufRemaining, len, |
| 10173 | (uint8_t *)&(((tDot11fTLVRFBands *) |
| 10174 | (pFrm + pTlv->offset))->present), |
| 10175 | (uint8_t *)&(((tDot11fTLVRFBands *) |
| 10176 | (pFrm + pTlv->offset))->bands)); |
| 10177 | break; |
| 10178 | case SigTlvRequestDeviceType: |
| 10179 | status |= |
| 10180 | dot11f_unpack_tlv_request_device_type(pCtx, |
| 10181 | pBufRemaining, len, |
| 10182 | (tDot11fTLVRequestDeviceType *) |
| 10183 | (pFrm + pTlv->offset)); |
| 10184 | break; |
| 10185 | case SigTlvRequestType: |
| 10186 | status |= |
| 10187 | dot11f_unpack_tlv_common_func(pCtx, |
| 10188 | pBufRemaining, len, |
| 10189 | (uint8_t *)&(((tDot11fTLVRequestType *) |
| 10190 | (pFrm + pTlv->offset))->present), |
| 10191 | (uint8_t *)&(((tDot11fTLVRequestType *) |
| 10192 | (pFrm + pTlv->offset))->reqType)); |
| 10193 | break; |
| 10194 | case SigTlvResponseType: |
| 10195 | status |= |
| 10196 | dot11f_unpack_tlv_common_func(pCtx, |
| 10197 | pBufRemaining, len, |
| 10198 | (uint8_t *)&(((tDot11fTLVResponseType *) |
| 10199 | (pFrm + pTlv->offset))->present), |
| 10200 | (uint8_t *)&(((tDot11fTLVResponseType *) |
| 10201 | (pFrm + pTlv->offset))->resType)); |
| 10202 | break; |
| 10203 | case SigTlvSelectedRegistrar: |
| 10204 | status |= |
| 10205 | dot11f_unpack_tlv_common_func(pCtx, |
| 10206 | pBufRemaining, len, |
| 10207 | (uint8_t *)&(((tDot11fTLVSelectedRegistrar *) |
| 10208 | (pFrm + pTlv->offset))->present), |
| 10209 | (uint8_t *)&(((tDot11fTLVSelectedRegistrar *) |
| 10210 | (pFrm + pTlv->offset))->selected)); |
| 10211 | break; |
| 10212 | case SigTlvSelectedRegistrarConfigMethods: |
| 10213 | status |= |
| 10214 | dot11f_unpack_tlv_common_func2(pCtx, |
| 10215 | pBufRemaining, len, |
| 10216 | (uint8_t *)&(((tDot11fTLVSelectedRegistrarConfigMethods *) |
| 10217 | (pFrm + pTlv->offset))->present), |
| 10218 | (uint16_t *)&(((tDot11fTLVSelectedRegistrarConfigMethods *) |
| 10219 | (pFrm + pTlv->offset))->methods)); |
| 10220 | break; |
| 10221 | case SigTlvSerialNumber: |
| 10222 | status |= |
| 10223 | dot11f_unpack_tlv_serial_number(pCtx, |
| 10224 | pBufRemaining, len, |
| 10225 | (tDot11fTLVSerialNumber *) |
| 10226 | (pFrm + pTlv->offset)); |
| 10227 | break; |
| 10228 | case SigTlvUUID_E: |
| 10229 | status |= |
| 10230 | dot11f_unpack_tlv_uuid_e(pCtx, |
| 10231 | pBufRemaining, len, |
| 10232 | (tDot11fTLVUUID_E *) |
| 10233 | (pFrm + pTlv->offset)); |
| 10234 | break; |
| 10235 | case SigTlvUUID_R: |
| 10236 | status |= |
| 10237 | dot11f_unpack_tlv_uuid_r(pCtx, |
| 10238 | pBufRemaining, len, |
| 10239 | (tDot11fTLVUUID_R *) |
| 10240 | (pFrm + pTlv->offset)); |
| 10241 | break; |
| 10242 | case SigTlvVendorExtension: |
| 10243 | status |= |
| 10244 | dot11f_unpack_tlv_vendor_extension(pCtx, |
| 10245 | pBufRemaining, len, |
| 10246 | (tDot11fTLVVendorExtension *) |
| 10247 | (pFrm + pTlv->offset)); |
| 10248 | break; |
| 10249 | case SigTlvVersion: |
| 10250 | status |= |
| 10251 | dot11f_unpack_tlv_version(pCtx, |
| 10252 | pBufRemaining, len, |
| 10253 | (tDot11fTLVVersion *) |
| 10254 | (pFrm + pTlv->offset)); |
| 10255 | break; |
| 10256 | case SigTlvWPSState: |
| 10257 | status |= |
| 10258 | dot11f_unpack_tlv_common_func(pCtx, |
| 10259 | pBufRemaining, len, |
| 10260 | (uint8_t *)&(((tDot11fTLVWPSState *) |
| 10261 | (pFrm + pTlv->offset))->present), |
| 10262 | (uint8_t *)&(((tDot11fTLVWPSState *) |
| 10263 | (pFrm + pTlv->offset))->state)); |
| 10264 | break; |
| 10265 | case SigTlvP2PInterface: |
| 10266 | status |= |
| 10267 | dot11f_unpack_tlv_p2_p_interface(pCtx, |
| 10268 | pBufRemaining, len, |
| 10269 | (tDot11fTLVP2PInterface *) |
| 10270 | (pFrm + pTlv->offset)); |
| 10271 | break; |
| 10272 | case SigTlvP2PManageability: |
| 10273 | status |= |
| 10274 | dot11f_unpack_tlv_common_func(pCtx, |
| 10275 | pBufRemaining, len, |
| 10276 | (uint8_t *)&(((tDot11fTLVP2PManageability *) |
| 10277 | (pFrm + pTlv->offset))->present), |
| 10278 | (uint8_t *)&(((tDot11fTLVP2PManageability *) |
| 10279 | (pFrm + pTlv->offset))->manageability)); |
| 10280 | break; |
| 10281 | default: |
| 10282 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR: I" |
| 10283 | " don't know about the TLV signature %d-- thi" |
| 10284 | "s is most likely a 'framesc' bug.\n"), |
| 10285 | pTlv->sig); |
| 10286 | FRAMES_DBG_BREAK(); |
| 10287 | return DOT11F_INTERNAL_ERROR; |
| 10288 | } /* End switch on sig. */ |
| 10289 | } /* End if on length check. */ |
| 10290 | |
| 10291 | } else { |
| 10292 | FRAMES_LOG2(pCtx, FRLOG3, FRFL("Skipping unknown TLV %d (" |
| 10293 | "length %d)\n"), id, len); |
| 10294 | FRAMES_DUMP(pCtx, FRLOG3, pBufRemaining - (pTlv->sType + pTlv->sLen), len); |
| 10295 | status |= DOT11F_UNKNOWN_TLVS; |
| 10296 | } |
| 10297 | |
| 10298 | /* Advance to the next TLV */ |
| 10299 | pBufRemaining += len; |
| 10300 | |
| 10301 | if (len > nBufRemaining) { |
| 10302 | FRAMES_LOG0(pCtx, FRLOGW, FRFL("This TLV extends past th" |
| 10303 | "e buffer as it was defined to us. This could mean " |
| 10304 | "a corrupt frame, or just an incorrect length parame" |
| 10305 | "ter.\n")); |
| 10306 | FRAMES_DBG_BREAK(); |
| 10307 | status |= DOT11F_LAST_TLV_TOO_LONG; |
| 10308 | goto MandatoryCheck; |
| 10309 | } |
| 10310 | |
| 10311 | nBufRemaining -= len; |
| 10312 | |
| 10313 | } /* End iteration over TLVs.*/ |
| 10314 | |
| 10315 | MandatoryCheck: |
| 10316 | pTlv = &TLVs[0]; |
| 10317 | while (0xffff != pTlv->id) { |
| 10318 | if (pTlv->fMandatory) { |
| 10319 | pfFound = (uint8_t *)(pFrm + pTlv->offset + |
| 10320 | pTlv->presenceOffset); |
| 10321 | if (!*pfFound) { |
| 10322 | FRAMES_LOG1(pCtx, FRLOGW, FRFL("ERROR: The mandatory " |
| 10323 | "TLV %s wasn't seen.\n"), |
| 10324 | pTlv->name); |
| 10325 | FRAMES_DBG_BREAK(); |
| 10326 | status |= DOT11F_MANDATORY_TLV_MISSING; |
| 10327 | } |
| 10328 | |
| 10329 | } |
| 10330 | ++pTlv; |
| 10331 | } |
| 10332 | |
| 10333 | return status; |
| 10334 | } /* End UnpacTlvkCore. */ |
| 10335 | uint32_t dot11f_get_packed_ietclas(tpAniSirGlobal pCtx, |
| 10336 | tDot11fIETCLAS *pIe, uint32_t *pnNeeded) |
| 10337 | { |
| 10338 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10339 | (void)pCtx; |
| 10340 | while (pIe->present) { |
| 10341 | *pnNeeded += 1; |
| 10342 | *pnNeeded += 1; |
| 10343 | *pnNeeded += 1; |
| 10344 | switch (pIe->classifier_type) { |
| 10345 | case 0: |
| 10346 | *pnNeeded += 6; |
| 10347 | *pnNeeded += 6; |
| 10348 | *pnNeeded += 2; |
| 10349 | break; |
| 10350 | case 1: |
| 10351 | *pnNeeded += 1; |
| 10352 | switch (pIe->info.IpParams.version) { |
| 10353 | case 4: |
| 10354 | *pnNeeded += 4; |
| 10355 | *pnNeeded += 4; |
| 10356 | *pnNeeded += 2; |
| 10357 | *pnNeeded += 2; |
| 10358 | *pnNeeded += 1; |
| 10359 | *pnNeeded += 1; |
| 10360 | *pnNeeded += 1; |
| 10361 | break; |
| 10362 | case 6: |
| 10363 | *pnNeeded += 16; |
| 10364 | *pnNeeded += 16; |
| 10365 | *pnNeeded += 2; |
| 10366 | *pnNeeded += 2; |
| 10367 | *pnNeeded += 3; |
| 10368 | break; |
| 10369 | } |
| 10370 | break; |
| 10371 | case 2: |
| 10372 | *pnNeeded += 2; |
| 10373 | break; |
| 10374 | } |
| 10375 | break; |
| 10376 | } |
| 10377 | return status; |
| 10378 | } /* End dot11f_get_packed_ietclas. */ |
| 10379 | |
| 10380 | uint32_t dot11f_get_packed_iewmmtclas(tpAniSirGlobal pCtx, |
| 10381 | tDot11fIEWMMTCLAS *pIe, uint32_t *pnNeeded) |
| 10382 | { |
| 10383 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10384 | (void)pCtx; |
| 10385 | while (pIe->present) { |
| 10386 | *pnNeeded += 1; |
| 10387 | *pnNeeded += 1; |
| 10388 | *pnNeeded += 1; |
| 10389 | *pnNeeded += 1; |
| 10390 | switch (pIe->classifier_type) { |
| 10391 | case 0: |
| 10392 | *pnNeeded += 6; |
| 10393 | *pnNeeded += 6; |
| 10394 | *pnNeeded += 2; |
| 10395 | break; |
| 10396 | case 1: |
| 10397 | *pnNeeded += 1; |
| 10398 | switch (pIe->info.IpParams.version) { |
| 10399 | case 4: |
| 10400 | *pnNeeded += 4; |
| 10401 | *pnNeeded += 4; |
| 10402 | *pnNeeded += 2; |
| 10403 | *pnNeeded += 2; |
| 10404 | *pnNeeded += 1; |
| 10405 | *pnNeeded += 1; |
| 10406 | *pnNeeded += 1; |
| 10407 | break; |
| 10408 | case 6: |
| 10409 | *pnNeeded += 16; |
| 10410 | *pnNeeded += 16; |
| 10411 | *pnNeeded += 2; |
| 10412 | *pnNeeded += 2; |
| 10413 | *pnNeeded += 3; |
| 10414 | break; |
| 10415 | } |
| 10416 | break; |
| 10417 | case 2: |
| 10418 | *pnNeeded += 2; |
| 10419 | break; |
| 10420 | } |
| 10421 | break; |
| 10422 | } |
| 10423 | return status; |
| 10424 | } /* End dot11f_get_packed_iewmmtclas. */ |
| 10425 | |
| 10426 | uint32_t dot11f_get_packed_ie_channel_switch_wrapper(tpAniSirGlobal pCtx, |
| 10427 | tDot11fIEChannelSwitchWrapper *pIe, uint32_t *pnNeeded) |
| 10428 | { |
| 10429 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10430 | (void)pCtx; |
| 10431 | while (pIe->present) { |
| 10432 | status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10433 | IES_ChannelSwitchWrapper); |
| 10434 | break; |
| 10435 | } |
| 10436 | return status; |
| 10437 | } /* End dot11f_get_packed_ie_channel_switch_wrapper. */ |
| 10438 | |
| 10439 | uint32_t dot11f_get_packed_ie_country(tpAniSirGlobal pCtx, |
| 10440 | tDot11fIECountry *pIe, uint32_t *pnNeeded) |
| 10441 | { |
| 10442 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10443 | (void)pCtx; |
| 10444 | while (pIe->present) { |
| 10445 | *pnNeeded += 3; |
| 10446 | if (pIe->num_triplets) { |
| 10447 | *pnNeeded += (pIe->num_triplets * 3); |
| 10448 | } else { |
| 10449 | break; |
| 10450 | } |
| 10451 | break; |
| 10452 | } |
| 10453 | return status; |
| 10454 | } /* End dot11f_get_packed_ie_country. */ |
| 10455 | |
| 10456 | uint32_t dot11f_get_packed_ieft_info(tpAniSirGlobal pCtx, |
| 10457 | tDot11fIEFTInfo *pIe, uint32_t *pnNeeded) |
| 10458 | { |
| 10459 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10460 | (void)pCtx; |
| 10461 | while (pIe->present) { |
| 10462 | *pnNeeded += 2; |
| 10463 | *pnNeeded += 16; |
| 10464 | *pnNeeded += 32; |
| 10465 | *pnNeeded += 32; |
| 10466 | status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10467 | IES_FTInfo); |
| 10468 | break; |
| 10469 | } |
| 10470 | return status; |
| 10471 | } /* End dot11f_get_packed_ieft_info. */ |
| 10472 | |
| 10473 | uint32_t dot11f_get_packed_ie_measurement_report(tpAniSirGlobal pCtx, |
| 10474 | tDot11fIEMeasurementReport *pIe, uint32_t *pnNeeded) |
| 10475 | { |
| 10476 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10477 | (void)pCtx; |
| 10478 | while (pIe->present) { |
| 10479 | *pnNeeded += 1; |
| 10480 | *pnNeeded += 1; |
| 10481 | *pnNeeded += 1; |
| 10482 | if (pIe->type) { |
| 10483 | switch (pIe->type) { |
| 10484 | case 0: |
| 10485 | *pnNeeded += 1; |
| 10486 | *pnNeeded += 8; |
| 10487 | *pnNeeded += 2; |
| 10488 | *pnNeeded += 1; |
| 10489 | break; |
| 10490 | case 1: |
| 10491 | *pnNeeded += 1; |
| 10492 | *pnNeeded += 8; |
| 10493 | *pnNeeded += 2; |
| 10494 | *pnNeeded += 1; |
| 10495 | break; |
| 10496 | case 2: |
| 10497 | *pnNeeded += 1; |
| 10498 | *pnNeeded += 8; |
| 10499 | *pnNeeded += 2; |
| 10500 | *pnNeeded += 1; |
| 10501 | *pnNeeded += 1; |
| 10502 | *pnNeeded += 1; |
| 10503 | *pnNeeded += 1; |
| 10504 | *pnNeeded += 1; |
| 10505 | *pnNeeded += 1; |
| 10506 | *pnNeeded += 1; |
| 10507 | *pnNeeded += 1; |
| 10508 | break; |
| 10509 | case 5: |
| 10510 | *pnNeeded += 1; |
| 10511 | *pnNeeded += 1; |
| 10512 | *pnNeeded += 8; |
| 10513 | *pnNeeded += 2; |
| 10514 | *pnNeeded += 1; |
| 10515 | *pnNeeded += 1; |
| 10516 | *pnNeeded += 1; |
| 10517 | *pnNeeded += 6; |
| 10518 | *pnNeeded += 1; |
| 10519 | *pnNeeded += 4; |
| 10520 | status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, IES_reportBeacon); |
| 10521 | break; |
| 10522 | } |
| 10523 | } else { |
| 10524 | break; |
| 10525 | } |
| 10526 | break; |
| 10527 | } |
| 10528 | return status; |
| 10529 | } /* End dot11f_get_packed_ie_measurement_report. */ |
| 10530 | |
| 10531 | uint32_t dot11f_get_packed_ie_measurement_request(tpAniSirGlobal pCtx, |
| 10532 | tDot11fIEMeasurementRequest *pIe, uint32_t *pnNeeded) |
| 10533 | { |
| 10534 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10535 | (void)pCtx; |
| 10536 | while (pIe->present) { |
| 10537 | *pnNeeded += 1; |
| 10538 | *pnNeeded += 1; |
| 10539 | *pnNeeded += 1; |
| 10540 | switch (pIe->measurement_type) { |
| 10541 | case 0: |
| 10542 | *pnNeeded += 1; |
| 10543 | *pnNeeded += 8; |
| 10544 | *pnNeeded += 2; |
| 10545 | break; |
| 10546 | case 1: |
| 10547 | *pnNeeded += 1; |
| 10548 | *pnNeeded += 8; |
| 10549 | *pnNeeded += 2; |
| 10550 | break; |
| 10551 | case 2: |
| 10552 | *pnNeeded += 1; |
| 10553 | *pnNeeded += 8; |
| 10554 | *pnNeeded += 2; |
| 10555 | break; |
| 10556 | case 5: |
| 10557 | *pnNeeded += 1; |
| 10558 | *pnNeeded += 1; |
| 10559 | *pnNeeded += 2; |
| 10560 | *pnNeeded += 2; |
| 10561 | *pnNeeded += 1; |
| 10562 | *pnNeeded += 6; |
| 10563 | status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, IES_measurement_requestBeacon); |
| 10564 | break; |
| 10565 | } |
| 10566 | break; |
| 10567 | } |
| 10568 | return status; |
| 10569 | } /* End dot11f_get_packed_ie_measurement_request. */ |
| 10570 | |
| 10571 | uint32_t dot11f_get_packed_ie_neighbor_report(tpAniSirGlobal pCtx, |
| 10572 | tDot11fIENeighborReport *pIe, uint32_t *pnNeeded) |
| 10573 | { |
| 10574 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10575 | (void)pCtx; |
| 10576 | while (pIe->present) { |
| 10577 | *pnNeeded += 6; |
| 10578 | *pnNeeded += 1; |
| 10579 | *pnNeeded += 1; |
| 10580 | *pnNeeded += 2; |
| 10581 | *pnNeeded += 1; |
| 10582 | *pnNeeded += 1; |
| 10583 | *pnNeeded += 1; |
| 10584 | status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10585 | IES_NeighborReport); |
| 10586 | break; |
| 10587 | } |
| 10588 | return status; |
| 10589 | } /* End dot11f_get_packed_ie_neighbor_report. */ |
| 10590 | |
| 10591 | uint32_t dot11f_get_packed_iep2_p_assoc_req(tpAniSirGlobal pCtx, |
| 10592 | tDot11fIEP2PAssocReq *pIe, uint32_t *pnNeeded) |
| 10593 | { |
| 10594 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10595 | (void)pCtx; |
| 10596 | while (pIe->present) { |
| 10597 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10598 | TLVS_P2PAssocReq); |
| 10599 | break; |
| 10600 | } |
| 10601 | return status; |
| 10602 | } /* End dot11f_get_packed_iep2_p_assoc_req. */ |
| 10603 | |
| 10604 | uint32_t dot11f_get_packed_iep2_p_assoc_res(tpAniSirGlobal pCtx, |
| 10605 | tDot11fIEP2PAssocRes *pIe, uint32_t *pnNeeded) |
| 10606 | { |
| 10607 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10608 | (void)pCtx; |
| 10609 | while (pIe->present) { |
| 10610 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10611 | TLVS_P2PAssocRes); |
| 10612 | break; |
| 10613 | } |
| 10614 | return status; |
| 10615 | } /* End dot11f_get_packed_iep2_p_assoc_res. */ |
| 10616 | |
| 10617 | uint32_t dot11f_get_packed_iep2_p_beacon(tpAniSirGlobal pCtx, |
| 10618 | tDot11fIEP2PBeacon *pIe, uint32_t *pnNeeded) |
| 10619 | { |
| 10620 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10621 | (void)pCtx; |
| 10622 | while (pIe->present) { |
| 10623 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10624 | TLVS_P2PBeacon); |
| 10625 | break; |
| 10626 | } |
| 10627 | return status; |
| 10628 | } /* End dot11f_get_packed_iep2_p_beacon. */ |
| 10629 | |
| 10630 | uint32_t dot11f_get_packed_iep2_p_beacon_probe_res(tpAniSirGlobal pCtx, |
| 10631 | tDot11fIEP2PBeaconProbeRes *pIe, uint32_t *pnNeeded) |
| 10632 | { |
| 10633 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10634 | (void)pCtx; |
| 10635 | while (pIe->present) { |
| 10636 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10637 | TLVS_P2PBeaconProbeRes); |
| 10638 | break; |
| 10639 | } |
| 10640 | return status; |
| 10641 | } /* End dot11f_get_packed_iep2_p_beacon_probe_res. */ |
| 10642 | |
| 10643 | uint32_t dot11f_get_packed_iep2_p_de_auth(tpAniSirGlobal pCtx, |
| 10644 | tDot11fIEP2PDeAuth *pIe, uint32_t *pnNeeded) |
| 10645 | { |
| 10646 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10647 | (void)pCtx; |
| 10648 | while (pIe->present) { |
| 10649 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10650 | TLVS_P2PDeAuth); |
| 10651 | break; |
| 10652 | } |
| 10653 | return status; |
| 10654 | } /* End dot11f_get_packed_iep2_p_de_auth. */ |
| 10655 | |
| 10656 | uint32_t dot11f_get_packed_iep2_p_dis_assoc(tpAniSirGlobal pCtx, |
| 10657 | tDot11fIEP2PDisAssoc *pIe, uint32_t *pnNeeded) |
| 10658 | { |
| 10659 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10660 | (void)pCtx; |
| 10661 | while (pIe->present) { |
| 10662 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10663 | TLVS_P2PDisAssoc); |
| 10664 | break; |
| 10665 | } |
| 10666 | return status; |
| 10667 | } /* End dot11f_get_packed_iep2_p_dis_assoc. */ |
| 10668 | |
| 10669 | uint32_t dot11f_get_packed_iep2_p_probe_req(tpAniSirGlobal pCtx, |
| 10670 | tDot11fIEP2PProbeReq *pIe, uint32_t *pnNeeded) |
| 10671 | { |
| 10672 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10673 | (void)pCtx; |
| 10674 | while (pIe->present) { |
| 10675 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10676 | TLVS_P2PProbeReq); |
| 10677 | break; |
| 10678 | } |
| 10679 | return status; |
| 10680 | } /* End dot11f_get_packed_iep2_p_probe_req. */ |
| 10681 | |
| 10682 | uint32_t dot11f_get_packed_iep2_p_probe_res(tpAniSirGlobal pCtx, |
| 10683 | tDot11fIEP2PProbeRes *pIe, uint32_t *pnNeeded) |
| 10684 | { |
| 10685 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10686 | (void)pCtx; |
| 10687 | while (pIe->present) { |
| 10688 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10689 | TLVS_P2PProbeRes); |
| 10690 | break; |
| 10691 | } |
| 10692 | return status; |
| 10693 | } /* End dot11f_get_packed_iep2_p_probe_res. */ |
| 10694 | |
| 10695 | uint32_t dot11f_get_packed_ieric_data_desc(tpAniSirGlobal pCtx, |
| 10696 | tDot11fIERICDataDesc *pIe, uint32_t *pnNeeded) |
| 10697 | { |
| 10698 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10699 | (void)pCtx; |
| 10700 | while (pIe->present) { |
| 10701 | status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10702 | IES_RICDataDesc); |
| 10703 | break; |
| 10704 | } |
| 10705 | return status; |
| 10706 | } /* End dot11f_get_packed_ieric_data_desc. */ |
| 10707 | |
| 10708 | uint32_t dot11f_get_packed_iersn(tpAniSirGlobal pCtx, |
| 10709 | tDot11fIERSN *pIe, uint32_t *pnNeeded) |
| 10710 | { |
| 10711 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10712 | (void)pCtx; |
| 10713 | while (pIe->present) { |
| 10714 | *pnNeeded += 2; |
| 10715 | *pnNeeded += 4; |
| 10716 | if (pIe->pwise_cipher_suite_count) { |
| 10717 | *pnNeeded += 2; |
| 10718 | } else { |
| 10719 | break; |
| 10720 | } |
| 10721 | *pnNeeded += (pIe->pwise_cipher_suite_count * 4); |
| 10722 | if (pIe->akm_suite_count) { |
| 10723 | *pnNeeded += 2; |
| 10724 | } else { |
| 10725 | break; |
| 10726 | } |
| 10727 | *pnNeeded += (pIe->akm_suite_count * 4); |
| 10728 | if (pIe->RSN_Cap) { |
| 10729 | *pnNeeded += 2; |
| 10730 | } else { |
| 10731 | break; |
| 10732 | } |
| 10733 | if (pIe->pmkid_count) { |
| 10734 | *pnNeeded += 2; |
| 10735 | } else { |
| 10736 | break; |
| 10737 | } |
| 10738 | *pnNeeded += (pIe->pmkid_count * 16); |
| 10739 | if (pIe->gp_mgmt_cipher_suite) { |
| 10740 | *pnNeeded += 4; |
| 10741 | } else { |
| 10742 | break; |
| 10743 | } |
| 10744 | break; |
| 10745 | } |
| 10746 | return status; |
| 10747 | } /* End dot11f_get_packed_iersn. */ |
| 10748 | |
| 10749 | uint32_t dot11f_get_packed_iewapi(tpAniSirGlobal pCtx, |
| 10750 | tDot11fIEWAPI *pIe, uint32_t *pnNeeded) |
| 10751 | { |
| 10752 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10753 | (void)pCtx; |
| 10754 | while (pIe->present) { |
| 10755 | *pnNeeded += 2; |
| 10756 | *pnNeeded += 2; |
| 10757 | *pnNeeded += (pIe->akm_suite_count * 4); |
| 10758 | *pnNeeded += 2; |
| 10759 | *pnNeeded += (pIe->unicast_cipher_suite_count * 4); |
| 10760 | *pnNeeded += 4; |
| 10761 | *pnNeeded += 2; |
| 10762 | if (pIe->bkid_count) { |
| 10763 | *pnNeeded += 2; |
| 10764 | } else { |
| 10765 | break; |
| 10766 | } |
| 10767 | *pnNeeded += (pIe->bkid_count * 16); |
| 10768 | break; |
| 10769 | } |
| 10770 | return status; |
| 10771 | } /* End dot11f_get_packed_iewapi. */ |
| 10772 | |
| 10773 | uint32_t dot11f_get_packed_iewpa(tpAniSirGlobal pCtx, |
| 10774 | tDot11fIEWPA *pIe, uint32_t *pnNeeded) |
| 10775 | { |
| 10776 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10777 | (void)pCtx; |
| 10778 | while (pIe->present) { |
| 10779 | *pnNeeded += 2; |
| 10780 | if (pIe->multicast_cipher_present) { |
| 10781 | |
| 10782 | *pnNeeded += 4; |
| 10783 | } else { |
| 10784 | break; |
| 10785 | } |
| 10786 | if (pIe->unicast_cipher_count) { |
| 10787 | *pnNeeded += 2; |
| 10788 | } else { |
| 10789 | break; |
| 10790 | } |
| 10791 | *pnNeeded += (pIe->unicast_cipher_count * 4); |
| 10792 | if (pIe->auth_suite_count) { |
| 10793 | *pnNeeded += 2; |
| 10794 | } else { |
| 10795 | break; |
| 10796 | } |
| 10797 | *pnNeeded += (pIe->auth_suite_count * 4); |
| 10798 | if (pIe->caps) { |
| 10799 | *pnNeeded += 2; |
| 10800 | } else { |
| 10801 | break; |
| 10802 | } |
| 10803 | break; |
| 10804 | } |
| 10805 | return status; |
| 10806 | } /* End dot11f_get_packed_iewpa. */ |
| 10807 | |
| 10808 | uint32_t dot11f_get_packed_iewsc(tpAniSirGlobal pCtx, |
| 10809 | tDot11fIEWSC *pIe, uint32_t *pnNeeded) |
| 10810 | { |
| 10811 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10812 | (void)pCtx; |
| 10813 | while (pIe->present) { |
| 10814 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10815 | TLVS_WSC); |
| 10816 | break; |
| 10817 | } |
| 10818 | return status; |
| 10819 | } /* End dot11f_get_packed_iewsc. */ |
| 10820 | |
| 10821 | uint32_t dot11f_get_packed_ie_wsc_assoc_req(tpAniSirGlobal pCtx, |
| 10822 | tDot11fIEWscAssocReq *pIe, uint32_t *pnNeeded) |
| 10823 | { |
| 10824 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10825 | (void)pCtx; |
| 10826 | while (pIe->present) { |
| 10827 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10828 | TLVS_WscAssocReq); |
| 10829 | break; |
| 10830 | } |
| 10831 | return status; |
| 10832 | } /* End dot11f_get_packed_ie_wsc_assoc_req. */ |
| 10833 | |
| 10834 | uint32_t dot11f_get_packed_ie_wsc_assoc_res(tpAniSirGlobal pCtx, |
| 10835 | tDot11fIEWscAssocRes *pIe, uint32_t *pnNeeded) |
| 10836 | { |
| 10837 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10838 | (void)pCtx; |
| 10839 | while (pIe->present) { |
| 10840 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10841 | TLVS_WscAssocRes); |
| 10842 | break; |
| 10843 | } |
| 10844 | return status; |
| 10845 | } /* End dot11f_get_packed_ie_wsc_assoc_res. */ |
| 10846 | |
| 10847 | uint32_t dot11f_get_packed_ie_wsc_beacon(tpAniSirGlobal pCtx, |
| 10848 | tDot11fIEWscBeacon *pIe, uint32_t *pnNeeded) |
| 10849 | { |
| 10850 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10851 | (void)pCtx; |
| 10852 | while (pIe->present) { |
| 10853 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10854 | TLVS_WscBeacon); |
| 10855 | break; |
| 10856 | } |
| 10857 | return status; |
| 10858 | } /* End dot11f_get_packed_ie_wsc_beacon. */ |
| 10859 | |
| 10860 | uint32_t dot11f_get_packed_ie_wsc_beacon_probe_res(tpAniSirGlobal pCtx, |
| 10861 | tDot11fIEWscBeaconProbeRes *pIe, uint32_t *pnNeeded) |
| 10862 | { |
| 10863 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10864 | (void)pCtx; |
| 10865 | while (pIe->present) { |
| 10866 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10867 | TLVS_WscBeaconProbeRes); |
| 10868 | break; |
| 10869 | } |
| 10870 | return status; |
| 10871 | } /* End dot11f_get_packed_ie_wsc_beacon_probe_res. */ |
| 10872 | |
| 10873 | uint32_t dot11f_get_packed_ie_wsc_probe_req(tpAniSirGlobal pCtx, |
| 10874 | tDot11fIEWscProbeReq *pIe, uint32_t *pnNeeded) |
| 10875 | { |
| 10876 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10877 | (void)pCtx; |
| 10878 | while (pIe->present) { |
| 10879 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10880 | TLVS_WscProbeReq); |
| 10881 | break; |
| 10882 | } |
| 10883 | return status; |
| 10884 | } /* End dot11f_get_packed_ie_wsc_probe_req. */ |
| 10885 | |
| 10886 | uint32_t dot11f_get_packed_ie_wsc_probe_res(tpAniSirGlobal pCtx, |
| 10887 | tDot11fIEWscProbeRes *pIe, uint32_t *pnNeeded) |
| 10888 | { |
| 10889 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10890 | (void)pCtx; |
| 10891 | while (pIe->present) { |
| 10892 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10893 | TLVS_WscProbeRes); |
| 10894 | break; |
| 10895 | } |
| 10896 | return status; |
| 10897 | } /* End dot11f_get_packed_ie_wsc_probe_res. */ |
| 10898 | |
| 10899 | uint32_t dot11f_get_packed_ie_wsc_reassoc_res(tpAniSirGlobal pCtx, |
| 10900 | tDot11fIEWscReassocRes *pIe, uint32_t *pnNeeded) |
| 10901 | { |
| 10902 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10903 | (void)pCtx; |
| 10904 | while (pIe->present) { |
| 10905 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10906 | TLVS_WscReassocRes); |
| 10907 | break; |
| 10908 | } |
| 10909 | return status; |
| 10910 | } /* End dot11f_get_packed_ie_wsc_reassoc_res. */ |
| 10911 | |
| 10912 | uint32_t dot11f_get_packed_ie_vendor2_ie(tpAniSirGlobal pCtx, |
| 10913 | tDot11fIEvendor2_ie *pIe, uint32_t *pnNeeded) |
| 10914 | { |
| 10915 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 10916 | (void)pCtx; |
| 10917 | while (pIe->present) { |
| 10918 | *pnNeeded += 1; |
| 10919 | *pnNeeded += 1; |
| 10920 | status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, |
| 10921 | IES_vendor2_ie); |
| 10922 | break; |
| 10923 | } |
| 10924 | return status; |
| 10925 | } /* End dot11f_get_packed_ie_vendor2_ie. */ |
| 10926 | |
| 10927 | uint32_t dot11f_get_packed_add_ts_request_size(tpAniSirGlobal pCtx, |
| 10928 | tDot11fAddTSRequest *pFrm, uint32_t *pnNeeded) |
| 10929 | { |
| 10930 | uint32_t status = 0; |
| 10931 | *pnNeeded = 3; |
| 10932 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 10933 | IES_AddTSRequest); |
| 10934 | return status; |
| 10935 | } /* End dot11f_get_packed_add_ts_request_size. */ |
| 10936 | |
| 10937 | uint32_t dot11f_get_packed_add_ts_response_size(tpAniSirGlobal pCtx, |
| 10938 | tDot11fAddTSResponse *pFrm, uint32_t *pnNeeded) |
| 10939 | { |
| 10940 | uint32_t status = 0; |
| 10941 | *pnNeeded = 5; |
| 10942 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 10943 | IES_AddTSResponse); |
| 10944 | return status; |
| 10945 | } /* End dot11f_get_packed_add_ts_response_size. */ |
| 10946 | |
| 10947 | uint32_t dot11f_get_packed_assoc_request_size(tpAniSirGlobal pCtx, |
| 10948 | tDot11fAssocRequest *pFrm, uint32_t *pnNeeded) |
| 10949 | { |
| 10950 | uint32_t status = 0; |
| 10951 | *pnNeeded = 4; |
| 10952 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 10953 | IES_AssocRequest); |
| 10954 | return status; |
| 10955 | } /* End dot11f_get_packed_assoc_request_size. */ |
| 10956 | |
| 10957 | uint32_t dot11f_get_packed_assoc_response_size(tpAniSirGlobal pCtx, |
| 10958 | tDot11fAssocResponse *pFrm, uint32_t *pnNeeded) |
| 10959 | { |
| 10960 | uint32_t status = 0; |
| 10961 | *pnNeeded = 6; |
| 10962 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 10963 | IES_AssocResponse); |
| 10964 | return status; |
| 10965 | } /* End dot11f_get_packed_assoc_response_size. */ |
| 10966 | |
| 10967 | uint32_t dot11f_get_packed_authentication_size(tpAniSirGlobal pCtx, |
| 10968 | tDot11fAuthentication *pFrm, uint32_t *pnNeeded) |
| 10969 | { |
| 10970 | uint32_t status = 0; |
| 10971 | *pnNeeded = 6; |
| 10972 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 10973 | IES_Authentication); |
| 10974 | return status; |
| 10975 | } /* End dot11f_get_packed_authentication_size. */ |
| 10976 | |
| 10977 | uint32_t dot11f_get_packed_beacon_size(tpAniSirGlobal pCtx, |
| 10978 | tDot11fBeacon *pFrm, uint32_t *pnNeeded) |
| 10979 | { |
| 10980 | uint32_t status = 0; |
| 10981 | *pnNeeded = 12; |
| 10982 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 10983 | IES_Beacon); |
| 10984 | return status; |
| 10985 | } /* End dot11f_get_packed_beacon_size. */ |
| 10986 | |
| 10987 | uint32_t dot11f_get_packed_beacon1_size(tpAniSirGlobal pCtx, |
| 10988 | tDot11fBeacon1 *pFrm, uint32_t *pnNeeded) |
| 10989 | { |
| 10990 | uint32_t status = 0; |
| 10991 | *pnNeeded = 12; |
| 10992 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 10993 | IES_Beacon1); |
| 10994 | return status; |
| 10995 | } /* End dot11f_get_packed_beacon1_size. */ |
| 10996 | |
| 10997 | uint32_t dot11f_get_packed_beacon2_size(tpAniSirGlobal pCtx, |
| 10998 | tDot11fBeacon2 *pFrm, uint32_t *pnNeeded) |
| 10999 | { |
| 11000 | uint32_t status = 0; |
| 11001 | *pnNeeded = 0; |
| 11002 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11003 | IES_Beacon2); |
| 11004 | return status; |
| 11005 | } /* End dot11f_get_packed_beacon2_size. */ |
| 11006 | |
| 11007 | uint32_t dot11f_get_packed_beacon_i_es_size(tpAniSirGlobal pCtx, |
| 11008 | tDot11fBeaconIEs *pFrm, uint32_t *pnNeeded) |
| 11009 | { |
| 11010 | uint32_t status = 0; |
| 11011 | *pnNeeded = 0; |
| 11012 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11013 | IES_BeaconIEs); |
| 11014 | return status; |
| 11015 | } /* End dot11f_get_packed_beacon_i_es_size. */ |
| 11016 | |
| 11017 | uint32_t dot11f_get_packed_channel_switch_size(tpAniSirGlobal pCtx, |
| 11018 | tDot11fChannelSwitch *pFrm, uint32_t *pnNeeded) |
| 11019 | { |
| 11020 | uint32_t status = 0; |
| 11021 | *pnNeeded = 2; |
| 11022 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11023 | IES_ChannelSwitch); |
| 11024 | return status; |
| 11025 | } /* End dot11f_get_packed_channel_switch_size. */ |
| 11026 | |
| 11027 | uint32_t dot11f_get_packed_de_auth_size(tpAniSirGlobal pCtx, |
| 11028 | tDot11fDeAuth *pFrm, uint32_t *pnNeeded) |
| 11029 | { |
| 11030 | uint32_t status = 0; |
| 11031 | *pnNeeded = 2; |
| 11032 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11033 | IES_DeAuth); |
| 11034 | return status; |
| 11035 | } /* End dot11f_get_packed_de_auth_size. */ |
| 11036 | |
| 11037 | uint32_t dot11f_get_packed_del_ts_size(tpAniSirGlobal pCtx, |
| 11038 | tDot11fDelTS *pFrm, uint32_t *pnNeeded) |
| 11039 | { |
| 11040 | uint32_t status = 0; |
| 11041 | *pnNeeded = 7; |
| 11042 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11043 | IES_DelTS); |
| 11044 | return status; |
| 11045 | } /* End dot11f_get_packed_del_ts_size. */ |
| 11046 | |
| 11047 | uint32_t dot11f_get_packed_disassociation_size(tpAniSirGlobal pCtx, |
| 11048 | tDot11fDisassociation *pFrm, uint32_t *pnNeeded) |
| 11049 | { |
| 11050 | uint32_t status = 0; |
| 11051 | *pnNeeded = 2; |
| 11052 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11053 | IES_Disassociation); |
| 11054 | return status; |
| 11055 | } /* End dot11f_get_packed_disassociation_size. */ |
| 11056 | |
| 11057 | uint32_t dot11f_get_packed_link_measurement_report_size(tpAniSirGlobal pCtx, |
| 11058 | tDot11fLinkMeasurementReport *pFrm, uint32_t *pnNeeded) |
| 11059 | { |
| 11060 | uint32_t status = 0; |
| 11061 | *pnNeeded = 11; |
| 11062 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11063 | IES_LinkMeasurementReport); |
| 11064 | return status; |
| 11065 | } /* End dot11f_get_packed_link_measurement_report_size. */ |
| 11066 | |
| 11067 | uint32_t dot11f_get_packed_link_measurement_request_size(tpAniSirGlobal pCtx, |
| 11068 | tDot11fLinkMeasurementRequest *pFrm, uint32_t *pnNeeded) |
| 11069 | { |
| 11070 | uint32_t status = 0; |
| 11071 | *pnNeeded = 5; |
| 11072 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11073 | IES_LinkMeasurementRequest); |
| 11074 | return status; |
| 11075 | } /* End dot11f_get_packed_link_measurement_request_size. */ |
| 11076 | |
| 11077 | uint32_t dot11f_get_packed_measurement_report_size(tpAniSirGlobal pCtx, |
| 11078 | tDot11fMeasurementReport *pFrm, uint32_t *pnNeeded) |
| 11079 | { |
| 11080 | uint32_t status = 0; |
| 11081 | *pnNeeded = 3; |
| 11082 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11083 | IES_MeasurementReport); |
| 11084 | return status; |
| 11085 | } /* End dot11f_get_packed_measurement_report_size. */ |
| 11086 | |
| 11087 | uint32_t dot11f_get_packed_measurement_request_size(tpAniSirGlobal pCtx, |
| 11088 | tDot11fMeasurementRequest *pFrm, uint32_t *pnNeeded) |
| 11089 | { |
| 11090 | uint32_t status = 0; |
| 11091 | *pnNeeded = 3; |
| 11092 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11093 | IES_MeasurementRequest); |
| 11094 | return status; |
| 11095 | } /* End dot11f_get_packed_measurement_request_size. */ |
| 11096 | |
| 11097 | uint32_t dot11f_get_packed_neighbor_report_request_size(tpAniSirGlobal pCtx, |
| 11098 | tDot11fNeighborReportRequest *pFrm, uint32_t *pnNeeded) |
| 11099 | { |
| 11100 | uint32_t status = 0; |
| 11101 | *pnNeeded = 3; |
| 11102 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11103 | IES_NeighborReportRequest); |
| 11104 | return status; |
| 11105 | } /* End dot11f_get_packed_neighbor_report_request_size. */ |
| 11106 | |
| 11107 | uint32_t dot11f_get_packed_neighbor_report_response_size(tpAniSirGlobal pCtx, |
| 11108 | tDot11fNeighborReportResponse *pFrm, uint32_t *pnNeeded) |
| 11109 | { |
| 11110 | uint32_t status = 0; |
| 11111 | *pnNeeded = 3; |
| 11112 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11113 | IES_NeighborReportResponse); |
| 11114 | return status; |
| 11115 | } /* End dot11f_get_packed_neighbor_report_response_size. */ |
| 11116 | |
| 11117 | uint32_t dot11f_get_packed_operating_mode_size(tpAniSirGlobal pCtx, |
| 11118 | tDot11fOperatingMode *pFrm, uint32_t *pnNeeded) |
| 11119 | { |
| 11120 | uint32_t status = 0; |
| 11121 | *pnNeeded = 3; |
| 11122 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11123 | IES_OperatingMode); |
| 11124 | return status; |
| 11125 | } /* End dot11f_get_packed_operating_mode_size. */ |
| 11126 | |
| 11127 | uint32_t dot11f_get_packed_probe_request_size(tpAniSirGlobal pCtx, |
| 11128 | tDot11fProbeRequest *pFrm, uint32_t *pnNeeded) |
| 11129 | { |
| 11130 | uint32_t status = 0; |
| 11131 | *pnNeeded = 0; |
| 11132 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11133 | IES_ProbeRequest); |
| 11134 | return status; |
| 11135 | } /* End dot11f_get_packed_probe_request_size. */ |
| 11136 | |
| 11137 | uint32_t dot11f_get_packed_probe_response_size(tpAniSirGlobal pCtx, |
| 11138 | tDot11fProbeResponse *pFrm, uint32_t *pnNeeded) |
| 11139 | { |
| 11140 | uint32_t status = 0; |
| 11141 | *pnNeeded = 12; |
| 11142 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11143 | IES_ProbeResponse); |
| 11144 | return status; |
| 11145 | } /* End dot11f_get_packed_probe_response_size. */ |
| 11146 | |
| 11147 | uint32_t dot11f_get_packed_qos_map_configure_size(tpAniSirGlobal pCtx, |
| 11148 | tDot11fQosMapConfigure *pFrm, uint32_t *pnNeeded) |
| 11149 | { |
| 11150 | uint32_t status = 0; |
| 11151 | *pnNeeded = 2; |
| 11152 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11153 | IES_QosMapConfigure); |
| 11154 | return status; |
| 11155 | } /* End dot11f_get_packed_qos_map_configure_size. */ |
| 11156 | |
| 11157 | uint32_t dot11f_get_packed_radio_measurement_report_size(tpAniSirGlobal pCtx, |
| 11158 | tDot11fRadioMeasurementReport *pFrm, uint32_t *pnNeeded) |
| 11159 | { |
| 11160 | uint32_t status = 0; |
| 11161 | *pnNeeded = 3; |
| 11162 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11163 | IES_RadioMeasurementReport); |
| 11164 | return status; |
| 11165 | } /* End dot11f_get_packed_radio_measurement_report_size. */ |
| 11166 | |
| 11167 | uint32_t dot11f_get_packed_radio_measurement_request_size(tpAniSirGlobal pCtx, |
| 11168 | tDot11fRadioMeasurementRequest *pFrm, uint32_t *pnNeeded) |
| 11169 | { |
| 11170 | uint32_t status = 0; |
| 11171 | *pnNeeded = 5; |
| 11172 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11173 | IES_RadioMeasurementRequest); |
| 11174 | return status; |
| 11175 | } /* End dot11f_get_packed_radio_measurement_request_size. */ |
| 11176 | |
| 11177 | uint32_t dot11f_get_packed_re_assoc_request_size(tpAniSirGlobal pCtx, |
| 11178 | tDot11fReAssocRequest *pFrm, uint32_t *pnNeeded) |
| 11179 | { |
| 11180 | uint32_t status = 0; |
| 11181 | *pnNeeded = 10; |
| 11182 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11183 | IES_ReAssocRequest); |
| 11184 | return status; |
| 11185 | } /* End dot11f_get_packed_re_assoc_request_size. */ |
| 11186 | |
| 11187 | uint32_t dot11f_get_packed_re_assoc_response_size(tpAniSirGlobal pCtx, |
| 11188 | tDot11fReAssocResponse *pFrm, uint32_t *pnNeeded) |
| 11189 | { |
| 11190 | uint32_t status = 0; |
| 11191 | *pnNeeded = 6; |
| 11192 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11193 | IES_ReAssocResponse); |
| 11194 | return status; |
| 11195 | } /* End dot11f_get_packed_re_assoc_response_size. */ |
| 11196 | |
| 11197 | uint32_t dot11f_get_packed_sm_power_save_size(tpAniSirGlobal pCtx, |
| 11198 | tDot11fSMPowerSave *pFrm, uint32_t *pnNeeded) |
| 11199 | { |
| 11200 | uint32_t status = 0; |
| 11201 | *pnNeeded = 3; |
| 11202 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11203 | IES_SMPowerSave); |
| 11204 | return status; |
| 11205 | } /* End dot11f_get_packed_sm_power_save_size. */ |
| 11206 | |
| 11207 | uint32_t dot11f_get_packed_sa_query_req_size(tpAniSirGlobal pCtx, |
| 11208 | tDot11fSaQueryReq *pFrm, uint32_t *pnNeeded) |
| 11209 | { |
| 11210 | uint32_t status = 0; |
| 11211 | *pnNeeded = 4; |
| 11212 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11213 | IES_SaQueryReq); |
| 11214 | return status; |
| 11215 | } /* End dot11f_get_packed_sa_query_req_size. */ |
| 11216 | |
| 11217 | uint32_t dot11f_get_packed_sa_query_rsp_size(tpAniSirGlobal pCtx, |
| 11218 | tDot11fSaQueryRsp *pFrm, uint32_t *pnNeeded) |
| 11219 | { |
| 11220 | uint32_t status = 0; |
| 11221 | *pnNeeded = 4; |
| 11222 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11223 | IES_SaQueryRsp); |
| 11224 | return status; |
| 11225 | } /* End dot11f_get_packed_sa_query_rsp_size. */ |
| 11226 | |
| 11227 | uint32_t dot11f_get_packed_tdls_dis_req_size(tpAniSirGlobal pCtx, |
| 11228 | tDot11fTDLSDisReq *pFrm, uint32_t *pnNeeded) |
| 11229 | { |
| 11230 | uint32_t status = 0; |
| 11231 | *pnNeeded = 3; |
| 11232 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11233 | IES_TDLSDisReq); |
| 11234 | return status; |
| 11235 | } /* End dot11f_get_packed_tdls_dis_req_size. */ |
| 11236 | |
| 11237 | uint32_t dot11f_get_packed_tdls_dis_rsp_size(tpAniSirGlobal pCtx, |
| 11238 | tDot11fTDLSDisRsp *pFrm, uint32_t *pnNeeded) |
| 11239 | { |
| 11240 | uint32_t status = 0; |
| 11241 | *pnNeeded = 5; |
| 11242 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11243 | IES_TDLSDisRsp); |
| 11244 | return status; |
| 11245 | } /* End dot11f_get_packed_tdls_dis_rsp_size. */ |
| 11246 | |
| 11247 | uint32_t dot11f_get_packed_tdls_peer_traffic_ind_size(tpAniSirGlobal pCtx, |
| 11248 | tDot11fTDLSPeerTrafficInd *pFrm, uint32_t *pnNeeded) |
| 11249 | { |
| 11250 | uint32_t status = 0; |
| 11251 | *pnNeeded = 3; |
| 11252 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11253 | IES_TDLSPeerTrafficInd); |
| 11254 | return status; |
| 11255 | } /* End dot11f_get_packed_tdls_peer_traffic_ind_size. */ |
| 11256 | |
| 11257 | uint32_t dot11f_get_packed_tdls_peer_traffic_rsp_size(tpAniSirGlobal pCtx, |
| 11258 | tDot11fTDLSPeerTrafficRsp *pFrm, uint32_t *pnNeeded) |
| 11259 | { |
| 11260 | uint32_t status = 0; |
| 11261 | *pnNeeded = 3; |
| 11262 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11263 | IES_TDLSPeerTrafficRsp); |
| 11264 | return status; |
| 11265 | } /* End dot11f_get_packed_tdls_peer_traffic_rsp_size. */ |
| 11266 | |
| 11267 | uint32_t dot11f_get_packed_tdls_setup_cnf_size(tpAniSirGlobal pCtx, |
| 11268 | tDot11fTDLSSetupCnf *pFrm, uint32_t *pnNeeded) |
| 11269 | { |
| 11270 | uint32_t status = 0; |
| 11271 | *pnNeeded = 5; |
| 11272 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11273 | IES_TDLSSetupCnf); |
| 11274 | return status; |
| 11275 | } /* End dot11f_get_packed_tdls_setup_cnf_size. */ |
| 11276 | |
| 11277 | uint32_t dot11f_get_packed_tdls_setup_req_size(tpAniSirGlobal pCtx, |
| 11278 | tDot11fTDLSSetupReq *pFrm, uint32_t *pnNeeded) |
| 11279 | { |
| 11280 | uint32_t status = 0; |
| 11281 | *pnNeeded = 5; |
| 11282 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11283 | IES_TDLSSetupReq); |
| 11284 | return status; |
| 11285 | } /* End dot11f_get_packed_tdls_setup_req_size. */ |
| 11286 | |
| 11287 | uint32_t dot11f_get_packed_tdls_setup_rsp_size(tpAniSirGlobal pCtx, |
| 11288 | tDot11fTDLSSetupRsp *pFrm, uint32_t *pnNeeded) |
| 11289 | { |
| 11290 | uint32_t status = 0; |
| 11291 | *pnNeeded = 7; |
| 11292 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11293 | IES_TDLSSetupRsp); |
| 11294 | return status; |
| 11295 | } /* End dot11f_get_packed_tdls_setup_rsp_size. */ |
| 11296 | |
| 11297 | uint32_t dot11f_get_packed_tdls_teardown_size(tpAniSirGlobal pCtx, |
| 11298 | tDot11fTDLSTeardown *pFrm, uint32_t *pnNeeded) |
| 11299 | { |
| 11300 | uint32_t status = 0; |
| 11301 | *pnNeeded = 4; |
| 11302 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11303 | IES_TDLSTeardown); |
| 11304 | return status; |
| 11305 | } /* End dot11f_get_packed_tdls_teardown_size. */ |
| 11306 | |
| 11307 | uint32_t dot11f_get_packed_tpc_report_size(tpAniSirGlobal pCtx, |
| 11308 | tDot11fTPCReport *pFrm, uint32_t *pnNeeded) |
| 11309 | { |
| 11310 | uint32_t status = 0; |
| 11311 | *pnNeeded = 3; |
| 11312 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11313 | IES_TPCReport); |
| 11314 | return status; |
| 11315 | } /* End dot11f_get_packed_tpc_report_size. */ |
| 11316 | |
| 11317 | uint32_t dot11f_get_packed_tpc_request_size(tpAniSirGlobal pCtx, |
| 11318 | tDot11fTPCRequest *pFrm, uint32_t *pnNeeded) |
| 11319 | { |
| 11320 | uint32_t status = 0; |
| 11321 | *pnNeeded = 3; |
| 11322 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11323 | IES_TPCRequest); |
| 11324 | return status; |
| 11325 | } /* End dot11f_get_packed_tpc_request_size. */ |
| 11326 | |
| 11327 | uint32_t dot11f_get_packed_timing_advertisement_frame_size(tpAniSirGlobal pCtx, |
| 11328 | tDot11fTimingAdvertisementFrame *pFrm, uint32_t *pnNeeded) |
| 11329 | { |
| 11330 | uint32_t status = 0; |
| 11331 | *pnNeeded = 10; |
| 11332 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11333 | IES_TimingAdvertisementFrame); |
| 11334 | return status; |
| 11335 | } /* End dot11f_get_packed_timing_advertisement_frame_size. */ |
| 11336 | |
| 11337 | uint32_t dot11f_get_packed_vht_gid_management_action_frame_size(tpAniSirGlobal pCtx, |
| 11338 | tDot11fVHTGidManagementActionFrame *pFrm, uint32_t *pnNeeded) |
| 11339 | { |
| 11340 | uint32_t status = 0; |
| 11341 | *pnNeeded = 26; |
| 11342 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11343 | IES_VHTGidManagementActionFrame); |
| 11344 | return status; |
| 11345 | } /* End dot11f_get_packed_vht_gid_management_action_frame_size. */ |
| 11346 | |
| 11347 | uint32_t dot11f_get_packed_wmm_add_ts_request_size(tpAniSirGlobal pCtx, |
| 11348 | tDot11fWMMAddTSRequest *pFrm, uint32_t *pnNeeded) |
| 11349 | { |
| 11350 | uint32_t status = 0; |
| 11351 | *pnNeeded = 4; |
| 11352 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11353 | IES_WMMAddTSRequest); |
| 11354 | return status; |
| 11355 | } /* End dot11f_get_packed_wmm_add_ts_request_size. */ |
| 11356 | |
| 11357 | uint32_t dot11f_get_packed_wmm_add_ts_response_size(tpAniSirGlobal pCtx, |
| 11358 | tDot11fWMMAddTSResponse *pFrm, uint32_t *pnNeeded) |
| 11359 | { |
| 11360 | uint32_t status = 0; |
| 11361 | *pnNeeded = 4; |
| 11362 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11363 | IES_WMMAddTSResponse); |
| 11364 | return status; |
| 11365 | } /* End dot11f_get_packed_wmm_add_ts_response_size. */ |
| 11366 | |
| 11367 | uint32_t dot11f_get_packed_wmm_del_ts_size(tpAniSirGlobal pCtx, |
| 11368 | tDot11fWMMDelTS *pFrm, uint32_t *pnNeeded) |
| 11369 | { |
| 11370 | uint32_t status = 0; |
| 11371 | *pnNeeded = 4; |
| 11372 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11373 | IES_WMMDelTS); |
| 11374 | return status; |
| 11375 | } /* End dot11f_get_packed_wmm_del_ts_size. */ |
| 11376 | |
| 11377 | uint32_t dot11f_get_packed_ht2040_bss_coexistence_mgmt_action_frameSize(tpAniSirGlobal pCtx, |
| 11378 | tDot11fht2040_bss_coexistence_mgmt_action_frame *pFrm, uint32_t *pnNeeded) |
| 11379 | { |
| 11380 | uint32_t status = 0; |
| 11381 | *pnNeeded = 2; |
| 11382 | status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded, |
| 11383 | IES_ht2040_bss_coexistence_mgmt_action_frame); |
| 11384 | return status; |
| 11385 | } /* End dot11f_get_packed_ht2040_bss_coexistence_mgmt_action_frameSize. */ |
| 11386 | |
| 11387 | static uint32_t get_packed_size_core(tpAniSirGlobal pCtx, |
| 11388 | uint8_t *pFrm, |
| 11389 | uint32_t *pnNeeded, |
| 11390 | const tIEDefn IEs[]) |
| 11391 | { |
| 11392 | const tIEDefn *pIe; |
| 11393 | uint16_t i, n; |
| 11394 | uint32_t status; |
| 11395 | tFRAMES_BOOL *pfFound; |
| 11396 | uint32_t countOffset = 0; |
| 11397 | uint32_t byteCount = 0; |
| 11398 | uint8_t pIePresent = 0; |
| 11399 | uint32_t offset = 0; |
| 11400 | |
| 11401 | status = DOT11F_PARSE_SUCCESS; |
| 11402 | |
| 11403 | (void)pCtx; /* Shutup the compiler if we have no FFs nor IEs... */ |
| 11404 | i = 0; |
| 11405 | n = 0; |
| 11406 | pIe = &(IEs[0]); |
| 11407 | while (0xff != pIe->eid) { |
| 11408 | pfFound = (tFRAMES_BOOL *)(pFrm + pIe->offset + |
| 11409 | pIe->presenceOffset); |
| 11410 | if (*pfFound) { |
| 11411 | countOffset = ((0 == pIe->arraybound) ? 1 : (*(uint16_t *)(pFrm + pIe->countOffset))); |
| 11412 | for (i = 0U; i < countOffset; ++i) { |
| 11413 | *pnNeeded += 2U + pIe->noui; |
| 11414 | byteCount = 0; |
| 11415 | switch (pIe->sig) { |
| 11416 | case SigIeCondensedCountryStr: |
| 11417 | offset = sizeof(tDot11fIECondensedCountryStr); |
| 11418 | byteCount = 2; |
| 11419 | pIePresent = ((tDot11fIECondensedCountryStr *) |
| 11420 | (pFrm + pIe->offset + offset * i))-> |
| 11421 | present; |
| 11422 | break; |
| 11423 | case SigIeGTK: |
| 11424 | offset = sizeof(tDot11fIEGTK); |
| 11425 | byteCount = ((tDot11fIEGTK *) |
| 11426 | (pFrm + pIe->offset + offset * i))-> |
| 11427 | num_key + 11; |
| 11428 | pIePresent = ((tDot11fIEGTK *) |
| 11429 | (pFrm + pIe->offset + offset * i))-> |
| 11430 | present; |
| 11431 | break; |
| 11432 | case SigIeIGTK: |
| 11433 | offset = sizeof(tDot11fIEIGTK); |
| 11434 | byteCount = 33; |
| 11435 | pIePresent = ((tDot11fIEIGTK *) |
| 11436 | (pFrm + pIe->offset + offset * i))-> |
| 11437 | present; |
| 11438 | break; |
| 11439 | case SigIeR0KH_ID: |
| 11440 | offset = sizeof(tDot11fIER0KH_ID); |
| 11441 | byteCount = ((tDot11fIER0KH_ID *) |
| 11442 | (pFrm + pIe->offset + offset * i))-> |
| 11443 | num_PMK_R0_ID; |
| 11444 | pIePresent = ((tDot11fIER0KH_ID *) |
| 11445 | (pFrm + pIe->offset + offset * i))-> |
| 11446 | present; |
| 11447 | break; |
| 11448 | case SigIeR1KH_ID: |
| 11449 | offset = sizeof(tDot11fIER1KH_ID); |
| 11450 | byteCount = 6; |
| 11451 | pIePresent = ((tDot11fIER1KH_ID *) |
| 11452 | (pFrm + pIe->offset + offset * i))-> |
| 11453 | present; |
| 11454 | break; |
| 11455 | case SigIeTSFInfo: |
| 11456 | offset = sizeof(tDot11fIETSFInfo); |
| 11457 | byteCount = 4; |
| 11458 | pIePresent = ((tDot11fIETSFInfo *) |
| 11459 | (pFrm + pIe->offset + offset * i))-> |
| 11460 | present; |
| 11461 | break; |
| 11462 | case SigIeAPChannelReport: |
| 11463 | offset = sizeof(tDot11fIEAPChannelReport); |
| 11464 | byteCount = ((tDot11fIEAPChannelReport *) |
| 11465 | (pFrm + pIe->offset + offset * i))-> |
| 11466 | num_channelList + 1; |
| 11467 | pIePresent = ((tDot11fIEAPChannelReport *) |
| 11468 | (pFrm + pIe->offset + offset * i))-> |
| 11469 | present; |
| 11470 | break; |
| 11471 | case SigIeBcnReportingDetail: |
| 11472 | offset = sizeof(tDot11fIEBcnReportingDetail); |
| 11473 | byteCount = 1; |
| 11474 | pIePresent = ((tDot11fIEBcnReportingDetail *) |
| 11475 | (pFrm + pIe->offset + offset * i))-> |
| 11476 | present; |
| 11477 | break; |
| 11478 | case SigIeBeaconReportFrmBody: |
| 11479 | offset = sizeof(tDot11fIEBeaconReportFrmBody); |
| 11480 | byteCount = ((tDot11fIEBeaconReportFrmBody *) |
| 11481 | (pFrm + pIe->offset + offset * i))-> |
| 11482 | num_reportedFields; |
| 11483 | pIePresent = ((tDot11fIEBeaconReportFrmBody *) |
| 11484 | (pFrm + pIe->offset + offset * i))-> |
| 11485 | present; |
| 11486 | break; |
| 11487 | case SigIeBeaconReporting: |
| 11488 | offset = sizeof(tDot11fIEBeaconReporting); |
| 11489 | byteCount = 2; |
| 11490 | pIePresent = ((tDot11fIEBeaconReporting *) |
| 11491 | (pFrm + pIe->offset + offset * i))-> |
| 11492 | present; |
| 11493 | break; |
| 11494 | case SigIeMeasurementPilot: |
| 11495 | offset = sizeof(tDot11fIEMeasurementPilot); |
| 11496 | byteCount = ((tDot11fIEMeasurementPilot *) |
| 11497 | (pFrm + pIe->offset + offset * i))-> |
| 11498 | num_vendorSpecific + 1; |
| 11499 | pIePresent = ((tDot11fIEMeasurementPilot *) |
| 11500 | (pFrm + pIe->offset + offset * i))-> |
| 11501 | present; |
| 11502 | break; |
| 11503 | case SigIeMultiBssid: |
| 11504 | offset = sizeof(tDot11fIEMultiBssid); |
| 11505 | byteCount = ((tDot11fIEMultiBssid *) |
| 11506 | (pFrm + pIe->offset + offset * i))-> |
| 11507 | num_vendorSpecific + 1; |
| 11508 | pIePresent = ((tDot11fIEMultiBssid *) |
| 11509 | (pFrm + pIe->offset + offset * i))-> |
| 11510 | present; |
| 11511 | break; |
| 11512 | case SigIeRICData: |
| 11513 | offset = sizeof(tDot11fIERICData); |
| 11514 | byteCount = 4; |
| 11515 | pIePresent = ((tDot11fIERICData *) |
| 11516 | (pFrm + pIe->offset + offset * i))-> |
| 11517 | present; |
| 11518 | break; |
| 11519 | case SigIeRICDescriptor: |
| 11520 | offset = sizeof(tDot11fIERICDescriptor); |
| 11521 | byteCount = ((tDot11fIERICDescriptor *) |
| 11522 | (pFrm + pIe->offset + offset * i))-> |
| 11523 | num_variableData + 1; |
| 11524 | pIePresent = ((tDot11fIERICDescriptor *) |
| 11525 | (pFrm + pIe->offset + offset * i))-> |
| 11526 | present; |
| 11527 | break; |
| 11528 | case SigIeRRMEnabledCap: |
| 11529 | offset = sizeof(tDot11fIERRMEnabledCap); |
| 11530 | byteCount = 5; |
| 11531 | pIePresent = ((tDot11fIERRMEnabledCap *) |
| 11532 | (pFrm + pIe->offset + offset * i))-> |
| 11533 | present; |
| 11534 | break; |
| 11535 | case SigIeRequestedInfo: |
| 11536 | offset = sizeof(tDot11fIERequestedInfo); |
| 11537 | byteCount = ((tDot11fIERequestedInfo *) |
| 11538 | (pFrm + pIe->offset + offset * i))-> |
| 11539 | num_requested_eids; |
| 11540 | pIePresent = ((tDot11fIERequestedInfo *) |
| 11541 | (pFrm + pIe->offset + offset * i))-> |
| 11542 | present; |
| 11543 | break; |
| 11544 | case SigIeSSID: |
| 11545 | offset = sizeof(tDot11fIESSID); |
| 11546 | byteCount = ((tDot11fIESSID *) |
| 11547 | (pFrm + pIe->offset + offset * i))-> |
| 11548 | num_ssid; |
| 11549 | pIePresent = ((tDot11fIESSID *) |
| 11550 | (pFrm + pIe->offset + offset * i))-> |
| 11551 | present; |
| 11552 | break; |
| 11553 | case SigIeSchedule: |
| 11554 | offset = sizeof(tDot11fIESchedule); |
| 11555 | byteCount = 14; |
| 11556 | pIePresent = ((tDot11fIESchedule *) |
| 11557 | (pFrm + pIe->offset + offset * i))-> |
| 11558 | present; |
| 11559 | break; |
| 11560 | case SigIeTCLAS: |
| 11561 | offset = sizeof(tDot11fIETCLAS); |
| 11562 | status |= |
| 11563 | dot11f_get_packed_ietclas( |
| 11564 | pCtx, (tDot11fIETCLAS *) |
| 11565 | (pFrm + pIe->offset + offset * i), |
| 11566 | pnNeeded); |
| 11567 | break; |
| 11568 | case SigIeTCLASSPROC: |
| 11569 | offset = sizeof(tDot11fIETCLASSPROC); |
| 11570 | byteCount = 1; |
| 11571 | pIePresent = ((tDot11fIETCLASSPROC *) |
| 11572 | (pFrm + pIe->offset + offset * i))-> |
| 11573 | present; |
| 11574 | break; |
| 11575 | case SigIeTSDelay: |
| 11576 | offset = sizeof(tDot11fIETSDelay); |
| 11577 | byteCount = 4; |
| 11578 | pIePresent = ((tDot11fIETSDelay *) |
| 11579 | (pFrm + pIe->offset + offset * i))-> |
| 11580 | present; |
| 11581 | break; |
| 11582 | case SigIeTSPEC: |
| 11583 | offset = sizeof(tDot11fIETSPEC); |
| 11584 | byteCount = 55; |
| 11585 | pIePresent = ((tDot11fIETSPEC *) |
| 11586 | (pFrm + pIe->offset + offset * i))-> |
| 11587 | present; |
| 11588 | break; |
| 11589 | case SigIeVHTCaps: |
| 11590 | offset = sizeof(tDot11fIEVHTCaps); |
| 11591 | byteCount = 12; |
| 11592 | pIePresent = ((tDot11fIEVHTCaps *) |
| 11593 | (pFrm + pIe->offset + offset * i))-> |
| 11594 | present; |
| 11595 | break; |
| 11596 | case SigIeVHTOperation: |
| 11597 | offset = sizeof(tDot11fIEVHTOperation); |
| 11598 | byteCount = 5; |
| 11599 | pIePresent = ((tDot11fIEVHTOperation *) |
| 11600 | (pFrm + pIe->offset + offset * i))-> |
| 11601 | present; |
| 11602 | break; |
| 11603 | case SigIeWMMSchedule: |
| 11604 | offset = sizeof(tDot11fIEWMMSchedule); |
| 11605 | byteCount = 15; |
| 11606 | pIePresent = ((tDot11fIEWMMSchedule *) |
| 11607 | (pFrm + pIe->offset + offset * i))-> |
| 11608 | present; |
| 11609 | break; |
| 11610 | case SigIeWMMTCLAS: |
| 11611 | offset = sizeof(tDot11fIEWMMTCLAS); |
| 11612 | status |= |
| 11613 | dot11f_get_packed_iewmmtclas( |
| 11614 | pCtx, (tDot11fIEWMMTCLAS *) |
| 11615 | (pFrm + pIe->offset + offset * i), |
| 11616 | pnNeeded); |
| 11617 | break; |
| 11618 | case SigIeWMMTCLASPROC: |
| 11619 | offset = sizeof(tDot11fIEWMMTCLASPROC); |
| 11620 | byteCount = 2; |
| 11621 | pIePresent = ((tDot11fIEWMMTCLASPROC *) |
| 11622 | (pFrm + pIe->offset + offset * i))-> |
| 11623 | present; |
| 11624 | break; |
| 11625 | case SigIeWMMTSDelay: |
| 11626 | offset = sizeof(tDot11fIEWMMTSDelay); |
| 11627 | byteCount = 5; |
| 11628 | pIePresent = ((tDot11fIEWMMTSDelay *) |
| 11629 | (pFrm + pIe->offset + offset * i))-> |
| 11630 | present; |
| 11631 | break; |
| 11632 | case SigIeWMMTSPEC: |
| 11633 | offset = sizeof(tDot11fIEWMMTSPEC); |
| 11634 | byteCount = 56; |
| 11635 | pIePresent = ((tDot11fIEWMMTSPEC *) |
| 11636 | (pFrm + pIe->offset + offset * i))-> |
| 11637 | present; |
| 11638 | break; |
| 11639 | case SigIeWiderBWChanSwitchAnn: |
| 11640 | offset = sizeof(tDot11fIEWiderBWChanSwitchAnn); |
| 11641 | byteCount = 3; |
| 11642 | pIePresent = ((tDot11fIEWiderBWChanSwitchAnn *) |
| 11643 | (pFrm + pIe->offset + offset * i))-> |
| 11644 | present; |
| 11645 | break; |
| 11646 | case SigIeAID: |
| 11647 | offset = sizeof(tDot11fIEAID); |
| 11648 | byteCount = 2; |
| 11649 | pIePresent = ((tDot11fIEAID *) |
| 11650 | (pFrm + pIe->offset + offset * i))-> |
| 11651 | present; |
| 11652 | break; |
| 11653 | case SigIeCFParams: |
| 11654 | offset = sizeof(tDot11fIECFParams); |
| 11655 | byteCount = 6; |
| 11656 | pIePresent = ((tDot11fIECFParams *) |
| 11657 | (pFrm + pIe->offset + offset * i))-> |
| 11658 | present; |
| 11659 | break; |
| 11660 | case SigIeChallengeText: |
| 11661 | offset = sizeof(tDot11fIEChallengeText); |
| 11662 | byteCount = ((tDot11fIEChallengeText *) |
| 11663 | (pFrm + pIe->offset + offset * i))-> |
| 11664 | num_text; |
| 11665 | pIePresent = ((tDot11fIEChallengeText *) |
| 11666 | (pFrm + pIe->offset + offset * i))-> |
| 11667 | present; |
| 11668 | break; |
| 11669 | case SigIeChanSwitchAnn: |
| 11670 | offset = sizeof(tDot11fIEChanSwitchAnn); |
| 11671 | byteCount = 3; |
| 11672 | pIePresent = ((tDot11fIEChanSwitchAnn *) |
| 11673 | (pFrm + pIe->offset + offset * i))-> |
| 11674 | present; |
| 11675 | break; |
| 11676 | case SigIeChannelSwitchWrapper: |
| 11677 | offset = sizeof(tDot11fIEChannelSwitchWrapper); |
| 11678 | status |= |
| 11679 | dot11f_get_packed_ie_channel_switch_wrapper( |
| 11680 | pCtx, (tDot11fIEChannelSwitchWrapper *) |
| 11681 | (pFrm + pIe->offset + offset * i), |
| 11682 | pnNeeded); |
| 11683 | break; |
| 11684 | case SigIeCountry: |
| 11685 | offset = sizeof(tDot11fIECountry); |
| 11686 | status |= |
| 11687 | dot11f_get_packed_ie_country( |
| 11688 | pCtx, (tDot11fIECountry *) |
| 11689 | (pFrm + pIe->offset + offset * i), |
| 11690 | pnNeeded); |
| 11691 | break; |
| 11692 | case SigIeDSParams: |
| 11693 | offset = sizeof(tDot11fIEDSParams); |
| 11694 | byteCount = 1; |
| 11695 | pIePresent = ((tDot11fIEDSParams *) |
| 11696 | (pFrm + pIe->offset + offset * i))-> |
| 11697 | present; |
| 11698 | break; |
| 11699 | case SigIeEDCAParamSet: |
| 11700 | offset = sizeof(tDot11fIEEDCAParamSet); |
| 11701 | byteCount = 18; |
| 11702 | pIePresent = ((tDot11fIEEDCAParamSet *) |
| 11703 | (pFrm + pIe->offset + offset * i))-> |
| 11704 | present; |
| 11705 | break; |
| 11706 | case SigIeERPInfo: |
| 11707 | offset = sizeof(tDot11fIEERPInfo); |
| 11708 | byteCount = 1; |
| 11709 | pIePresent = ((tDot11fIEERPInfo *) |
| 11710 | (pFrm + pIe->offset + offset * i))-> |
| 11711 | present; |
| 11712 | break; |
| 11713 | case SigIeESECckmOpaque: |
| 11714 | offset = sizeof(tDot11fIEESECckmOpaque); |
| 11715 | byteCount = ((tDot11fIEESECckmOpaque *) |
| 11716 | (pFrm + pIe->offset + offset * i))-> |
| 11717 | num_data; |
| 11718 | pIePresent = ((tDot11fIEESECckmOpaque *) |
| 11719 | (pFrm + pIe->offset + offset * i))-> |
| 11720 | present; |
| 11721 | break; |
| 11722 | case SigIeESERadMgmtCap: |
| 11723 | offset = sizeof(tDot11fIEESERadMgmtCap); |
| 11724 | byteCount = 2; |
| 11725 | pIePresent = ((tDot11fIEESERadMgmtCap *) |
| 11726 | (pFrm + pIe->offset + offset * i))-> |
| 11727 | present; |
| 11728 | break; |
| 11729 | case SigIeESETrafStrmMet: |
| 11730 | offset = sizeof(tDot11fIEESETrafStrmMet); |
| 11731 | byteCount = 4; |
| 11732 | pIePresent = ((tDot11fIEESETrafStrmMet *) |
| 11733 | (pFrm + pIe->offset + offset * i))-> |
| 11734 | present; |
| 11735 | break; |
| 11736 | case SigIeESETrafStrmRateSet: |
| 11737 | offset = sizeof(tDot11fIEESETrafStrmRateSet); |
| 11738 | byteCount = ((tDot11fIEESETrafStrmRateSet *) |
| 11739 | (pFrm + pIe->offset + offset * i))-> |
| 11740 | num_tsrates + 1; |
| 11741 | pIePresent = ((tDot11fIEESETrafStrmRateSet *) |
| 11742 | (pFrm + pIe->offset + offset * i))-> |
| 11743 | present; |
| 11744 | break; |
| 11745 | case SigIeESETxmitPower: |
| 11746 | offset = sizeof(tDot11fIEESETxmitPower); |
| 11747 | byteCount = 2; |
| 11748 | pIePresent = ((tDot11fIEESETxmitPower *) |
| 11749 | (pFrm + pIe->offset + offset * i))-> |
| 11750 | present; |
| 11751 | break; |
| 11752 | case SigIeESEVersion: |
| 11753 | offset = sizeof(tDot11fIEESEVersion); |
| 11754 | byteCount = 1; |
| 11755 | pIePresent = ((tDot11fIEESEVersion *) |
| 11756 | (pFrm + pIe->offset + offset * i))-> |
| 11757 | present; |
| 11758 | break; |
| 11759 | case SigIeExtCap: |
| 11760 | offset = sizeof(tDot11fIEExtCap); |
| 11761 | byteCount = ((tDot11fIEExtCap *) |
| 11762 | (pFrm + pIe->offset + offset * i))-> |
| 11763 | num_bytes; |
| 11764 | pIePresent = ((tDot11fIEExtCap *) |
| 11765 | (pFrm + pIe->offset + offset * i))-> |
| 11766 | present; |
| 11767 | break; |
| 11768 | case SigIeExtSuppRates: |
| 11769 | offset = sizeof(tDot11fIEExtSuppRates); |
| 11770 | byteCount = ((tDot11fIEExtSuppRates *) |
| 11771 | (pFrm + pIe->offset + offset * i))-> |
| 11772 | num_rates; |
| 11773 | pIePresent = ((tDot11fIEExtSuppRates *) |
| 11774 | (pFrm + pIe->offset + offset * i))-> |
| 11775 | present; |
| 11776 | break; |
| 11777 | case SigIeFHParamSet: |
| 11778 | offset = sizeof(tDot11fIEFHParamSet); |
| 11779 | byteCount = 5; |
| 11780 | pIePresent = ((tDot11fIEFHParamSet *) |
| 11781 | (pFrm + pIe->offset + offset * i))-> |
| 11782 | present; |
| 11783 | break; |
| 11784 | case SigIeFHParams: |
| 11785 | offset = sizeof(tDot11fIEFHParams); |
| 11786 | byteCount = 2; |
| 11787 | pIePresent = ((tDot11fIEFHParams *) |
| 11788 | (pFrm + pIe->offset + offset * i))-> |
| 11789 | present; |
| 11790 | break; |
| 11791 | case SigIeFHPattTable: |
| 11792 | offset = sizeof(tDot11fIEFHPattTable); |
| 11793 | byteCount = ((tDot11fIEFHPattTable *) |
| 11794 | (pFrm + pIe->offset + offset * i))-> |
| 11795 | num_randtable + 4; |
| 11796 | pIePresent = ((tDot11fIEFHPattTable *) |
| 11797 | (pFrm + pIe->offset + offset * i))-> |
| 11798 | present; |
| 11799 | break; |
| 11800 | case SigIeFTInfo: |
| 11801 | offset = sizeof(tDot11fIEFTInfo); |
| 11802 | status |= |
| 11803 | dot11f_get_packed_ieft_info( |
| 11804 | pCtx, (tDot11fIEFTInfo *) |
| 11805 | (pFrm + pIe->offset + offset * i), |
| 11806 | pnNeeded); |
| 11807 | break; |
| 11808 | case SigIeHTCaps: |
| 11809 | offset = sizeof(tDot11fIEHTCaps); |
| 11810 | byteCount = ((tDot11fIEHTCaps *) |
| 11811 | (pFrm + pIe->offset + offset * i))-> |
| 11812 | num_rsvd + 26; |
| 11813 | pIePresent = ((tDot11fIEHTCaps *) |
| 11814 | (pFrm + pIe->offset + offset * i))-> |
| 11815 | present; |
| 11816 | break; |
| 11817 | case SigIeHTInfo: |
| 11818 | offset = sizeof(tDot11fIEHTInfo); |
| 11819 | byteCount = ((tDot11fIEHTInfo *) |
| 11820 | (pFrm + pIe->offset + offset * i))-> |
| 11821 | num_rsvd + 22; |
| 11822 | pIePresent = ((tDot11fIEHTInfo *) |
| 11823 | (pFrm + pIe->offset + offset * i))-> |
| 11824 | present; |
| 11825 | break; |
| 11826 | case SigIeIBSSParams: |
| 11827 | offset = sizeof(tDot11fIEIBSSParams); |
| 11828 | byteCount = 2; |
| 11829 | pIePresent = ((tDot11fIEIBSSParams *) |
| 11830 | (pFrm + pIe->offset + offset * i))-> |
| 11831 | present; |
| 11832 | break; |
| 11833 | case SigIeLinkIdentifier: |
| 11834 | offset = sizeof(tDot11fIELinkIdentifier); |
| 11835 | byteCount = 18; |
| 11836 | pIePresent = ((tDot11fIELinkIdentifier *) |
| 11837 | (pFrm + pIe->offset + offset * i))-> |
| 11838 | present; |
| 11839 | break; |
| 11840 | case SigIeMeasurementReport: |
| 11841 | offset = sizeof(tDot11fIEMeasurementReport); |
| 11842 | status |= |
| 11843 | dot11f_get_packed_ie_measurement_report( |
| 11844 | pCtx, (tDot11fIEMeasurementReport *) |
| 11845 | (pFrm + pIe->offset + offset * i), |
| 11846 | pnNeeded); |
| 11847 | break; |
| 11848 | case SigIeMeasurementRequest: |
| 11849 | offset = sizeof(tDot11fIEMeasurementRequest); |
| 11850 | status |= |
| 11851 | dot11f_get_packed_ie_measurement_request( |
| 11852 | pCtx, (tDot11fIEMeasurementRequest *) |
| 11853 | (pFrm + pIe->offset + offset * i), |
| 11854 | pnNeeded); |
| 11855 | break; |
| 11856 | case SigIeMobilityDomain: |
| 11857 | offset = sizeof(tDot11fIEMobilityDomain); |
| 11858 | byteCount = 3; |
| 11859 | pIePresent = ((tDot11fIEMobilityDomain *) |
| 11860 | (pFrm + pIe->offset + offset * i))-> |
| 11861 | present; |
| 11862 | break; |
| 11863 | case SigIeNeighborReport: |
| 11864 | offset = sizeof(tDot11fIENeighborReport); |
| 11865 | status |= |
| 11866 | dot11f_get_packed_ie_neighbor_report( |
| 11867 | pCtx, (tDot11fIENeighborReport *) |
| 11868 | (pFrm + pIe->offset + offset * i), |
| 11869 | pnNeeded); |
| 11870 | break; |
| 11871 | case SigIeOBSSScanParameters: |
| 11872 | offset = sizeof(tDot11fIEOBSSScanParameters); |
| 11873 | byteCount = 14; |
| 11874 | pIePresent = ((tDot11fIEOBSSScanParameters *) |
| 11875 | (pFrm + pIe->offset + offset * i))-> |
| 11876 | present; |
| 11877 | break; |
| 11878 | case SigIeOperatingMode: |
| 11879 | offset = sizeof(tDot11fIEOperatingMode); |
| 11880 | byteCount = 1; |
| 11881 | pIePresent = ((tDot11fIEOperatingMode *) |
| 11882 | (pFrm + pIe->offset + offset * i))-> |
| 11883 | present; |
| 11884 | break; |
| 11885 | case SigIeP2PAssocReq: |
| 11886 | offset = sizeof(tDot11fIEP2PAssocReq); |
| 11887 | status |= |
| 11888 | dot11f_get_packed_iep2_p_assoc_req( |
| 11889 | pCtx, (tDot11fIEP2PAssocReq *) |
| 11890 | (pFrm + pIe->offset + offset * i), |
| 11891 | pnNeeded); |
| 11892 | break; |
| 11893 | case SigIeP2PAssocRes: |
| 11894 | offset = sizeof(tDot11fIEP2PAssocRes); |
| 11895 | status |= |
| 11896 | dot11f_get_packed_iep2_p_assoc_res( |
| 11897 | pCtx, (tDot11fIEP2PAssocRes *) |
| 11898 | (pFrm + pIe->offset + offset * i), |
| 11899 | pnNeeded); |
| 11900 | break; |
| 11901 | case SigIeP2PBeacon: |
| 11902 | offset = sizeof(tDot11fIEP2PBeacon); |
| 11903 | status |= |
| 11904 | dot11f_get_packed_iep2_p_beacon( |
| 11905 | pCtx, (tDot11fIEP2PBeacon *) |
| 11906 | (pFrm + pIe->offset + offset * i), |
| 11907 | pnNeeded); |
| 11908 | break; |
| 11909 | case SigIeP2PBeaconProbeRes: |
| 11910 | offset = sizeof(tDot11fIEP2PBeaconProbeRes); |
| 11911 | status |= |
| 11912 | dot11f_get_packed_iep2_p_beacon_probe_res( |
| 11913 | pCtx, (tDot11fIEP2PBeaconProbeRes *) |
| 11914 | (pFrm + pIe->offset + offset * i), |
| 11915 | pnNeeded); |
| 11916 | break; |
| 11917 | case SigIeP2PDeAuth: |
| 11918 | offset = sizeof(tDot11fIEP2PDeAuth); |
| 11919 | status |= |
| 11920 | dot11f_get_packed_iep2_p_de_auth( |
| 11921 | pCtx, (tDot11fIEP2PDeAuth *) |
| 11922 | (pFrm + pIe->offset + offset * i), |
| 11923 | pnNeeded); |
| 11924 | break; |
| 11925 | case SigIeP2PDisAssoc: |
| 11926 | offset = sizeof(tDot11fIEP2PDisAssoc); |
| 11927 | status |= |
| 11928 | dot11f_get_packed_iep2_p_dis_assoc( |
| 11929 | pCtx, (tDot11fIEP2PDisAssoc *) |
| 11930 | (pFrm + pIe->offset + offset * i), |
| 11931 | pnNeeded); |
| 11932 | break; |
| 11933 | case SigIeP2PIEOpaque: |
| 11934 | offset = sizeof(tDot11fIEP2PIEOpaque); |
| 11935 | byteCount = ((tDot11fIEP2PIEOpaque *) |
| 11936 | (pFrm + pIe->offset + offset * i))-> |
| 11937 | num_data; |
| 11938 | pIePresent = ((tDot11fIEP2PIEOpaque *) |
| 11939 | (pFrm + pIe->offset + offset * i))-> |
| 11940 | present; |
| 11941 | break; |
| 11942 | case SigIeP2PProbeReq: |
| 11943 | offset = sizeof(tDot11fIEP2PProbeReq); |
| 11944 | status |= |
| 11945 | dot11f_get_packed_iep2_p_probe_req( |
| 11946 | pCtx, (tDot11fIEP2PProbeReq *) |
| 11947 | (pFrm + pIe->offset + offset * i), |
| 11948 | pnNeeded); |
| 11949 | break; |
| 11950 | case SigIeP2PProbeRes: |
| 11951 | offset = sizeof(tDot11fIEP2PProbeRes); |
| 11952 | status |= |
| 11953 | dot11f_get_packed_iep2_p_probe_res( |
| 11954 | pCtx, (tDot11fIEP2PProbeRes *) |
| 11955 | (pFrm + pIe->offset + offset * i), |
| 11956 | pnNeeded); |
| 11957 | break; |
| 11958 | case SigIePTIControl: |
| 11959 | offset = sizeof(tDot11fIEPTIControl); |
| 11960 | byteCount = 3; |
| 11961 | pIePresent = ((tDot11fIEPTIControl *) |
| 11962 | (pFrm + pIe->offset + offset * i))-> |
| 11963 | present; |
| 11964 | break; |
| 11965 | case SigIePUBufferStatus: |
| 11966 | offset = sizeof(tDot11fIEPUBufferStatus); |
| 11967 | byteCount = 1; |
| 11968 | pIePresent = ((tDot11fIEPUBufferStatus *) |
| 11969 | (pFrm + pIe->offset + offset * i))-> |
| 11970 | present; |
| 11971 | break; |
| 11972 | case SigIePowerCaps: |
| 11973 | offset = sizeof(tDot11fIEPowerCaps); |
| 11974 | byteCount = 2; |
| 11975 | pIePresent = ((tDot11fIEPowerCaps *) |
| 11976 | (pFrm + pIe->offset + offset * i))-> |
| 11977 | present; |
| 11978 | break; |
| 11979 | case SigIePowerConstraints: |
| 11980 | offset = sizeof(tDot11fIEPowerConstraints); |
| 11981 | byteCount = 1; |
| 11982 | pIePresent = ((tDot11fIEPowerConstraints *) |
| 11983 | (pFrm + pIe->offset + offset * i))-> |
| 11984 | present; |
| 11985 | break; |
| 11986 | case SigIeQBSSLoad: |
| 11987 | offset = sizeof(tDot11fIEQBSSLoad); |
| 11988 | byteCount = 5; |
| 11989 | pIePresent = ((tDot11fIEQBSSLoad *) |
| 11990 | (pFrm + pIe->offset + offset * i))-> |
| 11991 | present; |
| 11992 | break; |
| 11993 | case SigIeQComVendorIE: |
| 11994 | offset = sizeof(tDot11fIEQComVendorIE); |
| 11995 | byteCount = 2; |
| 11996 | pIePresent = ((tDot11fIEQComVendorIE *) |
| 11997 | (pFrm + pIe->offset + offset * i))-> |
| 11998 | present; |
| 11999 | break; |
| 12000 | case SigIeQOSCapsAp: |
| 12001 | offset = sizeof(tDot11fIEQOSCapsAp); |
| 12002 | byteCount = 1; |
| 12003 | pIePresent = ((tDot11fIEQOSCapsAp *) |
| 12004 | (pFrm + pIe->offset + offset * i))-> |
| 12005 | present; |
| 12006 | break; |
| 12007 | case SigIeQOSCapsStation: |
| 12008 | offset = sizeof(tDot11fIEQOSCapsStation); |
| 12009 | byteCount = 1; |
| 12010 | pIePresent = ((tDot11fIEQOSCapsStation *) |
| 12011 | (pFrm + pIe->offset + offset * i))-> |
| 12012 | present; |
| 12013 | break; |
| 12014 | case SigIeQosMapSet: |
| 12015 | offset = sizeof(tDot11fIEQosMapSet); |
| 12016 | byteCount = ((tDot11fIEQosMapSet *) |
| 12017 | (pFrm + pIe->offset + offset * i))-> |
| 12018 | num_dscp_exceptions; |
| 12019 | pIePresent = ((tDot11fIEQosMapSet *) |
| 12020 | (pFrm + pIe->offset + offset * i))-> |
| 12021 | present; |
| 12022 | break; |
| 12023 | case SigIeQuiet: |
| 12024 | offset = sizeof(tDot11fIEQuiet); |
| 12025 | byteCount = 6; |
| 12026 | pIePresent = ((tDot11fIEQuiet *) |
| 12027 | (pFrm + pIe->offset + offset * i))-> |
| 12028 | present; |
| 12029 | break; |
| 12030 | case SigIeRCPIIE: |
| 12031 | offset = sizeof(tDot11fIERCPIIE); |
| 12032 | byteCount = 1; |
| 12033 | pIePresent = ((tDot11fIERCPIIE *) |
| 12034 | (pFrm + pIe->offset + offset * i))-> |
| 12035 | present; |
| 12036 | break; |
| 12037 | case SigIeRICDataDesc: |
| 12038 | offset = sizeof(tDot11fIERICDataDesc); |
| 12039 | pnNeeded -= 2 ; /* Subtract the length and Oui as this is our container IE to group Ies and it doesnt have its own length and OUI. */ |
| 12040 | status |= |
| 12041 | dot11f_get_packed_ieric_data_desc( |
| 12042 | pCtx, (tDot11fIERICDataDesc *) |
| 12043 | (pFrm + pIe->offset + offset * i), |
| 12044 | pnNeeded); |
| 12045 | break; |
| 12046 | case SigIeRSN: |
| 12047 | offset = sizeof(tDot11fIERSN); |
| 12048 | status |= |
| 12049 | dot11f_get_packed_iersn( |
| 12050 | pCtx, (tDot11fIERSN *) |
| 12051 | (pFrm + pIe->offset + offset * i), |
| 12052 | pnNeeded); |
| 12053 | break; |
| 12054 | case SigIeRSNIIE: |
| 12055 | offset = sizeof(tDot11fIERSNIIE); |
| 12056 | byteCount = 1; |
| 12057 | pIePresent = ((tDot11fIERSNIIE *) |
| 12058 | (pFrm + pIe->offset + offset * i))-> |
| 12059 | present; |
| 12060 | break; |
| 12061 | case SigIeRSNOpaque: |
| 12062 | offset = sizeof(tDot11fIERSNOpaque); |
| 12063 | byteCount = ((tDot11fIERSNOpaque *) |
| 12064 | (pFrm + pIe->offset + offset * i))-> |
| 12065 | num_data; |
| 12066 | pIePresent = ((tDot11fIERSNOpaque *) |
| 12067 | (pFrm + pIe->offset + offset * i))-> |
| 12068 | present; |
| 12069 | break; |
| 12070 | case SigIeSuppChannels: |
| 12071 | offset = sizeof(tDot11fIESuppChannels); |
| 12072 | byteCount = ((tDot11fIESuppChannels *) |
| 12073 | (pFrm + pIe->offset + offset * i))-> |
| 12074 | num_bands * 2; |
| 12075 | pIePresent = ((tDot11fIESuppChannels *) |
| 12076 | (pFrm + pIe->offset + offset * i))-> |
| 12077 | present; |
| 12078 | break; |
| 12079 | case SigIeSuppOperatingClasses: |
| 12080 | offset = sizeof(tDot11fIESuppOperatingClasses); |
| 12081 | byteCount = ((tDot11fIESuppOperatingClasses *) |
| 12082 | (pFrm + pIe->offset + offset * i))-> |
| 12083 | num_classes; |
| 12084 | pIePresent = ((tDot11fIESuppOperatingClasses *) |
| 12085 | (pFrm + pIe->offset + offset * i))-> |
| 12086 | present; |
| 12087 | break; |
| 12088 | case SigIeSuppRates: |
| 12089 | offset = sizeof(tDot11fIESuppRates); |
| 12090 | byteCount = ((tDot11fIESuppRates *) |
| 12091 | (pFrm + pIe->offset + offset * i))-> |
| 12092 | num_rates; |
| 12093 | pIePresent = ((tDot11fIESuppRates *) |
| 12094 | (pFrm + pIe->offset + offset * i))-> |
| 12095 | present; |
| 12096 | break; |
| 12097 | case SigIeTIM: |
| 12098 | offset = sizeof(tDot11fIETIM); |
| 12099 | byteCount = ((tDot11fIETIM *) |
| 12100 | (pFrm + pIe->offset + offset * i))-> |
| 12101 | num_vbmp + 3; |
| 12102 | pIePresent = ((tDot11fIETIM *) |
| 12103 | (pFrm + pIe->offset + offset * i))-> |
| 12104 | present; |
| 12105 | break; |
| 12106 | case SigIeTPCReport: |
| 12107 | offset = sizeof(tDot11fIETPCReport); |
| 12108 | byteCount = 2; |
| 12109 | pIePresent = ((tDot11fIETPCReport *) |
| 12110 | (pFrm + pIe->offset + offset * i))-> |
| 12111 | present; |
| 12112 | break; |
| 12113 | case SigIeTPCRequest: |
| 12114 | offset = sizeof(tDot11fIETPCRequest); |
| 12115 | byteCount = 0; |
| 12116 | pIePresent = ((tDot11fIETPCRequest *) |
| 12117 | (pFrm + pIe->offset + offset * i))-> |
| 12118 | present; |
| 12119 | break; |
| 12120 | case SigIeTimeAdvertisement: |
| 12121 | offset = sizeof(tDot11fIETimeAdvertisement); |
| 12122 | byteCount = 16; |
| 12123 | pIePresent = ((tDot11fIETimeAdvertisement *) |
| 12124 | (pFrm + pIe->offset + offset * i))-> |
| 12125 | present; |
| 12126 | break; |
| 12127 | case SigIeTimeoutInterval: |
| 12128 | offset = sizeof(tDot11fIETimeoutInterval); |
| 12129 | byteCount = 5; |
| 12130 | pIePresent = ((tDot11fIETimeoutInterval *) |
| 12131 | (pFrm + pIe->offset + offset * i))-> |
| 12132 | present; |
| 12133 | break; |
| 12134 | case SigIeVHTExtBssLoad: |
| 12135 | offset = sizeof(tDot11fIEVHTExtBssLoad); |
| 12136 | byteCount = 5; |
| 12137 | pIePresent = ((tDot11fIEVHTExtBssLoad *) |
| 12138 | (pFrm + pIe->offset + offset * i))-> |
| 12139 | present; |
| 12140 | break; |
| 12141 | case SigIeVendor1IE: |
| 12142 | offset = sizeof(tDot11fIEVendor1IE); |
| 12143 | byteCount = 0; |
| 12144 | pIePresent = ((tDot11fIEVendor1IE *) |
| 12145 | (pFrm + pIe->offset + offset * i))-> |
| 12146 | present; |
| 12147 | break; |
| 12148 | case SigIeVendor3IE: |
| 12149 | offset = sizeof(tDot11fIEVendor3IE); |
| 12150 | byteCount = 0; |
| 12151 | pIePresent = ((tDot11fIEVendor3IE *) |
| 12152 | (pFrm + pIe->offset + offset * i))-> |
| 12153 | present; |
| 12154 | break; |
| 12155 | case SigIeWAPI: |
| 12156 | offset = sizeof(tDot11fIEWAPI); |
| 12157 | status |= |
| 12158 | dot11f_get_packed_iewapi( |
| 12159 | pCtx, (tDot11fIEWAPI *) |
| 12160 | (pFrm + pIe->offset + offset * i), |
| 12161 | pnNeeded); |
| 12162 | break; |
| 12163 | case SigIeWAPIOpaque: |
| 12164 | offset = sizeof(tDot11fIEWAPIOpaque); |
| 12165 | byteCount = ((tDot11fIEWAPIOpaque *) |
| 12166 | (pFrm + pIe->offset + offset * i))-> |
| 12167 | num_data; |
| 12168 | pIePresent = ((tDot11fIEWAPIOpaque *) |
| 12169 | (pFrm + pIe->offset + offset * i))-> |
| 12170 | present; |
| 12171 | break; |
| 12172 | case SigIeWFATPC: |
| 12173 | offset = sizeof(tDot11fIEWFATPC); |
| 12174 | byteCount = 2; |
| 12175 | pIePresent = ((tDot11fIEWFATPC *) |
| 12176 | (pFrm + pIe->offset + offset * i))-> |
| 12177 | present; |
| 12178 | break; |
| 12179 | case SigIeWFDIEOpaque: |
| 12180 | offset = sizeof(tDot11fIEWFDIEOpaque); |
| 12181 | byteCount = ((tDot11fIEWFDIEOpaque *) |
| 12182 | (pFrm + pIe->offset + offset * i))-> |
| 12183 | num_data; |
| 12184 | pIePresent = ((tDot11fIEWFDIEOpaque *) |
| 12185 | (pFrm + pIe->offset + offset * i))-> |
| 12186 | present; |
| 12187 | break; |
| 12188 | case SigIeWMMCaps: |
| 12189 | offset = sizeof(tDot11fIEWMMCaps); |
| 12190 | byteCount = 2; |
| 12191 | pIePresent = ((tDot11fIEWMMCaps *) |
| 12192 | (pFrm + pIe->offset + offset * i))-> |
| 12193 | present; |
| 12194 | break; |
| 12195 | case SigIeWMMInfoAp: |
| 12196 | offset = sizeof(tDot11fIEWMMInfoAp); |
| 12197 | byteCount = 2; |
| 12198 | pIePresent = ((tDot11fIEWMMInfoAp *) |
| 12199 | (pFrm + pIe->offset + offset * i))-> |
| 12200 | present; |
| 12201 | break; |
| 12202 | case SigIeWMMInfoStation: |
| 12203 | offset = sizeof(tDot11fIEWMMInfoStation); |
| 12204 | byteCount = 2; |
| 12205 | pIePresent = ((tDot11fIEWMMInfoStation *) |
| 12206 | (pFrm + pIe->offset + offset * i))-> |
| 12207 | present; |
| 12208 | break; |
| 12209 | case SigIeWMMParams: |
| 12210 | offset = sizeof(tDot11fIEWMMParams); |
| 12211 | byteCount = 19; |
| 12212 | pIePresent = ((tDot11fIEWMMParams *) |
| 12213 | (pFrm + pIe->offset + offset * i))-> |
| 12214 | present; |
| 12215 | break; |
| 12216 | case SigIeWPA: |
| 12217 | offset = sizeof(tDot11fIEWPA); |
| 12218 | status |= |
| 12219 | dot11f_get_packed_iewpa( |
| 12220 | pCtx, (tDot11fIEWPA *) |
| 12221 | (pFrm + pIe->offset + offset * i), |
| 12222 | pnNeeded); |
| 12223 | break; |
| 12224 | case SigIeWPAOpaque: |
| 12225 | offset = sizeof(tDot11fIEWPAOpaque); |
| 12226 | byteCount = ((tDot11fIEWPAOpaque *) |
| 12227 | (pFrm + pIe->offset + offset * i))-> |
| 12228 | num_data; |
| 12229 | pIePresent = ((tDot11fIEWPAOpaque *) |
| 12230 | (pFrm + pIe->offset + offset * i))-> |
| 12231 | present; |
| 12232 | break; |
| 12233 | case SigIeWSC: |
| 12234 | offset = sizeof(tDot11fIEWSC); |
| 12235 | status |= |
| 12236 | dot11f_get_packed_iewsc( |
| 12237 | pCtx, (tDot11fIEWSC *) |
| 12238 | (pFrm + pIe->offset + offset * i), |
| 12239 | pnNeeded); |
| 12240 | break; |
| 12241 | case SigIeWscAssocReq: |
| 12242 | offset = sizeof(tDot11fIEWscAssocReq); |
| 12243 | status |= |
| 12244 | dot11f_get_packed_ie_wsc_assoc_req( |
| 12245 | pCtx, (tDot11fIEWscAssocReq *) |
| 12246 | (pFrm + pIe->offset + offset * i), |
| 12247 | pnNeeded); |
| 12248 | break; |
| 12249 | case SigIeWscAssocRes: |
| 12250 | offset = sizeof(tDot11fIEWscAssocRes); |
| 12251 | status |= |
| 12252 | dot11f_get_packed_ie_wsc_assoc_res( |
| 12253 | pCtx, (tDot11fIEWscAssocRes *) |
| 12254 | (pFrm + pIe->offset + offset * i), |
| 12255 | pnNeeded); |
| 12256 | break; |
| 12257 | case SigIeWscBeacon: |
| 12258 | offset = sizeof(tDot11fIEWscBeacon); |
| 12259 | status |= |
| 12260 | dot11f_get_packed_ie_wsc_beacon( |
| 12261 | pCtx, (tDot11fIEWscBeacon *) |
| 12262 | (pFrm + pIe->offset + offset * i), |
| 12263 | pnNeeded); |
| 12264 | break; |
| 12265 | case SigIeWscBeaconProbeRes: |
| 12266 | offset = sizeof(tDot11fIEWscBeaconProbeRes); |
| 12267 | status |= |
| 12268 | dot11f_get_packed_ie_wsc_beacon_probe_res( |
| 12269 | pCtx, (tDot11fIEWscBeaconProbeRes *) |
| 12270 | (pFrm + pIe->offset + offset * i), |
| 12271 | pnNeeded); |
| 12272 | break; |
| 12273 | case SigIeWscIEOpaque: |
| 12274 | offset = sizeof(tDot11fIEWscIEOpaque); |
| 12275 | byteCount = ((tDot11fIEWscIEOpaque *) |
| 12276 | (pFrm + pIe->offset + offset * i))-> |
| 12277 | num_data; |
| 12278 | pIePresent = ((tDot11fIEWscIEOpaque *) |
| 12279 | (pFrm + pIe->offset + offset * i))-> |
| 12280 | present; |
| 12281 | break; |
| 12282 | case SigIeWscProbeReq: |
| 12283 | offset = sizeof(tDot11fIEWscProbeReq); |
| 12284 | status |= |
| 12285 | dot11f_get_packed_ie_wsc_probe_req( |
| 12286 | pCtx, (tDot11fIEWscProbeReq *) |
| 12287 | (pFrm + pIe->offset + offset * i), |
| 12288 | pnNeeded); |
| 12289 | break; |
| 12290 | case SigIeWscProbeRes: |
| 12291 | offset = sizeof(tDot11fIEWscProbeRes); |
| 12292 | status |= |
| 12293 | dot11f_get_packed_ie_wsc_probe_res( |
| 12294 | pCtx, (tDot11fIEWscProbeRes *) |
| 12295 | (pFrm + pIe->offset + offset * i), |
| 12296 | pnNeeded); |
| 12297 | break; |
| 12298 | case SigIeWscReassocRes: |
| 12299 | offset = sizeof(tDot11fIEWscReassocRes); |
| 12300 | status |= |
| 12301 | dot11f_get_packed_ie_wsc_reassoc_res( |
| 12302 | pCtx, (tDot11fIEWscReassocRes *) |
| 12303 | (pFrm + pIe->offset + offset * i), |
| 12304 | pnNeeded); |
| 12305 | break; |
| 12306 | case SigIeext_chan_switch_ann: |
| 12307 | offset = sizeof(tDot11fIEext_chan_switch_ann); |
| 12308 | byteCount = 4; |
| 12309 | pIePresent = ((tDot11fIEext_chan_switch_ann *) |
| 12310 | (pFrm + pIe->offset + offset * i))-> |
| 12311 | present; |
| 12312 | break; |
| 12313 | case SigIeht2040_bss_coexistence: |
| 12314 | offset = sizeof(tDot11fIEht2040_bss_coexistence); |
| 12315 | byteCount = 1; |
| 12316 | pIePresent = ((tDot11fIEht2040_bss_coexistence *) |
| 12317 | (pFrm + pIe->offset + offset * i))-> |
| 12318 | present; |
| 12319 | break; |
| 12320 | case SigIeht2040_bss_intolerant_report: |
| 12321 | offset = sizeof(tDot11fIEht2040_bss_intolerant_report); |
| 12322 | byteCount = ((tDot11fIEht2040_bss_intolerant_report *) |
| 12323 | (pFrm + pIe->offset + offset * i))-> |
| 12324 | num_channel_list + 1; |
| 12325 | pIePresent = ((tDot11fIEht2040_bss_intolerant_report *) |
| 12326 | (pFrm + pIe->offset + offset * i))-> |
| 12327 | present; |
| 12328 | break; |
| 12329 | case SigIesec_chan_offset_ele: |
| 12330 | offset = sizeof(tDot11fIEsec_chan_offset_ele); |
| 12331 | byteCount = 1; |
| 12332 | pIePresent = ((tDot11fIEsec_chan_offset_ele *) |
| 12333 | (pFrm + pIe->offset + offset * i))-> |
| 12334 | present; |
| 12335 | break; |
| 12336 | case SigIevendor2_ie: |
| 12337 | offset = sizeof(tDot11fIEvendor2_ie); |
| 12338 | status |= |
| 12339 | dot11f_get_packed_ie_vendor2_ie( |
| 12340 | pCtx, (tDot11fIEvendor2_ie *) |
| 12341 | (pFrm + pIe->offset + offset * i), |
| 12342 | pnNeeded); |
| 12343 | break; |
| 12344 | default: |
| 12345 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR-- I don" |
| 12346 | "'t know about the IE signature %d; this is most l" |
| 12347 | "ikely a bug in 'framesc'.\n"), pIe->sig); |
| 12348 | return DOT11F_INTERNAL_ERROR; |
| 12349 | } /*End of switch Case*/ |
| 12350 | |
| 12351 | if (byteCount && pIePresent) |
| 12352 | *pnNeeded += byteCount; |
| 12353 | } /*End of for loop*/ |
| 12354 | } |
| 12355 | ++pIe; |
| 12356 | } |
| 12357 | return status; |
| 12358 | |
| 12359 | } |
| 12360 | |
| 12361 | static uint32_t get_packed_size_tlv_core(tpAniSirGlobal pCtx, |
| 12362 | uint8_t *pFrm, |
| 12363 | uint32_t *pnNeeded, |
| 12364 | const tTLVDefn TLVs[]) |
| 12365 | { |
| 12366 | const tTLVDefn *pTlv; |
| 12367 | uint32_t status; |
| 12368 | tFRAMES_BOOL *pfFound; |
| 12369 | uint32_t byteCount = 0; |
| 12370 | uint8_t pTlvPresent = 0; |
| 12371 | |
| 12372 | status = DOT11F_PARSE_SUCCESS; |
| 12373 | |
| 12374 | pTlv = &(TLVs[0]); |
| 12375 | while (0xffff != pTlv->id) { |
| 12376 | pfFound = (tFRAMES_BOOL *)(pFrm + pTlv->offset + |
| 12377 | pTlv->presenceOffset); |
| 12378 | if (*pfFound) { |
| 12379 | *pnNeeded += (pTlv->sType + pTlv->sLen); |
| 12380 | if (pTlv->pec) |
| 12381 | *pnNeeded += 3U; |
| 12382 | switch (pTlv->sig) { |
| 12383 | case SigTlvAuthorizedMACs: |
| 12384 | byteCount = 6; |
| 12385 | pTlvPresent = ((tDot11fTLVAuthorizedMACs *) |
| 12386 | (pFrm + pTlv->offset))->present; |
| 12387 | break; |
| 12388 | case SigTlvRequestToEnroll: |
| 12389 | byteCount = 1; |
| 12390 | pTlvPresent = ((tDot11fTLVRequestToEnroll *) |
| 12391 | (pFrm + pTlv->offset))->present; |
| 12392 | break; |
| 12393 | case SigTlvVersion2: |
| 12394 | byteCount = 1; |
| 12395 | pTlvPresent = ((tDot11fTLVVersion2 *) |
| 12396 | (pFrm + pTlv->offset))->present; |
| 12397 | break; |
| 12398 | case SigTlvAPSetupLocked: |
| 12399 | byteCount = 1; |
| 12400 | pTlvPresent = ((tDot11fTLVAPSetupLocked *) |
| 12401 | (pFrm + pTlv->offset))->present; |
| 12402 | break; |
| 12403 | case SigTlvAssociationState: |
| 12404 | byteCount = 2; |
| 12405 | pTlvPresent = ((tDot11fTLVAssociationState *) |
| 12406 | (pFrm + pTlv->offset))->present; |
| 12407 | break; |
| 12408 | case SigTlvConfigMethods: |
| 12409 | byteCount = 2; |
| 12410 | pTlvPresent = ((tDot11fTLVConfigMethods *) |
| 12411 | (pFrm + pTlv->offset))->present; |
| 12412 | break; |
| 12413 | case SigTlvConfigurationError: |
| 12414 | byteCount = 2; |
| 12415 | pTlvPresent = ((tDot11fTLVConfigurationError *) |
| 12416 | (pFrm + pTlv->offset))->present; |
| 12417 | break; |
| 12418 | case SigTlvDeviceName: |
| 12419 | byteCount = ((tDot11fTLVDeviceName *)(pFrm + pTlv->offset))->num_text; |
| 12420 | pTlvPresent = ((tDot11fTLVDeviceName *) |
| 12421 | (pFrm + pTlv->offset))->present; |
| 12422 | break; |
| 12423 | case SigTlvDevicePasswordID: |
| 12424 | byteCount = 2; |
| 12425 | pTlvPresent = ((tDot11fTLVDevicePasswordID *) |
| 12426 | (pFrm + pTlv->offset))->present; |
| 12427 | break; |
| 12428 | case SigTlvExtendedListenTiming: |
| 12429 | byteCount = 4; |
| 12430 | pTlvPresent = ((tDot11fTLVExtendedListenTiming *) |
| 12431 | (pFrm + pTlv->offset))->present; |
| 12432 | break; |
| 12433 | case SigTlvListenChannel: |
| 12434 | byteCount = 5; |
| 12435 | pTlvPresent = ((tDot11fTLVListenChannel *) |
| 12436 | (pFrm + pTlv->offset))->present; |
| 12437 | break; |
| 12438 | case SigTlvManufacturer: |
| 12439 | byteCount = ((tDot11fTLVManufacturer *)(pFrm + pTlv->offset))->num_name; |
| 12440 | pTlvPresent = ((tDot11fTLVManufacturer *) |
| 12441 | (pFrm + pTlv->offset))->present; |
| 12442 | break; |
| 12443 | case SigTlvMinorReasonCode: |
| 12444 | byteCount = 1; |
| 12445 | pTlvPresent = ((tDot11fTLVMinorReasonCode *) |
| 12446 | (pFrm + pTlv->offset))->present; |
| 12447 | break; |
| 12448 | case SigTlvModelName: |
| 12449 | byteCount = ((tDot11fTLVModelName *)(pFrm + pTlv->offset))->num_text; |
| 12450 | pTlvPresent = ((tDot11fTLVModelName *) |
| 12451 | (pFrm + pTlv->offset))->present; |
| 12452 | break; |
| 12453 | case SigTlvModelNumber: |
| 12454 | byteCount = ((tDot11fTLVModelNumber *)(pFrm + pTlv->offset))->num_text; |
| 12455 | pTlvPresent = ((tDot11fTLVModelNumber *) |
| 12456 | (pFrm + pTlv->offset))->present; |
| 12457 | break; |
| 12458 | case SigTlvNoticeOfAbsence: |
| 12459 | byteCount = ((tDot11fTLVNoticeOfAbsence *)(pFrm + pTlv->offset))->num_NoADesc+2; |
| 12460 | pTlvPresent = ((tDot11fTLVNoticeOfAbsence *) |
| 12461 | (pFrm + pTlv->offset))->present; |
| 12462 | break; |
| 12463 | case SigTlvOperatingChannel: |
| 12464 | byteCount = 5; |
| 12465 | pTlvPresent = ((tDot11fTLVOperatingChannel *) |
| 12466 | (pFrm + pTlv->offset))->present; |
| 12467 | break; |
| 12468 | case SigTlvP2PCapability: |
| 12469 | byteCount = 2; |
| 12470 | pTlvPresent = ((tDot11fTLVP2PCapability *) |
| 12471 | (pFrm + pTlv->offset))->present; |
| 12472 | break; |
| 12473 | case SigTlvP2PDeviceId: |
| 12474 | byteCount = 6; |
| 12475 | pTlvPresent = ((tDot11fTLVP2PDeviceId *) |
| 12476 | (pFrm + pTlv->offset))->present; |
| 12477 | break; |
| 12478 | case SigTlvP2PDeviceInfo: |
| 12479 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pFrm + pTlv->offset, pnNeeded, TLVS_P2PDeviceInfo); |
| 12480 | byteCount = 16; |
| 12481 | pTlvPresent = ((tDot11fTLVP2PDeviceInfo *) |
| 12482 | (pFrm + pTlv->offset))->present; |
| 12483 | break; |
| 12484 | case SigTlvP2PGroupInfo: |
| 12485 | byteCount = ((tDot11fTLVP2PGroupInfo *)(pFrm + pTlv->offset))->num_P2PClientInfoDesc; |
| 12486 | pTlvPresent = ((tDot11fTLVP2PGroupInfo *) |
| 12487 | (pFrm + pTlv->offset))->present; |
| 12488 | break; |
| 12489 | case SigTlvP2PStatus: |
| 12490 | byteCount = 1; |
| 12491 | pTlvPresent = ((tDot11fTLVP2PStatus *) |
| 12492 | (pFrm + pTlv->offset))->present; |
| 12493 | break; |
| 12494 | case SigTlvPrimaryDeviceType: |
| 12495 | byteCount = 8; |
| 12496 | pTlvPresent = ((tDot11fTLVPrimaryDeviceType *) |
| 12497 | (pFrm + pTlv->offset))->present; |
| 12498 | break; |
| 12499 | case SigTlvRFBands: |
| 12500 | byteCount = 1; |
| 12501 | pTlvPresent = ((tDot11fTLVRFBands *) |
| 12502 | (pFrm + pTlv->offset))->present; |
| 12503 | break; |
| 12504 | case SigTlvRequestDeviceType: |
| 12505 | byteCount = 8; |
| 12506 | pTlvPresent = ((tDot11fTLVRequestDeviceType *) |
| 12507 | (pFrm + pTlv->offset))->present; |
| 12508 | break; |
| 12509 | case SigTlvRequestType: |
| 12510 | byteCount = 1; |
| 12511 | pTlvPresent = ((tDot11fTLVRequestType *) |
| 12512 | (pFrm + pTlv->offset))->present; |
| 12513 | break; |
| 12514 | case SigTlvResponseType: |
| 12515 | byteCount = 1; |
| 12516 | pTlvPresent = ((tDot11fTLVResponseType *) |
| 12517 | (pFrm + pTlv->offset))->present; |
| 12518 | break; |
| 12519 | case SigTlvSelectedRegistrar: |
| 12520 | byteCount = 1; |
| 12521 | pTlvPresent = ((tDot11fTLVSelectedRegistrar *) |
| 12522 | (pFrm + pTlv->offset))->present; |
| 12523 | break; |
| 12524 | case SigTlvSelectedRegistrarConfigMethods: |
| 12525 | byteCount = 2; |
| 12526 | pTlvPresent = ((tDot11fTLVSelectedRegistrarConfigMethods *) |
| 12527 | (pFrm + pTlv->offset))->present; |
| 12528 | break; |
| 12529 | case SigTlvSerialNumber: |
| 12530 | byteCount = ((tDot11fTLVSerialNumber *)(pFrm + pTlv->offset))->num_text; |
| 12531 | pTlvPresent = ((tDot11fTLVSerialNumber *) |
| 12532 | (pFrm + pTlv->offset))->present; |
| 12533 | break; |
| 12534 | case SigTlvUUID_E: |
| 12535 | byteCount = 16; |
| 12536 | pTlvPresent = ((tDot11fTLVUUID_E *) |
| 12537 | (pFrm + pTlv->offset))->present; |
| 12538 | break; |
| 12539 | case SigTlvUUID_R: |
| 12540 | byteCount = 16; |
| 12541 | pTlvPresent = ((tDot11fTLVUUID_R *) |
| 12542 | (pFrm + pTlv->offset))->present; |
| 12543 | break; |
| 12544 | case SigTlvVendorExtension: |
| 12545 | status = get_packed_size_tlv_core(pCtx, (uint8_t *)pFrm + pTlv->offset, pnNeeded, TLVS_VendorExtension); |
| 12546 | byteCount = 3; |
| 12547 | pTlvPresent = ((tDot11fTLVVendorExtension *) |
| 12548 | (pFrm + pTlv->offset))->present; |
| 12549 | break; |
| 12550 | case SigTlvVersion: |
| 12551 | byteCount = 1; |
| 12552 | pTlvPresent = ((tDot11fTLVVersion *) |
| 12553 | (pFrm + pTlv->offset))->present; |
| 12554 | break; |
| 12555 | case SigTlvWPSState: |
| 12556 | byteCount = 1; |
| 12557 | pTlvPresent = ((tDot11fTLVWPSState *) |
| 12558 | (pFrm + pTlv->offset))->present; |
| 12559 | break; |
| 12560 | case SigTlvP2PInterface: |
| 12561 | byteCount = 6; |
| 12562 | pTlvPresent = ((tDot11fTLVP2PInterface *) |
| 12563 | (pFrm + pTlv->offset))->present; |
| 12564 | break; |
| 12565 | case SigTlvP2PManageability: |
| 12566 | byteCount = 1; |
| 12567 | pTlvPresent = ((tDot11fTLVP2PManageability *) |
| 12568 | (pFrm + pTlv->offset))->present; |
| 12569 | break; |
| 12570 | default: |
| 12571 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR-- I don" |
| 12572 | "'t know about the TLV signature %d; this is most l" |
| 12573 | "ikely a bug in 'framesc'.\n"), pTlv->sig); |
| 12574 | return DOT11F_INTERNAL_ERROR; |
| 12575 | } |
| 12576 | if (pTlvPresent) { |
| 12577 | *pnNeeded += byteCount; |
| 12578 | } |
| 12579 | } |
| 12580 | ++pTlv; |
| 12581 | } |
| 12582 | return status; |
| 12583 | } |
| 12584 | void dot11f_pack_ff_aid(tpAniSirGlobal pCtx, |
| 12585 | tDot11fFfAID *pSrc, |
| 12586 | uint8_t *pBuf) |
| 12587 | { |
| 12588 | frameshtons(pCtx, pBuf, pSrc->associd, 0); |
| 12589 | (void)pCtx; |
| 12590 | } /* End dot11f_pack_ff_aid. */ |
| 12591 | |
| 12592 | void dot11f_pack_ff_action(tpAniSirGlobal pCtx, |
| 12593 | tDot11fFfAction *pSrc, |
| 12594 | uint8_t *pBuf) |
| 12595 | { |
| 12596 | *pBuf = pSrc->action; |
| 12597 | (void)pCtx; |
| 12598 | } /* End dot11f_pack_ff_action. */ |
| 12599 | |
| 12600 | void dot11f_pack_ff_auth_algo(tpAniSirGlobal pCtx, |
| 12601 | tDot11fFfAuthAlgo *pSrc, |
| 12602 | uint8_t *pBuf) |
| 12603 | { |
| 12604 | frameshtons(pCtx, pBuf, pSrc->algo, 0); |
| 12605 | (void)pCtx; |
| 12606 | } /* End dot11f_pack_ff_auth_algo. */ |
| 12607 | |
| 12608 | void dot11f_pack_ff_auth_seq_no(tpAniSirGlobal pCtx, |
| 12609 | tDot11fFfAuthSeqNo *pSrc, |
| 12610 | uint8_t *pBuf) |
| 12611 | { |
| 12612 | frameshtons(pCtx, pBuf, pSrc->no, 0); |
| 12613 | (void)pCtx; |
| 12614 | } /* End dot11f_pack_ff_auth_seq_no. */ |
| 12615 | |
| 12616 | void dot11f_pack_ff_beacon_interval(tpAniSirGlobal pCtx, |
| 12617 | tDot11fFfBeaconInterval *pSrc, |
| 12618 | uint8_t *pBuf) |
| 12619 | { |
| 12620 | frameshtons(pCtx, pBuf, pSrc->interval, 0); |
| 12621 | (void)pCtx; |
| 12622 | } /* End dot11f_pack_ff_beacon_interval. */ |
| 12623 | |
| 12624 | void dot11f_pack_ff_capabilities(tpAniSirGlobal pCtx, |
| 12625 | tDot11fFfCapabilities *pSrc, |
| 12626 | uint8_t *pBuf) |
| 12627 | { |
| 12628 | uint16_t tmp66__; |
| 12629 | tmp66__ = 0U; |
| 12630 | tmp66__ |= (pSrc->ess << 0); |
| 12631 | tmp66__ |= (pSrc->ibss << 1); |
| 12632 | tmp66__ |= (pSrc->cfPollable << 2); |
| 12633 | tmp66__ |= (pSrc->cfPollReq << 3); |
| 12634 | tmp66__ |= (pSrc->privacy << 4); |
| 12635 | tmp66__ |= (pSrc->shortPreamble << 5); |
| 12636 | tmp66__ |= (pSrc->pbcc << 6); |
| 12637 | tmp66__ |= (pSrc->channelAgility << 7); |
| 12638 | tmp66__ |= (pSrc->spectrumMgt << 8); |
| 12639 | tmp66__ |= (pSrc->qos << 9); |
| 12640 | tmp66__ |= (pSrc->shortSlotTime << 10); |
| 12641 | tmp66__ |= (pSrc->apsd << 11); |
| 12642 | tmp66__ |= (pSrc->rrm << 12); |
| 12643 | tmp66__ |= (pSrc->dsssOfdm << 13); |
| 12644 | tmp66__ |= (pSrc->delayedBA << 14); |
| 12645 | tmp66__ |= (pSrc->immediateBA << 15); |
| 12646 | frameshtons(pCtx, pBuf, tmp66__, 0); |
| 12647 | (void)pCtx; |
| 12648 | } /* End dot11f_pack_ff_capabilities. */ |
| 12649 | |
| 12650 | void dot11f_pack_ff_category(tpAniSirGlobal pCtx, |
| 12651 | tDot11fFfCategory *pSrc, |
| 12652 | uint8_t *pBuf) |
| 12653 | { |
| 12654 | *pBuf = pSrc->category; |
| 12655 | (void)pCtx; |
| 12656 | } /* End dot11f_pack_ff_category. */ |
| 12657 | |
| 12658 | void dot11f_pack_ff_current_ap_address(tpAniSirGlobal pCtx, |
| 12659 | tDot11fFfCurrentAPAddress *pSrc, |
| 12660 | uint8_t *pBuf) |
| 12661 | { |
| 12662 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->mac, 6); |
| 12663 | (void)pCtx; |
| 12664 | } /* End dot11f_pack_ff_current_ap_address. */ |
| 12665 | |
| 12666 | void dot11f_pack_ff_dialog_token(tpAniSirGlobal pCtx, |
| 12667 | tDot11fFfDialogToken *pSrc, |
| 12668 | uint8_t *pBuf) |
| 12669 | { |
| 12670 | *pBuf = pSrc->token; |
| 12671 | (void)pCtx; |
| 12672 | } /* End dot11f_pack_ff_dialog_token. */ |
| 12673 | |
| 12674 | void dot11f_pack_ff_link_margin(tpAniSirGlobal pCtx, |
| 12675 | tDot11fFfLinkMargin *pSrc, |
| 12676 | uint8_t *pBuf) |
| 12677 | { |
| 12678 | *pBuf = pSrc->linkMargin; |
| 12679 | (void)pCtx; |
| 12680 | } /* End dot11f_pack_ff_link_margin. */ |
| 12681 | |
| 12682 | void dot11f_pack_ff_listen_interval(tpAniSirGlobal pCtx, |
| 12683 | tDot11fFfListenInterval *pSrc, |
| 12684 | uint8_t *pBuf) |
| 12685 | { |
| 12686 | frameshtons(pCtx, pBuf, pSrc->interval, 0); |
| 12687 | (void)pCtx; |
| 12688 | } /* End dot11f_pack_ff_listen_interval. */ |
| 12689 | |
| 12690 | void dot11f_pack_ff_max_tx_power(tpAniSirGlobal pCtx, |
| 12691 | tDot11fFfMaxTxPower *pSrc, |
| 12692 | uint8_t *pBuf) |
| 12693 | { |
| 12694 | *pBuf = pSrc->maxTxPower; |
| 12695 | (void)pCtx; |
| 12696 | } /* End dot11f_pack_ff_max_tx_power. */ |
| 12697 | |
| 12698 | void dot11f_pack_ff_num_of_repetitions(tpAniSirGlobal pCtx, |
| 12699 | tDot11fFfNumOfRepetitions *pSrc, |
| 12700 | uint8_t *pBuf) |
| 12701 | { |
| 12702 | frameshtons(pCtx, pBuf, pSrc->repetitions, 0); |
| 12703 | (void)pCtx; |
| 12704 | } /* End dot11f_pack_ff_num_of_repetitions. */ |
| 12705 | |
| 12706 | void dot11f_pack_ff_operating_mode(tpAniSirGlobal pCtx, |
| 12707 | tDot11fFfOperatingMode *pSrc, |
| 12708 | uint8_t *pBuf) |
| 12709 | { |
| 12710 | uint8_t tmp67__; |
| 12711 | tmp67__ = 0U; |
| 12712 | tmp67__ |= (pSrc->chanWidth << 0); |
| 12713 | tmp67__ |= (pSrc->reserved << 2); |
| 12714 | tmp67__ |= (pSrc->rxNSS << 4); |
| 12715 | tmp67__ |= (pSrc->rxNSSType << 7); |
| 12716 | *pBuf = tmp67__; |
| 12717 | (void)pCtx; |
| 12718 | } /* End dot11f_pack_ff_operating_mode. */ |
| 12719 | |
| 12720 | void dot11f_pack_ff_rcpi(tpAniSirGlobal pCtx, |
| 12721 | tDot11fFfRCPI *pSrc, |
| 12722 | uint8_t *pBuf) |
| 12723 | { |
| 12724 | *pBuf = pSrc->rcpi; |
| 12725 | (void)pCtx; |
| 12726 | } /* End dot11f_pack_ff_rcpi. */ |
| 12727 | |
| 12728 | void dot11f_pack_ff_rsni(tpAniSirGlobal pCtx, |
| 12729 | tDot11fFfRSNI *pSrc, |
| 12730 | uint8_t *pBuf) |
| 12731 | { |
| 12732 | *pBuf = pSrc->rsni; |
| 12733 | (void)pCtx; |
| 12734 | } /* End dot11f_pack_ff_rsni. */ |
| 12735 | |
| 12736 | void dot11f_pack_ff_reason(tpAniSirGlobal pCtx, |
| 12737 | tDot11fFfReason *pSrc, |
| 12738 | uint8_t *pBuf) |
| 12739 | { |
| 12740 | frameshtons(pCtx, pBuf, pSrc->code, 0); |
| 12741 | (void)pCtx; |
| 12742 | } /* End dot11f_pack_ff_reason. */ |
| 12743 | |
| 12744 | void dot11f_pack_ff_rx_antenna_id(tpAniSirGlobal pCtx, |
| 12745 | tDot11fFfRxAntennaId *pSrc, |
| 12746 | uint8_t *pBuf) |
| 12747 | { |
| 12748 | *pBuf = pSrc->antennaId; |
| 12749 | (void)pCtx; |
| 12750 | } /* End dot11f_pack_ff_rx_antenna_id. */ |
| 12751 | |
| 12752 | void dot11f_pack_ff_sm_power_mode_set(tpAniSirGlobal pCtx, |
| 12753 | tDot11fFfSMPowerModeSet *pSrc, |
| 12754 | uint8_t *pBuf) |
| 12755 | { |
| 12756 | uint8_t tmp68__; |
| 12757 | tmp68__ = 0U; |
| 12758 | tmp68__ |= (pSrc->PowerSave_En << 0); |
| 12759 | tmp68__ |= (pSrc->Mode << 1); |
| 12760 | tmp68__ |= (pSrc->reserved << 2); |
| 12761 | *pBuf = tmp68__; |
| 12762 | (void)pCtx; |
| 12763 | } /* End dot11f_pack_ff_sm_power_mode_set. */ |
| 12764 | |
| 12765 | void dot11f_pack_ff_status(tpAniSirGlobal pCtx, |
| 12766 | tDot11fFfStatus *pSrc, |
| 12767 | uint8_t *pBuf) |
| 12768 | { |
| 12769 | frameshtons(pCtx, pBuf, pSrc->status, 0); |
| 12770 | (void)pCtx; |
| 12771 | } /* End dot11f_pack_ff_status. */ |
| 12772 | |
| 12773 | void dot11f_pack_ff_status_code(tpAniSirGlobal pCtx, |
| 12774 | tDot11fFfStatusCode *pSrc, |
| 12775 | uint8_t *pBuf) |
| 12776 | { |
| 12777 | *pBuf = pSrc->statusCode; |
| 12778 | (void)pCtx; |
| 12779 | } /* End dot11f_pack_ff_status_code. */ |
| 12780 | |
| 12781 | void dot11f_pack_ff_tpc_ele_id(tpAniSirGlobal pCtx, |
| 12782 | tDot11fFfTPCEleID *pSrc, |
| 12783 | uint8_t *pBuf) |
| 12784 | { |
| 12785 | *pBuf = pSrc->TPCId; |
| 12786 | (void)pCtx; |
| 12787 | } /* End dot11f_pack_ff_tpc_ele_id. */ |
| 12788 | |
| 12789 | void dot11f_pack_ff_tpc_ele_len(tpAniSirGlobal pCtx, |
| 12790 | tDot11fFfTPCEleLen *pSrc, |
| 12791 | uint8_t *pBuf) |
| 12792 | { |
| 12793 | *pBuf = pSrc->TPCLen; |
| 12794 | (void)pCtx; |
| 12795 | } /* End dot11f_pack_ff_tpc_ele_len. */ |
| 12796 | |
| 12797 | void dot11f_pack_ff_ts_info(tpAniSirGlobal pCtx, |
| 12798 | tDot11fFfTSInfo *pSrc, |
| 12799 | uint8_t *pBuf) |
| 12800 | { |
| 12801 | uint32_t tmp69__; |
| 12802 | tmp69__ = 0U; |
| 12803 | tmp69__ |= (pSrc->traffic_type << 0); |
| 12804 | tmp69__ |= (pSrc->tsid << 1); |
| 12805 | tmp69__ |= (pSrc->direction << 5); |
| 12806 | tmp69__ |= (pSrc->access_policy << 7); |
| 12807 | tmp69__ |= (pSrc->aggregation << 9); |
| 12808 | tmp69__ |= (pSrc->psb << 10); |
| 12809 | tmp69__ |= (pSrc->user_priority << 11); |
| 12810 | tmp69__ |= (pSrc->tsinfo_ack_pol << 14); |
| 12811 | tmp69__ |= (pSrc->schedule << 16); |
| 12812 | tmp69__ |= (pSrc->unused << 17); |
| 12813 | frameshtonl(pCtx, pBuf, tmp69__, 0); |
| 12814 | (void)pCtx; |
| 12815 | } /* End dot11f_pack_ff_ts_info. */ |
| 12816 | |
| 12817 | void dot11f_pack_ff_time_stamp(tpAniSirGlobal pCtx, |
| 12818 | tDot11fFfTimeStamp *pSrc, |
| 12819 | uint8_t *pBuf) |
| 12820 | { |
| 12821 | frameshtonq(pCtx, pBuf, pSrc->timestamp, 0); |
| 12822 | (void)pCtx; |
| 12823 | } /* End dot11f_pack_ff_time_stamp. */ |
| 12824 | |
| 12825 | void dot11f_pack_ff_transaction_id(tpAniSirGlobal pCtx, |
| 12826 | tDot11fFfTransactionId *pSrc, |
| 12827 | uint8_t *pBuf) |
| 12828 | { |
| 12829 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->transId, 2); |
| 12830 | (void)pCtx; |
| 12831 | } /* End dot11f_pack_ff_transaction_id. */ |
| 12832 | |
| 12833 | void dot11f_pack_ff_tx_antenna_id(tpAniSirGlobal pCtx, |
| 12834 | tDot11fFfTxAntennaId *pSrc, |
| 12835 | uint8_t *pBuf) |
| 12836 | { |
| 12837 | *pBuf = pSrc->antennaId; |
| 12838 | (void)pCtx; |
| 12839 | } /* End dot11f_pack_ff_tx_antenna_id. */ |
| 12840 | |
| 12841 | void dot11f_pack_ff_tx_power(tpAniSirGlobal pCtx, |
| 12842 | tDot11fFfTxPower *pSrc, |
| 12843 | uint8_t *pBuf) |
| 12844 | { |
| 12845 | *pBuf = pSrc->txPower; |
| 12846 | (void)pCtx; |
| 12847 | } /* End dot11f_pack_ff_tx_power. */ |
| 12848 | |
| 12849 | void dot11f_pack_ff_vht_membership_status_array(tpAniSirGlobal pCtx, |
| 12850 | tDot11fFfVhtMembershipStatusArray *pSrc, |
| 12851 | uint8_t *pBuf) |
| 12852 | { |
| 12853 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->membershipStatusArray, 8); |
| 12854 | (void)pCtx; |
| 12855 | } /* End dot11f_pack_ff_vht_membership_status_array. */ |
| 12856 | |
| 12857 | void dot11f_pack_ff_vht_user_position_array(tpAniSirGlobal pCtx, |
| 12858 | tDot11fFfVhtUserPositionArray *pSrc, |
| 12859 | uint8_t *pBuf) |
| 12860 | { |
| 12861 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->userPositionArray, 16); |
| 12862 | (void)pCtx; |
| 12863 | } /* End dot11f_pack_ff_vht_user_position_array. */ |
| 12864 | |
| 12865 | uint32_t dot11f_pack_tlv_authorized_ma_cs(tpAniSirGlobal pCtx, |
| 12866 | tDot11fTLVAuthorizedMACs *pSrc, |
| 12867 | uint8_t *pBuf, |
| 12868 | uint32_t nBuf, |
| 12869 | uint32_t *pnConsumed) |
| 12870 | { |
| 12871 | uint8_t *pTlvLen = 0; |
| 12872 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 12873 | uint32_t nNeeded = 0U; |
| 12874 | nNeeded += 8; |
| 12875 | if (nNeeded > nBuf) |
| 12876 | return DOT11F_BUFFER_OVERFLOW; |
| 12877 | while (pSrc->present) { |
| 12878 | *pBuf = 1; |
| 12879 | pBuf += 1; *pnConsumed += 1; |
| 12880 | pTlvLen = pBuf; |
| 12881 | pBuf += 1; *pnConsumed += 1; |
| 12882 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->mac, 6); |
| 12883 | *pnConsumed += 6; |
| 12884 | pBuf += 6; |
| 12885 | break; |
| 12886 | } |
| 12887 | (void)pCtx; |
| 12888 | if (pTlvLen) { |
| 12889 | *pTlvLen = *pnConsumed - nConsumedOnEntry - 2; |
| 12890 | } |
| 12891 | return DOT11F_PARSE_SUCCESS; |
| 12892 | } /* End dot11f_pack_tlv_authorized_ma_cs. */ |
| 12893 | |
| 12894 | uint32_t dot11f_pack_tlv_request_to_enroll(tpAniSirGlobal pCtx, |
| 12895 | tDot11fTLVRequestToEnroll *pSrc, |
| 12896 | uint8_t *pBuf, |
| 12897 | uint32_t nBuf, |
| 12898 | uint32_t *pnConsumed) |
| 12899 | { |
| 12900 | uint8_t *pTlvLen = 0; |
| 12901 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 12902 | uint32_t nNeeded = 0U; |
| 12903 | nNeeded += 3; |
| 12904 | if (nNeeded > nBuf) |
| 12905 | return DOT11F_BUFFER_OVERFLOW; |
| 12906 | while (pSrc->present) { |
| 12907 | *pBuf = 3; |
| 12908 | pBuf += 1; *pnConsumed += 1; |
| 12909 | pTlvLen = pBuf; |
| 12910 | pBuf += 1; *pnConsumed += 1; |
| 12911 | *pBuf = pSrc->req; |
| 12912 | *pnConsumed += 1; |
| 12913 | pBuf += 1; |
| 12914 | break; |
| 12915 | } |
| 12916 | (void)pCtx; |
| 12917 | if (pTlvLen) { |
| 12918 | *pTlvLen = *pnConsumed - nConsumedOnEntry - 2; |
| 12919 | } |
| 12920 | return DOT11F_PARSE_SUCCESS; |
| 12921 | } /* End dot11f_pack_tlv_request_to_enroll. */ |
| 12922 | |
| 12923 | uint32_t dot11f_pack_tlv_version2(tpAniSirGlobal pCtx, |
| 12924 | tDot11fTLVVersion2 *pSrc, |
| 12925 | uint8_t *pBuf, |
| 12926 | uint32_t nBuf, |
| 12927 | uint32_t *pnConsumed) |
| 12928 | { |
| 12929 | uint8_t *pTlvLen = 0; |
| 12930 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 12931 | uint32_t nNeeded = 0U; |
| 12932 | uint8_t tmp70__; |
| 12933 | nNeeded += 3; |
| 12934 | if (nNeeded > nBuf) |
| 12935 | return DOT11F_BUFFER_OVERFLOW; |
| 12936 | while (pSrc->present) { |
| 12937 | *pBuf = 0; |
| 12938 | pBuf += 1; *pnConsumed += 1; |
| 12939 | pTlvLen = pBuf; |
| 12940 | pBuf += 1; *pnConsumed += 1; |
| 12941 | tmp70__ = 0U; |
| 12942 | tmp70__ |= (pSrc->minor << 0); |
| 12943 | tmp70__ |= (pSrc->major << 4); |
| 12944 | *pBuf = tmp70__; |
| 12945 | *pnConsumed += 1; |
| 12946 | pBuf += 1; |
| 12947 | nBuf -= 1 ; |
| 12948 | break; |
| 12949 | } |
| 12950 | (void)pCtx; |
| 12951 | if (pTlvLen) { |
| 12952 | *pTlvLen = *pnConsumed - nConsumedOnEntry - 2; |
| 12953 | } |
| 12954 | return DOT11F_PARSE_SUCCESS; |
| 12955 | } /* End dot11f_pack_tlv_version2. */ |
| 12956 | |
| 12957 | uint32_t dot11f_pack_tlv_ap_setup_locked(tpAniSirGlobal pCtx, |
| 12958 | tDot11fTLVAPSetupLocked *pSrc, |
| 12959 | uint8_t *pBuf, |
| 12960 | uint32_t nBuf, |
| 12961 | uint32_t *pnConsumed) |
| 12962 | { |
| 12963 | uint8_t *pTlvLen = 0; |
| 12964 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 12965 | uint32_t nNeeded = 0U; |
| 12966 | nNeeded += 5; |
| 12967 | if (nNeeded > nBuf) |
| 12968 | return DOT11F_BUFFER_OVERFLOW; |
| 12969 | while (pSrc->present) { |
| 12970 | frameshtons(pCtx, pBuf, 4183, 1); |
| 12971 | pBuf += 2; *pnConsumed += 2; |
| 12972 | pTlvLen = pBuf; |
| 12973 | pBuf += 2; *pnConsumed += 2; |
| 12974 | *pBuf = pSrc->fLocked; |
| 12975 | *pnConsumed += 1; |
| 12976 | pBuf += 1; |
| 12977 | break; |
| 12978 | } |
| 12979 | (void)pCtx; |
| 12980 | if (pTlvLen) { |
| 12981 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 12982 | } |
| 12983 | return DOT11F_PARSE_SUCCESS; |
| 12984 | } /* End dot11f_pack_tlv_ap_setup_locked. */ |
| 12985 | |
| 12986 | uint32_t dot11f_pack_tlv_association_state(tpAniSirGlobal pCtx, |
| 12987 | tDot11fTLVAssociationState *pSrc, |
| 12988 | uint8_t *pBuf, |
| 12989 | uint32_t nBuf, |
| 12990 | uint32_t *pnConsumed) |
| 12991 | { |
| 12992 | uint8_t *pTlvLen = 0; |
| 12993 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 12994 | uint32_t nNeeded = 0U; |
| 12995 | nNeeded += 6; |
| 12996 | if (nNeeded > nBuf) |
| 12997 | return DOT11F_BUFFER_OVERFLOW; |
| 12998 | while (pSrc->present) { |
| 12999 | frameshtons(pCtx, pBuf, 4098, 1); |
| 13000 | pBuf += 2; *pnConsumed += 2; |
| 13001 | pTlvLen = pBuf; |
| 13002 | pBuf += 2; *pnConsumed += 2; |
| 13003 | frameshtons(pCtx, pBuf, pSrc->state, 1); |
| 13004 | *pnConsumed += 2; |
| 13005 | pBuf += 2; |
| 13006 | break; |
| 13007 | } |
| 13008 | (void)pCtx; |
| 13009 | if (pTlvLen) { |
| 13010 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13011 | } |
| 13012 | return DOT11F_PARSE_SUCCESS; |
| 13013 | } /* End dot11f_pack_tlv_association_state. */ |
| 13014 | |
| 13015 | uint32_t dot11f_pack_tlv_config_methods(tpAniSirGlobal pCtx, |
| 13016 | tDot11fTLVConfigMethods *pSrc, |
| 13017 | uint8_t *pBuf, |
| 13018 | uint32_t nBuf, |
| 13019 | uint32_t *pnConsumed) |
| 13020 | { |
| 13021 | uint8_t *pTlvLen = 0; |
| 13022 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13023 | uint32_t nNeeded = 0U; |
| 13024 | nNeeded += 6; |
| 13025 | if (nNeeded > nBuf) |
| 13026 | return DOT11F_BUFFER_OVERFLOW; |
| 13027 | while (pSrc->present) { |
| 13028 | frameshtons(pCtx, pBuf, 4104, 1); |
| 13029 | pBuf += 2; *pnConsumed += 2; |
| 13030 | pTlvLen = pBuf; |
| 13031 | pBuf += 2; *pnConsumed += 2; |
| 13032 | frameshtons(pCtx, pBuf, pSrc->methods, 1); |
| 13033 | *pnConsumed += 2; |
| 13034 | pBuf += 2; |
| 13035 | break; |
| 13036 | } |
| 13037 | (void)pCtx; |
| 13038 | if (pTlvLen) { |
| 13039 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13040 | } |
| 13041 | return DOT11F_PARSE_SUCCESS; |
| 13042 | } /* End dot11f_pack_tlv_config_methods. */ |
| 13043 | |
| 13044 | uint32_t dot11f_pack_tlv_configuration_error(tpAniSirGlobal pCtx, |
| 13045 | tDot11fTLVConfigurationError *pSrc, |
| 13046 | uint8_t *pBuf, |
| 13047 | uint32_t nBuf, |
| 13048 | uint32_t *pnConsumed) |
| 13049 | { |
| 13050 | uint8_t *pTlvLen = 0; |
| 13051 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13052 | uint32_t nNeeded = 0U; |
| 13053 | nNeeded += 6; |
| 13054 | if (nNeeded > nBuf) |
| 13055 | return DOT11F_BUFFER_OVERFLOW; |
| 13056 | while (pSrc->present) { |
| 13057 | frameshtons(pCtx, pBuf, 4105, 1); |
| 13058 | pBuf += 2; *pnConsumed += 2; |
| 13059 | pTlvLen = pBuf; |
| 13060 | pBuf += 2; *pnConsumed += 2; |
| 13061 | frameshtons(pCtx, pBuf, pSrc->error, 1); |
| 13062 | *pnConsumed += 2; |
| 13063 | pBuf += 2; |
| 13064 | break; |
| 13065 | } |
| 13066 | (void)pCtx; |
| 13067 | if (pTlvLen) { |
| 13068 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13069 | } |
| 13070 | return DOT11F_PARSE_SUCCESS; |
| 13071 | } /* End dot11f_pack_tlv_configuration_error. */ |
| 13072 | |
| 13073 | uint32_t dot11f_pack_tlv_device_name(tpAniSirGlobal pCtx, |
| 13074 | tDot11fTLVDeviceName *pSrc, |
| 13075 | uint8_t *pBuf, |
| 13076 | uint32_t nBuf, |
| 13077 | uint32_t *pnConsumed) |
| 13078 | { |
| 13079 | uint8_t *pTlvLen = 0; |
| 13080 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13081 | uint32_t nNeeded = 0U; |
| 13082 | nNeeded += (pSrc->num_text + 4) ; |
| 13083 | |
| 13084 | if (nNeeded > nBuf) |
| 13085 | return DOT11F_BUFFER_OVERFLOW; |
| 13086 | while (pSrc->present) { |
| 13087 | frameshtons(pCtx, pBuf, 4113, 1); |
| 13088 | pBuf += 2; *pnConsumed += 2; |
| 13089 | pTlvLen = pBuf; |
| 13090 | pBuf += 2; *pnConsumed += 2; |
| 13091 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->text), pSrc->num_text); |
| 13092 | *pnConsumed += pSrc->num_text; |
| 13093 | pBuf += pSrc->num_text; |
| 13094 | break; |
| 13095 | } |
| 13096 | (void)pCtx; |
| 13097 | if (pTlvLen) { |
| 13098 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13099 | } |
| 13100 | return DOT11F_PARSE_SUCCESS; |
| 13101 | } /* End dot11f_pack_tlv_device_name. */ |
| 13102 | |
| 13103 | uint32_t dot11f_pack_tlv_device_password_id(tpAniSirGlobal pCtx, |
| 13104 | tDot11fTLVDevicePasswordID *pSrc, |
| 13105 | uint8_t *pBuf, |
| 13106 | uint32_t nBuf, |
| 13107 | uint32_t *pnConsumed) |
| 13108 | { |
| 13109 | uint8_t *pTlvLen = 0; |
| 13110 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13111 | uint32_t nNeeded = 0U; |
| 13112 | nNeeded += 6; |
| 13113 | if (nNeeded > nBuf) |
| 13114 | return DOT11F_BUFFER_OVERFLOW; |
| 13115 | while (pSrc->present) { |
| 13116 | frameshtons(pCtx, pBuf, 4114, 1); |
| 13117 | pBuf += 2; *pnConsumed += 2; |
| 13118 | pTlvLen = pBuf; |
| 13119 | pBuf += 2; *pnConsumed += 2; |
| 13120 | frameshtons(pCtx, pBuf, pSrc->id, 1); |
| 13121 | *pnConsumed += 2; |
| 13122 | pBuf += 2; |
| 13123 | break; |
| 13124 | } |
| 13125 | (void)pCtx; |
| 13126 | if (pTlvLen) { |
| 13127 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13128 | } |
| 13129 | return DOT11F_PARSE_SUCCESS; |
| 13130 | } /* End dot11f_pack_tlv_device_password_id. */ |
| 13131 | |
| 13132 | uint32_t dot11f_pack_tlv_extended_listen_timing(tpAniSirGlobal pCtx, |
| 13133 | tDot11fTLVExtendedListenTiming *pSrc, |
| 13134 | uint8_t *pBuf, |
| 13135 | uint32_t nBuf, |
| 13136 | uint32_t *pnConsumed) |
| 13137 | { |
| 13138 | uint8_t *pTlvLen = 0; |
| 13139 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13140 | uint32_t nNeeded = 0U; |
| 13141 | nNeeded += 7; |
| 13142 | if (nNeeded > nBuf) |
| 13143 | return DOT11F_BUFFER_OVERFLOW; |
| 13144 | while (pSrc->present) { |
| 13145 | *pBuf = 8; |
| 13146 | pBuf += 1; *pnConsumed += 1; |
| 13147 | pTlvLen = pBuf; |
| 13148 | pBuf += 2; *pnConsumed += 2; |
| 13149 | frameshtons(pCtx, pBuf, pSrc->availibilityPeriod, 0); |
| 13150 | *pnConsumed += 2; |
| 13151 | pBuf += 2; |
| 13152 | frameshtons(pCtx, pBuf, pSrc->availibilityInterval, 0); |
| 13153 | *pnConsumed += 2; |
| 13154 | pBuf += 2; |
| 13155 | break; |
| 13156 | } |
| 13157 | (void)pCtx; |
| 13158 | if (pTlvLen) { |
| 13159 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13160 | } |
| 13161 | return DOT11F_PARSE_SUCCESS; |
| 13162 | } /* End dot11f_pack_tlv_extended_listen_timing. */ |
| 13163 | |
| 13164 | uint32_t dot11f_pack_tlv_listen_channel(tpAniSirGlobal pCtx, |
| 13165 | tDot11fTLVListenChannel *pSrc, |
| 13166 | uint8_t *pBuf, |
| 13167 | uint32_t nBuf, |
| 13168 | uint32_t *pnConsumed) |
| 13169 | { |
| 13170 | uint8_t *pTlvLen = 0; |
| 13171 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13172 | uint32_t nNeeded = 0U; |
| 13173 | nNeeded += 8; |
| 13174 | if (nNeeded > nBuf) |
| 13175 | return DOT11F_BUFFER_OVERFLOW; |
| 13176 | while (pSrc->present) { |
| 13177 | *pBuf = 6; |
| 13178 | pBuf += 1; *pnConsumed += 1; |
| 13179 | pTlvLen = pBuf; |
| 13180 | pBuf += 2; *pnConsumed += 2; |
| 13181 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->countryString, 3); |
| 13182 | *pnConsumed += 3; |
| 13183 | pBuf += 3; |
| 13184 | *pBuf = pSrc->regulatoryClass; |
| 13185 | *pnConsumed += 1; |
| 13186 | pBuf += 1; |
| 13187 | *pBuf = pSrc->channel; |
| 13188 | *pnConsumed += 1; |
| 13189 | pBuf += 1; |
| 13190 | break; |
| 13191 | } |
| 13192 | (void)pCtx; |
| 13193 | if (pTlvLen) { |
| 13194 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13195 | } |
| 13196 | return DOT11F_PARSE_SUCCESS; |
| 13197 | } /* End dot11f_pack_tlv_listen_channel. */ |
| 13198 | |
| 13199 | uint32_t dot11f_pack_tlv_manufacturer(tpAniSirGlobal pCtx, |
| 13200 | tDot11fTLVManufacturer *pSrc, |
| 13201 | uint8_t *pBuf, |
| 13202 | uint32_t nBuf, |
| 13203 | uint32_t *pnConsumed) |
| 13204 | { |
| 13205 | uint8_t *pTlvLen = 0; |
| 13206 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13207 | uint32_t nNeeded = 0U; |
| 13208 | nNeeded += (pSrc->num_name + 4) ; |
| 13209 | |
| 13210 | if (nNeeded > nBuf) |
| 13211 | return DOT11F_BUFFER_OVERFLOW; |
| 13212 | while (pSrc->present) { |
| 13213 | frameshtons(pCtx, pBuf, 4129, 1); |
| 13214 | pBuf += 2; *pnConsumed += 2; |
| 13215 | pTlvLen = pBuf; |
| 13216 | pBuf += 2; *pnConsumed += 2; |
| 13217 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->name), pSrc->num_name); |
| 13218 | *pnConsumed += pSrc->num_name; |
| 13219 | pBuf += pSrc->num_name; |
| 13220 | break; |
| 13221 | } |
| 13222 | (void)pCtx; |
| 13223 | if (pTlvLen) { |
| 13224 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13225 | } |
| 13226 | return DOT11F_PARSE_SUCCESS; |
| 13227 | } /* End dot11f_pack_tlv_manufacturer. */ |
| 13228 | |
| 13229 | uint32_t dot11f_pack_tlv_minor_reason_code(tpAniSirGlobal pCtx, |
| 13230 | tDot11fTLVMinorReasonCode *pSrc, |
| 13231 | uint8_t *pBuf, |
| 13232 | uint32_t nBuf, |
| 13233 | uint32_t *pnConsumed) |
| 13234 | { |
| 13235 | uint8_t *pTlvLen = 0; |
| 13236 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13237 | uint32_t nNeeded = 0U; |
| 13238 | nNeeded += 4; |
| 13239 | if (nNeeded > nBuf) |
| 13240 | return DOT11F_BUFFER_OVERFLOW; |
| 13241 | while (pSrc->present) { |
| 13242 | *pBuf = 1; |
| 13243 | pBuf += 1; *pnConsumed += 1; |
| 13244 | pTlvLen = pBuf; |
| 13245 | pBuf += 2; *pnConsumed += 2; |
| 13246 | *pBuf = pSrc->minorReasonCode; |
| 13247 | *pnConsumed += 1; |
| 13248 | pBuf += 1; |
| 13249 | break; |
| 13250 | } |
| 13251 | (void)pCtx; |
| 13252 | if (pTlvLen) { |
| 13253 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13254 | } |
| 13255 | return DOT11F_PARSE_SUCCESS; |
| 13256 | } /* End dot11f_pack_tlv_minor_reason_code. */ |
| 13257 | |
| 13258 | uint32_t dot11f_pack_tlv_model_name(tpAniSirGlobal pCtx, |
| 13259 | tDot11fTLVModelName *pSrc, |
| 13260 | uint8_t *pBuf, |
| 13261 | uint32_t nBuf, |
| 13262 | uint32_t *pnConsumed) |
| 13263 | { |
| 13264 | uint8_t *pTlvLen = 0; |
| 13265 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13266 | uint32_t nNeeded = 0U; |
| 13267 | nNeeded += (pSrc->num_text + 4) ; |
| 13268 | |
| 13269 | if (nNeeded > nBuf) |
| 13270 | return DOT11F_BUFFER_OVERFLOW; |
| 13271 | while (pSrc->present) { |
| 13272 | frameshtons(pCtx, pBuf, 4131, 1); |
| 13273 | pBuf += 2; *pnConsumed += 2; |
| 13274 | pTlvLen = pBuf; |
| 13275 | pBuf += 2; *pnConsumed += 2; |
| 13276 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->text), pSrc->num_text); |
| 13277 | *pnConsumed += pSrc->num_text; |
| 13278 | pBuf += pSrc->num_text; |
| 13279 | break; |
| 13280 | } |
| 13281 | (void)pCtx; |
| 13282 | if (pTlvLen) { |
| 13283 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13284 | } |
| 13285 | return DOT11F_PARSE_SUCCESS; |
| 13286 | } /* End dot11f_pack_tlv_model_name. */ |
| 13287 | |
| 13288 | uint32_t dot11f_pack_tlv_model_number(tpAniSirGlobal pCtx, |
| 13289 | tDot11fTLVModelNumber *pSrc, |
| 13290 | uint8_t *pBuf, |
| 13291 | uint32_t nBuf, |
| 13292 | uint32_t *pnConsumed) |
| 13293 | { |
| 13294 | uint8_t *pTlvLen = 0; |
| 13295 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13296 | uint32_t nNeeded = 0U; |
| 13297 | nNeeded += (pSrc->num_text + 4) ; |
| 13298 | |
| 13299 | if (nNeeded > nBuf) |
| 13300 | return DOT11F_BUFFER_OVERFLOW; |
| 13301 | while (pSrc->present) { |
| 13302 | frameshtons(pCtx, pBuf, 4132, 1); |
| 13303 | pBuf += 2; *pnConsumed += 2; |
| 13304 | pTlvLen = pBuf; |
| 13305 | pBuf += 2; *pnConsumed += 2; |
| 13306 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->text), pSrc->num_text); |
| 13307 | *pnConsumed += pSrc->num_text; |
| 13308 | pBuf += pSrc->num_text; |
| 13309 | break; |
| 13310 | } |
| 13311 | (void)pCtx; |
| 13312 | if (pTlvLen) { |
| 13313 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13314 | } |
| 13315 | return DOT11F_PARSE_SUCCESS; |
| 13316 | } /* End dot11f_pack_tlv_model_number. */ |
| 13317 | |
| 13318 | uint32_t dot11f_pack_tlv_notice_of_absence(tpAniSirGlobal pCtx, |
| 13319 | tDot11fTLVNoticeOfAbsence *pSrc, |
| 13320 | uint8_t *pBuf, |
| 13321 | uint32_t nBuf, |
| 13322 | uint32_t *pnConsumed) |
| 13323 | { |
| 13324 | uint8_t *pTlvLen = 0; |
| 13325 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13326 | uint32_t nNeeded = 0U; |
| 13327 | nNeeded += (pSrc->num_NoADesc + 5) ; |
| 13328 | |
| 13329 | if (nNeeded > nBuf) |
| 13330 | return DOT11F_BUFFER_OVERFLOW; |
| 13331 | while (pSrc->present) { |
| 13332 | *pBuf = 12; |
| 13333 | pBuf += 1; *pnConsumed += 1; |
| 13334 | pTlvLen = pBuf; |
| 13335 | pBuf += 2; *pnConsumed += 2; |
| 13336 | *pBuf = pSrc->index; |
| 13337 | *pnConsumed += 1; |
| 13338 | pBuf += 1; |
| 13339 | *pBuf = pSrc->CTSWindowOppPS; |
| 13340 | *pnConsumed += 1; |
| 13341 | pBuf += 1; |
| 13342 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->NoADesc), pSrc->num_NoADesc); |
| 13343 | *pnConsumed += pSrc->num_NoADesc; |
| 13344 | pBuf += pSrc->num_NoADesc; |
| 13345 | break; |
| 13346 | } |
| 13347 | (void)pCtx; |
| 13348 | if (pTlvLen) { |
| 13349 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13350 | } |
| 13351 | return DOT11F_PARSE_SUCCESS; |
| 13352 | } /* End dot11f_pack_tlv_notice_of_absence. */ |
| 13353 | |
| 13354 | uint32_t dot11f_pack_tlv_operating_channel(tpAniSirGlobal pCtx, |
| 13355 | tDot11fTLVOperatingChannel *pSrc, |
| 13356 | uint8_t *pBuf, |
| 13357 | uint32_t nBuf, |
| 13358 | uint32_t *pnConsumed) |
| 13359 | { |
| 13360 | uint8_t *pTlvLen = 0; |
| 13361 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13362 | uint32_t nNeeded = 0U; |
| 13363 | nNeeded += 8; |
| 13364 | if (nNeeded > nBuf) |
| 13365 | return DOT11F_BUFFER_OVERFLOW; |
| 13366 | while (pSrc->present) { |
| 13367 | *pBuf = 17; |
| 13368 | pBuf += 1; *pnConsumed += 1; |
| 13369 | pTlvLen = pBuf; |
| 13370 | pBuf += 2; *pnConsumed += 2; |
| 13371 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->countryString, 3); |
| 13372 | *pnConsumed += 3; |
| 13373 | pBuf += 3; |
| 13374 | *pBuf = pSrc->regulatoryClass; |
| 13375 | *pnConsumed += 1; |
| 13376 | pBuf += 1; |
| 13377 | *pBuf = pSrc->channel; |
| 13378 | *pnConsumed += 1; |
| 13379 | pBuf += 1; |
| 13380 | break; |
| 13381 | } |
| 13382 | (void)pCtx; |
| 13383 | if (pTlvLen) { |
| 13384 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13385 | } |
| 13386 | return DOT11F_PARSE_SUCCESS; |
| 13387 | } /* End dot11f_pack_tlv_operating_channel. */ |
| 13388 | |
| 13389 | uint32_t dot11f_pack_tlv_p2_p_capability(tpAniSirGlobal pCtx, |
| 13390 | tDot11fTLVP2PCapability *pSrc, |
| 13391 | uint8_t *pBuf, |
| 13392 | uint32_t nBuf, |
| 13393 | uint32_t *pnConsumed) |
| 13394 | { |
| 13395 | uint8_t *pTlvLen = 0; |
| 13396 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13397 | uint32_t nNeeded = 0U; |
| 13398 | nNeeded += 5; |
| 13399 | if (nNeeded > nBuf) |
| 13400 | return DOT11F_BUFFER_OVERFLOW; |
| 13401 | while (pSrc->present) { |
| 13402 | *pBuf = 2; |
| 13403 | pBuf += 1; *pnConsumed += 1; |
| 13404 | pTlvLen = pBuf; |
| 13405 | pBuf += 2; *pnConsumed += 2; |
| 13406 | *pBuf = pSrc->deviceCapability; |
| 13407 | *pnConsumed += 1; |
| 13408 | pBuf += 1; |
| 13409 | *pBuf = pSrc->groupCapability; |
| 13410 | *pnConsumed += 1; |
| 13411 | pBuf += 1; |
| 13412 | break; |
| 13413 | } |
| 13414 | (void)pCtx; |
| 13415 | if (pTlvLen) { |
| 13416 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13417 | } |
| 13418 | return DOT11F_PARSE_SUCCESS; |
| 13419 | } /* End dot11f_pack_tlv_p2_p_capability. */ |
| 13420 | |
| 13421 | uint32_t dot11f_pack_tlv_p2_p_device_id(tpAniSirGlobal pCtx, |
| 13422 | tDot11fTLVP2PDeviceId *pSrc, |
| 13423 | uint8_t *pBuf, |
| 13424 | uint32_t nBuf, |
| 13425 | uint32_t *pnConsumed) |
| 13426 | { |
| 13427 | uint8_t *pTlvLen = 0; |
| 13428 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13429 | uint32_t nNeeded = 0U; |
| 13430 | nNeeded += 9; |
| 13431 | if (nNeeded > nBuf) |
| 13432 | return DOT11F_BUFFER_OVERFLOW; |
| 13433 | while (pSrc->present) { |
| 13434 | *pBuf = 3; |
| 13435 | pBuf += 1; *pnConsumed += 1; |
| 13436 | pTlvLen = pBuf; |
| 13437 | pBuf += 2; *pnConsumed += 2; |
| 13438 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->P2PDeviceAddress, 6); |
| 13439 | *pnConsumed += 6; |
| 13440 | pBuf += 6; |
| 13441 | break; |
| 13442 | } |
| 13443 | (void)pCtx; |
| 13444 | if (pTlvLen) { |
| 13445 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13446 | } |
| 13447 | return DOT11F_PARSE_SUCCESS; |
| 13448 | } /* End dot11f_pack_tlv_p2_p_device_id. */ |
| 13449 | |
| 13450 | uint32_t dot11f_pack_tlv_p2_p_device_info(tpAniSirGlobal pCtx, |
| 13451 | tDot11fTLVP2PDeviceInfo *pSrc, |
| 13452 | uint8_t *pBuf, |
| 13453 | uint32_t nBuf, |
| 13454 | uint32_t *pnConsumed) |
| 13455 | { |
| 13456 | uint8_t *pTlvLen = 0; |
| 13457 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13458 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 13459 | uint32_t nNeeded = 0U; |
| 13460 | uint32_t idx = 0; |
| 13461 | nNeeded += 19; |
| 13462 | if (nNeeded > nBuf) |
| 13463 | return DOT11F_BUFFER_OVERFLOW; |
| 13464 | while (pSrc->present) { |
| 13465 | *pBuf = 13; |
| 13466 | pBuf += 1; nBuf -= 1; *pnConsumed += 1; |
| 13467 | pTlvLen = pBuf; |
| 13468 | pBuf += 2; nBuf -= 2; *pnConsumed += 2; |
| 13469 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->P2PDeviceAddress, 6); |
| 13470 | *pnConsumed += 6; |
| 13471 | pBuf += 6; |
| 13472 | frameshtons(pCtx, pBuf, pSrc->configMethod, 1); |
| 13473 | *pnConsumed += 2; |
| 13474 | pBuf += 2; |
| 13475 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->primaryDeviceType, 8); |
| 13476 | *pnConsumed += 8; |
| 13477 | pBuf += 8; |
| 13478 | status |= pack_tlv_core(pCtx, |
| 13479 | (uint8_t *)pSrc, |
| 13480 | pBuf, |
| 13481 | nBuf, |
| 13482 | pnConsumed, |
| 13483 | TLVS_P2PDeviceInfo, &idx); |
| 13484 | break; |
| 13485 | } |
| 13486 | (void)pCtx; |
| 13487 | if (pTlvLen) { |
| 13488 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13489 | } |
| 13490 | return status; |
| 13491 | } /* End dot11f_pack_tlv_p2_p_device_info. */ |
| 13492 | |
| 13493 | uint32_t dot11f_pack_tlv_p2_p_group_info(tpAniSirGlobal pCtx, |
| 13494 | tDot11fTLVP2PGroupInfo *pSrc, |
| 13495 | uint8_t *pBuf, |
| 13496 | uint32_t nBuf, |
| 13497 | uint32_t *pnConsumed) |
| 13498 | { |
| 13499 | uint8_t *pTlvLen = 0; |
| 13500 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13501 | uint32_t nNeeded = 0U; |
| 13502 | nNeeded += (pSrc->num_P2PClientInfoDesc + 3) ; |
| 13503 | |
| 13504 | if (nNeeded > nBuf) |
| 13505 | return DOT11F_BUFFER_OVERFLOW; |
| 13506 | while (pSrc->present) { |
| 13507 | *pBuf = 14; |
| 13508 | pBuf += 1; *pnConsumed += 1; |
| 13509 | pTlvLen = pBuf; |
| 13510 | pBuf += 2; *pnConsumed += 2; |
| 13511 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->P2PClientInfoDesc), pSrc->num_P2PClientInfoDesc); |
| 13512 | *pnConsumed += pSrc->num_P2PClientInfoDesc; |
| 13513 | pBuf += pSrc->num_P2PClientInfoDesc; |
| 13514 | break; |
| 13515 | } |
| 13516 | (void)pCtx; |
| 13517 | if (pTlvLen) { |
| 13518 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13519 | } |
| 13520 | return DOT11F_PARSE_SUCCESS; |
| 13521 | } /* End dot11f_pack_tlv_p2_p_group_info. */ |
| 13522 | |
| 13523 | uint32_t dot11f_pack_tlv_p2_p_status(tpAniSirGlobal pCtx, |
| 13524 | tDot11fTLVP2PStatus *pSrc, |
| 13525 | uint8_t *pBuf, |
| 13526 | uint32_t nBuf, |
| 13527 | uint32_t *pnConsumed) |
| 13528 | { |
| 13529 | uint8_t *pTlvLen = 0; |
| 13530 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13531 | uint32_t nNeeded = 0U; |
| 13532 | nNeeded += 4; |
| 13533 | if (nNeeded > nBuf) |
| 13534 | return DOT11F_BUFFER_OVERFLOW; |
| 13535 | while (pSrc->present) { |
| 13536 | *pBuf = 0; |
| 13537 | pBuf += 1; *pnConsumed += 1; |
| 13538 | pTlvLen = pBuf; |
| 13539 | pBuf += 2; *pnConsumed += 2; |
| 13540 | *pBuf = pSrc->status; |
| 13541 | *pnConsumed += 1; |
| 13542 | pBuf += 1; |
| 13543 | break; |
| 13544 | } |
| 13545 | (void)pCtx; |
| 13546 | if (pTlvLen) { |
| 13547 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13548 | } |
| 13549 | return DOT11F_PARSE_SUCCESS; |
| 13550 | } /* End dot11f_pack_tlv_p2_p_status. */ |
| 13551 | |
| 13552 | uint32_t dot11f_pack_tlv_primary_device_type(tpAniSirGlobal pCtx, |
| 13553 | tDot11fTLVPrimaryDeviceType *pSrc, |
| 13554 | uint8_t *pBuf, |
| 13555 | uint32_t nBuf, |
| 13556 | uint32_t *pnConsumed) |
| 13557 | { |
| 13558 | uint8_t *pTlvLen = 0; |
| 13559 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13560 | uint32_t nNeeded = 0U; |
| 13561 | nNeeded += 12; |
| 13562 | if (nNeeded > nBuf) |
| 13563 | return DOT11F_BUFFER_OVERFLOW; |
| 13564 | while (pSrc->present) { |
| 13565 | frameshtons(pCtx, pBuf, 4180, 1); |
| 13566 | pBuf += 2; *pnConsumed += 2; |
| 13567 | pTlvLen = pBuf; |
| 13568 | pBuf += 2; *pnConsumed += 2; |
| 13569 | frameshtons(pCtx, pBuf, pSrc->primary_category, 1); |
| 13570 | *pnConsumed += 2; |
| 13571 | pBuf += 2; |
| 13572 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->oui, 4); |
| 13573 | *pnConsumed += 4; |
| 13574 | pBuf += 4; |
| 13575 | frameshtons(pCtx, pBuf, pSrc->sub_category, 1); |
| 13576 | *pnConsumed += 2; |
| 13577 | pBuf += 2; |
| 13578 | break; |
| 13579 | } |
| 13580 | (void)pCtx; |
| 13581 | if (pTlvLen) { |
| 13582 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13583 | } |
| 13584 | return DOT11F_PARSE_SUCCESS; |
| 13585 | } /* End dot11f_pack_tlv_primary_device_type. */ |
| 13586 | |
| 13587 | uint32_t dot11f_pack_tlv_rf_bands(tpAniSirGlobal pCtx, |
| 13588 | tDot11fTLVRFBands *pSrc, |
| 13589 | uint8_t *pBuf, |
| 13590 | uint32_t nBuf, |
| 13591 | uint32_t *pnConsumed) |
| 13592 | { |
| 13593 | uint8_t *pTlvLen = 0; |
| 13594 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13595 | uint32_t nNeeded = 0U; |
| 13596 | nNeeded += 5; |
| 13597 | if (nNeeded > nBuf) |
| 13598 | return DOT11F_BUFFER_OVERFLOW; |
| 13599 | while (pSrc->present) { |
| 13600 | frameshtons(pCtx, pBuf, 4156, 1); |
| 13601 | pBuf += 2; *pnConsumed += 2; |
| 13602 | pTlvLen = pBuf; |
| 13603 | pBuf += 2; *pnConsumed += 2; |
| 13604 | *pBuf = pSrc->bands; |
| 13605 | *pnConsumed += 1; |
| 13606 | pBuf += 1; |
| 13607 | break; |
| 13608 | } |
| 13609 | (void)pCtx; |
| 13610 | if (pTlvLen) { |
| 13611 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13612 | } |
| 13613 | return DOT11F_PARSE_SUCCESS; |
| 13614 | } /* End dot11f_pack_tlv_rf_bands. */ |
| 13615 | |
| 13616 | uint32_t dot11f_pack_tlv_request_device_type(tpAniSirGlobal pCtx, |
| 13617 | tDot11fTLVRequestDeviceType *pSrc, |
| 13618 | uint8_t *pBuf, |
| 13619 | uint32_t nBuf, |
| 13620 | uint32_t *pnConsumed) |
| 13621 | { |
| 13622 | uint8_t *pTlvLen = 0; |
| 13623 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13624 | uint32_t nNeeded = 0U; |
| 13625 | nNeeded += 12; |
| 13626 | if (nNeeded > nBuf) |
| 13627 | return DOT11F_BUFFER_OVERFLOW; |
| 13628 | while (pSrc->present) { |
| 13629 | frameshtons(pCtx, pBuf, 4202, 1); |
| 13630 | pBuf += 2; *pnConsumed += 2; |
| 13631 | pTlvLen = pBuf; |
| 13632 | pBuf += 2; *pnConsumed += 2; |
| 13633 | frameshtons(pCtx, pBuf, pSrc->primary_category, 1); |
| 13634 | *pnConsumed += 2; |
| 13635 | pBuf += 2; |
| 13636 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->oui, 4); |
| 13637 | *pnConsumed += 4; |
| 13638 | pBuf += 4; |
| 13639 | frameshtons(pCtx, pBuf, pSrc->sub_category, 1); |
| 13640 | *pnConsumed += 2; |
| 13641 | pBuf += 2; |
| 13642 | break; |
| 13643 | } |
| 13644 | (void)pCtx; |
| 13645 | if (pTlvLen) { |
| 13646 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13647 | } |
| 13648 | return DOT11F_PARSE_SUCCESS; |
| 13649 | } /* End dot11f_pack_tlv_request_device_type. */ |
| 13650 | |
| 13651 | uint32_t dot11f_pack_tlv_request_type(tpAniSirGlobal pCtx, |
| 13652 | tDot11fTLVRequestType *pSrc, |
| 13653 | uint8_t *pBuf, |
| 13654 | uint32_t nBuf, |
| 13655 | uint32_t *pnConsumed) |
| 13656 | { |
| 13657 | uint8_t *pTlvLen = 0; |
| 13658 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13659 | uint32_t nNeeded = 0U; |
| 13660 | nNeeded += 5; |
| 13661 | if (nNeeded > nBuf) |
| 13662 | return DOT11F_BUFFER_OVERFLOW; |
| 13663 | while (pSrc->present) { |
| 13664 | frameshtons(pCtx, pBuf, 4154, 1); |
| 13665 | pBuf += 2; *pnConsumed += 2; |
| 13666 | pTlvLen = pBuf; |
| 13667 | pBuf += 2; *pnConsumed += 2; |
| 13668 | *pBuf = pSrc->reqType; |
| 13669 | *pnConsumed += 1; |
| 13670 | pBuf += 1; |
| 13671 | break; |
| 13672 | } |
| 13673 | (void)pCtx; |
| 13674 | if (pTlvLen) { |
| 13675 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13676 | } |
| 13677 | return DOT11F_PARSE_SUCCESS; |
| 13678 | } /* End dot11f_pack_tlv_request_type. */ |
| 13679 | |
| 13680 | uint32_t dot11f_pack_tlv_response_type(tpAniSirGlobal pCtx, |
| 13681 | tDot11fTLVResponseType *pSrc, |
| 13682 | uint8_t *pBuf, |
| 13683 | uint32_t nBuf, |
| 13684 | uint32_t *pnConsumed) |
| 13685 | { |
| 13686 | uint8_t *pTlvLen = 0; |
| 13687 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13688 | uint32_t nNeeded = 0U; |
| 13689 | nNeeded += 5; |
| 13690 | if (nNeeded > nBuf) |
| 13691 | return DOT11F_BUFFER_OVERFLOW; |
| 13692 | while (pSrc->present) { |
| 13693 | frameshtons(pCtx, pBuf, 4155, 1); |
| 13694 | pBuf += 2; *pnConsumed += 2; |
| 13695 | pTlvLen = pBuf; |
| 13696 | pBuf += 2; *pnConsumed += 2; |
| 13697 | *pBuf = pSrc->resType; |
| 13698 | *pnConsumed += 1; |
| 13699 | pBuf += 1; |
| 13700 | break; |
| 13701 | } |
| 13702 | (void)pCtx; |
| 13703 | if (pTlvLen) { |
| 13704 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13705 | } |
| 13706 | return DOT11F_PARSE_SUCCESS; |
| 13707 | } /* End dot11f_pack_tlv_response_type. */ |
| 13708 | |
| 13709 | uint32_t dot11f_pack_tlv_selected_registrar(tpAniSirGlobal pCtx, |
| 13710 | tDot11fTLVSelectedRegistrar *pSrc, |
| 13711 | uint8_t *pBuf, |
| 13712 | uint32_t nBuf, |
| 13713 | uint32_t *pnConsumed) |
| 13714 | { |
| 13715 | uint8_t *pTlvLen = 0; |
| 13716 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13717 | uint32_t nNeeded = 0U; |
| 13718 | nNeeded += 5; |
| 13719 | if (nNeeded > nBuf) |
| 13720 | return DOT11F_BUFFER_OVERFLOW; |
| 13721 | while (pSrc->present) { |
| 13722 | frameshtons(pCtx, pBuf, 4161, 1); |
| 13723 | pBuf += 2; *pnConsumed += 2; |
| 13724 | pTlvLen = pBuf; |
| 13725 | pBuf += 2; *pnConsumed += 2; |
| 13726 | *pBuf = pSrc->selected; |
| 13727 | *pnConsumed += 1; |
| 13728 | pBuf += 1; |
| 13729 | break; |
| 13730 | } |
| 13731 | (void)pCtx; |
| 13732 | if (pTlvLen) { |
| 13733 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13734 | } |
| 13735 | return DOT11F_PARSE_SUCCESS; |
| 13736 | } /* End dot11f_pack_tlv_selected_registrar. */ |
| 13737 | |
| 13738 | uint32_t dot11f_pack_tlv_selected_registrar_config_methods(tpAniSirGlobal pCtx, |
| 13739 | tDot11fTLVSelectedRegistrarConfigMethods *pSrc, |
| 13740 | uint8_t *pBuf, |
| 13741 | uint32_t nBuf, |
| 13742 | uint32_t *pnConsumed) |
| 13743 | { |
| 13744 | uint8_t *pTlvLen = 0; |
| 13745 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13746 | uint32_t nNeeded = 0U; |
| 13747 | nNeeded += 6; |
| 13748 | if (nNeeded > nBuf) |
| 13749 | return DOT11F_BUFFER_OVERFLOW; |
| 13750 | while (pSrc->present) { |
| 13751 | frameshtons(pCtx, pBuf, 4179, 1); |
| 13752 | pBuf += 2; *pnConsumed += 2; |
| 13753 | pTlvLen = pBuf; |
| 13754 | pBuf += 2; *pnConsumed += 2; |
| 13755 | frameshtons(pCtx, pBuf, pSrc->methods, 1); |
| 13756 | *pnConsumed += 2; |
| 13757 | pBuf += 2; |
| 13758 | break; |
| 13759 | } |
| 13760 | (void)pCtx; |
| 13761 | if (pTlvLen) { |
| 13762 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13763 | } |
| 13764 | return DOT11F_PARSE_SUCCESS; |
| 13765 | } /* End dot11f_pack_tlv_selected_registrar_config_methods. */ |
| 13766 | |
| 13767 | uint32_t dot11f_pack_tlv_serial_number(tpAniSirGlobal pCtx, |
| 13768 | tDot11fTLVSerialNumber *pSrc, |
| 13769 | uint8_t *pBuf, |
| 13770 | uint32_t nBuf, |
| 13771 | uint32_t *pnConsumed) |
| 13772 | { |
| 13773 | uint8_t *pTlvLen = 0; |
| 13774 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13775 | uint32_t nNeeded = 0U; |
| 13776 | nNeeded += (pSrc->num_text + 4) ; |
| 13777 | |
| 13778 | if (nNeeded > nBuf) |
| 13779 | return DOT11F_BUFFER_OVERFLOW; |
| 13780 | while (pSrc->present) { |
| 13781 | frameshtons(pCtx, pBuf, 4162, 1); |
| 13782 | pBuf += 2; *pnConsumed += 2; |
| 13783 | pTlvLen = pBuf; |
| 13784 | pBuf += 2; *pnConsumed += 2; |
| 13785 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->text), pSrc->num_text); |
| 13786 | *pnConsumed += pSrc->num_text; |
| 13787 | pBuf += pSrc->num_text; |
| 13788 | break; |
| 13789 | } |
| 13790 | (void)pCtx; |
| 13791 | if (pTlvLen) { |
| 13792 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13793 | } |
| 13794 | return DOT11F_PARSE_SUCCESS; |
| 13795 | } /* End dot11f_pack_tlv_serial_number. */ |
| 13796 | |
| 13797 | uint32_t dot11f_pack_tlv_uuid_e(tpAniSirGlobal pCtx, |
| 13798 | tDot11fTLVUUID_E *pSrc, |
| 13799 | uint8_t *pBuf, |
| 13800 | uint32_t nBuf, |
| 13801 | uint32_t *pnConsumed) |
| 13802 | { |
| 13803 | uint8_t *pTlvLen = 0; |
| 13804 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13805 | uint32_t nNeeded = 0U; |
| 13806 | nNeeded += 20; |
| 13807 | if (nNeeded > nBuf) |
| 13808 | return DOT11F_BUFFER_OVERFLOW; |
| 13809 | while (pSrc->present) { |
| 13810 | frameshtons(pCtx, pBuf, 4167, 1); |
| 13811 | pBuf += 2; *pnConsumed += 2; |
| 13812 | pTlvLen = pBuf; |
| 13813 | pBuf += 2; *pnConsumed += 2; |
| 13814 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->uuid, 16); |
| 13815 | *pnConsumed += 16; |
| 13816 | pBuf += 16; |
| 13817 | break; |
| 13818 | } |
| 13819 | (void)pCtx; |
| 13820 | if (pTlvLen) { |
| 13821 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13822 | } |
| 13823 | return DOT11F_PARSE_SUCCESS; |
| 13824 | } /* End dot11f_pack_tlv_uuid_e. */ |
| 13825 | |
| 13826 | uint32_t dot11f_pack_tlv_uuid_r(tpAniSirGlobal pCtx, |
| 13827 | tDot11fTLVUUID_R *pSrc, |
| 13828 | uint8_t *pBuf, |
| 13829 | uint32_t nBuf, |
| 13830 | uint32_t *pnConsumed) |
| 13831 | { |
| 13832 | uint8_t *pTlvLen = 0; |
| 13833 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13834 | uint32_t nNeeded = 0U; |
| 13835 | nNeeded += 20; |
| 13836 | if (nNeeded > nBuf) |
| 13837 | return DOT11F_BUFFER_OVERFLOW; |
| 13838 | while (pSrc->present) { |
| 13839 | frameshtons(pCtx, pBuf, 4168, 1); |
| 13840 | pBuf += 2; *pnConsumed += 2; |
| 13841 | pTlvLen = pBuf; |
| 13842 | pBuf += 2; *pnConsumed += 2; |
| 13843 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->uuid, 16); |
| 13844 | *pnConsumed += 16; |
| 13845 | pBuf += 16; |
| 13846 | break; |
| 13847 | } |
| 13848 | (void)pCtx; |
| 13849 | if (pTlvLen) { |
| 13850 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13851 | } |
| 13852 | return DOT11F_PARSE_SUCCESS; |
| 13853 | } /* End dot11f_pack_tlv_uuid_r. */ |
| 13854 | |
| 13855 | uint32_t dot11f_pack_tlv_vendor_extension(tpAniSirGlobal pCtx, |
| 13856 | tDot11fTLVVendorExtension *pSrc, |
| 13857 | uint8_t *pBuf, |
| 13858 | uint32_t nBuf, |
| 13859 | uint32_t *pnConsumed) |
| 13860 | { |
| 13861 | uint8_t *pTlvLen = 0; |
| 13862 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13863 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 13864 | uint32_t nNeeded = 0U; |
| 13865 | uint32_t idx = 0; |
| 13866 | nNeeded += 7; |
| 13867 | if (nNeeded > nBuf) |
| 13868 | return DOT11F_BUFFER_OVERFLOW; |
| 13869 | while (pSrc->present) { |
| 13870 | frameshtons(pCtx, pBuf, 4169, 1); |
| 13871 | pBuf += 2; nBuf -= 2; *pnConsumed += 2; |
| 13872 | pTlvLen = pBuf; |
| 13873 | pBuf += 2; nBuf -= 2; *pnConsumed += 2; |
| 13874 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->vendorId, 3); |
| 13875 | *pnConsumed += 3; |
| 13876 | pBuf += 3; |
| 13877 | status |= pack_tlv_core(pCtx, |
| 13878 | (uint8_t *)pSrc, |
| 13879 | pBuf, |
| 13880 | nBuf, |
| 13881 | pnConsumed, |
| 13882 | TLVS_VendorExtension, &idx); |
| 13883 | break; |
| 13884 | } |
| 13885 | (void)pCtx; |
| 13886 | if (pTlvLen) { |
| 13887 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13888 | } |
| 13889 | return status; |
| 13890 | } /* End dot11f_pack_tlv_vendor_extension. */ |
| 13891 | |
| 13892 | uint32_t dot11f_pack_tlv_version(tpAniSirGlobal pCtx, |
| 13893 | tDot11fTLVVersion *pSrc, |
| 13894 | uint8_t *pBuf, |
| 13895 | uint32_t nBuf, |
| 13896 | uint32_t *pnConsumed) |
| 13897 | { |
| 13898 | uint8_t *pTlvLen = 0; |
| 13899 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13900 | uint32_t nNeeded = 0U; |
| 13901 | uint8_t tmp71__; |
| 13902 | nNeeded += 5; |
| 13903 | if (nNeeded > nBuf) |
| 13904 | return DOT11F_BUFFER_OVERFLOW; |
| 13905 | while (pSrc->present) { |
| 13906 | frameshtons(pCtx, pBuf, 4170, 1); |
| 13907 | pBuf += 2; *pnConsumed += 2; |
| 13908 | pTlvLen = pBuf; |
| 13909 | pBuf += 2; *pnConsumed += 2; |
| 13910 | tmp71__ = 0U; |
| 13911 | tmp71__ |= (pSrc->minor << 0); |
| 13912 | tmp71__ |= (pSrc->major << 4); |
| 13913 | *pBuf = tmp71__; |
| 13914 | *pnConsumed += 1; |
| 13915 | pBuf += 1; |
| 13916 | nBuf -= 1 ; |
| 13917 | break; |
| 13918 | } |
| 13919 | (void)pCtx; |
| 13920 | if (pTlvLen) { |
| 13921 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13922 | } |
| 13923 | return DOT11F_PARSE_SUCCESS; |
| 13924 | } /* End dot11f_pack_tlv_version. */ |
| 13925 | |
| 13926 | uint32_t dot11f_pack_tlv_wps_state(tpAniSirGlobal pCtx, |
| 13927 | tDot11fTLVWPSState *pSrc, |
| 13928 | uint8_t *pBuf, |
| 13929 | uint32_t nBuf, |
| 13930 | uint32_t *pnConsumed) |
| 13931 | { |
| 13932 | uint8_t *pTlvLen = 0; |
| 13933 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13934 | uint32_t nNeeded = 0U; |
| 13935 | nNeeded += 5; |
| 13936 | if (nNeeded > nBuf) |
| 13937 | return DOT11F_BUFFER_OVERFLOW; |
| 13938 | while (pSrc->present) { |
| 13939 | frameshtons(pCtx, pBuf, 4164, 1); |
| 13940 | pBuf += 2; *pnConsumed += 2; |
| 13941 | pTlvLen = pBuf; |
| 13942 | pBuf += 2; *pnConsumed += 2; |
| 13943 | *pBuf = pSrc->state; |
| 13944 | *pnConsumed += 1; |
| 13945 | pBuf += 1; |
| 13946 | break; |
| 13947 | } |
| 13948 | (void)pCtx; |
| 13949 | if (pTlvLen) { |
| 13950 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 4, 1); |
| 13951 | } |
| 13952 | return DOT11F_PARSE_SUCCESS; |
| 13953 | } /* End dot11f_pack_tlv_wps_state. */ |
| 13954 | |
| 13955 | uint32_t dot11f_pack_tlv_p2_p_interface(tpAniSirGlobal pCtx, |
| 13956 | tDot11fTLVP2PInterface *pSrc, |
| 13957 | uint8_t *pBuf, |
| 13958 | uint32_t nBuf, |
| 13959 | uint32_t *pnConsumed) |
| 13960 | { |
| 13961 | uint8_t *pTlvLen = 0; |
| 13962 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13963 | uint32_t nNeeded = 0U; |
| 13964 | nNeeded += 9; |
| 13965 | if (nNeeded > nBuf) |
| 13966 | return DOT11F_BUFFER_OVERFLOW; |
| 13967 | while (pSrc->present) { |
| 13968 | *pBuf = 16; |
| 13969 | pBuf += 1; *pnConsumed += 1; |
| 13970 | pTlvLen = pBuf; |
| 13971 | pBuf += 2; *pnConsumed += 2; |
| 13972 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->P2PDeviceAddress, 6); |
| 13973 | *pnConsumed += 6; |
| 13974 | pBuf += 6; |
| 13975 | break; |
| 13976 | } |
| 13977 | (void)pCtx; |
| 13978 | if (pTlvLen) { |
| 13979 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 13980 | } |
| 13981 | return DOT11F_PARSE_SUCCESS; |
| 13982 | } /* End dot11f_pack_tlv_p2_p_interface. */ |
| 13983 | |
| 13984 | uint32_t dot11f_pack_tlv_p2_p_manageability(tpAniSirGlobal pCtx, |
| 13985 | tDot11fTLVP2PManageability *pSrc, |
| 13986 | uint8_t *pBuf, |
| 13987 | uint32_t nBuf, |
| 13988 | uint32_t *pnConsumed) |
| 13989 | { |
| 13990 | uint8_t *pTlvLen = 0; |
| 13991 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 13992 | uint32_t nNeeded = 0U; |
| 13993 | nNeeded += 4; |
| 13994 | if (nNeeded > nBuf) |
| 13995 | return DOT11F_BUFFER_OVERFLOW; |
| 13996 | while (pSrc->present) { |
| 13997 | *pBuf = 10; |
| 13998 | pBuf += 1; *pnConsumed += 1; |
| 13999 | pTlvLen = pBuf; |
| 14000 | pBuf += 2; *pnConsumed += 2; |
| 14001 | *pBuf = pSrc->manageability; |
| 14002 | *pnConsumed += 1; |
| 14003 | pBuf += 1; |
| 14004 | break; |
| 14005 | } |
| 14006 | (void)pCtx; |
| 14007 | if (pTlvLen) { |
| 14008 | frameshtons(pCtx, pTlvLen, *pnConsumed - nConsumedOnEntry - 3, 0); |
| 14009 | } |
| 14010 | return DOT11F_PARSE_SUCCESS; |
| 14011 | } /* End dot11f_pack_tlv_p2_p_manageability. */ |
| 14012 | |
| 14013 | uint32_t dot11f_pack_ie_condensed_country_str(tpAniSirGlobal pCtx, |
| 14014 | tDot11fIECondensedCountryStr *pSrc, |
| 14015 | uint8_t *pBuf, |
| 14016 | uint32_t nBuf, |
| 14017 | uint32_t *pnConsumed) |
| 14018 | { |
| 14019 | uint8_t *pIeLen = 0; |
| 14020 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14021 | uint32_t nNeeded = 0U; |
| 14022 | nNeeded += 2; |
| 14023 | while (pSrc->present) { |
| 14024 | if (nNeeded > nBuf) |
| 14025 | return DOT11F_BUFFER_OVERFLOW; |
| 14026 | *pBuf = 2; |
| 14027 | ++pBuf; ++(*pnConsumed); |
| 14028 | pIeLen = pBuf; |
| 14029 | ++pBuf; ++(*pnConsumed); |
| 14030 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->countryStr, 2); |
| 14031 | *pnConsumed += 2; |
| 14032 | /* fieldsEndFlag = 1 */ |
| 14033 | break; |
| 14034 | } |
| 14035 | (void)pCtx; |
| 14036 | if (pIeLen) { |
| 14037 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14038 | } |
| 14039 | return DOT11F_PARSE_SUCCESS; |
| 14040 | } /* End dot11f_pack_ie_condensed_country_str. */ |
| 14041 | |
| 14042 | uint32_t dot11f_pack_ie_gtk(tpAniSirGlobal pCtx, |
| 14043 | tDot11fIEGTK *pSrc, |
| 14044 | uint8_t *pBuf, |
| 14045 | uint32_t nBuf, |
| 14046 | uint32_t *pnConsumed) |
| 14047 | { |
| 14048 | uint8_t *pIeLen = 0; |
| 14049 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14050 | uint32_t nNeeded = 0U; |
| 14051 | uint16_t tmp72__; |
| 14052 | nNeeded += (pSrc->num_key + 11); |
| 14053 | while (pSrc->present) { |
| 14054 | if (nNeeded > nBuf) |
| 14055 | return DOT11F_BUFFER_OVERFLOW; |
| 14056 | *pBuf = 2; |
| 14057 | ++pBuf; ++(*pnConsumed); |
| 14058 | pIeLen = pBuf; |
| 14059 | ++pBuf; ++(*pnConsumed); |
| 14060 | tmp72__ = 0U; |
| 14061 | tmp72__ |= (pSrc->keyId << 0); |
| 14062 | tmp72__ |= (pSrc->reserved << 2); |
| 14063 | frameshtons(pCtx, pBuf, tmp72__, 0); |
| 14064 | *pnConsumed += 2; |
| 14065 | pBuf += 2; |
| 14066 | nBuf -= 2 ; |
| 14067 | *pBuf = pSrc->keyLength; |
| 14068 | *pnConsumed += 1; |
| 14069 | pBuf += 1; |
| 14070 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->RSC, 8); |
| 14071 | *pnConsumed += 8; |
| 14072 | pBuf += 8; |
| 14073 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->key), pSrc->num_key); |
| 14074 | *pnConsumed += pSrc->num_key; |
| 14075 | /* fieldsEndFlag = 1 */ |
| 14076 | break; |
| 14077 | } |
| 14078 | (void)pCtx; |
| 14079 | if (pIeLen) { |
| 14080 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14081 | } |
| 14082 | return DOT11F_PARSE_SUCCESS; |
| 14083 | } /* End dot11f_pack_ie_gtk. */ |
| 14084 | |
| 14085 | uint32_t dot11f_pack_ie_igtk(tpAniSirGlobal pCtx, |
| 14086 | tDot11fIEIGTK *pSrc, |
| 14087 | uint8_t *pBuf, |
| 14088 | uint32_t nBuf, |
| 14089 | uint32_t *pnConsumed) |
| 14090 | { |
| 14091 | uint8_t *pIeLen = 0; |
| 14092 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14093 | uint32_t nNeeded = 0U; |
| 14094 | nNeeded += 33; |
| 14095 | while (pSrc->present) { |
| 14096 | if (nNeeded > nBuf) |
| 14097 | return DOT11F_BUFFER_OVERFLOW; |
| 14098 | *pBuf = 4; |
| 14099 | ++pBuf; ++(*pnConsumed); |
| 14100 | pIeLen = pBuf; |
| 14101 | ++pBuf; ++(*pnConsumed); |
| 14102 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->keyID, 2); |
| 14103 | *pnConsumed += 2; |
| 14104 | pBuf += 2; |
| 14105 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->IPN, 6); |
| 14106 | *pnConsumed += 6; |
| 14107 | pBuf += 6; |
| 14108 | *pBuf = pSrc->keyLength; |
| 14109 | *pnConsumed += 1; |
| 14110 | pBuf += 1; |
| 14111 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->key, 24); |
| 14112 | *pnConsumed += 24; |
| 14113 | /* fieldsEndFlag = 1 */ |
| 14114 | break; |
| 14115 | } |
| 14116 | (void)pCtx; |
| 14117 | if (pIeLen) { |
| 14118 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14119 | } |
| 14120 | return DOT11F_PARSE_SUCCESS; |
| 14121 | } /* End dot11f_pack_ie_igtk. */ |
| 14122 | |
| 14123 | uint32_t dot11f_pack_ie_r0_kh_id(tpAniSirGlobal pCtx, |
| 14124 | tDot11fIER0KH_ID *pSrc, |
| 14125 | uint8_t *pBuf, |
| 14126 | uint32_t nBuf, |
| 14127 | uint32_t *pnConsumed) |
| 14128 | { |
| 14129 | uint8_t *pIeLen = 0; |
| 14130 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14131 | uint32_t nNeeded = 0U; |
| 14132 | nNeeded += pSrc->num_PMK_R0_ID; |
| 14133 | while (pSrc->present) { |
| 14134 | if (nNeeded > nBuf) |
| 14135 | return DOT11F_BUFFER_OVERFLOW; |
| 14136 | *pBuf = 3; |
| 14137 | ++pBuf; ++(*pnConsumed); |
| 14138 | pIeLen = pBuf; |
| 14139 | ++pBuf; ++(*pnConsumed); |
| 14140 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->PMK_R0_ID), pSrc->num_PMK_R0_ID); |
| 14141 | *pnConsumed += pSrc->num_PMK_R0_ID; |
| 14142 | /* fieldsEndFlag = 1 */ |
| 14143 | break; |
| 14144 | } |
| 14145 | (void)pCtx; |
| 14146 | if (pIeLen) { |
| 14147 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14148 | } |
| 14149 | return DOT11F_PARSE_SUCCESS; |
| 14150 | } /* End dot11f_pack_ie_r0_kh_id. */ |
| 14151 | |
| 14152 | uint32_t dot11f_pack_ie_r1_kh_id(tpAniSirGlobal pCtx, |
| 14153 | tDot11fIER1KH_ID *pSrc, |
| 14154 | uint8_t *pBuf, |
| 14155 | uint32_t nBuf, |
| 14156 | uint32_t *pnConsumed) |
| 14157 | { |
| 14158 | uint8_t *pIeLen = 0; |
| 14159 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14160 | uint32_t nNeeded = 0U; |
| 14161 | nNeeded += 6; |
| 14162 | while (pSrc->present) { |
| 14163 | if (nNeeded > nBuf) |
| 14164 | return DOT11F_BUFFER_OVERFLOW; |
| 14165 | *pBuf = 1; |
| 14166 | ++pBuf; ++(*pnConsumed); |
| 14167 | pIeLen = pBuf; |
| 14168 | ++pBuf; ++(*pnConsumed); |
| 14169 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->PMK_R1_ID, 6); |
| 14170 | *pnConsumed += 6; |
| 14171 | /* fieldsEndFlag = 1 */ |
| 14172 | break; |
| 14173 | } |
| 14174 | (void)pCtx; |
| 14175 | if (pIeLen) { |
| 14176 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14177 | } |
| 14178 | return DOT11F_PARSE_SUCCESS; |
| 14179 | } /* End dot11f_pack_ie_r1_kh_id. */ |
| 14180 | |
| 14181 | uint32_t dot11f_pack_ie_tsf_info(tpAniSirGlobal pCtx, |
| 14182 | tDot11fIETSFInfo *pSrc, |
| 14183 | uint8_t *pBuf, |
| 14184 | uint32_t nBuf, |
| 14185 | uint32_t *pnConsumed) |
| 14186 | { |
| 14187 | uint8_t *pIeLen = 0; |
| 14188 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14189 | uint32_t nNeeded = 0U; |
| 14190 | nNeeded += 4; |
| 14191 | while (pSrc->present) { |
| 14192 | if (nNeeded > nBuf) |
| 14193 | return DOT11F_BUFFER_OVERFLOW; |
| 14194 | *pBuf = 1; |
| 14195 | ++pBuf; ++(*pnConsumed); |
| 14196 | pIeLen = pBuf; |
| 14197 | ++pBuf; ++(*pnConsumed); |
| 14198 | frameshtons(pCtx, pBuf, pSrc->TsfOffset, 0); |
| 14199 | *pnConsumed += 2; |
| 14200 | pBuf += 2; |
| 14201 | frameshtons(pCtx, pBuf, pSrc->BeaconIntvl, 0); |
| 14202 | *pnConsumed += 2; |
| 14203 | /* fieldsEndFlag = 1 */ |
| 14204 | break; |
| 14205 | } |
| 14206 | (void)pCtx; |
| 14207 | if (pIeLen) { |
| 14208 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14209 | } |
| 14210 | return DOT11F_PARSE_SUCCESS; |
| 14211 | } /* End dot11f_pack_ie_tsf_info. */ |
| 14212 | |
| 14213 | uint32_t dot11f_pack_ie_ap_channel_report(tpAniSirGlobal pCtx, |
| 14214 | tDot11fIEAPChannelReport *pSrc, |
| 14215 | uint8_t *pBuf, |
| 14216 | uint32_t nBuf, |
| 14217 | uint32_t *pnConsumed) |
| 14218 | { |
| 14219 | uint8_t *pIeLen = 0; |
| 14220 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14221 | uint32_t nNeeded = 0U; |
| 14222 | nNeeded += (pSrc->num_channelList + 1); |
| 14223 | while (pSrc->present) { |
| 14224 | if (nNeeded > nBuf) |
| 14225 | return DOT11F_BUFFER_OVERFLOW; |
| 14226 | *pBuf = 51; |
| 14227 | ++pBuf; ++(*pnConsumed); |
| 14228 | pIeLen = pBuf; |
| 14229 | ++pBuf; ++(*pnConsumed); |
| 14230 | *pBuf = pSrc->regulatoryClass; |
| 14231 | *pnConsumed += 1; |
| 14232 | pBuf += 1; |
| 14233 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->channelList), pSrc->num_channelList); |
| 14234 | *pnConsumed += pSrc->num_channelList; |
| 14235 | /* fieldsEndFlag = 1 */ |
| 14236 | break; |
| 14237 | } |
| 14238 | (void)pCtx; |
| 14239 | if (pIeLen) { |
| 14240 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14241 | } |
| 14242 | return DOT11F_PARSE_SUCCESS; |
| 14243 | } /* End dot11f_pack_ie_ap_channel_report. */ |
| 14244 | |
| 14245 | uint32_t dot11f_pack_ie_bcn_reporting_detail(tpAniSirGlobal pCtx, |
| 14246 | tDot11fIEBcnReportingDetail *pSrc, |
| 14247 | uint8_t *pBuf, |
| 14248 | uint32_t nBuf, |
| 14249 | uint32_t *pnConsumed) |
| 14250 | { |
| 14251 | uint8_t *pIeLen = 0; |
| 14252 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14253 | uint32_t nNeeded = 0U; |
| 14254 | nNeeded += 1; |
| 14255 | while (pSrc->present) { |
| 14256 | if (nNeeded > nBuf) |
| 14257 | return DOT11F_BUFFER_OVERFLOW; |
| 14258 | *pBuf = 2; |
| 14259 | ++pBuf; ++(*pnConsumed); |
| 14260 | pIeLen = pBuf; |
| 14261 | ++pBuf; ++(*pnConsumed); |
| 14262 | *pBuf = pSrc->reportingDetail; |
| 14263 | *pnConsumed += 1; |
| 14264 | /* fieldsEndFlag = 1 */ |
| 14265 | break; |
| 14266 | } |
| 14267 | (void)pCtx; |
| 14268 | if (pIeLen) { |
| 14269 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14270 | } |
| 14271 | return DOT11F_PARSE_SUCCESS; |
| 14272 | } /* End dot11f_pack_ie_bcn_reporting_detail. */ |
| 14273 | |
| 14274 | uint32_t dot11f_pack_ie_beacon_report_frm_body(tpAniSirGlobal pCtx, |
| 14275 | tDot11fIEBeaconReportFrmBody *pSrc, |
| 14276 | uint8_t *pBuf, |
| 14277 | uint32_t nBuf, |
| 14278 | uint32_t *pnConsumed) |
| 14279 | { |
| 14280 | uint8_t *pIeLen = 0; |
| 14281 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14282 | uint32_t nNeeded = 0U; |
| 14283 | nNeeded += pSrc->num_reportedFields; |
| 14284 | while (pSrc->present) { |
| 14285 | if (nNeeded > nBuf) |
| 14286 | return DOT11F_BUFFER_OVERFLOW; |
| 14287 | *pBuf = 1; |
| 14288 | ++pBuf; ++(*pnConsumed); |
| 14289 | pIeLen = pBuf; |
| 14290 | ++pBuf; ++(*pnConsumed); |
| 14291 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->reportedFields), pSrc->num_reportedFields); |
| 14292 | *pnConsumed += pSrc->num_reportedFields; |
| 14293 | /* fieldsEndFlag = 1 */ |
| 14294 | break; |
| 14295 | } |
| 14296 | (void)pCtx; |
| 14297 | if (pIeLen) { |
| 14298 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14299 | } |
| 14300 | return DOT11F_PARSE_SUCCESS; |
| 14301 | } /* End dot11f_pack_ie_beacon_report_frm_body. */ |
| 14302 | |
| 14303 | uint32_t dot11f_pack_ie_beacon_reporting(tpAniSirGlobal pCtx, |
| 14304 | tDot11fIEBeaconReporting *pSrc, |
| 14305 | uint8_t *pBuf, |
| 14306 | uint32_t nBuf, |
| 14307 | uint32_t *pnConsumed) |
| 14308 | { |
| 14309 | uint8_t *pIeLen = 0; |
| 14310 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14311 | uint32_t nNeeded = 0U; |
| 14312 | nNeeded += 2; |
| 14313 | while (pSrc->present) { |
| 14314 | if (nNeeded > nBuf) |
| 14315 | return DOT11F_BUFFER_OVERFLOW; |
| 14316 | *pBuf = 1; |
| 14317 | ++pBuf; ++(*pnConsumed); |
| 14318 | pIeLen = pBuf; |
| 14319 | ++pBuf; ++(*pnConsumed); |
| 14320 | *pBuf = pSrc->reportingCondition; |
| 14321 | *pnConsumed += 1; |
| 14322 | pBuf += 1; |
| 14323 | *pBuf = pSrc->threshold; |
| 14324 | *pnConsumed += 1; |
| 14325 | /* fieldsEndFlag = 1 */ |
| 14326 | break; |
| 14327 | } |
| 14328 | (void)pCtx; |
| 14329 | if (pIeLen) { |
| 14330 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14331 | } |
| 14332 | return DOT11F_PARSE_SUCCESS; |
| 14333 | } /* End dot11f_pack_ie_beacon_reporting. */ |
| 14334 | |
| 14335 | uint32_t dot11f_pack_ie_measurement_pilot(tpAniSirGlobal pCtx, |
| 14336 | tDot11fIEMeasurementPilot *pSrc, |
| 14337 | uint8_t *pBuf, |
| 14338 | uint32_t nBuf, |
| 14339 | uint32_t *pnConsumed) |
| 14340 | { |
| 14341 | uint8_t *pIeLen = 0; |
| 14342 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14343 | uint32_t nNeeded = 0U; |
| 14344 | nNeeded += (pSrc->num_vendorSpecific + 1); |
| 14345 | while (pSrc->present) { |
| 14346 | if (nNeeded > nBuf) |
| 14347 | return DOT11F_BUFFER_OVERFLOW; |
| 14348 | *pBuf = 66; |
| 14349 | ++pBuf; ++(*pnConsumed); |
| 14350 | pIeLen = pBuf; |
| 14351 | ++pBuf; ++(*pnConsumed); |
| 14352 | *pBuf = pSrc->measurementPilot; |
| 14353 | *pnConsumed += 1; |
| 14354 | pBuf += 1; |
| 14355 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->vendorSpecific), pSrc->num_vendorSpecific); |
| 14356 | *pnConsumed += pSrc->num_vendorSpecific; |
| 14357 | /* fieldsEndFlag = 1 */ |
| 14358 | break; |
| 14359 | } |
| 14360 | (void)pCtx; |
| 14361 | if (pIeLen) { |
| 14362 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14363 | } |
| 14364 | return DOT11F_PARSE_SUCCESS; |
| 14365 | } /* End dot11f_pack_ie_measurement_pilot. */ |
| 14366 | |
| 14367 | uint32_t dot11f_pack_ie_multi_bssid(tpAniSirGlobal pCtx, |
| 14368 | tDot11fIEMultiBssid *pSrc, |
| 14369 | uint8_t *pBuf, |
| 14370 | uint32_t nBuf, |
| 14371 | uint32_t *pnConsumed) |
| 14372 | { |
| 14373 | uint8_t *pIeLen = 0; |
| 14374 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14375 | uint32_t nNeeded = 0U; |
| 14376 | nNeeded += (pSrc->num_vendorSpecific + 1); |
| 14377 | while (pSrc->present) { |
| 14378 | if (nNeeded > nBuf) |
| 14379 | return DOT11F_BUFFER_OVERFLOW; |
| 14380 | *pBuf = 71; |
| 14381 | ++pBuf; ++(*pnConsumed); |
| 14382 | pIeLen = pBuf; |
| 14383 | ++pBuf; ++(*pnConsumed); |
| 14384 | *pBuf = pSrc->maxBSSIDIndicator; |
| 14385 | *pnConsumed += 1; |
| 14386 | pBuf += 1; |
| 14387 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->vendorSpecific), pSrc->num_vendorSpecific); |
| 14388 | *pnConsumed += pSrc->num_vendorSpecific; |
| 14389 | /* fieldsEndFlag = 1 */ |
| 14390 | break; |
| 14391 | } |
| 14392 | (void)pCtx; |
| 14393 | if (pIeLen) { |
| 14394 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14395 | } |
| 14396 | return DOT11F_PARSE_SUCCESS; |
| 14397 | } /* End dot11f_pack_ie_multi_bssid. */ |
| 14398 | |
| 14399 | uint32_t dot11f_pack_ie_ric_data(tpAniSirGlobal pCtx, |
| 14400 | tDot11fIERICData *pSrc, |
| 14401 | uint8_t *pBuf, |
| 14402 | uint32_t nBuf, |
| 14403 | uint32_t *pnConsumed) |
| 14404 | { |
| 14405 | uint8_t *pIeLen = 0; |
| 14406 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14407 | uint32_t nNeeded = 0U; |
| 14408 | nNeeded += 4; |
| 14409 | while (pSrc->present) { |
| 14410 | if (nNeeded > nBuf) |
| 14411 | return DOT11F_BUFFER_OVERFLOW; |
| 14412 | *pBuf = 57; |
| 14413 | ++pBuf; ++(*pnConsumed); |
| 14414 | pIeLen = pBuf; |
| 14415 | ++pBuf; ++(*pnConsumed); |
| 14416 | *pBuf = pSrc->Identifier; |
| 14417 | *pnConsumed += 1; |
| 14418 | pBuf += 1; |
| 14419 | *pBuf = pSrc->resourceDescCount; |
| 14420 | *pnConsumed += 1; |
| 14421 | pBuf += 1; |
| 14422 | frameshtons(pCtx, pBuf, pSrc->statusCode, 0); |
| 14423 | *pnConsumed += 2; |
| 14424 | /* fieldsEndFlag = 1 */ |
| 14425 | break; |
| 14426 | } |
| 14427 | (void)pCtx; |
| 14428 | if (pIeLen) { |
| 14429 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14430 | } |
| 14431 | return DOT11F_PARSE_SUCCESS; |
| 14432 | } /* End dot11f_pack_ie_ric_data. */ |
| 14433 | |
| 14434 | uint32_t dot11f_pack_ie_ric_descriptor(tpAniSirGlobal pCtx, |
| 14435 | tDot11fIERICDescriptor *pSrc, |
| 14436 | uint8_t *pBuf, |
| 14437 | uint32_t nBuf, |
| 14438 | uint32_t *pnConsumed) |
| 14439 | { |
| 14440 | uint8_t *pIeLen = 0; |
| 14441 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14442 | uint32_t nNeeded = 0U; |
| 14443 | nNeeded += (pSrc->num_variableData + 1); |
| 14444 | while (pSrc->present) { |
| 14445 | if (nNeeded > nBuf) |
| 14446 | return DOT11F_BUFFER_OVERFLOW; |
| 14447 | *pBuf = 75; |
| 14448 | ++pBuf; ++(*pnConsumed); |
| 14449 | pIeLen = pBuf; |
| 14450 | ++pBuf; ++(*pnConsumed); |
| 14451 | *pBuf = pSrc->resourceType; |
| 14452 | *pnConsumed += 1; |
| 14453 | pBuf += 1; |
| 14454 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->variableData), pSrc->num_variableData); |
| 14455 | *pnConsumed += pSrc->num_variableData; |
| 14456 | /* fieldsEndFlag = 1 */ |
| 14457 | break; |
| 14458 | } |
| 14459 | (void)pCtx; |
| 14460 | if (pIeLen) { |
| 14461 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14462 | } |
| 14463 | return DOT11F_PARSE_SUCCESS; |
| 14464 | } /* End dot11f_pack_ie_ric_descriptor. */ |
| 14465 | |
| 14466 | uint32_t dot11f_pack_ie_rrm_enabled_cap(tpAniSirGlobal pCtx, |
| 14467 | tDot11fIERRMEnabledCap *pSrc, |
| 14468 | uint8_t *pBuf, |
| 14469 | uint32_t nBuf, |
| 14470 | uint32_t *pnConsumed) |
| 14471 | { |
| 14472 | uint8_t *pIeLen = 0; |
| 14473 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14474 | uint32_t nNeeded = 0U; |
| 14475 | uint8_t tmp73__; |
| 14476 | uint8_t tmp74__; |
| 14477 | uint8_t tmp75__; |
| 14478 | uint8_t tmp76__; |
| 14479 | uint8_t tmp77__; |
| 14480 | nNeeded += 5; |
| 14481 | while (pSrc->present) { |
| 14482 | if (nNeeded > nBuf) |
| 14483 | return DOT11F_BUFFER_OVERFLOW; |
| 14484 | *pBuf = 70; |
| 14485 | ++pBuf; ++(*pnConsumed); |
| 14486 | pIeLen = pBuf; |
| 14487 | ++pBuf; ++(*pnConsumed); |
| 14488 | tmp73__ = 0U; |
| 14489 | tmp73__ |= (pSrc->LinkMeasurement << 0); |
| 14490 | tmp73__ |= (pSrc->NeighborRpt << 1); |
| 14491 | tmp73__ |= (pSrc->parallel << 2); |
| 14492 | tmp73__ |= (pSrc->repeated << 3); |
| 14493 | tmp73__ |= (pSrc->BeaconPassive << 4); |
| 14494 | tmp73__ |= (pSrc->BeaconActive << 5); |
| 14495 | tmp73__ |= (pSrc->BeaconTable << 6); |
| 14496 | tmp73__ |= (pSrc->BeaconRepCond << 7); |
| 14497 | *pBuf = tmp73__; |
| 14498 | *pnConsumed += 1; |
| 14499 | pBuf += 1; |
| 14500 | nBuf -= 1 ; |
| 14501 | tmp74__ = 0U; |
| 14502 | tmp74__ |= (pSrc->FrameMeasurement << 0); |
| 14503 | tmp74__ |= (pSrc->ChannelLoad << 1); |
| 14504 | tmp74__ |= (pSrc->NoiseHistogram << 2); |
| 14505 | tmp74__ |= (pSrc->statistics << 3); |
| 14506 | tmp74__ |= (pSrc->LCIMeasurement << 4); |
| 14507 | tmp74__ |= (pSrc->LCIAzimuth << 5); |
| 14508 | tmp74__ |= (pSrc->TCMCapability << 6); |
| 14509 | tmp74__ |= (pSrc->triggeredTCM << 7); |
| 14510 | *pBuf = tmp74__; |
| 14511 | *pnConsumed += 1; |
| 14512 | pBuf += 1; |
| 14513 | nBuf -= 1 ; |
| 14514 | tmp75__ = 0U; |
| 14515 | tmp75__ |= (pSrc->APChanReport << 0); |
| 14516 | tmp75__ |= (pSrc->RRMMIBEnabled << 1); |
| 14517 | tmp75__ |= (pSrc->operatingChanMax << 2); |
| 14518 | tmp75__ |= (pSrc->nonOperatinChanMax << 5); |
| 14519 | *pBuf = tmp75__; |
| 14520 | *pnConsumed += 1; |
| 14521 | pBuf += 1; |
| 14522 | nBuf -= 1 ; |
| 14523 | tmp76__ = 0U; |
| 14524 | tmp76__ |= (pSrc->MeasurementPilot << 0); |
| 14525 | tmp76__ |= (pSrc->MeasurementPilotEnabled << 3); |
| 14526 | tmp76__ |= (pSrc->NeighborTSFOffset << 4); |
| 14527 | tmp76__ |= (pSrc->RCPIMeasurement << 5); |
| 14528 | tmp76__ |= (pSrc->RSNIMeasurement << 6); |
| 14529 | tmp76__ |= (pSrc->BssAvgAccessDelay << 7); |
| 14530 | *pBuf = tmp76__; |
| 14531 | *pnConsumed += 1; |
| 14532 | pBuf += 1; |
| 14533 | nBuf -= 1 ; |
| 14534 | tmp77__ = 0U; |
| 14535 | tmp77__ |= (pSrc->BSSAvailAdmission << 0); |
| 14536 | tmp77__ |= (pSrc->AntennaInformation << 1); |
| 14537 | tmp77__ |= (pSrc->fine_time_meas_rpt << 2); |
| 14538 | tmp77__ |= (pSrc->lci_capability << 3); |
| 14539 | tmp77__ |= (pSrc->reserved << 4); |
| 14540 | *pBuf = tmp77__; |
| 14541 | *pnConsumed += 1; |
| 14542 | /* fieldsEndFlag = 1 */ |
| 14543 | nBuf -= 1 ; |
| 14544 | break; |
| 14545 | } |
| 14546 | (void)pCtx; |
| 14547 | if (pIeLen) { |
| 14548 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14549 | } |
| 14550 | return DOT11F_PARSE_SUCCESS; |
| 14551 | } /* End dot11f_pack_ie_rrm_enabled_cap. */ |
| 14552 | |
| 14553 | uint32_t dot11f_pack_ie_requested_info(tpAniSirGlobal pCtx, |
| 14554 | tDot11fIERequestedInfo *pSrc, |
| 14555 | uint8_t *pBuf, |
| 14556 | uint32_t nBuf, |
| 14557 | uint32_t *pnConsumed) |
| 14558 | { |
| 14559 | uint8_t *pIeLen = 0; |
| 14560 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14561 | uint32_t nNeeded = 0U; |
| 14562 | nNeeded += pSrc->num_requested_eids; |
| 14563 | while (pSrc->present) { |
| 14564 | if (nNeeded > nBuf) |
| 14565 | return DOT11F_BUFFER_OVERFLOW; |
| 14566 | *pBuf = 10; |
| 14567 | ++pBuf; ++(*pnConsumed); |
| 14568 | pIeLen = pBuf; |
| 14569 | ++pBuf; ++(*pnConsumed); |
| 14570 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->requested_eids), pSrc->num_requested_eids); |
| 14571 | *pnConsumed += pSrc->num_requested_eids; |
| 14572 | /* fieldsEndFlag = 1 */ |
| 14573 | break; |
| 14574 | } |
| 14575 | (void)pCtx; |
| 14576 | if (pIeLen) { |
| 14577 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14578 | } |
| 14579 | return DOT11F_PARSE_SUCCESS; |
| 14580 | } /* End dot11f_pack_ie_requested_info. */ |
| 14581 | |
| 14582 | uint32_t dot11f_pack_ie_ssid(tpAniSirGlobal pCtx, |
| 14583 | tDot11fIESSID *pSrc, |
| 14584 | uint8_t *pBuf, |
| 14585 | uint32_t nBuf, |
| 14586 | uint32_t *pnConsumed) |
| 14587 | { |
| 14588 | uint8_t *pIeLen = 0; |
| 14589 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14590 | uint32_t nNeeded = 0U; |
| 14591 | nNeeded += pSrc->num_ssid; |
| 14592 | while (pSrc->present) { |
| 14593 | if (nNeeded > nBuf) |
| 14594 | return DOT11F_BUFFER_OVERFLOW; |
| 14595 | *pBuf = 0; |
| 14596 | ++pBuf; ++(*pnConsumed); |
| 14597 | pIeLen = pBuf; |
| 14598 | ++pBuf; ++(*pnConsumed); |
| 14599 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->ssid), pSrc->num_ssid); |
| 14600 | *pnConsumed += pSrc->num_ssid; |
| 14601 | /* fieldsEndFlag = 1 */ |
| 14602 | break; |
| 14603 | } |
| 14604 | (void)pCtx; |
| 14605 | if (pIeLen) { |
| 14606 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14607 | } |
| 14608 | return DOT11F_PARSE_SUCCESS; |
| 14609 | } /* End dot11f_pack_ie_ssid. */ |
| 14610 | |
| 14611 | uint32_t dot11f_pack_ie_schedule(tpAniSirGlobal pCtx, |
| 14612 | tDot11fIESchedule *pSrc, |
| 14613 | uint8_t *pBuf, |
| 14614 | uint32_t nBuf, |
| 14615 | uint32_t *pnConsumed) |
| 14616 | { |
| 14617 | uint8_t *pIeLen = 0; |
| 14618 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14619 | uint32_t nNeeded = 0U; |
| 14620 | uint16_t tmp78__; |
| 14621 | nNeeded += 14; |
| 14622 | while (pSrc->present) { |
| 14623 | if (nNeeded > nBuf) |
| 14624 | return DOT11F_BUFFER_OVERFLOW; |
| 14625 | *pBuf = 15; |
| 14626 | ++pBuf; ++(*pnConsumed); |
| 14627 | pIeLen = pBuf; |
| 14628 | ++pBuf; ++(*pnConsumed); |
| 14629 | tmp78__ = 0U; |
| 14630 | tmp78__ |= (pSrc->aggregation << 0); |
| 14631 | tmp78__ |= (pSrc->tsid << 1); |
| 14632 | tmp78__ |= (pSrc->direction << 5); |
| 14633 | tmp78__ |= (pSrc->reserved << 7); |
| 14634 | frameshtons(pCtx, pBuf, tmp78__, 0); |
| 14635 | *pnConsumed += 2; |
| 14636 | pBuf += 2; |
| 14637 | nBuf -= 2 ; |
| 14638 | frameshtonl(pCtx, pBuf, pSrc->service_start_time, 0); |
| 14639 | *pnConsumed += 4; |
| 14640 | pBuf += 4; |
| 14641 | frameshtonl(pCtx, pBuf, pSrc->service_interval, 0); |
| 14642 | *pnConsumed += 4; |
| 14643 | pBuf += 4; |
| 14644 | frameshtons(pCtx, pBuf, pSrc->max_service_dur, 0); |
| 14645 | *pnConsumed += 2; |
| 14646 | pBuf += 2; |
| 14647 | frameshtons(pCtx, pBuf, pSrc->spec_interval, 0); |
| 14648 | *pnConsumed += 2; |
| 14649 | /* fieldsEndFlag = 1 */ |
| 14650 | break; |
| 14651 | } |
| 14652 | (void)pCtx; |
| 14653 | if (pIeLen) { |
| 14654 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14655 | } |
| 14656 | return DOT11F_PARSE_SUCCESS; |
| 14657 | } /* End dot11f_pack_ie_schedule. */ |
| 14658 | |
| 14659 | uint32_t dot11f_pack_ie_tclas(tpAniSirGlobal pCtx, |
| 14660 | tDot11fIETCLAS *pSrc, |
| 14661 | uint8_t *pBuf, |
| 14662 | uint32_t nBuf, |
| 14663 | uint32_t *pnConsumed) |
| 14664 | { |
| 14665 | uint8_t *pIeLen = 0; |
| 14666 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14667 | uint32_t nNeeded = 0U; |
| 14668 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 14669 | status = dot11f_get_packed_ietclas(pCtx, pSrc, &nNeeded); |
| 14670 | if (!DOT11F_SUCCEEDED(status)) |
| 14671 | return status; |
| 14672 | while (pSrc->present) { |
| 14673 | if (nNeeded > nBuf) |
| 14674 | return DOT11F_BUFFER_OVERFLOW; |
| 14675 | *pBuf = 14; |
| 14676 | ++pBuf; ++(*pnConsumed); |
| 14677 | pIeLen = pBuf; |
| 14678 | ++pBuf; ++(*pnConsumed); |
| 14679 | *pBuf = pSrc->user_priority; |
| 14680 | *pnConsumed += 1; |
| 14681 | pBuf += 1; |
| 14682 | *pBuf = pSrc->classifier_type; |
| 14683 | *pnConsumed += 1; |
| 14684 | pBuf += 1; |
| 14685 | *pBuf = pSrc->classifier_mask; |
| 14686 | *pnConsumed += 1; |
| 14687 | pBuf += 1; |
| 14688 | switch (pSrc->classifier_type) { |
| 14689 | case 0: |
| 14690 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.EthParams.source, 6); |
| 14691 | *pnConsumed += 6; |
| 14692 | pBuf += 6; |
| 14693 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.EthParams.dest, 6); |
| 14694 | *pnConsumed += 6; |
| 14695 | pBuf += 6; |
| 14696 | frameshtons(pCtx, pBuf, pSrc->info.EthParams.type, 0); |
| 14697 | *pnConsumed += 2; |
| 14698 | /* fieldsEndFlag = 1 */ |
| 14699 | break; |
| 14700 | case 1: |
| 14701 | *pBuf = pSrc->info.IpParams.version; |
| 14702 | *pnConsumed += 1; |
| 14703 | pBuf += 1; |
| 14704 | switch (pSrc->info.IpParams.version) { |
| 14705 | case 4: |
| 14706 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.source, 4); |
| 14707 | *pnConsumed += 4; |
| 14708 | pBuf += 4; |
| 14709 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.dest, 4); |
| 14710 | *pnConsumed += 4; |
| 14711 | pBuf += 4; |
| 14712 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.src_port, 0); |
| 14713 | *pnConsumed += 2; |
| 14714 | pBuf += 2; |
| 14715 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.dest_port, 0); |
| 14716 | *pnConsumed += 2; |
| 14717 | pBuf += 2; |
| 14718 | *pBuf = pSrc->info.IpParams.params.IpV4Params.DSCP; |
| 14719 | *pnConsumed += 1; |
| 14720 | pBuf += 1; |
| 14721 | *pBuf = pSrc->info.IpParams.params.IpV4Params.proto; |
| 14722 | *pnConsumed += 1; |
| 14723 | pBuf += 1; |
| 14724 | *pBuf = pSrc->info.IpParams.params.IpV4Params.reserved; |
| 14725 | *pnConsumed += 1; |
| 14726 | /* fieldsEndFlag = 1 */ |
| 14727 | break; |
| 14728 | case 6: |
| 14729 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.source, 16); |
| 14730 | *pnConsumed += 16; |
| 14731 | pBuf += 16; |
| 14732 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.dest, 16); |
| 14733 | *pnConsumed += 16; |
| 14734 | pBuf += 16; |
| 14735 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.src_port, 0); |
| 14736 | *pnConsumed += 2; |
| 14737 | pBuf += 2; |
| 14738 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.dest_port, 0); |
| 14739 | *pnConsumed += 2; |
| 14740 | pBuf += 2; |
| 14741 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.flow_label, 3); |
| 14742 | *pnConsumed += 3; |
| 14743 | /* fieldsEndFlag = 1 */ |
| 14744 | break; |
| 14745 | } |
| 14746 | break; |
| 14747 | case 2: |
| 14748 | frameshtons(pCtx, pBuf, pSrc->info.Params8021dq.tag_type, 0); |
| 14749 | *pnConsumed += 2; |
| 14750 | /* fieldsEndFlag = 1 */ |
| 14751 | break; |
| 14752 | } |
| 14753 | break; |
| 14754 | } |
| 14755 | (void)pCtx; |
| 14756 | if (pIeLen) { |
| 14757 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14758 | } |
| 14759 | return status; |
| 14760 | } /* End dot11f_pack_ie_tclas. */ |
| 14761 | |
| 14762 | uint32_t dot11f_pack_ie_tclassproc(tpAniSirGlobal pCtx, |
| 14763 | tDot11fIETCLASSPROC *pSrc, |
| 14764 | uint8_t *pBuf, |
| 14765 | uint32_t nBuf, |
| 14766 | uint32_t *pnConsumed) |
| 14767 | { |
| 14768 | uint8_t *pIeLen = 0; |
| 14769 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14770 | uint32_t nNeeded = 0U; |
| 14771 | nNeeded += 1; |
| 14772 | while (pSrc->present) { |
| 14773 | if (nNeeded > nBuf) |
| 14774 | return DOT11F_BUFFER_OVERFLOW; |
| 14775 | *pBuf = 44; |
| 14776 | ++pBuf; ++(*pnConsumed); |
| 14777 | pIeLen = pBuf; |
| 14778 | ++pBuf; ++(*pnConsumed); |
| 14779 | *pBuf = pSrc->processing; |
| 14780 | *pnConsumed += 1; |
| 14781 | /* fieldsEndFlag = 1 */ |
| 14782 | break; |
| 14783 | } |
| 14784 | (void)pCtx; |
| 14785 | if (pIeLen) { |
| 14786 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14787 | } |
| 14788 | return DOT11F_PARSE_SUCCESS; |
| 14789 | } /* End dot11f_pack_ie_tclassproc. */ |
| 14790 | |
| 14791 | uint32_t dot11f_pack_ie_ts_delay(tpAniSirGlobal pCtx, |
| 14792 | tDot11fIETSDelay *pSrc, |
| 14793 | uint8_t *pBuf, |
| 14794 | uint32_t nBuf, |
| 14795 | uint32_t *pnConsumed) |
| 14796 | { |
| 14797 | uint8_t *pIeLen = 0; |
| 14798 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14799 | uint32_t nNeeded = 0U; |
| 14800 | nNeeded += 4; |
| 14801 | while (pSrc->present) { |
| 14802 | if (nNeeded > nBuf) |
| 14803 | return DOT11F_BUFFER_OVERFLOW; |
| 14804 | *pBuf = 43; |
| 14805 | ++pBuf; ++(*pnConsumed); |
| 14806 | pIeLen = pBuf; |
| 14807 | ++pBuf; ++(*pnConsumed); |
| 14808 | frameshtonl(pCtx, pBuf, pSrc->delay, 0); |
| 14809 | *pnConsumed += 4; |
| 14810 | /* fieldsEndFlag = 1 */ |
| 14811 | break; |
| 14812 | } |
| 14813 | (void)pCtx; |
| 14814 | if (pIeLen) { |
| 14815 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14816 | } |
| 14817 | return DOT11F_PARSE_SUCCESS; |
| 14818 | } /* End dot11f_pack_ie_ts_delay. */ |
| 14819 | |
| 14820 | uint32_t dot11f_pack_ie_tspec(tpAniSirGlobal pCtx, |
| 14821 | tDot11fIETSPEC *pSrc, |
| 14822 | uint8_t *pBuf, |
| 14823 | uint32_t nBuf, |
| 14824 | uint32_t *pnConsumed) |
| 14825 | { |
| 14826 | uint8_t *pIeLen = 0; |
| 14827 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14828 | uint32_t nNeeded = 0U; |
| 14829 | uint16_t tmp79__; |
| 14830 | uint8_t tmp80__; |
| 14831 | uint16_t tmp81__; |
| 14832 | nNeeded += 55; |
| 14833 | while (pSrc->present) { |
| 14834 | if (nNeeded > nBuf) |
| 14835 | return DOT11F_BUFFER_OVERFLOW; |
| 14836 | *pBuf = 13; |
| 14837 | ++pBuf; ++(*pnConsumed); |
| 14838 | pIeLen = pBuf; |
| 14839 | ++pBuf; ++(*pnConsumed); |
| 14840 | tmp79__ = 0U; |
| 14841 | tmp79__ |= (pSrc->traffic_type << 0); |
| 14842 | tmp79__ |= (pSrc->tsid << 1); |
| 14843 | tmp79__ |= (pSrc->direction << 5); |
| 14844 | tmp79__ |= (pSrc->access_policy << 7); |
| 14845 | tmp79__ |= (pSrc->aggregation << 9); |
| 14846 | tmp79__ |= (pSrc->psb << 10); |
| 14847 | tmp79__ |= (pSrc->user_priority << 11); |
| 14848 | tmp79__ |= (pSrc->tsinfo_ack_pol << 14); |
| 14849 | frameshtons(pCtx, pBuf, tmp79__, 0); |
| 14850 | *pnConsumed += 2; |
| 14851 | pBuf += 2; |
| 14852 | nBuf -= 2 ; |
| 14853 | tmp80__ = 0U; |
| 14854 | tmp80__ |= (pSrc->schedule << 0); |
| 14855 | tmp80__ |= (pSrc->unused << 1); |
| 14856 | *pBuf = tmp80__; |
| 14857 | *pnConsumed += 1; |
| 14858 | pBuf += 1; |
| 14859 | nBuf -= 1 ; |
| 14860 | tmp81__ = 0U; |
| 14861 | tmp81__ |= (pSrc->size << 0); |
| 14862 | tmp81__ |= (pSrc->fixed << 15); |
| 14863 | frameshtons(pCtx, pBuf, tmp81__, 0); |
| 14864 | *pnConsumed += 2; |
| 14865 | pBuf += 2; |
| 14866 | nBuf -= 2 ; |
| 14867 | frameshtons(pCtx, pBuf, pSrc->max_msdu_size, 0); |
| 14868 | *pnConsumed += 2; |
| 14869 | pBuf += 2; |
| 14870 | frameshtonl(pCtx, pBuf, pSrc->min_service_int, 0); |
| 14871 | *pnConsumed += 4; |
| 14872 | pBuf += 4; |
| 14873 | frameshtonl(pCtx, pBuf, pSrc->max_service_int, 0); |
| 14874 | *pnConsumed += 4; |
| 14875 | pBuf += 4; |
| 14876 | frameshtonl(pCtx, pBuf, pSrc->inactivity_int, 0); |
| 14877 | *pnConsumed += 4; |
| 14878 | pBuf += 4; |
| 14879 | frameshtonl(pCtx, pBuf, pSrc->suspension_int, 0); |
| 14880 | *pnConsumed += 4; |
| 14881 | pBuf += 4; |
| 14882 | frameshtonl(pCtx, pBuf, pSrc->service_start_time, 0); |
| 14883 | *pnConsumed += 4; |
| 14884 | pBuf += 4; |
| 14885 | frameshtonl(pCtx, pBuf, pSrc->min_data_rate, 0); |
| 14886 | *pnConsumed += 4; |
| 14887 | pBuf += 4; |
| 14888 | frameshtonl(pCtx, pBuf, pSrc->mean_data_rate, 0); |
| 14889 | *pnConsumed += 4; |
| 14890 | pBuf += 4; |
| 14891 | frameshtonl(pCtx, pBuf, pSrc->peak_data_rate, 0); |
| 14892 | *pnConsumed += 4; |
| 14893 | pBuf += 4; |
| 14894 | frameshtonl(pCtx, pBuf, pSrc->burst_size, 0); |
| 14895 | *pnConsumed += 4; |
| 14896 | pBuf += 4; |
| 14897 | frameshtonl(pCtx, pBuf, pSrc->delay_bound, 0); |
| 14898 | *pnConsumed += 4; |
| 14899 | pBuf += 4; |
| 14900 | frameshtonl(pCtx, pBuf, pSrc->min_phy_rate, 0); |
| 14901 | *pnConsumed += 4; |
| 14902 | pBuf += 4; |
| 14903 | frameshtons(pCtx, pBuf, pSrc->surplus_bw_allowance, 0); |
| 14904 | *pnConsumed += 2; |
| 14905 | pBuf += 2; |
| 14906 | frameshtons(pCtx, pBuf, pSrc->medium_time, 0); |
| 14907 | *pnConsumed += 2; |
| 14908 | /* fieldsEndFlag = 1 */ |
| 14909 | break; |
| 14910 | } |
| 14911 | (void)pCtx; |
| 14912 | if (pIeLen) { |
| 14913 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14914 | } |
| 14915 | return DOT11F_PARSE_SUCCESS; |
| 14916 | } /* End dot11f_pack_ie_tspec. */ |
| 14917 | |
| 14918 | uint32_t dot11f_pack_ie_vht_caps(tpAniSirGlobal pCtx, |
| 14919 | tDot11fIEVHTCaps *pSrc, |
| 14920 | uint8_t *pBuf, |
| 14921 | uint32_t nBuf, |
| 14922 | uint32_t *pnConsumed) |
| 14923 | { |
| 14924 | uint8_t *pIeLen = 0; |
| 14925 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 14926 | uint32_t nNeeded = 0U; |
| 14927 | uint32_t tmp82__; |
| 14928 | uint16_t tmp83__; |
| 14929 | uint16_t tmp84__; |
| 14930 | nNeeded += 12; |
| 14931 | while (pSrc->present) { |
| 14932 | if (nNeeded > nBuf) |
| 14933 | return DOT11F_BUFFER_OVERFLOW; |
| 14934 | *pBuf = 191; |
| 14935 | ++pBuf; ++(*pnConsumed); |
| 14936 | pIeLen = pBuf; |
| 14937 | ++pBuf; ++(*pnConsumed); |
| 14938 | tmp82__ = 0U; |
| 14939 | tmp82__ |= (pSrc->maxMPDULen << 0); |
| 14940 | tmp82__ |= (pSrc->supportedChannelWidthSet << 2); |
| 14941 | tmp82__ |= (pSrc->ldpcCodingCap << 4); |
| 14942 | tmp82__ |= (pSrc->shortGI80MHz << 5); |
| 14943 | tmp82__ |= (pSrc->shortGI160and80plus80MHz << 6); |
| 14944 | tmp82__ |= (pSrc->txSTBC << 7); |
| 14945 | tmp82__ |= (pSrc->rxSTBC << 8); |
| 14946 | tmp82__ |= (pSrc->suBeamFormerCap << 11); |
| 14947 | tmp82__ |= (pSrc->suBeamformeeCap << 12); |
| 14948 | tmp82__ |= (pSrc->csnofBeamformerAntSup << 13); |
| 14949 | tmp82__ |= (pSrc->numSoundingDim << 16); |
| 14950 | tmp82__ |= (pSrc->muBeamformerCap << 19); |
| 14951 | tmp82__ |= (pSrc->muBeamformeeCap << 20); |
| 14952 | tmp82__ |= (pSrc->vhtTXOPPS << 21); |
| 14953 | tmp82__ |= (pSrc->htcVHTCap << 22); |
| 14954 | tmp82__ |= (pSrc->maxAMPDULenExp << 23); |
| 14955 | tmp82__ |= (pSrc->vhtLinkAdaptCap << 26); |
| 14956 | tmp82__ |= (pSrc->rxAntPattern << 28); |
| 14957 | tmp82__ |= (pSrc->txAntPattern << 29); |
| 14958 | tmp82__ |= (pSrc->reserved1 << 30); |
| 14959 | frameshtonl(pCtx, pBuf, tmp82__, 0); |
| 14960 | *pnConsumed += 4; |
| 14961 | pBuf += 4; |
| 14962 | nBuf -= 4 ; |
| 14963 | frameshtons(pCtx, pBuf, pSrc->rxMCSMap, 0); |
| 14964 | *pnConsumed += 2; |
| 14965 | pBuf += 2; |
| 14966 | tmp83__ = 0U; |
| 14967 | tmp83__ |= (pSrc->rxHighSupDataRate << 0); |
| 14968 | tmp83__ |= (pSrc->reserved2 << 13); |
| 14969 | frameshtons(pCtx, pBuf, tmp83__, 0); |
| 14970 | *pnConsumed += 2; |
| 14971 | pBuf += 2; |
| 14972 | nBuf -= 2 ; |
| 14973 | frameshtons(pCtx, pBuf, pSrc->txMCSMap, 0); |
| 14974 | *pnConsumed += 2; |
| 14975 | pBuf += 2; |
| 14976 | tmp84__ = 0U; |
| 14977 | tmp84__ |= (pSrc->txSupDataRate << 0); |
| 14978 | tmp84__ |= (pSrc->reserved3 << 13); |
| 14979 | frameshtons(pCtx, pBuf, tmp84__, 0); |
| 14980 | *pnConsumed += 2; |
| 14981 | /* fieldsEndFlag = 1 */ |
| 14982 | nBuf -= 2 ; |
| 14983 | break; |
| 14984 | } |
| 14985 | (void)pCtx; |
| 14986 | if (pIeLen) { |
| 14987 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 14988 | } |
| 14989 | return DOT11F_PARSE_SUCCESS; |
| 14990 | } /* End dot11f_pack_ie_vht_caps. */ |
| 14991 | |
| 14992 | uint32_t dot11f_pack_ie_vht_operation(tpAniSirGlobal pCtx, |
| 14993 | tDot11fIEVHTOperation *pSrc, |
| 14994 | uint8_t *pBuf, |
| 14995 | uint32_t nBuf, |
| 14996 | uint32_t *pnConsumed) |
| 14997 | { |
| 14998 | uint8_t *pIeLen = 0; |
| 14999 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15000 | uint32_t nNeeded = 0U; |
| 15001 | nNeeded += 5; |
| 15002 | while (pSrc->present) { |
| 15003 | if (nNeeded > nBuf) |
| 15004 | return DOT11F_BUFFER_OVERFLOW; |
| 15005 | *pBuf = 192; |
| 15006 | ++pBuf; ++(*pnConsumed); |
| 15007 | pIeLen = pBuf; |
| 15008 | ++pBuf; ++(*pnConsumed); |
| 15009 | *pBuf = pSrc->chanWidth; |
| 15010 | *pnConsumed += 1; |
| 15011 | pBuf += 1; |
| 15012 | *pBuf = pSrc->chanCenterFreqSeg1; |
| 15013 | *pnConsumed += 1; |
| 15014 | pBuf += 1; |
| 15015 | *pBuf = pSrc->chanCenterFreqSeg2; |
| 15016 | *pnConsumed += 1; |
| 15017 | pBuf += 1; |
| 15018 | frameshtons(pCtx, pBuf, pSrc->basicMCSSet, 0); |
| 15019 | *pnConsumed += 2; |
| 15020 | /* fieldsEndFlag = 1 */ |
| 15021 | break; |
| 15022 | } |
| 15023 | (void)pCtx; |
| 15024 | if (pIeLen) { |
| 15025 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15026 | } |
| 15027 | return DOT11F_PARSE_SUCCESS; |
| 15028 | } /* End dot11f_pack_ie_vht_operation. */ |
| 15029 | |
| 15030 | uint32_t dot11f_pack_ie_wmm_schedule(tpAniSirGlobal pCtx, |
| 15031 | tDot11fIEWMMSchedule *pSrc, |
| 15032 | uint8_t *pBuf, |
| 15033 | uint32_t nBuf, |
| 15034 | uint32_t *pnConsumed) |
| 15035 | { |
| 15036 | uint8_t *pIeLen = 0; |
| 15037 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15038 | uint32_t nNeeded = 0U; |
| 15039 | uint16_t tmp85__; |
| 15040 | nNeeded += 15; |
| 15041 | while (pSrc->present) { |
| 15042 | if (nNeeded > nBuf) |
| 15043 | return DOT11F_BUFFER_OVERFLOW; |
| 15044 | *pBuf = 221; |
| 15045 | ++pBuf; ++(*pnConsumed); |
| 15046 | pIeLen = pBuf; |
| 15047 | ++pBuf; ++(*pnConsumed); |
| 15048 | *pBuf = 0x0; |
| 15049 | ++pBuf; ++(*pnConsumed); |
| 15050 | *pBuf = 0x50; |
| 15051 | ++pBuf; ++(*pnConsumed); |
| 15052 | *pBuf = 0xf2; |
| 15053 | ++pBuf; ++(*pnConsumed); |
| 15054 | *pBuf = 0x2; |
| 15055 | ++pBuf; ++(*pnConsumed); |
| 15056 | *pBuf = 0x9; |
| 15057 | ++pBuf; ++(*pnConsumed); |
| 15058 | *pBuf = pSrc->version; |
| 15059 | *pnConsumed += 1; |
| 15060 | pBuf += 1; |
| 15061 | tmp85__ = 0U; |
| 15062 | tmp85__ |= (pSrc->aggregation << 0); |
| 15063 | tmp85__ |= (pSrc->tsid << 1); |
| 15064 | tmp85__ |= (pSrc->direction << 5); |
| 15065 | tmp85__ |= (pSrc->reserved << 7); |
| 15066 | frameshtons(pCtx, pBuf, tmp85__, 0); |
| 15067 | *pnConsumed += 2; |
| 15068 | pBuf += 2; |
| 15069 | nBuf -= 2 ; |
| 15070 | frameshtonl(pCtx, pBuf, pSrc->service_start_time, 0); |
| 15071 | *pnConsumed += 4; |
| 15072 | pBuf += 4; |
| 15073 | frameshtonl(pCtx, pBuf, pSrc->service_interval, 0); |
| 15074 | *pnConsumed += 4; |
| 15075 | pBuf += 4; |
| 15076 | frameshtons(pCtx, pBuf, pSrc->max_service_dur, 0); |
| 15077 | *pnConsumed += 2; |
| 15078 | pBuf += 2; |
| 15079 | frameshtons(pCtx, pBuf, pSrc->spec_interval, 0); |
| 15080 | *pnConsumed += 2; |
| 15081 | /* fieldsEndFlag = 1 */ |
| 15082 | break; |
| 15083 | } |
| 15084 | (void)pCtx; |
| 15085 | if (pIeLen) { |
| 15086 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15087 | } |
| 15088 | return DOT11F_PARSE_SUCCESS; |
| 15089 | } /* End dot11f_pack_ie_wmm_schedule. */ |
| 15090 | |
| 15091 | uint32_t dot11f_pack_ie_wmmtclas(tpAniSirGlobal pCtx, |
| 15092 | tDot11fIEWMMTCLAS *pSrc, |
| 15093 | uint8_t *pBuf, |
| 15094 | uint32_t nBuf, |
| 15095 | uint32_t *pnConsumed) |
| 15096 | { |
| 15097 | uint8_t *pIeLen = 0; |
| 15098 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15099 | uint32_t nNeeded = 0U; |
| 15100 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 15101 | status = dot11f_get_packed_iewmmtclas(pCtx, pSrc, &nNeeded); |
| 15102 | if (!DOT11F_SUCCEEDED(status)) |
| 15103 | return status; |
| 15104 | while (pSrc->present) { |
| 15105 | if (nNeeded > nBuf) |
| 15106 | return DOT11F_BUFFER_OVERFLOW; |
| 15107 | *pBuf = 221; |
| 15108 | ++pBuf; ++(*pnConsumed); |
| 15109 | pIeLen = pBuf; |
| 15110 | ++pBuf; ++(*pnConsumed); |
| 15111 | *pBuf = 0x0; |
| 15112 | ++pBuf; ++(*pnConsumed); |
| 15113 | *pBuf = 0x50; |
| 15114 | ++pBuf; ++(*pnConsumed); |
| 15115 | *pBuf = 0xf2; |
| 15116 | ++pBuf; ++(*pnConsumed); |
| 15117 | *pBuf = 0x2; |
| 15118 | ++pBuf; ++(*pnConsumed); |
| 15119 | *pBuf = 0x6; |
| 15120 | ++pBuf; ++(*pnConsumed); |
| 15121 | *pBuf = pSrc->version; |
| 15122 | *pnConsumed += 1; |
| 15123 | pBuf += 1; |
| 15124 | *pBuf = pSrc->user_priority; |
| 15125 | *pnConsumed += 1; |
| 15126 | pBuf += 1; |
| 15127 | *pBuf = pSrc->classifier_type; |
| 15128 | *pnConsumed += 1; |
| 15129 | pBuf += 1; |
| 15130 | *pBuf = pSrc->classifier_mask; |
| 15131 | *pnConsumed += 1; |
| 15132 | pBuf += 1; |
| 15133 | switch (pSrc->classifier_type) { |
| 15134 | case 0: |
| 15135 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.EthParams.source, 6); |
| 15136 | *pnConsumed += 6; |
| 15137 | pBuf += 6; |
| 15138 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.EthParams.dest, 6); |
| 15139 | *pnConsumed += 6; |
| 15140 | pBuf += 6; |
| 15141 | frameshtons(pCtx, pBuf, pSrc->info.EthParams.type, 0); |
| 15142 | *pnConsumed += 2; |
| 15143 | /* fieldsEndFlag = 1 */ |
| 15144 | break; |
| 15145 | case 1: |
| 15146 | *pBuf = pSrc->info.IpParams.version; |
| 15147 | *pnConsumed += 1; |
| 15148 | pBuf += 1; |
| 15149 | switch (pSrc->info.IpParams.version) { |
| 15150 | case 4: |
| 15151 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.source, 4); |
| 15152 | *pnConsumed += 4; |
| 15153 | pBuf += 4; |
| 15154 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.dest, 4); |
| 15155 | *pnConsumed += 4; |
| 15156 | pBuf += 4; |
| 15157 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.src_port, 0); |
| 15158 | *pnConsumed += 2; |
| 15159 | pBuf += 2; |
| 15160 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV4Params.dest_port, 0); |
| 15161 | *pnConsumed += 2; |
| 15162 | pBuf += 2; |
| 15163 | *pBuf = pSrc->info.IpParams.params.IpV4Params.DSCP; |
| 15164 | *pnConsumed += 1; |
| 15165 | pBuf += 1; |
| 15166 | *pBuf = pSrc->info.IpParams.params.IpV4Params.proto; |
| 15167 | *pnConsumed += 1; |
| 15168 | pBuf += 1; |
| 15169 | *pBuf = pSrc->info.IpParams.params.IpV4Params.reserved; |
| 15170 | *pnConsumed += 1; |
| 15171 | /* fieldsEndFlag = 1 */ |
| 15172 | break; |
| 15173 | case 6: |
| 15174 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.source, 10); |
| 15175 | *pnConsumed += 10; |
| 15176 | pBuf += 10; |
| 15177 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.dest, 10); |
| 15178 | *pnConsumed += 10; |
| 15179 | pBuf += 10; |
| 15180 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.src_port, 0); |
| 15181 | *pnConsumed += 2; |
| 15182 | pBuf += 2; |
| 15183 | frameshtons(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.dest_port, 0); |
| 15184 | *pnConsumed += 2; |
| 15185 | pBuf += 2; |
| 15186 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->info.IpParams.params.IpV6Params.flow_label, 3); |
| 15187 | *pnConsumed += 3; |
| 15188 | /* fieldsEndFlag = 1 */ |
| 15189 | break; |
| 15190 | } |
| 15191 | break; |
| 15192 | case 2: |
| 15193 | frameshtons(pCtx, pBuf, pSrc->info.Params8021dq.tag_type, 0); |
| 15194 | *pnConsumed += 2; |
| 15195 | /* fieldsEndFlag = 1 */ |
| 15196 | break; |
| 15197 | } |
| 15198 | break; |
| 15199 | } |
| 15200 | (void)pCtx; |
| 15201 | if (pIeLen) { |
| 15202 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15203 | } |
| 15204 | return status; |
| 15205 | } /* End dot11f_pack_ie_wmmtclas. */ |
| 15206 | |
| 15207 | uint32_t dot11f_pack_ie_wmmtclasproc(tpAniSirGlobal pCtx, |
| 15208 | tDot11fIEWMMTCLASPROC *pSrc, |
| 15209 | uint8_t *pBuf, |
| 15210 | uint32_t nBuf, |
| 15211 | uint32_t *pnConsumed) |
| 15212 | { |
| 15213 | uint8_t *pIeLen = 0; |
| 15214 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15215 | uint32_t nNeeded = 0U; |
| 15216 | nNeeded += 2; |
| 15217 | while (pSrc->present) { |
| 15218 | if (nNeeded > nBuf) |
| 15219 | return DOT11F_BUFFER_OVERFLOW; |
| 15220 | *pBuf = 221; |
| 15221 | ++pBuf; ++(*pnConsumed); |
| 15222 | pIeLen = pBuf; |
| 15223 | ++pBuf; ++(*pnConsumed); |
| 15224 | *pBuf = 0x0; |
| 15225 | ++pBuf; ++(*pnConsumed); |
| 15226 | *pBuf = 0x50; |
| 15227 | ++pBuf; ++(*pnConsumed); |
| 15228 | *pBuf = 0xf2; |
| 15229 | ++pBuf; ++(*pnConsumed); |
| 15230 | *pBuf = 0x2; |
| 15231 | ++pBuf; ++(*pnConsumed); |
| 15232 | *pBuf = 0x7; |
| 15233 | ++pBuf; ++(*pnConsumed); |
| 15234 | *pBuf = pSrc->version; |
| 15235 | *pnConsumed += 1; |
| 15236 | pBuf += 1; |
| 15237 | *pBuf = pSrc->processing; |
| 15238 | *pnConsumed += 1; |
| 15239 | /* fieldsEndFlag = 1 */ |
| 15240 | break; |
| 15241 | } |
| 15242 | (void)pCtx; |
| 15243 | if (pIeLen) { |
| 15244 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15245 | } |
| 15246 | return DOT11F_PARSE_SUCCESS; |
| 15247 | } /* End dot11f_pack_ie_wmmtclasproc. */ |
| 15248 | |
| 15249 | uint32_t dot11f_pack_ie_wmmts_delay(tpAniSirGlobal pCtx, |
| 15250 | tDot11fIEWMMTSDelay *pSrc, |
| 15251 | uint8_t *pBuf, |
| 15252 | uint32_t nBuf, |
| 15253 | uint32_t *pnConsumed) |
| 15254 | { |
| 15255 | uint8_t *pIeLen = 0; |
| 15256 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15257 | uint32_t nNeeded = 0U; |
| 15258 | nNeeded += 5; |
| 15259 | while (pSrc->present) { |
| 15260 | if (nNeeded > nBuf) |
| 15261 | return DOT11F_BUFFER_OVERFLOW; |
| 15262 | *pBuf = 221; |
| 15263 | ++pBuf; ++(*pnConsumed); |
| 15264 | pIeLen = pBuf; |
| 15265 | ++pBuf; ++(*pnConsumed); |
| 15266 | *pBuf = 0x0; |
| 15267 | ++pBuf; ++(*pnConsumed); |
| 15268 | *pBuf = 0x50; |
| 15269 | ++pBuf; ++(*pnConsumed); |
| 15270 | *pBuf = 0xf2; |
| 15271 | ++pBuf; ++(*pnConsumed); |
| 15272 | *pBuf = 0x2; |
| 15273 | ++pBuf; ++(*pnConsumed); |
| 15274 | *pBuf = 0x8; |
| 15275 | ++pBuf; ++(*pnConsumed); |
| 15276 | *pBuf = pSrc->version; |
| 15277 | *pnConsumed += 1; |
| 15278 | pBuf += 1; |
| 15279 | frameshtonl(pCtx, pBuf, pSrc->delay, 0); |
| 15280 | *pnConsumed += 4; |
| 15281 | /* fieldsEndFlag = 1 */ |
| 15282 | break; |
| 15283 | } |
| 15284 | (void)pCtx; |
| 15285 | if (pIeLen) { |
| 15286 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15287 | } |
| 15288 | return DOT11F_PARSE_SUCCESS; |
| 15289 | } /* End dot11f_pack_ie_wmmts_delay. */ |
| 15290 | |
| 15291 | uint32_t dot11f_pack_ie_wmmtspec(tpAniSirGlobal pCtx, |
| 15292 | tDot11fIEWMMTSPEC *pSrc, |
| 15293 | uint8_t *pBuf, |
| 15294 | uint32_t nBuf, |
| 15295 | uint32_t *pnConsumed) |
| 15296 | { |
| 15297 | uint8_t *pIeLen = 0; |
| 15298 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15299 | uint32_t nNeeded = 0U; |
| 15300 | uint16_t tmp86__; |
| 15301 | uint8_t tmp87__; |
| 15302 | uint16_t tmp88__; |
| 15303 | nNeeded += 38; |
| 15304 | while (pSrc->present) { |
| 15305 | if (nNeeded > nBuf) |
| 15306 | return DOT11F_BUFFER_OVERFLOW; |
| 15307 | *pBuf = 221; |
| 15308 | ++pBuf; ++(*pnConsumed); |
| 15309 | pIeLen = pBuf; |
| 15310 | ++pBuf; ++(*pnConsumed); |
| 15311 | *pBuf = 0x0; |
| 15312 | ++pBuf; ++(*pnConsumed); |
| 15313 | *pBuf = 0x50; |
| 15314 | ++pBuf; ++(*pnConsumed); |
| 15315 | *pBuf = 0xf2; |
| 15316 | ++pBuf; ++(*pnConsumed); |
| 15317 | *pBuf = 0x2; |
| 15318 | ++pBuf; ++(*pnConsumed); |
| 15319 | *pBuf = 0x2; |
| 15320 | ++pBuf; ++(*pnConsumed); |
| 15321 | *pBuf = pSrc->version; |
| 15322 | *pnConsumed += 1; |
| 15323 | pBuf += 1; |
| 15324 | tmp86__ = 0U; |
| 15325 | tmp86__ |= (pSrc->traffic_type << 0); |
| 15326 | tmp86__ |= (pSrc->tsid << 1); |
| 15327 | tmp86__ |= (pSrc->direction << 5); |
| 15328 | tmp86__ |= (pSrc->access_policy << 7); |
| 15329 | tmp86__ |= (pSrc->aggregation << 9); |
| 15330 | tmp86__ |= (pSrc->psb << 10); |
| 15331 | tmp86__ |= (pSrc->user_priority << 11); |
| 15332 | tmp86__ |= (pSrc->tsinfo_ack_pol << 14); |
| 15333 | frameshtons(pCtx, pBuf, tmp86__, 0); |
| 15334 | *pnConsumed += 2; |
| 15335 | pBuf += 2; |
| 15336 | nBuf -= 2 ; |
| 15337 | tmp87__ = 0U; |
| 15338 | tmp87__ |= (pSrc->tsinfo_rsvd << 0); |
| 15339 | tmp87__ |= (pSrc->burst_size_defn << 7); |
| 15340 | *pBuf = tmp87__; |
| 15341 | *pnConsumed += 1; |
| 15342 | pBuf += 1; |
| 15343 | nBuf -= 1 ; |
| 15344 | tmp88__ = 0U; |
| 15345 | tmp88__ |= (pSrc->size << 0); |
| 15346 | tmp88__ |= (pSrc->fixed << 15); |
| 15347 | frameshtons(pCtx, pBuf, tmp88__, 0); |
| 15348 | *pnConsumed += 2; |
| 15349 | pBuf += 2; |
| 15350 | nBuf -= 2 ; |
| 15351 | frameshtons(pCtx, pBuf, pSrc->max_msdu_size, 0); |
| 15352 | *pnConsumed += 2; |
| 15353 | pBuf += 2; |
| 15354 | frameshtonl(pCtx, pBuf, pSrc->min_service_int, 0); |
| 15355 | *pnConsumed += 4; |
| 15356 | pBuf += 4; |
| 15357 | frameshtonl(pCtx, pBuf, pSrc->max_service_int, 0); |
| 15358 | *pnConsumed += 4; |
| 15359 | pBuf += 4; |
| 15360 | frameshtonl(pCtx, pBuf, pSrc->inactivity_int, 0); |
| 15361 | *pnConsumed += 4; |
| 15362 | pBuf += 4; |
| 15363 | frameshtonl(pCtx, pBuf, pSrc->suspension_int, 0); |
| 15364 | *pnConsumed += 4; |
| 15365 | pBuf += 4; |
| 15366 | frameshtonl(pCtx, pBuf, pSrc->service_start_time, 0); |
| 15367 | *pnConsumed += 4; |
| 15368 | pBuf += 4; |
| 15369 | frameshtonl(pCtx, pBuf, pSrc->min_data_rate, 0); |
| 15370 | *pnConsumed += 4; |
| 15371 | pBuf += 4; |
| 15372 | frameshtonl(pCtx, pBuf, pSrc->mean_data_rate, 0); |
| 15373 | *pnConsumed += 4; |
| 15374 | pBuf += 4; |
| 15375 | frameshtonl(pCtx, pBuf, pSrc->peak_data_rate, 0); |
| 15376 | *pnConsumed += 4; |
| 15377 | pBuf += 4; |
| 15378 | frameshtonl(pCtx, pBuf, pSrc->burst_size, 0); |
| 15379 | *pnConsumed += 4; |
| 15380 | pBuf += 4; |
| 15381 | frameshtonl(pCtx, pBuf, pSrc->delay_bound, 0); |
| 15382 | *pnConsumed += 4; |
| 15383 | pBuf += 4; |
| 15384 | frameshtonl(pCtx, pBuf, pSrc->min_phy_rate, 0); |
| 15385 | *pnConsumed += 4; |
| 15386 | pBuf += 4; |
| 15387 | frameshtons(pCtx, pBuf, pSrc->surplus_bw_allowance, 0); |
| 15388 | *pnConsumed += 2; |
| 15389 | pBuf += 2; |
| 15390 | frameshtons(pCtx, pBuf, pSrc->medium_time, 0); |
| 15391 | *pnConsumed += 2; |
| 15392 | /* fieldsEndFlag = 1 */ |
| 15393 | break; |
| 15394 | } |
| 15395 | (void)pCtx; |
| 15396 | if (pIeLen) { |
| 15397 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15398 | } |
| 15399 | return DOT11F_PARSE_SUCCESS; |
| 15400 | } /* End dot11f_pack_ie_wmmtspec. */ |
| 15401 | |
| 15402 | uint32_t dot11f_pack_ie_wider_bw_chan_switch_ann(tpAniSirGlobal pCtx, |
| 15403 | tDot11fIEWiderBWChanSwitchAnn *pSrc, |
| 15404 | uint8_t *pBuf, |
| 15405 | uint32_t nBuf, |
| 15406 | uint32_t *pnConsumed) |
| 15407 | { |
| 15408 | uint8_t *pIeLen = 0; |
| 15409 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15410 | uint32_t nNeeded = 0U; |
| 15411 | nNeeded += 3; |
| 15412 | while (pSrc->present) { |
| 15413 | if (nNeeded > nBuf) |
| 15414 | return DOT11F_BUFFER_OVERFLOW; |
| 15415 | *pBuf = 194; |
| 15416 | ++pBuf; ++(*pnConsumed); |
| 15417 | pIeLen = pBuf; |
| 15418 | ++pBuf; ++(*pnConsumed); |
| 15419 | *pBuf = pSrc->newChanWidth; |
| 15420 | *pnConsumed += 1; |
| 15421 | pBuf += 1; |
| 15422 | *pBuf = pSrc->newCenterChanFreq0; |
| 15423 | *pnConsumed += 1; |
| 15424 | pBuf += 1; |
| 15425 | *pBuf = pSrc->newCenterChanFreq1; |
| 15426 | *pnConsumed += 1; |
| 15427 | /* fieldsEndFlag = 1 */ |
| 15428 | break; |
| 15429 | } |
| 15430 | (void)pCtx; |
| 15431 | if (pIeLen) { |
| 15432 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15433 | } |
| 15434 | return DOT11F_PARSE_SUCCESS; |
| 15435 | } /* End dot11f_pack_ie_wider_bw_chan_switch_ann. */ |
| 15436 | |
| 15437 | uint32_t dot11f_pack_ie_aid(tpAniSirGlobal pCtx, |
| 15438 | tDot11fIEAID *pSrc, |
| 15439 | uint8_t *pBuf, |
| 15440 | uint32_t nBuf, |
| 15441 | uint32_t *pnConsumed) |
| 15442 | { |
| 15443 | uint8_t *pIeLen = 0; |
| 15444 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15445 | uint32_t nNeeded = 0U; |
| 15446 | nNeeded += 2; |
| 15447 | while (pSrc->present) { |
| 15448 | if (nNeeded > nBuf) |
| 15449 | return DOT11F_BUFFER_OVERFLOW; |
| 15450 | *pBuf = 197; |
| 15451 | ++pBuf; ++(*pnConsumed); |
| 15452 | pIeLen = pBuf; |
| 15453 | ++pBuf; ++(*pnConsumed); |
| 15454 | frameshtons(pCtx, pBuf, pSrc->assocId, 0); |
| 15455 | *pnConsumed += 2; |
| 15456 | /* fieldsEndFlag = 1 */ |
| 15457 | break; |
| 15458 | } |
| 15459 | (void)pCtx; |
| 15460 | if (pIeLen) { |
| 15461 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15462 | } |
| 15463 | return DOT11F_PARSE_SUCCESS; |
| 15464 | } /* End dot11f_pack_ie_aid. */ |
| 15465 | |
| 15466 | uint32_t dot11f_pack_ie_cf_params(tpAniSirGlobal pCtx, |
| 15467 | tDot11fIECFParams *pSrc, |
| 15468 | uint8_t *pBuf, |
| 15469 | uint32_t nBuf, |
| 15470 | uint32_t *pnConsumed) |
| 15471 | { |
| 15472 | uint8_t *pIeLen = 0; |
| 15473 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15474 | uint32_t nNeeded = 0U; |
| 15475 | nNeeded += 6; |
| 15476 | while (pSrc->present) { |
| 15477 | if (nNeeded > nBuf) |
| 15478 | return DOT11F_BUFFER_OVERFLOW; |
| 15479 | *pBuf = 4; |
| 15480 | ++pBuf; ++(*pnConsumed); |
| 15481 | pIeLen = pBuf; |
| 15482 | ++pBuf; ++(*pnConsumed); |
| 15483 | *pBuf = pSrc->cfp_count; |
| 15484 | *pnConsumed += 1; |
| 15485 | pBuf += 1; |
| 15486 | *pBuf = pSrc->cfp_period; |
| 15487 | *pnConsumed += 1; |
| 15488 | pBuf += 1; |
| 15489 | frameshtons(pCtx, pBuf, pSrc->cfp_maxduration, 0); |
| 15490 | *pnConsumed += 2; |
| 15491 | pBuf += 2; |
| 15492 | frameshtons(pCtx, pBuf, pSrc->cfp_durremaining, 0); |
| 15493 | *pnConsumed += 2; |
| 15494 | /* fieldsEndFlag = 1 */ |
| 15495 | break; |
| 15496 | } |
| 15497 | (void)pCtx; |
| 15498 | if (pIeLen) { |
| 15499 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15500 | } |
| 15501 | return DOT11F_PARSE_SUCCESS; |
| 15502 | } /* End dot11f_pack_ie_cf_params. */ |
| 15503 | |
| 15504 | uint32_t dot11f_pack_ie_challenge_text(tpAniSirGlobal pCtx, |
| 15505 | tDot11fIEChallengeText *pSrc, |
| 15506 | uint8_t *pBuf, |
| 15507 | uint32_t nBuf, |
| 15508 | uint32_t *pnConsumed) |
| 15509 | { |
| 15510 | uint8_t *pIeLen = 0; |
| 15511 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15512 | uint32_t nNeeded = 0U; |
| 15513 | nNeeded += pSrc->num_text; |
| 15514 | while (pSrc->present) { |
| 15515 | if (nNeeded > nBuf) |
| 15516 | return DOT11F_BUFFER_OVERFLOW; |
| 15517 | *pBuf = 16; |
| 15518 | ++pBuf; ++(*pnConsumed); |
| 15519 | pIeLen = pBuf; |
| 15520 | ++pBuf; ++(*pnConsumed); |
| 15521 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->text), pSrc->num_text); |
| 15522 | *pnConsumed += pSrc->num_text; |
| 15523 | /* fieldsEndFlag = 1 */ |
| 15524 | break; |
| 15525 | } |
| 15526 | (void)pCtx; |
| 15527 | if (pIeLen) { |
| 15528 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15529 | } |
| 15530 | return DOT11F_PARSE_SUCCESS; |
| 15531 | } /* End dot11f_pack_ie_challenge_text. */ |
| 15532 | |
| 15533 | uint32_t dot11f_pack_ie_chan_switch_ann(tpAniSirGlobal pCtx, |
| 15534 | tDot11fIEChanSwitchAnn *pSrc, |
| 15535 | uint8_t *pBuf, |
| 15536 | uint32_t nBuf, |
| 15537 | uint32_t *pnConsumed) |
| 15538 | { |
| 15539 | uint8_t *pIeLen = 0; |
| 15540 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15541 | uint32_t nNeeded = 0U; |
| 15542 | nNeeded += 3; |
| 15543 | while (pSrc->present) { |
| 15544 | if (nNeeded > nBuf) |
| 15545 | return DOT11F_BUFFER_OVERFLOW; |
| 15546 | *pBuf = 37; |
| 15547 | ++pBuf; ++(*pnConsumed); |
| 15548 | pIeLen = pBuf; |
| 15549 | ++pBuf; ++(*pnConsumed); |
| 15550 | *pBuf = pSrc->switchMode; |
| 15551 | *pnConsumed += 1; |
| 15552 | pBuf += 1; |
| 15553 | *pBuf = pSrc->newChannel; |
| 15554 | *pnConsumed += 1; |
| 15555 | pBuf += 1; |
| 15556 | *pBuf = pSrc->switchCount; |
| 15557 | *pnConsumed += 1; |
| 15558 | /* fieldsEndFlag = 1 */ |
| 15559 | break; |
| 15560 | } |
| 15561 | (void)pCtx; |
| 15562 | if (pIeLen) { |
| 15563 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15564 | } |
| 15565 | return DOT11F_PARSE_SUCCESS; |
| 15566 | } /* End dot11f_pack_ie_chan_switch_ann. */ |
| 15567 | |
| 15568 | uint32_t dot11f_pack_ie_channel_switch_wrapper(tpAniSirGlobal pCtx, |
| 15569 | tDot11fIEChannelSwitchWrapper *pSrc, |
| 15570 | uint8_t *pBuf, |
| 15571 | uint32_t nBuf, |
| 15572 | uint32_t *pnConsumed) |
| 15573 | { |
| 15574 | uint8_t *pIeLen = 0; |
| 15575 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15576 | uint32_t nNeeded = 0U; |
| 15577 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 15578 | status = dot11f_get_packed_ie_channel_switch_wrapper(pCtx, pSrc, &nNeeded); |
| 15579 | if (!DOT11F_SUCCEEDED(status)) |
| 15580 | return status; |
| 15581 | while (pSrc->present) { |
| 15582 | if (nNeeded > nBuf) |
| 15583 | return DOT11F_BUFFER_OVERFLOW; |
| 15584 | *pBuf = 196; |
| 15585 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 15586 | pIeLen = pBuf; |
| 15587 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 15588 | status = pack_core(pCtx, |
| 15589 | (uint8_t *)pSrc, |
| 15590 | pBuf, |
| 15591 | nBuf, |
| 15592 | pnConsumed, |
| 15593 | FFS_ChannelSwitchWrapper, |
| 15594 | IES_ChannelSwitchWrapper); |
| 15595 | break; |
| 15596 | } |
| 15597 | (void)pCtx; |
| 15598 | if (pIeLen) { |
| 15599 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15600 | } |
| 15601 | return status; |
| 15602 | } /* End dot11f_pack_ie_channel_switch_wrapper. */ |
| 15603 | |
| 15604 | uint32_t dot11f_pack_ie_country(tpAniSirGlobal pCtx, |
| 15605 | tDot11fIECountry *pSrc, |
| 15606 | uint8_t *pBuf, |
| 15607 | uint32_t nBuf, |
| 15608 | uint32_t *pnConsumed) |
| 15609 | { |
| 15610 | uint8_t *pIeLen = 0; |
| 15611 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15612 | uint32_t nNeeded = 0U; |
| 15613 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 15614 | status = dot11f_get_packed_ie_country(pCtx, pSrc, &nNeeded); |
| 15615 | if (!DOT11F_SUCCEEDED(status)) |
| 15616 | return status; |
| 15617 | while (pSrc->present) { |
| 15618 | if (nNeeded > nBuf) |
| 15619 | return DOT11F_BUFFER_OVERFLOW; |
| 15620 | *pBuf = 7; |
| 15621 | ++pBuf; ++(*pnConsumed); |
| 15622 | pIeLen = pBuf; |
| 15623 | ++pBuf; ++(*pnConsumed); |
| 15624 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->country, 3); |
| 15625 | *pnConsumed += 3; |
| 15626 | pBuf += 3; |
| 15627 | if (pSrc->num_triplets) { |
| 15628 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->triplets), (pSrc->num_triplets * 3)); |
| 15629 | *pnConsumed += (pSrc->num_triplets * 3); |
| 15630 | /* fieldsEndFlag = 1 */ |
| 15631 | } else { |
| 15632 | break; |
| 15633 | } |
| 15634 | break; |
| 15635 | } |
| 15636 | (void)pCtx; |
| 15637 | if (pIeLen) { |
| 15638 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15639 | } |
| 15640 | return status; |
| 15641 | } /* End dot11f_pack_ie_country. */ |
| 15642 | |
| 15643 | uint32_t dot11f_pack_ie_ds_params(tpAniSirGlobal pCtx, |
| 15644 | tDot11fIEDSParams *pSrc, |
| 15645 | uint8_t *pBuf, |
| 15646 | uint32_t nBuf, |
| 15647 | uint32_t *pnConsumed) |
| 15648 | { |
| 15649 | uint8_t *pIeLen = 0; |
| 15650 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15651 | uint32_t nNeeded = 0U; |
| 15652 | nNeeded += 1; |
| 15653 | while (pSrc->present) { |
| 15654 | if (nNeeded > nBuf) |
| 15655 | return DOT11F_BUFFER_OVERFLOW; |
| 15656 | *pBuf = 3; |
| 15657 | ++pBuf; ++(*pnConsumed); |
| 15658 | pIeLen = pBuf; |
| 15659 | ++pBuf; ++(*pnConsumed); |
| 15660 | *pBuf = pSrc->curr_channel; |
| 15661 | *pnConsumed += 1; |
| 15662 | /* fieldsEndFlag = 1 */ |
| 15663 | break; |
| 15664 | } |
| 15665 | (void)pCtx; |
| 15666 | if (pIeLen) { |
| 15667 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15668 | } |
| 15669 | return DOT11F_PARSE_SUCCESS; |
| 15670 | } /* End dot11f_pack_ie_ds_params. */ |
| 15671 | |
| 15672 | uint32_t dot11f_pack_ie_edca_param_set(tpAniSirGlobal pCtx, |
| 15673 | tDot11fIEEDCAParamSet *pSrc, |
| 15674 | uint8_t *pBuf, |
| 15675 | uint32_t nBuf, |
| 15676 | uint32_t *pnConsumed) |
| 15677 | { |
| 15678 | uint8_t *pIeLen = 0; |
| 15679 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15680 | uint32_t nNeeded = 0U; |
| 15681 | uint8_t tmp89__; |
| 15682 | uint8_t tmp90__; |
| 15683 | uint8_t tmp91__; |
| 15684 | uint8_t tmp92__; |
| 15685 | uint8_t tmp93__; |
| 15686 | uint8_t tmp94__; |
| 15687 | uint8_t tmp95__; |
| 15688 | uint8_t tmp96__; |
| 15689 | nNeeded += 18; |
| 15690 | while (pSrc->present) { |
| 15691 | if (nNeeded > nBuf) |
| 15692 | return DOT11F_BUFFER_OVERFLOW; |
| 15693 | *pBuf = 12; |
| 15694 | ++pBuf; ++(*pnConsumed); |
| 15695 | pIeLen = pBuf; |
| 15696 | ++pBuf; ++(*pnConsumed); |
| 15697 | *pBuf = pSrc->qos; |
| 15698 | *pnConsumed += 1; |
| 15699 | pBuf += 1; |
| 15700 | *pBuf = pSrc->reserved; |
| 15701 | *pnConsumed += 1; |
| 15702 | pBuf += 1; |
| 15703 | tmp89__ = 0U; |
| 15704 | tmp89__ |= (pSrc->acbe_aifsn << 0); |
| 15705 | tmp89__ |= (pSrc->acbe_acm << 4); |
| 15706 | tmp89__ |= (pSrc->acbe_aci << 5); |
| 15707 | tmp89__ |= (pSrc->unused1 << 7); |
| 15708 | *pBuf = tmp89__; |
| 15709 | *pnConsumed += 1; |
| 15710 | pBuf += 1; |
| 15711 | nBuf -= 1 ; |
| 15712 | tmp90__ = 0U; |
| 15713 | tmp90__ |= (pSrc->acbe_acwmin << 0); |
| 15714 | tmp90__ |= (pSrc->acbe_acwmax << 4); |
| 15715 | *pBuf = tmp90__; |
| 15716 | *pnConsumed += 1; |
| 15717 | pBuf += 1; |
| 15718 | nBuf -= 1 ; |
| 15719 | frameshtons(pCtx, pBuf, pSrc->acbe_txoplimit, 0); |
| 15720 | *pnConsumed += 2; |
| 15721 | pBuf += 2; |
| 15722 | tmp91__ = 0U; |
| 15723 | tmp91__ |= (pSrc->acbk_aifsn << 0); |
| 15724 | tmp91__ |= (pSrc->acbk_acm << 4); |
| 15725 | tmp91__ |= (pSrc->acbk_aci << 5); |
| 15726 | tmp91__ |= (pSrc->unused2 << 7); |
| 15727 | *pBuf = tmp91__; |
| 15728 | *pnConsumed += 1; |
| 15729 | pBuf += 1; |
| 15730 | nBuf -= 1 ; |
| 15731 | tmp92__ = 0U; |
| 15732 | tmp92__ |= (pSrc->acbk_acwmin << 0); |
| 15733 | tmp92__ |= (pSrc->acbk_acwmax << 4); |
| 15734 | *pBuf = tmp92__; |
| 15735 | *pnConsumed += 1; |
| 15736 | pBuf += 1; |
| 15737 | nBuf -= 1 ; |
| 15738 | frameshtons(pCtx, pBuf, pSrc->acbk_txoplimit, 0); |
| 15739 | *pnConsumed += 2; |
| 15740 | pBuf += 2; |
| 15741 | tmp93__ = 0U; |
| 15742 | tmp93__ |= (pSrc->acvi_aifsn << 0); |
| 15743 | tmp93__ |= (pSrc->acvi_acm << 4); |
| 15744 | tmp93__ |= (pSrc->acvi_aci << 5); |
| 15745 | tmp93__ |= (pSrc->unused3 << 7); |
| 15746 | *pBuf = tmp93__; |
| 15747 | *pnConsumed += 1; |
| 15748 | pBuf += 1; |
| 15749 | nBuf -= 1 ; |
| 15750 | tmp94__ = 0U; |
| 15751 | tmp94__ |= (pSrc->acvi_acwmin << 0); |
| 15752 | tmp94__ |= (pSrc->acvi_acwmax << 4); |
| 15753 | *pBuf = tmp94__; |
| 15754 | *pnConsumed += 1; |
| 15755 | pBuf += 1; |
| 15756 | nBuf -= 1 ; |
| 15757 | frameshtons(pCtx, pBuf, pSrc->acvi_txoplimit, 0); |
| 15758 | *pnConsumed += 2; |
| 15759 | pBuf += 2; |
| 15760 | tmp95__ = 0U; |
| 15761 | tmp95__ |= (pSrc->acvo_aifsn << 0); |
| 15762 | tmp95__ |= (pSrc->acvo_acm << 4); |
| 15763 | tmp95__ |= (pSrc->acvo_aci << 5); |
| 15764 | tmp95__ |= (pSrc->unused4 << 7); |
| 15765 | *pBuf = tmp95__; |
| 15766 | *pnConsumed += 1; |
| 15767 | pBuf += 1; |
| 15768 | nBuf -= 1 ; |
| 15769 | tmp96__ = 0U; |
| 15770 | tmp96__ |= (pSrc->acvo_acwmin << 0); |
| 15771 | tmp96__ |= (pSrc->acvo_acwmax << 4); |
| 15772 | *pBuf = tmp96__; |
| 15773 | *pnConsumed += 1; |
| 15774 | pBuf += 1; |
| 15775 | nBuf -= 1 ; |
| 15776 | frameshtons(pCtx, pBuf, pSrc->acvo_txoplimit, 0); |
| 15777 | *pnConsumed += 2; |
| 15778 | /* fieldsEndFlag = 1 */ |
| 15779 | break; |
| 15780 | } |
| 15781 | (void)pCtx; |
| 15782 | if (pIeLen) { |
| 15783 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15784 | } |
| 15785 | return DOT11F_PARSE_SUCCESS; |
| 15786 | } /* End dot11f_pack_ie_edca_param_set. */ |
| 15787 | |
| 15788 | uint32_t dot11f_pack_ie_erp_info(tpAniSirGlobal pCtx, |
| 15789 | tDot11fIEERPInfo *pSrc, |
| 15790 | uint8_t *pBuf, |
| 15791 | uint32_t nBuf, |
| 15792 | uint32_t *pnConsumed) |
| 15793 | { |
| 15794 | uint8_t *pIeLen = 0; |
| 15795 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15796 | uint32_t nNeeded = 0U; |
| 15797 | uint8_t tmp97__; |
| 15798 | nNeeded += 1; |
| 15799 | while (pSrc->present) { |
| 15800 | if (nNeeded > nBuf) |
| 15801 | return DOT11F_BUFFER_OVERFLOW; |
| 15802 | *pBuf = 42; |
| 15803 | ++pBuf; ++(*pnConsumed); |
| 15804 | pIeLen = pBuf; |
| 15805 | ++pBuf; ++(*pnConsumed); |
| 15806 | tmp97__ = 0U; |
| 15807 | tmp97__ |= (pSrc->non_erp_present << 0); |
| 15808 | tmp97__ |= (pSrc->use_prot << 1); |
| 15809 | tmp97__ |= (pSrc->barker_preamble << 2); |
| 15810 | tmp97__ |= (pSrc->unused << 3); |
| 15811 | *pBuf = tmp97__; |
| 15812 | *pnConsumed += 1; |
| 15813 | /* fieldsEndFlag = 1 */ |
| 15814 | nBuf -= 1 ; |
| 15815 | break; |
| 15816 | } |
| 15817 | (void)pCtx; |
| 15818 | if (pIeLen) { |
| 15819 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15820 | } |
| 15821 | return DOT11F_PARSE_SUCCESS; |
| 15822 | } /* End dot11f_pack_ie_erp_info. */ |
| 15823 | |
| 15824 | uint32_t dot11f_pack_ie_ese_cckm_opaque(tpAniSirGlobal pCtx, |
| 15825 | tDot11fIEESECckmOpaque *pSrc, |
| 15826 | uint8_t *pBuf, |
| 15827 | uint32_t nBuf, |
| 15828 | uint32_t *pnConsumed) |
| 15829 | { |
| 15830 | uint8_t *pIeLen = 0; |
| 15831 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15832 | uint32_t nNeeded = 0U; |
| 15833 | nNeeded += pSrc->num_data; |
| 15834 | while (pSrc->present) { |
| 15835 | if (nNeeded > nBuf) |
| 15836 | return DOT11F_BUFFER_OVERFLOW; |
| 15837 | *pBuf = 156; |
| 15838 | ++pBuf; ++(*pnConsumed); |
| 15839 | pIeLen = pBuf; |
| 15840 | ++pBuf; ++(*pnConsumed); |
| 15841 | *pBuf = 0x0; |
| 15842 | ++pBuf; ++(*pnConsumed); |
| 15843 | *pBuf = 0x40; |
| 15844 | ++pBuf; ++(*pnConsumed); |
| 15845 | *pBuf = 0x96; |
| 15846 | ++pBuf; ++(*pnConsumed); |
| 15847 | *pBuf = 0x0; |
| 15848 | ++pBuf; ++(*pnConsumed); |
| 15849 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data); |
| 15850 | *pnConsumed += pSrc->num_data; |
| 15851 | /* fieldsEndFlag = 1 */ |
| 15852 | break; |
| 15853 | } |
| 15854 | (void)pCtx; |
| 15855 | if (pIeLen) { |
| 15856 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15857 | } |
| 15858 | return DOT11F_PARSE_SUCCESS; |
| 15859 | } /* End dot11f_pack_ie_ese_cckm_opaque. */ |
| 15860 | |
| 15861 | uint32_t dot11f_pack_ie_ese_rad_mgmt_cap(tpAniSirGlobal pCtx, |
| 15862 | tDot11fIEESERadMgmtCap *pSrc, |
| 15863 | uint8_t *pBuf, |
| 15864 | uint32_t nBuf, |
| 15865 | uint32_t *pnConsumed) |
| 15866 | { |
| 15867 | uint8_t *pIeLen = 0; |
| 15868 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15869 | uint32_t nNeeded = 0U; |
| 15870 | uint8_t tmp98__; |
| 15871 | nNeeded += 2; |
| 15872 | while (pSrc->present) { |
| 15873 | if (nNeeded > nBuf) |
| 15874 | return DOT11F_BUFFER_OVERFLOW; |
| 15875 | *pBuf = 221; |
| 15876 | ++pBuf; ++(*pnConsumed); |
| 15877 | pIeLen = pBuf; |
| 15878 | ++pBuf; ++(*pnConsumed); |
| 15879 | *pBuf = 0x0; |
| 15880 | ++pBuf; ++(*pnConsumed); |
| 15881 | *pBuf = 0x40; |
| 15882 | ++pBuf; ++(*pnConsumed); |
| 15883 | *pBuf = 0x96; |
| 15884 | ++pBuf; ++(*pnConsumed); |
| 15885 | *pBuf = 0x1; |
| 15886 | ++pBuf; ++(*pnConsumed); |
| 15887 | *pBuf = pSrc->mgmt_state; |
| 15888 | *pnConsumed += 1; |
| 15889 | pBuf += 1; |
| 15890 | tmp98__ = 0U; |
| 15891 | tmp98__ |= (pSrc->mbssid_mask << 0); |
| 15892 | tmp98__ |= (pSrc->reserved << 3); |
| 15893 | *pBuf = tmp98__; |
| 15894 | *pnConsumed += 1; |
| 15895 | /* fieldsEndFlag = 1 */ |
| 15896 | nBuf -= 1 ; |
| 15897 | break; |
| 15898 | } |
| 15899 | (void)pCtx; |
| 15900 | if (pIeLen) { |
| 15901 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15902 | } |
| 15903 | return DOT11F_PARSE_SUCCESS; |
| 15904 | } /* End dot11f_pack_ie_ese_rad_mgmt_cap. */ |
| 15905 | |
| 15906 | uint32_t dot11f_pack_ie_ese_traf_strm_met(tpAniSirGlobal pCtx, |
| 15907 | tDot11fIEESETrafStrmMet *pSrc, |
| 15908 | uint8_t *pBuf, |
| 15909 | uint32_t nBuf, |
| 15910 | uint32_t *pnConsumed) |
| 15911 | { |
| 15912 | uint8_t *pIeLen = 0; |
| 15913 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15914 | uint32_t nNeeded = 0U; |
| 15915 | nNeeded += 4; |
| 15916 | while (pSrc->present) { |
| 15917 | if (nNeeded > nBuf) |
| 15918 | return DOT11F_BUFFER_OVERFLOW; |
| 15919 | *pBuf = 221; |
| 15920 | ++pBuf; ++(*pnConsumed); |
| 15921 | pIeLen = pBuf; |
| 15922 | ++pBuf; ++(*pnConsumed); |
| 15923 | *pBuf = 0x0; |
| 15924 | ++pBuf; ++(*pnConsumed); |
| 15925 | *pBuf = 0x40; |
| 15926 | ++pBuf; ++(*pnConsumed); |
| 15927 | *pBuf = 0x96; |
| 15928 | ++pBuf; ++(*pnConsumed); |
| 15929 | *pBuf = 0x7; |
| 15930 | ++pBuf; ++(*pnConsumed); |
| 15931 | *pBuf = pSrc->tsid; |
| 15932 | *pnConsumed += 1; |
| 15933 | pBuf += 1; |
| 15934 | *pBuf = pSrc->state; |
| 15935 | *pnConsumed += 1; |
| 15936 | pBuf += 1; |
| 15937 | frameshtons(pCtx, pBuf, pSrc->msmt_interval, 0); |
| 15938 | *pnConsumed += 2; |
| 15939 | /* fieldsEndFlag = 1 */ |
| 15940 | break; |
| 15941 | } |
| 15942 | (void)pCtx; |
| 15943 | if (pIeLen) { |
| 15944 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15945 | } |
| 15946 | return DOT11F_PARSE_SUCCESS; |
| 15947 | } /* End dot11f_pack_ie_ese_traf_strm_met. */ |
| 15948 | |
| 15949 | uint32_t dot11f_pack_ie_ese_traf_strm_rate_set(tpAniSirGlobal pCtx, |
| 15950 | tDot11fIEESETrafStrmRateSet *pSrc, |
| 15951 | uint8_t *pBuf, |
| 15952 | uint32_t nBuf, |
| 15953 | uint32_t *pnConsumed) |
| 15954 | { |
| 15955 | uint8_t *pIeLen = 0; |
| 15956 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15957 | uint32_t nNeeded = 0U; |
| 15958 | nNeeded += (pSrc->num_tsrates + 1); |
| 15959 | while (pSrc->present) { |
| 15960 | if (nNeeded > nBuf) |
| 15961 | return DOT11F_BUFFER_OVERFLOW; |
| 15962 | *pBuf = 221; |
| 15963 | ++pBuf; ++(*pnConsumed); |
| 15964 | pIeLen = pBuf; |
| 15965 | ++pBuf; ++(*pnConsumed); |
| 15966 | *pBuf = 0x0; |
| 15967 | ++pBuf; ++(*pnConsumed); |
| 15968 | *pBuf = 0x40; |
| 15969 | ++pBuf; ++(*pnConsumed); |
| 15970 | *pBuf = 0x96; |
| 15971 | ++pBuf; ++(*pnConsumed); |
| 15972 | *pBuf = 0x8; |
| 15973 | ++pBuf; ++(*pnConsumed); |
| 15974 | *pBuf = pSrc->tsid; |
| 15975 | *pnConsumed += 1; |
| 15976 | pBuf += 1; |
| 15977 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->tsrates), pSrc->num_tsrates); |
| 15978 | *pnConsumed += pSrc->num_tsrates; |
| 15979 | /* fieldsEndFlag = 1 */ |
| 15980 | break; |
| 15981 | } |
| 15982 | (void)pCtx; |
| 15983 | if (pIeLen) { |
| 15984 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 15985 | } |
| 15986 | return DOT11F_PARSE_SUCCESS; |
| 15987 | } /* End dot11f_pack_ie_ese_traf_strm_rate_set. */ |
| 15988 | |
| 15989 | uint32_t dot11f_pack_ie_ese_txmit_power(tpAniSirGlobal pCtx, |
| 15990 | tDot11fIEESETxmitPower *pSrc, |
| 15991 | uint8_t *pBuf, |
| 15992 | uint32_t nBuf, |
| 15993 | uint32_t *pnConsumed) |
| 15994 | { |
| 15995 | uint8_t *pIeLen = 0; |
| 15996 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 15997 | uint32_t nNeeded = 0U; |
| 15998 | nNeeded += 2; |
| 15999 | while (pSrc->present) { |
| 16000 | if (nNeeded > nBuf) |
| 16001 | return DOT11F_BUFFER_OVERFLOW; |
| 16002 | *pBuf = 150; |
| 16003 | ++pBuf; ++(*pnConsumed); |
| 16004 | pIeLen = pBuf; |
| 16005 | ++pBuf; ++(*pnConsumed); |
| 16006 | *pBuf = 0x0; |
| 16007 | ++pBuf; ++(*pnConsumed); |
| 16008 | *pBuf = 0x40; |
| 16009 | ++pBuf; ++(*pnConsumed); |
| 16010 | *pBuf = 0x96; |
| 16011 | ++pBuf; ++(*pnConsumed); |
| 16012 | *pBuf = 0x0; |
| 16013 | ++pBuf; ++(*pnConsumed); |
| 16014 | *pBuf = pSrc->power_limit; |
| 16015 | *pnConsumed += 1; |
| 16016 | pBuf += 1; |
| 16017 | *pBuf = pSrc->reserved; |
| 16018 | *pnConsumed += 1; |
| 16019 | /* fieldsEndFlag = 1 */ |
| 16020 | break; |
| 16021 | } |
| 16022 | (void)pCtx; |
| 16023 | if (pIeLen) { |
| 16024 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16025 | } |
| 16026 | return DOT11F_PARSE_SUCCESS; |
| 16027 | } /* End dot11f_pack_ie_ese_txmit_power. */ |
| 16028 | |
| 16029 | uint32_t dot11f_pack_ie_ese_version(tpAniSirGlobal pCtx, |
| 16030 | tDot11fIEESEVersion *pSrc, |
| 16031 | uint8_t *pBuf, |
| 16032 | uint32_t nBuf, |
| 16033 | uint32_t *pnConsumed) |
| 16034 | { |
| 16035 | uint8_t *pIeLen = 0; |
| 16036 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16037 | uint32_t nNeeded = 0U; |
| 16038 | nNeeded += 1; |
| 16039 | while (pSrc->present) { |
| 16040 | if (nNeeded > nBuf) |
| 16041 | return DOT11F_BUFFER_OVERFLOW; |
| 16042 | *pBuf = 221; |
| 16043 | ++pBuf; ++(*pnConsumed); |
| 16044 | pIeLen = pBuf; |
| 16045 | ++pBuf; ++(*pnConsumed); |
| 16046 | *pBuf = 0x0; |
| 16047 | ++pBuf; ++(*pnConsumed); |
| 16048 | *pBuf = 0x40; |
| 16049 | ++pBuf; ++(*pnConsumed); |
| 16050 | *pBuf = 0x96; |
| 16051 | ++pBuf; ++(*pnConsumed); |
| 16052 | *pBuf = 0x3; |
| 16053 | ++pBuf; ++(*pnConsumed); |
| 16054 | *pBuf = pSrc->version; |
| 16055 | *pnConsumed += 1; |
| 16056 | /* fieldsEndFlag = 1 */ |
| 16057 | break; |
| 16058 | } |
| 16059 | (void)pCtx; |
| 16060 | if (pIeLen) { |
| 16061 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16062 | } |
| 16063 | return DOT11F_PARSE_SUCCESS; |
| 16064 | } /* End dot11f_pack_ie_ese_version. */ |
| 16065 | |
| 16066 | uint32_t dot11f_pack_ie_ext_cap(tpAniSirGlobal pCtx, |
| 16067 | tDot11fIEExtCap *pSrc, |
| 16068 | uint8_t *pBuf, |
| 16069 | uint32_t nBuf, |
| 16070 | uint32_t *pnConsumed) |
| 16071 | { |
| 16072 | uint8_t *pIeLen = 0; |
| 16073 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16074 | uint32_t nNeeded = 0U; |
| 16075 | nNeeded += pSrc->num_bytes; |
| 16076 | while (pSrc->present) { |
| 16077 | if (nNeeded > nBuf) |
| 16078 | return DOT11F_BUFFER_OVERFLOW; |
| 16079 | *pBuf = 127; |
| 16080 | ++pBuf; ++(*pnConsumed); |
| 16081 | pIeLen = pBuf; |
| 16082 | ++pBuf; ++(*pnConsumed); |
| 16083 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->bytes), pSrc->num_bytes); |
| 16084 | *pnConsumed += pSrc->num_bytes; |
| 16085 | /* fieldsEndFlag = 1 */ |
| 16086 | break; |
| 16087 | } |
| 16088 | (void)pCtx; |
| 16089 | if (pIeLen) { |
| 16090 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16091 | } |
| 16092 | return DOT11F_PARSE_SUCCESS; |
| 16093 | } /* End dot11f_pack_ie_ext_cap. */ |
| 16094 | |
| 16095 | uint32_t dot11f_pack_ie_ext_supp_rates(tpAniSirGlobal pCtx, |
| 16096 | tDot11fIEExtSuppRates *pSrc, |
| 16097 | uint8_t *pBuf, |
| 16098 | uint32_t nBuf, |
| 16099 | uint32_t *pnConsumed) |
| 16100 | { |
| 16101 | uint8_t *pIeLen = 0; |
| 16102 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16103 | uint32_t nNeeded = 0U; |
| 16104 | nNeeded += pSrc->num_rates; |
| 16105 | while (pSrc->present) { |
| 16106 | if (nNeeded > nBuf) |
| 16107 | return DOT11F_BUFFER_OVERFLOW; |
| 16108 | *pBuf = 50; |
| 16109 | ++pBuf; ++(*pnConsumed); |
| 16110 | pIeLen = pBuf; |
| 16111 | ++pBuf; ++(*pnConsumed); |
| 16112 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->rates), pSrc->num_rates); |
| 16113 | *pnConsumed += pSrc->num_rates; |
| 16114 | /* fieldsEndFlag = 1 */ |
| 16115 | break; |
| 16116 | } |
| 16117 | (void)pCtx; |
| 16118 | if (pIeLen) { |
| 16119 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16120 | } |
| 16121 | return DOT11F_PARSE_SUCCESS; |
| 16122 | } /* End dot11f_pack_ie_ext_supp_rates. */ |
| 16123 | |
| 16124 | uint32_t dot11f_pack_ie_fh_param_set(tpAniSirGlobal pCtx, |
| 16125 | tDot11fIEFHParamSet *pSrc, |
| 16126 | uint8_t *pBuf, |
| 16127 | uint32_t nBuf, |
| 16128 | uint32_t *pnConsumed) |
| 16129 | { |
| 16130 | uint8_t *pIeLen = 0; |
| 16131 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16132 | uint32_t nNeeded = 0U; |
| 16133 | nNeeded += 5; |
| 16134 | while (pSrc->present) { |
| 16135 | if (nNeeded > nBuf) |
| 16136 | return DOT11F_BUFFER_OVERFLOW; |
| 16137 | *pBuf = 2; |
| 16138 | ++pBuf; ++(*pnConsumed); |
| 16139 | pIeLen = pBuf; |
| 16140 | ++pBuf; ++(*pnConsumed); |
| 16141 | frameshtons(pCtx, pBuf, pSrc->dwell_time, 0); |
| 16142 | *pnConsumed += 2; |
| 16143 | pBuf += 2; |
| 16144 | *pBuf = pSrc->hop_set; |
| 16145 | *pnConsumed += 1; |
| 16146 | pBuf += 1; |
| 16147 | *pBuf = pSrc->hop_pattern; |
| 16148 | *pnConsumed += 1; |
| 16149 | pBuf += 1; |
| 16150 | *pBuf = pSrc->hop_index; |
| 16151 | *pnConsumed += 1; |
| 16152 | /* fieldsEndFlag = 1 */ |
| 16153 | break; |
| 16154 | } |
| 16155 | (void)pCtx; |
| 16156 | if (pIeLen) { |
| 16157 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16158 | } |
| 16159 | return DOT11F_PARSE_SUCCESS; |
| 16160 | } /* End dot11f_pack_ie_fh_param_set. */ |
| 16161 | |
| 16162 | uint32_t dot11f_pack_ie_fh_params(tpAniSirGlobal pCtx, |
| 16163 | tDot11fIEFHParams *pSrc, |
| 16164 | uint8_t *pBuf, |
| 16165 | uint32_t nBuf, |
| 16166 | uint32_t *pnConsumed) |
| 16167 | { |
| 16168 | uint8_t *pIeLen = 0; |
| 16169 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16170 | uint32_t nNeeded = 0U; |
| 16171 | nNeeded += 2; |
| 16172 | while (pSrc->present) { |
| 16173 | if (nNeeded > nBuf) |
| 16174 | return DOT11F_BUFFER_OVERFLOW; |
| 16175 | *pBuf = 8; |
| 16176 | ++pBuf; ++(*pnConsumed); |
| 16177 | pIeLen = pBuf; |
| 16178 | ++pBuf; ++(*pnConsumed); |
| 16179 | *pBuf = pSrc->radix; |
| 16180 | *pnConsumed += 1; |
| 16181 | pBuf += 1; |
| 16182 | *pBuf = pSrc->nchannels; |
| 16183 | *pnConsumed += 1; |
| 16184 | /* fieldsEndFlag = 1 */ |
| 16185 | break; |
| 16186 | } |
| 16187 | (void)pCtx; |
| 16188 | if (pIeLen) { |
| 16189 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16190 | } |
| 16191 | return DOT11F_PARSE_SUCCESS; |
| 16192 | } /* End dot11f_pack_ie_fh_params. */ |
| 16193 | |
| 16194 | uint32_t dot11f_pack_ie_fh_patt_table(tpAniSirGlobal pCtx, |
| 16195 | tDot11fIEFHPattTable *pSrc, |
| 16196 | uint8_t *pBuf, |
| 16197 | uint32_t nBuf, |
| 16198 | uint32_t *pnConsumed) |
| 16199 | { |
| 16200 | uint8_t *pIeLen = 0; |
| 16201 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16202 | uint32_t nNeeded = 0U; |
| 16203 | nNeeded += (pSrc->num_randtable + 4); |
| 16204 | while (pSrc->present) { |
| 16205 | if (nNeeded > nBuf) |
| 16206 | return DOT11F_BUFFER_OVERFLOW; |
| 16207 | *pBuf = 9; |
| 16208 | ++pBuf; ++(*pnConsumed); |
| 16209 | pIeLen = pBuf; |
| 16210 | ++pBuf; ++(*pnConsumed); |
| 16211 | *pBuf = pSrc->flag; |
| 16212 | *pnConsumed += 1; |
| 16213 | pBuf += 1; |
| 16214 | *pBuf = pSrc->nsets; |
| 16215 | *pnConsumed += 1; |
| 16216 | pBuf += 1; |
| 16217 | *pBuf = pSrc->modulus; |
| 16218 | *pnConsumed += 1; |
| 16219 | pBuf += 1; |
| 16220 | *pBuf = pSrc->offset; |
| 16221 | *pnConsumed += 1; |
| 16222 | pBuf += 1; |
| 16223 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->randtable), pSrc->num_randtable); |
| 16224 | *pnConsumed += pSrc->num_randtable; |
| 16225 | /* fieldsEndFlag = 1 */ |
| 16226 | break; |
| 16227 | } |
| 16228 | (void)pCtx; |
| 16229 | if (pIeLen) { |
| 16230 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16231 | } |
| 16232 | return DOT11F_PARSE_SUCCESS; |
| 16233 | } /* End dot11f_pack_ie_fh_patt_table. */ |
| 16234 | |
| 16235 | uint32_t dot11f_pack_ie_ft_info(tpAniSirGlobal pCtx, |
| 16236 | tDot11fIEFTInfo *pSrc, |
| 16237 | uint8_t *pBuf, |
| 16238 | uint32_t nBuf, |
| 16239 | uint32_t *pnConsumed) |
| 16240 | { |
| 16241 | uint8_t *pIeLen = 0; |
| 16242 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16243 | uint32_t nNeeded = 0U; |
| 16244 | uint16_t tmp99__; |
| 16245 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 16246 | status = dot11f_get_packed_ieft_info(pCtx, pSrc, &nNeeded); |
| 16247 | if (!DOT11F_SUCCEEDED(status)) |
| 16248 | return status; |
| 16249 | while (pSrc->present) { |
| 16250 | if (nNeeded > nBuf) |
| 16251 | return DOT11F_BUFFER_OVERFLOW; |
| 16252 | *pBuf = 55; |
| 16253 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 16254 | pIeLen = pBuf; |
| 16255 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 16256 | tmp99__ = 0U; |
| 16257 | tmp99__ |= (pSrc->reserved << 0); |
| 16258 | tmp99__ |= (pSrc->IECount << 8); |
| 16259 | frameshtons(pCtx, pBuf, tmp99__, 0); |
| 16260 | *pnConsumed += 2; |
| 16261 | pBuf += 2; |
| 16262 | nBuf -= 2 ; |
| 16263 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->MIC, 16); |
| 16264 | *pnConsumed += 16; |
| 16265 | pBuf += 16; |
| 16266 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->Anonce, 32); |
| 16267 | *pnConsumed += 32; |
| 16268 | pBuf += 32; |
| 16269 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->Snonce, 32); |
| 16270 | *pnConsumed += 32; |
| 16271 | pBuf += 32; |
| 16272 | status = pack_core(pCtx, |
| 16273 | (uint8_t *)pSrc, |
| 16274 | pBuf, |
| 16275 | nBuf, |
| 16276 | pnConsumed, |
| 16277 | FFS_FTInfo, |
| 16278 | IES_FTInfo); |
| 16279 | break; |
| 16280 | } |
| 16281 | (void)pCtx; |
| 16282 | if (pIeLen) { |
| 16283 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16284 | } |
| 16285 | return status; |
| 16286 | } /* End dot11f_pack_ie_ft_info. */ |
| 16287 | |
| 16288 | uint32_t dot11f_pack_ie_ht_caps(tpAniSirGlobal pCtx, |
| 16289 | tDot11fIEHTCaps *pSrc, |
| 16290 | uint8_t *pBuf, |
| 16291 | uint32_t nBuf, |
| 16292 | uint32_t *pnConsumed) |
| 16293 | { |
| 16294 | uint8_t *pIeLen = 0; |
| 16295 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16296 | uint32_t nNeeded = 0U; |
| 16297 | uint16_t tmp100__; |
| 16298 | uint8_t tmp101__; |
| 16299 | uint16_t tmp102__; |
| 16300 | uint32_t tmp103__; |
| 16301 | uint8_t tmp104__; |
| 16302 | nNeeded += (pSrc->num_rsvd + 26); |
| 16303 | while (pSrc->present) { |
| 16304 | if (nNeeded > nBuf) |
| 16305 | return DOT11F_BUFFER_OVERFLOW; |
| 16306 | *pBuf = 45; |
| 16307 | ++pBuf; ++(*pnConsumed); |
| 16308 | pIeLen = pBuf; |
| 16309 | ++pBuf; ++(*pnConsumed); |
| 16310 | tmp100__ = 0U; |
| 16311 | tmp100__ |= (pSrc->advCodingCap << 0); |
| 16312 | tmp100__ |= (pSrc->supportedChannelWidthSet << 1); |
| 16313 | tmp100__ |= (pSrc->mimoPowerSave << 2); |
| 16314 | tmp100__ |= (pSrc->greenField << 4); |
| 16315 | tmp100__ |= (pSrc->shortGI20MHz << 5); |
| 16316 | tmp100__ |= (pSrc->shortGI40MHz << 6); |
| 16317 | tmp100__ |= (pSrc->txSTBC << 7); |
| 16318 | tmp100__ |= (pSrc->rxSTBC << 8); |
| 16319 | tmp100__ |= (pSrc->delayedBA << 10); |
| 16320 | tmp100__ |= (pSrc->maximalAMSDUsize << 11); |
| 16321 | tmp100__ |= (pSrc->dsssCckMode40MHz << 12); |
| 16322 | tmp100__ |= (pSrc->psmp << 13); |
| 16323 | tmp100__ |= (pSrc->stbcControlFrame << 14); |
| 16324 | tmp100__ |= (pSrc->lsigTXOPProtection << 15); |
| 16325 | frameshtons(pCtx, pBuf, tmp100__, 0); |
| 16326 | *pnConsumed += 2; |
| 16327 | pBuf += 2; |
| 16328 | nBuf -= 2 ; |
| 16329 | tmp101__ = 0U; |
| 16330 | tmp101__ |= (pSrc->maxRxAMPDUFactor << 0); |
| 16331 | tmp101__ |= (pSrc->mpduDensity << 2); |
| 16332 | tmp101__ |= (pSrc->reserved1 << 5); |
| 16333 | *pBuf = tmp101__; |
| 16334 | *pnConsumed += 1; |
| 16335 | pBuf += 1; |
| 16336 | nBuf -= 1 ; |
| 16337 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->supportedMCSSet, 16); |
| 16338 | *pnConsumed += 16; |
| 16339 | pBuf += 16; |
| 16340 | tmp102__ = 0U; |
| 16341 | tmp102__ |= (pSrc->pco << 0); |
| 16342 | tmp102__ |= (pSrc->transitionTime << 1); |
| 16343 | tmp102__ |= (pSrc->reserved2 << 3); |
| 16344 | tmp102__ |= (pSrc->mcsFeedback << 8); |
| 16345 | tmp102__ |= (pSrc->reserved3 << 10); |
| 16346 | frameshtons(pCtx, pBuf, tmp102__, 0); |
| 16347 | *pnConsumed += 2; |
| 16348 | pBuf += 2; |
| 16349 | nBuf -= 2 ; |
| 16350 | tmp103__ = 0U; |
| 16351 | tmp103__ |= (pSrc->txBF << 0); |
| 16352 | tmp103__ |= (pSrc->rxStaggeredSounding << 1); |
| 16353 | tmp103__ |= (pSrc->txStaggeredSounding << 2); |
| 16354 | tmp103__ |= (pSrc->rxZLF << 3); |
| 16355 | tmp103__ |= (pSrc->txZLF << 4); |
| 16356 | tmp103__ |= (pSrc->implicitTxBF << 5); |
| 16357 | tmp103__ |= (pSrc->calibration << 6); |
| 16358 | tmp103__ |= (pSrc->explicitCSITxBF << 8); |
| 16359 | tmp103__ |= (pSrc->explicitUncompressedSteeringMatrix << 9); |
| 16360 | tmp103__ |= (pSrc->explicitBFCSIFeedback << 10); |
| 16361 | tmp103__ |= (pSrc->explicitUncompressedSteeringMatrixFeedback << 13); |
| 16362 | tmp103__ |= (pSrc->explicitCompressedSteeringMatrixFeedback << 16); |
| 16363 | tmp103__ |= (pSrc->csiNumBFAntennae << 19); |
| 16364 | tmp103__ |= (pSrc->uncompressedSteeringMatrixBFAntennae << 21); |
| 16365 | tmp103__ |= (pSrc->compressedSteeringMatrixBFAntennae << 23); |
| 16366 | tmp103__ |= (pSrc->reserved4 << 25); |
| 16367 | frameshtonl(pCtx, pBuf, tmp103__, 0); |
| 16368 | *pnConsumed += 4; |
| 16369 | pBuf += 4; |
| 16370 | nBuf -= 4 ; |
| 16371 | tmp104__ = 0U; |
| 16372 | tmp104__ |= (pSrc->antennaSelection << 0); |
| 16373 | tmp104__ |= (pSrc->explicitCSIFeedbackTx << 1); |
| 16374 | tmp104__ |= (pSrc->antennaIndicesFeedbackTx << 2); |
| 16375 | tmp104__ |= (pSrc->explicitCSIFeedback << 3); |
| 16376 | tmp104__ |= (pSrc->antennaIndicesFeedback << 4); |
| 16377 | tmp104__ |= (pSrc->rxAS << 5); |
| 16378 | tmp104__ |= (pSrc->txSoundingPPDUs << 6); |
| 16379 | tmp104__ |= (pSrc->reserved5 << 7); |
| 16380 | *pBuf = tmp104__; |
| 16381 | *pnConsumed += 1; |
| 16382 | pBuf += 1; |
| 16383 | nBuf -= 1 ; |
| 16384 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->rsvd), pSrc->num_rsvd); |
| 16385 | *pnConsumed += pSrc->num_rsvd; |
| 16386 | /* fieldsEndFlag = 1 */ |
| 16387 | break; |
| 16388 | } |
| 16389 | (void)pCtx; |
| 16390 | if (pIeLen) { |
| 16391 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16392 | } |
| 16393 | return DOT11F_PARSE_SUCCESS; |
| 16394 | } /* End dot11f_pack_ie_ht_caps. */ |
| 16395 | |
| 16396 | uint32_t dot11f_pack_ie_ht_info(tpAniSirGlobal pCtx, |
| 16397 | tDot11fIEHTInfo *pSrc, |
| 16398 | uint8_t *pBuf, |
| 16399 | uint32_t nBuf, |
| 16400 | uint32_t *pnConsumed) |
| 16401 | { |
| 16402 | uint8_t *pIeLen = 0; |
| 16403 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16404 | uint32_t nNeeded = 0U; |
| 16405 | uint8_t tmp105__; |
| 16406 | uint16_t tmp106__; |
| 16407 | uint16_t tmp107__; |
| 16408 | nNeeded += (pSrc->num_rsvd + 22); |
| 16409 | while (pSrc->present) { |
| 16410 | if (nNeeded > nBuf) |
| 16411 | return DOT11F_BUFFER_OVERFLOW; |
| 16412 | *pBuf = 61; |
| 16413 | ++pBuf; ++(*pnConsumed); |
| 16414 | pIeLen = pBuf; |
| 16415 | ++pBuf; ++(*pnConsumed); |
| 16416 | *pBuf = pSrc->primaryChannel; |
| 16417 | *pnConsumed += 1; |
| 16418 | pBuf += 1; |
| 16419 | tmp105__ = 0U; |
| 16420 | tmp105__ |= (pSrc->secondaryChannelOffset << 0); |
| 16421 | tmp105__ |= (pSrc->recommendedTxWidthSet << 2); |
| 16422 | tmp105__ |= (pSrc->rifsMode << 3); |
| 16423 | tmp105__ |= (pSrc->controlledAccessOnly << 4); |
| 16424 | tmp105__ |= (pSrc->serviceIntervalGranularity << 5); |
| 16425 | *pBuf = tmp105__; |
| 16426 | *pnConsumed += 1; |
| 16427 | pBuf += 1; |
| 16428 | nBuf -= 1 ; |
| 16429 | tmp106__ = 0U; |
| 16430 | tmp106__ |= (pSrc->opMode << 0); |
| 16431 | tmp106__ |= (pSrc->nonGFDevicesPresent << 2); |
| 16432 | tmp106__ |= (pSrc->transmitBurstLimit << 3); |
| 16433 | tmp106__ |= (pSrc->obssNonHTStaPresent << 4); |
| 16434 | tmp106__ |= (pSrc->reserved << 5); |
| 16435 | frameshtons(pCtx, pBuf, tmp106__, 0); |
| 16436 | *pnConsumed += 2; |
| 16437 | pBuf += 2; |
| 16438 | nBuf -= 2 ; |
| 16439 | tmp107__ = 0U; |
| 16440 | tmp107__ |= (pSrc->basicSTBCMCS << 0); |
| 16441 | tmp107__ |= (pSrc->dualCTSProtection << 7); |
| 16442 | tmp107__ |= (pSrc->secondaryBeacon << 8); |
| 16443 | tmp107__ |= (pSrc->lsigTXOPProtectionFullSupport << 9); |
| 16444 | tmp107__ |= (pSrc->pcoActive << 10); |
| 16445 | tmp107__ |= (pSrc->pcoPhase << 11); |
| 16446 | tmp107__ |= (pSrc->reserved2 << 12); |
| 16447 | frameshtons(pCtx, pBuf, tmp107__, 0); |
| 16448 | *pnConsumed += 2; |
| 16449 | pBuf += 2; |
| 16450 | nBuf -= 2 ; |
| 16451 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->basicMCSSet, 16); |
| 16452 | *pnConsumed += 16; |
| 16453 | pBuf += 16; |
| 16454 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->rsvd), pSrc->num_rsvd); |
| 16455 | *pnConsumed += pSrc->num_rsvd; |
| 16456 | /* fieldsEndFlag = 1 */ |
| 16457 | break; |
| 16458 | } |
| 16459 | (void)pCtx; |
| 16460 | if (pIeLen) { |
| 16461 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16462 | } |
| 16463 | return DOT11F_PARSE_SUCCESS; |
| 16464 | } /* End dot11f_pack_ie_ht_info. */ |
| 16465 | |
| 16466 | uint32_t dot11f_pack_ie_ibss_params(tpAniSirGlobal pCtx, |
| 16467 | tDot11fIEIBSSParams *pSrc, |
| 16468 | uint8_t *pBuf, |
| 16469 | uint32_t nBuf, |
| 16470 | uint32_t *pnConsumed) |
| 16471 | { |
| 16472 | uint8_t *pIeLen = 0; |
| 16473 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16474 | uint32_t nNeeded = 0U; |
| 16475 | nNeeded += 2; |
| 16476 | while (pSrc->present) { |
| 16477 | if (nNeeded > nBuf) |
| 16478 | return DOT11F_BUFFER_OVERFLOW; |
| 16479 | *pBuf = 6; |
| 16480 | ++pBuf; ++(*pnConsumed); |
| 16481 | pIeLen = pBuf; |
| 16482 | ++pBuf; ++(*pnConsumed); |
| 16483 | frameshtons(pCtx, pBuf, pSrc->atim, 0); |
| 16484 | *pnConsumed += 2; |
| 16485 | /* fieldsEndFlag = 1 */ |
| 16486 | break; |
| 16487 | } |
| 16488 | (void)pCtx; |
| 16489 | if (pIeLen) { |
| 16490 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16491 | } |
| 16492 | return DOT11F_PARSE_SUCCESS; |
| 16493 | } /* End dot11f_pack_ie_ibss_params. */ |
| 16494 | |
| 16495 | uint32_t dot11f_pack_ie_link_identifier(tpAniSirGlobal pCtx, |
| 16496 | tDot11fIELinkIdentifier *pSrc, |
| 16497 | uint8_t *pBuf, |
| 16498 | uint32_t nBuf, |
| 16499 | uint32_t *pnConsumed) |
| 16500 | { |
| 16501 | uint8_t *pIeLen = 0; |
| 16502 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16503 | uint32_t nNeeded = 0U; |
| 16504 | nNeeded += 18; |
| 16505 | while (pSrc->present) { |
| 16506 | if (nNeeded > nBuf) |
| 16507 | return DOT11F_BUFFER_OVERFLOW; |
| 16508 | *pBuf = 101; |
| 16509 | ++pBuf; ++(*pnConsumed); |
| 16510 | pIeLen = pBuf; |
| 16511 | ++pBuf; ++(*pnConsumed); |
| 16512 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->bssid, 6); |
| 16513 | *pnConsumed += 6; |
| 16514 | pBuf += 6; |
| 16515 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->InitStaAddr, 6); |
| 16516 | *pnConsumed += 6; |
| 16517 | pBuf += 6; |
| 16518 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->RespStaAddr, 6); |
| 16519 | *pnConsumed += 6; |
| 16520 | /* fieldsEndFlag = 1 */ |
| 16521 | break; |
| 16522 | } |
| 16523 | (void)pCtx; |
| 16524 | if (pIeLen) { |
| 16525 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16526 | } |
| 16527 | return DOT11F_PARSE_SUCCESS; |
| 16528 | } /* End dot11f_pack_ie_link_identifier. */ |
| 16529 | |
| 16530 | uint32_t dot11f_pack_ie_measurement_report(tpAniSirGlobal pCtx, |
| 16531 | tDot11fIEMeasurementReport *pSrc, |
| 16532 | uint8_t *pBuf, |
| 16533 | uint32_t nBuf, |
| 16534 | uint32_t *pnConsumed) |
| 16535 | { |
| 16536 | uint8_t *pIeLen = 0; |
| 16537 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16538 | uint32_t nNeeded = 0U; |
| 16539 | uint8_t tmp108__; |
| 16540 | uint8_t tmp109__; |
| 16541 | uint8_t tmp110__; |
| 16542 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 16543 | status = dot11f_get_packed_ie_measurement_report(pCtx, pSrc, &nNeeded); |
| 16544 | if (!DOT11F_SUCCEEDED(status)) |
| 16545 | return status; |
| 16546 | while (pSrc->present) { |
| 16547 | if (nNeeded > nBuf) |
| 16548 | return DOT11F_BUFFER_OVERFLOW; |
| 16549 | *pBuf = 39; |
| 16550 | ++pBuf; ++(*pnConsumed); |
| 16551 | pIeLen = pBuf; |
| 16552 | ++pBuf; ++(*pnConsumed); |
| 16553 | *pBuf = pSrc->token; |
| 16554 | *pnConsumed += 1; |
| 16555 | pBuf += 1; |
| 16556 | tmp108__ = 0U; |
| 16557 | tmp108__ |= (pSrc->late << 0); |
| 16558 | tmp108__ |= (pSrc->incapable << 1); |
| 16559 | tmp108__ |= (pSrc->refused << 2); |
| 16560 | tmp108__ |= (pSrc->unused << 3); |
| 16561 | *pBuf = tmp108__; |
| 16562 | *pnConsumed += 1; |
| 16563 | pBuf += 1; |
| 16564 | nBuf -= 1 ; |
| 16565 | *pBuf = pSrc->type; |
| 16566 | *pnConsumed += 1; |
| 16567 | pBuf += 1; |
| 16568 | if (pSrc->type) { |
| 16569 | switch (pSrc->type) { |
| 16570 | case 0: |
| 16571 | *pBuf = pSrc->report.Basic.channel; |
| 16572 | *pnConsumed += 1; |
| 16573 | pBuf += 1; |
| 16574 | frameshtonq(pCtx, pBuf, pSrc->report.Basic.meas_start_time, 0); |
| 16575 | *pnConsumed += 8; |
| 16576 | pBuf += 8; |
| 16577 | frameshtons(pCtx, pBuf, pSrc->report.Basic.meas_duration, 0); |
| 16578 | *pnConsumed += 2; |
| 16579 | pBuf += 2; |
| 16580 | tmp109__ = 0U; |
| 16581 | tmp109__ |= (pSrc->report.Basic.bss << 0); |
| 16582 | tmp109__ |= (pSrc->report.Basic.ofdm_preamble << 1); |
| 16583 | tmp109__ |= (pSrc->report.Basic.unid_signal << 2); |
| 16584 | tmp109__ |= (pSrc->report.Basic.rader << 3); |
| 16585 | tmp109__ |= (pSrc->report.Basic.unmeasured << 4); |
| 16586 | tmp109__ |= (pSrc->report.Basic.unused << 5); |
| 16587 | *pBuf = tmp109__; |
| 16588 | *pnConsumed += 1; |
| 16589 | /* fieldsEndFlag = 1 */ |
| 16590 | nBuf -= 1 ; |
| 16591 | break; |
| 16592 | case 1: |
| 16593 | *pBuf = pSrc->report.CCA.channel; |
| 16594 | *pnConsumed += 1; |
| 16595 | pBuf += 1; |
| 16596 | frameshtonq(pCtx, pBuf, pSrc->report.CCA.meas_start_time, 0); |
| 16597 | *pnConsumed += 8; |
| 16598 | pBuf += 8; |
| 16599 | frameshtons(pCtx, pBuf, pSrc->report.CCA.meas_duration, 0); |
| 16600 | *pnConsumed += 2; |
| 16601 | pBuf += 2; |
| 16602 | *pBuf = pSrc->report.CCA.cca_busy_fraction; |
| 16603 | *pnConsumed += 1; |
| 16604 | /* fieldsEndFlag = 1 */ |
| 16605 | break; |
| 16606 | case 2: |
| 16607 | *pBuf = pSrc->report.RPIHistogram.channel; |
| 16608 | *pnConsumed += 1; |
| 16609 | pBuf += 1; |
| 16610 | frameshtonq(pCtx, pBuf, pSrc->report.RPIHistogram.meas_start_time, 0); |
| 16611 | *pnConsumed += 8; |
| 16612 | pBuf += 8; |
| 16613 | frameshtons(pCtx, pBuf, pSrc->report.RPIHistogram.meas_duration, 0); |
| 16614 | *pnConsumed += 2; |
| 16615 | pBuf += 2; |
| 16616 | *pBuf = pSrc->report.RPIHistogram.rpi0_density; |
| 16617 | *pnConsumed += 1; |
| 16618 | pBuf += 1; |
| 16619 | *pBuf = pSrc->report.RPIHistogram.rpi1_density; |
| 16620 | *pnConsumed += 1; |
| 16621 | pBuf += 1; |
| 16622 | *pBuf = pSrc->report.RPIHistogram.rpi2_density; |
| 16623 | *pnConsumed += 1; |
| 16624 | pBuf += 1; |
| 16625 | *pBuf = pSrc->report.RPIHistogram.rpi3_density; |
| 16626 | *pnConsumed += 1; |
| 16627 | pBuf += 1; |
| 16628 | *pBuf = pSrc->report.RPIHistogram.rpi4_density; |
| 16629 | *pnConsumed += 1; |
| 16630 | pBuf += 1; |
| 16631 | *pBuf = pSrc->report.RPIHistogram.rpi5_density; |
| 16632 | *pnConsumed += 1; |
| 16633 | pBuf += 1; |
| 16634 | *pBuf = pSrc->report.RPIHistogram.rpi6_density; |
| 16635 | *pnConsumed += 1; |
| 16636 | pBuf += 1; |
| 16637 | *pBuf = pSrc->report.RPIHistogram.rpi7_density; |
| 16638 | *pnConsumed += 1; |
| 16639 | /* fieldsEndFlag = 1 */ |
| 16640 | break; |
| 16641 | case 5: |
| 16642 | *pBuf = pSrc->report.Beacon.regClass; |
| 16643 | *pnConsumed += 1; |
| 16644 | pBuf += 1; |
| 16645 | *pBuf = pSrc->report.Beacon.channel; |
| 16646 | *pnConsumed += 1; |
| 16647 | pBuf += 1; |
| 16648 | frameshtonq(pCtx, pBuf, pSrc->report.Beacon.meas_start_time, 0); |
| 16649 | *pnConsumed += 8; |
| 16650 | pBuf += 8; |
| 16651 | frameshtons(pCtx, pBuf, pSrc->report.Beacon.meas_duration, 0); |
| 16652 | *pnConsumed += 2; |
| 16653 | pBuf += 2; |
| 16654 | tmp110__ = 0U; |
| 16655 | tmp110__ |= (pSrc->report.Beacon.condensed_PHY << 0); |
| 16656 | tmp110__ |= (pSrc->report.Beacon.reported_frame_type << 7); |
| 16657 | *pBuf = tmp110__; |
| 16658 | *pnConsumed += 1; |
| 16659 | pBuf += 1; |
| 16660 | nBuf -= 1 ; |
| 16661 | *pBuf = pSrc->report.Beacon.RCPI; |
| 16662 | *pnConsumed += 1; |
| 16663 | pBuf += 1; |
| 16664 | *pBuf = pSrc->report.Beacon.RSNI; |
| 16665 | *pnConsumed += 1; |
| 16666 | pBuf += 1; |
| 16667 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->report.Beacon.BSSID, 6); |
| 16668 | *pnConsumed += 6; |
| 16669 | pBuf += 6; |
| 16670 | *pBuf = pSrc->report.Beacon.antenna_id; |
| 16671 | *pnConsumed += 1; |
| 16672 | pBuf += 1; |
| 16673 | frameshtonl(pCtx, pBuf, pSrc->report.Beacon.parent_TSF, 0); |
| 16674 | *pnConsumed += 4; |
| 16675 | pBuf += 4; |
| 16676 | status = pack_core(pCtx, |
| 16677 | (uint8_t *)pSrc, |
| 16678 | pBuf, |
| 16679 | nBuf, |
| 16680 | pnConsumed, |
| 16681 | FFS_reportBeacon, |
| 16682 | IES_reportBeacon); |
| 16683 | break; |
| 16684 | } |
| 16685 | } else { |
| 16686 | break; |
| 16687 | } |
| 16688 | break; |
| 16689 | } |
| 16690 | (void)pCtx; |
| 16691 | if (pIeLen) { |
| 16692 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16693 | } |
| 16694 | return status; |
| 16695 | } /* End dot11f_pack_ie_measurement_report. */ |
| 16696 | |
| 16697 | uint32_t dot11f_pack_ie_measurement_request(tpAniSirGlobal pCtx, |
| 16698 | tDot11fIEMeasurementRequest *pSrc, |
| 16699 | uint8_t *pBuf, |
| 16700 | uint32_t nBuf, |
| 16701 | uint32_t *pnConsumed) |
| 16702 | { |
| 16703 | uint8_t *pIeLen = 0; |
| 16704 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16705 | uint32_t nNeeded = 0U; |
| 16706 | uint8_t tmp111__; |
| 16707 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 16708 | status = dot11f_get_packed_ie_measurement_request(pCtx, pSrc, &nNeeded); |
| 16709 | if (!DOT11F_SUCCEEDED(status)) |
| 16710 | return status; |
| 16711 | while (pSrc->present) { |
| 16712 | if (nNeeded > nBuf) |
| 16713 | return DOT11F_BUFFER_OVERFLOW; |
| 16714 | *pBuf = 38; |
| 16715 | ++pBuf; ++(*pnConsumed); |
| 16716 | pIeLen = pBuf; |
| 16717 | ++pBuf; ++(*pnConsumed); |
| 16718 | *pBuf = pSrc->measurement_token; |
| 16719 | *pnConsumed += 1; |
| 16720 | pBuf += 1; |
| 16721 | tmp111__ = 0U; |
| 16722 | tmp111__ |= (pSrc->parallel << 0); |
| 16723 | tmp111__ |= (pSrc->enable << 1); |
| 16724 | tmp111__ |= (pSrc->request << 2); |
| 16725 | tmp111__ |= (pSrc->report << 3); |
| 16726 | tmp111__ |= (pSrc->durationMandatory << 4); |
| 16727 | tmp111__ |= (pSrc->unused << 5); |
| 16728 | *pBuf = tmp111__; |
| 16729 | *pnConsumed += 1; |
| 16730 | pBuf += 1; |
| 16731 | nBuf -= 1 ; |
| 16732 | *pBuf = pSrc->measurement_type; |
| 16733 | *pnConsumed += 1; |
| 16734 | pBuf += 1; |
| 16735 | switch (pSrc->measurement_type) { |
| 16736 | case 0: |
| 16737 | *pBuf = pSrc->measurement_request.Basic.channel_no; |
| 16738 | *pnConsumed += 1; |
| 16739 | pBuf += 1; |
| 16740 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->measurement_request.Basic.meas_start_time, 8); |
| 16741 | *pnConsumed += 8; |
| 16742 | pBuf += 8; |
| 16743 | frameshtons(pCtx, pBuf, pSrc->measurement_request.Basic.meas_duration, 0); |
| 16744 | *pnConsumed += 2; |
| 16745 | /* fieldsEndFlag = 1 */ |
| 16746 | break; |
| 16747 | case 1: |
| 16748 | *pBuf = pSrc->measurement_request.CCA.channel_no; |
| 16749 | *pnConsumed += 1; |
| 16750 | pBuf += 1; |
| 16751 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->measurement_request.CCA.meas_start_time, 8); |
| 16752 | *pnConsumed += 8; |
| 16753 | pBuf += 8; |
| 16754 | frameshtons(pCtx, pBuf, pSrc->measurement_request.CCA.meas_duration, 0); |
| 16755 | *pnConsumed += 2; |
| 16756 | /* fieldsEndFlag = 1 */ |
| 16757 | break; |
| 16758 | case 2: |
| 16759 | *pBuf = pSrc->measurement_request.RPIHistogram.channel_no; |
| 16760 | *pnConsumed += 1; |
| 16761 | pBuf += 1; |
| 16762 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->measurement_request.RPIHistogram.meas_start_time, 8); |
| 16763 | *pnConsumed += 8; |
| 16764 | pBuf += 8; |
| 16765 | frameshtons(pCtx, pBuf, pSrc->measurement_request.RPIHistogram.meas_duration, 0); |
| 16766 | *pnConsumed += 2; |
| 16767 | /* fieldsEndFlag = 1 */ |
| 16768 | break; |
| 16769 | case 5: |
| 16770 | *pBuf = pSrc->measurement_request.Beacon.regClass; |
| 16771 | *pnConsumed += 1; |
| 16772 | pBuf += 1; |
| 16773 | *pBuf = pSrc->measurement_request.Beacon.channel; |
| 16774 | *pnConsumed += 1; |
| 16775 | pBuf += 1; |
| 16776 | frameshtons(pCtx, pBuf, pSrc->measurement_request.Beacon.randomization, 0); |
| 16777 | *pnConsumed += 2; |
| 16778 | pBuf += 2; |
| 16779 | frameshtons(pCtx, pBuf, pSrc->measurement_request.Beacon.meas_duration, 0); |
| 16780 | *pnConsumed += 2; |
| 16781 | pBuf += 2; |
| 16782 | *pBuf = pSrc->measurement_request.Beacon.meas_mode; |
| 16783 | *pnConsumed += 1; |
| 16784 | pBuf += 1; |
| 16785 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->measurement_request.Beacon.BSSID, 6); |
| 16786 | *pnConsumed += 6; |
| 16787 | pBuf += 6; |
| 16788 | status = pack_core(pCtx, |
| 16789 | (uint8_t *)pSrc, |
| 16790 | pBuf, |
| 16791 | nBuf, |
| 16792 | pnConsumed, |
| 16793 | FFS_measurement_requestBeacon, |
| 16794 | IES_measurement_requestBeacon); |
| 16795 | break; |
| 16796 | } |
| 16797 | break; |
| 16798 | } |
| 16799 | (void)pCtx; |
| 16800 | if (pIeLen) { |
| 16801 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16802 | } |
| 16803 | return status; |
| 16804 | } /* End dot11f_pack_ie_measurement_request. */ |
| 16805 | |
| 16806 | uint32_t dot11f_pack_ie_mobility_domain(tpAniSirGlobal pCtx, |
| 16807 | tDot11fIEMobilityDomain *pSrc, |
| 16808 | uint8_t *pBuf, |
| 16809 | uint32_t nBuf, |
| 16810 | uint32_t *pnConsumed) |
| 16811 | { |
| 16812 | uint8_t *pIeLen = 0; |
| 16813 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16814 | uint32_t nNeeded = 0U; |
| 16815 | uint8_t tmp112__; |
| 16816 | nNeeded += 3; |
| 16817 | while (pSrc->present) { |
| 16818 | if (nNeeded > nBuf) |
| 16819 | return DOT11F_BUFFER_OVERFLOW; |
| 16820 | *pBuf = 54; |
| 16821 | ++pBuf; ++(*pnConsumed); |
| 16822 | pIeLen = pBuf; |
| 16823 | ++pBuf; ++(*pnConsumed); |
| 16824 | frameshtons(pCtx, pBuf, pSrc->MDID, 0); |
| 16825 | *pnConsumed += 2; |
| 16826 | pBuf += 2; |
| 16827 | tmp112__ = 0U; |
| 16828 | tmp112__ |= (pSrc->overDSCap << 0); |
| 16829 | tmp112__ |= (pSrc->resourceReqCap << 1); |
| 16830 | tmp112__ |= (pSrc->reserved << 2); |
| 16831 | *pBuf = tmp112__; |
| 16832 | *pnConsumed += 1; |
| 16833 | /* fieldsEndFlag = 1 */ |
| 16834 | nBuf -= 1 ; |
| 16835 | break; |
| 16836 | } |
| 16837 | (void)pCtx; |
| 16838 | if (pIeLen) { |
| 16839 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16840 | } |
| 16841 | return DOT11F_PARSE_SUCCESS; |
| 16842 | } /* End dot11f_pack_ie_mobility_domain. */ |
| 16843 | |
| 16844 | uint32_t dot11f_pack_ie_neighbor_report(tpAniSirGlobal pCtx, |
| 16845 | tDot11fIENeighborReport *pSrc, |
| 16846 | uint8_t *pBuf, |
| 16847 | uint32_t nBuf, |
| 16848 | uint32_t *pnConsumed) |
| 16849 | { |
| 16850 | uint8_t *pIeLen = 0; |
| 16851 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16852 | uint32_t nNeeded = 0U; |
| 16853 | uint8_t tmp113__; |
| 16854 | uint8_t tmp114__; |
| 16855 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 16856 | status = dot11f_get_packed_ie_neighbor_report(pCtx, pSrc, &nNeeded); |
| 16857 | if (!DOT11F_SUCCEEDED(status)) |
| 16858 | return status; |
| 16859 | while (pSrc->present) { |
| 16860 | if (nNeeded > nBuf) |
| 16861 | return DOT11F_BUFFER_OVERFLOW; |
| 16862 | *pBuf = 52; |
| 16863 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 16864 | pIeLen = pBuf; |
| 16865 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 16866 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->bssid, 6); |
| 16867 | *pnConsumed += 6; |
| 16868 | pBuf += 6; |
| 16869 | tmp113__ = 0U; |
| 16870 | tmp113__ |= (pSrc->APReachability << 0); |
| 16871 | tmp113__ |= (pSrc->Security << 2); |
| 16872 | tmp113__ |= (pSrc->KeyScope << 3); |
| 16873 | tmp113__ |= (pSrc->SpecMgmtCap << 4); |
| 16874 | tmp113__ |= (pSrc->QosCap << 5); |
| 16875 | tmp113__ |= (pSrc->apsd << 6); |
| 16876 | tmp113__ |= (pSrc->rrm << 7); |
| 16877 | *pBuf = tmp113__; |
| 16878 | *pnConsumed += 1; |
| 16879 | pBuf += 1; |
| 16880 | nBuf -= 1 ; |
| 16881 | tmp114__ = 0U; |
| 16882 | tmp114__ |= (pSrc->DelayedBA << 0); |
| 16883 | tmp114__ |= (pSrc->ImmBA << 1); |
| 16884 | tmp114__ |= (pSrc->MobilityDomain << 2); |
| 16885 | tmp114__ |= (pSrc->reserved << 3); |
| 16886 | *pBuf = tmp114__; |
| 16887 | *pnConsumed += 1; |
| 16888 | pBuf += 1; |
| 16889 | nBuf -= 1 ; |
| 16890 | frameshtons(pCtx, pBuf, pSrc->reserved1, 0); |
| 16891 | *pnConsumed += 2; |
| 16892 | pBuf += 2; |
| 16893 | *pBuf = pSrc->regulatoryClass; |
| 16894 | *pnConsumed += 1; |
| 16895 | pBuf += 1; |
| 16896 | *pBuf = pSrc->channel; |
| 16897 | *pnConsumed += 1; |
| 16898 | pBuf += 1; |
| 16899 | *pBuf = pSrc->PhyType; |
| 16900 | *pnConsumed += 1; |
| 16901 | pBuf += 1; |
| 16902 | status = pack_core(pCtx, |
| 16903 | (uint8_t *)pSrc, |
| 16904 | pBuf, |
| 16905 | nBuf, |
| 16906 | pnConsumed, |
| 16907 | FFS_NeighborReport, |
| 16908 | IES_NeighborReport); |
| 16909 | break; |
| 16910 | } |
| 16911 | (void)pCtx; |
| 16912 | if (pIeLen) { |
| 16913 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16914 | } |
| 16915 | return status; |
| 16916 | } /* End dot11f_pack_ie_neighbor_report. */ |
| 16917 | |
| 16918 | uint32_t dot11f_pack_ie_obss_scan_parameters(tpAniSirGlobal pCtx, |
| 16919 | tDot11fIEOBSSScanParameters *pSrc, |
| 16920 | uint8_t *pBuf, |
| 16921 | uint32_t nBuf, |
| 16922 | uint32_t *pnConsumed) |
| 16923 | { |
| 16924 | uint8_t *pIeLen = 0; |
| 16925 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16926 | uint32_t nNeeded = 0U; |
| 16927 | nNeeded += 14; |
| 16928 | while (pSrc->present) { |
| 16929 | if (nNeeded > nBuf) |
| 16930 | return DOT11F_BUFFER_OVERFLOW; |
| 16931 | *pBuf = 74; |
| 16932 | ++pBuf; ++(*pnConsumed); |
| 16933 | pIeLen = pBuf; |
| 16934 | ++pBuf; ++(*pnConsumed); |
| 16935 | frameshtons(pCtx, pBuf, pSrc->obssScanPassiveDwell, 0); |
| 16936 | *pnConsumed += 2; |
| 16937 | pBuf += 2; |
| 16938 | frameshtons(pCtx, pBuf, pSrc->obssScanActiveDwell, 0); |
| 16939 | *pnConsumed += 2; |
| 16940 | pBuf += 2; |
| 16941 | frameshtons(pCtx, pBuf, pSrc->bssChannelWidthTriggerScanInterval, 0); |
| 16942 | *pnConsumed += 2; |
| 16943 | pBuf += 2; |
| 16944 | frameshtons(pCtx, pBuf, pSrc->obssScanPassiveTotalPerChannel, 0); |
| 16945 | *pnConsumed += 2; |
| 16946 | pBuf += 2; |
| 16947 | frameshtons(pCtx, pBuf, pSrc->obssScanActiveTotalPerChannel, 0); |
| 16948 | *pnConsumed += 2; |
| 16949 | pBuf += 2; |
| 16950 | frameshtons(pCtx, pBuf, pSrc->bssWidthChannelTransitionDelayFactor, 0); |
| 16951 | *pnConsumed += 2; |
| 16952 | pBuf += 2; |
| 16953 | frameshtons(pCtx, pBuf, pSrc->obssScanActivityThreshold, 0); |
| 16954 | *pnConsumed += 2; |
| 16955 | /* fieldsEndFlag = 1 */ |
| 16956 | break; |
| 16957 | } |
| 16958 | (void)pCtx; |
| 16959 | if (pIeLen) { |
| 16960 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16961 | } |
| 16962 | return DOT11F_PARSE_SUCCESS; |
| 16963 | } /* End dot11f_pack_ie_obss_scan_parameters. */ |
| 16964 | |
| 16965 | uint32_t dot11f_pack_ie_operating_mode(tpAniSirGlobal pCtx, |
| 16966 | tDot11fIEOperatingMode *pSrc, |
| 16967 | uint8_t *pBuf, |
| 16968 | uint32_t nBuf, |
| 16969 | uint32_t *pnConsumed) |
| 16970 | { |
| 16971 | uint8_t *pIeLen = 0; |
| 16972 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 16973 | uint32_t nNeeded = 0U; |
| 16974 | uint8_t tmp115__; |
| 16975 | nNeeded += 1; |
| 16976 | while (pSrc->present) { |
| 16977 | if (nNeeded > nBuf) |
| 16978 | return DOT11F_BUFFER_OVERFLOW; |
| 16979 | *pBuf = 199; |
| 16980 | ++pBuf; ++(*pnConsumed); |
| 16981 | pIeLen = pBuf; |
| 16982 | ++pBuf; ++(*pnConsumed); |
| 16983 | tmp115__ = 0U; |
| 16984 | tmp115__ |= (pSrc->chanWidth << 0); |
| 16985 | tmp115__ |= (pSrc->reserved << 2); |
| 16986 | tmp115__ |= (pSrc->rxNSS << 4); |
| 16987 | tmp115__ |= (pSrc->rxNSSType << 7); |
| 16988 | *pBuf = tmp115__; |
| 16989 | *pnConsumed += 1; |
| 16990 | /* fieldsEndFlag = 1 */ |
| 16991 | nBuf -= 1 ; |
| 16992 | break; |
| 16993 | } |
| 16994 | (void)pCtx; |
| 16995 | if (pIeLen) { |
| 16996 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 16997 | } |
| 16998 | return DOT11F_PARSE_SUCCESS; |
| 16999 | } /* End dot11f_pack_ie_operating_mode. */ |
| 17000 | |
| 17001 | uint32_t dot11f_pack_ie_p2_p_assoc_req(tpAniSirGlobal pCtx, |
| 17002 | tDot11fIEP2PAssocReq *pSrc, |
| 17003 | uint8_t *pBuf, |
| 17004 | uint32_t nBuf, |
| 17005 | uint32_t *pnConsumed) |
| 17006 | { |
| 17007 | uint8_t *pIeLen = 0; |
| 17008 | uint32_t n, idx = 0, idxlast; |
| 17009 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17010 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17011 | uint32_t nNeeded = 0U; |
| 17012 | status = dot11f_get_packed_iep2_p_assoc_req(pCtx, pSrc, &nNeeded); |
| 17013 | if (!DOT11F_SUCCEEDED(status)) |
| 17014 | return status; |
| 17015 | if (nNeeded > nBuf) |
| 17016 | return DOT11F_BUFFER_OVERFLOW; |
| 17017 | (void)pCtx; |
| 17018 | if (pSrc->present) { |
| 17019 | do { |
| 17020 | nConsumedSoFar = *pnConsumed; |
| 17021 | *pBuf = 221; |
| 17022 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17023 | pIeLen = pBuf; |
| 17024 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17025 | *pBuf = 0x50; |
| 17026 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17027 | *pBuf = 0x6f; |
| 17028 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17029 | *pBuf = 0x9a; |
| 17030 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17031 | *pBuf = 0x9; |
| 17032 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17033 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17034 | nConsumedNow = *pnConsumed; |
| 17035 | idxlast = idx; |
| 17036 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17037 | pnConsumed, |
| 17038 | TLVS_P2PAssocReq + |
| 17039 | idx, &idx); |
| 17040 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17041 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17042 | pBuf += nConsumedNow; |
| 17043 | nBuf -= nConsumedNow; |
| 17044 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17045 | } |
| 17046 | return status; |
| 17047 | } /* End dot11f_pack_ie_p2_p_assoc_req. */ |
| 17048 | |
| 17049 | uint32_t dot11f_pack_ie_p2_p_assoc_res(tpAniSirGlobal pCtx, |
| 17050 | tDot11fIEP2PAssocRes *pSrc, |
| 17051 | uint8_t *pBuf, |
| 17052 | uint32_t nBuf, |
| 17053 | uint32_t *pnConsumed) |
| 17054 | { |
| 17055 | uint8_t *pIeLen = 0; |
| 17056 | uint32_t n, idx = 0, idxlast; |
| 17057 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17058 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17059 | uint32_t nNeeded = 0U; |
| 17060 | status = dot11f_get_packed_iep2_p_assoc_res(pCtx, pSrc, &nNeeded); |
| 17061 | if (!DOT11F_SUCCEEDED(status)) |
| 17062 | return status; |
| 17063 | if (nNeeded > nBuf) |
| 17064 | return DOT11F_BUFFER_OVERFLOW; |
| 17065 | (void)pCtx; |
| 17066 | if (pSrc->present) { |
| 17067 | do { |
| 17068 | nConsumedSoFar = *pnConsumed; |
| 17069 | *pBuf = 221; |
| 17070 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17071 | pIeLen = pBuf; |
| 17072 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17073 | *pBuf = 0x50; |
| 17074 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17075 | *pBuf = 0x6f; |
| 17076 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17077 | *pBuf = 0x9a; |
| 17078 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17079 | *pBuf = 0x9; |
| 17080 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17081 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17082 | nConsumedNow = *pnConsumed; |
| 17083 | idxlast = idx; |
| 17084 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17085 | pnConsumed, |
| 17086 | TLVS_P2PAssocRes + |
| 17087 | idx, &idx); |
| 17088 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17089 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17090 | pBuf += nConsumedNow; |
| 17091 | nBuf -= nConsumedNow; |
| 17092 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17093 | } |
| 17094 | return status; |
| 17095 | } /* End dot11f_pack_ie_p2_p_assoc_res. */ |
| 17096 | |
| 17097 | uint32_t dot11f_pack_ie_p2_p_beacon(tpAniSirGlobal pCtx, |
| 17098 | tDot11fIEP2PBeacon *pSrc, |
| 17099 | uint8_t *pBuf, |
| 17100 | uint32_t nBuf, |
| 17101 | uint32_t *pnConsumed) |
| 17102 | { |
| 17103 | uint8_t *pIeLen = 0; |
| 17104 | uint32_t n, idx = 0, idxlast; |
| 17105 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17106 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17107 | uint32_t nNeeded = 0U; |
| 17108 | status = dot11f_get_packed_iep2_p_beacon(pCtx, pSrc, &nNeeded); |
| 17109 | if (!DOT11F_SUCCEEDED(status)) |
| 17110 | return status; |
| 17111 | if (nNeeded > nBuf) |
| 17112 | return DOT11F_BUFFER_OVERFLOW; |
| 17113 | (void)pCtx; |
| 17114 | if (pSrc->present) { |
| 17115 | do { |
| 17116 | nConsumedSoFar = *pnConsumed; |
| 17117 | *pBuf = 221; |
| 17118 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17119 | pIeLen = pBuf; |
| 17120 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17121 | *pBuf = 0x50; |
| 17122 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17123 | *pBuf = 0x6f; |
| 17124 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17125 | *pBuf = 0x9a; |
| 17126 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17127 | *pBuf = 0x9; |
| 17128 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17129 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17130 | nConsumedNow = *pnConsumed; |
| 17131 | idxlast = idx; |
| 17132 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17133 | pnConsumed, |
| 17134 | TLVS_P2PBeacon + |
| 17135 | idx, &idx); |
| 17136 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17137 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17138 | pBuf += nConsumedNow; |
| 17139 | nBuf -= nConsumedNow; |
| 17140 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17141 | } |
| 17142 | return status; |
| 17143 | } /* End dot11f_pack_ie_p2_p_beacon. */ |
| 17144 | |
| 17145 | uint32_t dot11f_pack_ie_p2_p_beacon_probe_res(tpAniSirGlobal pCtx, |
| 17146 | tDot11fIEP2PBeaconProbeRes *pSrc, |
| 17147 | uint8_t *pBuf, |
| 17148 | uint32_t nBuf, |
| 17149 | uint32_t *pnConsumed) |
| 17150 | { |
| 17151 | uint8_t *pIeLen = 0; |
| 17152 | uint32_t n, idx = 0, idxlast; |
| 17153 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17154 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17155 | uint32_t nNeeded = 0U; |
| 17156 | status = dot11f_get_packed_iep2_p_beacon_probe_res(pCtx, pSrc, &nNeeded); |
| 17157 | if (!DOT11F_SUCCEEDED(status)) |
| 17158 | return status; |
| 17159 | if (nNeeded > nBuf) |
| 17160 | return DOT11F_BUFFER_OVERFLOW; |
| 17161 | (void)pCtx; |
| 17162 | if (pSrc->present) { |
| 17163 | do { |
| 17164 | nConsumedSoFar = *pnConsumed; |
| 17165 | *pBuf = 221; |
| 17166 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17167 | pIeLen = pBuf; |
| 17168 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17169 | *pBuf = 0x50; |
| 17170 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17171 | *pBuf = 0x6f; |
| 17172 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17173 | *pBuf = 0x9a; |
| 17174 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17175 | *pBuf = 0x9; |
| 17176 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17177 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17178 | nConsumedNow = *pnConsumed; |
| 17179 | idxlast = idx; |
| 17180 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17181 | pnConsumed, |
| 17182 | TLVS_P2PBeaconProbeRes + |
| 17183 | idx, &idx); |
| 17184 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17185 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17186 | pBuf += nConsumedNow; |
| 17187 | nBuf -= nConsumedNow; |
| 17188 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17189 | } |
| 17190 | return status; |
| 17191 | } /* End dot11f_pack_ie_p2_p_beacon_probe_res. */ |
| 17192 | |
| 17193 | uint32_t dot11f_pack_ie_p2_p_de_auth(tpAniSirGlobal pCtx, |
| 17194 | tDot11fIEP2PDeAuth *pSrc, |
| 17195 | uint8_t *pBuf, |
| 17196 | uint32_t nBuf, |
| 17197 | uint32_t *pnConsumed) |
| 17198 | { |
| 17199 | uint8_t *pIeLen = 0; |
| 17200 | uint32_t n, idx = 0, idxlast; |
| 17201 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17202 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17203 | uint32_t nNeeded = 0U; |
| 17204 | status = dot11f_get_packed_iep2_p_de_auth(pCtx, pSrc, &nNeeded); |
| 17205 | if (!DOT11F_SUCCEEDED(status)) |
| 17206 | return status; |
| 17207 | if (nNeeded > nBuf) |
| 17208 | return DOT11F_BUFFER_OVERFLOW; |
| 17209 | (void)pCtx; |
| 17210 | if (pSrc->present) { |
| 17211 | do { |
| 17212 | nConsumedSoFar = *pnConsumed; |
| 17213 | *pBuf = 221; |
| 17214 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17215 | pIeLen = pBuf; |
| 17216 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17217 | *pBuf = 0x50; |
| 17218 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17219 | *pBuf = 0x6f; |
| 17220 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17221 | *pBuf = 0x9a; |
| 17222 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17223 | *pBuf = 0x9; |
| 17224 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17225 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17226 | nConsumedNow = *pnConsumed; |
| 17227 | idxlast = idx; |
| 17228 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17229 | pnConsumed, |
| 17230 | TLVS_P2PDeAuth + |
| 17231 | idx, &idx); |
| 17232 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17233 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17234 | pBuf += nConsumedNow; |
| 17235 | nBuf -= nConsumedNow; |
| 17236 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17237 | } |
| 17238 | return status; |
| 17239 | } /* End dot11f_pack_ie_p2_p_de_auth. */ |
| 17240 | |
| 17241 | uint32_t dot11f_pack_ie_p2_p_dis_assoc(tpAniSirGlobal pCtx, |
| 17242 | tDot11fIEP2PDisAssoc *pSrc, |
| 17243 | uint8_t *pBuf, |
| 17244 | uint32_t nBuf, |
| 17245 | uint32_t *pnConsumed) |
| 17246 | { |
| 17247 | uint8_t *pIeLen = 0; |
| 17248 | uint32_t n, idx = 0, idxlast; |
| 17249 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17250 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17251 | uint32_t nNeeded = 0U; |
| 17252 | status = dot11f_get_packed_iep2_p_dis_assoc(pCtx, pSrc, &nNeeded); |
| 17253 | if (!DOT11F_SUCCEEDED(status)) |
| 17254 | return status; |
| 17255 | if (nNeeded > nBuf) |
| 17256 | return DOT11F_BUFFER_OVERFLOW; |
| 17257 | (void)pCtx; |
| 17258 | if (pSrc->present) { |
| 17259 | do { |
| 17260 | nConsumedSoFar = *pnConsumed; |
| 17261 | *pBuf = 221; |
| 17262 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17263 | pIeLen = pBuf; |
| 17264 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17265 | *pBuf = 0x50; |
| 17266 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17267 | *pBuf = 0x6f; |
| 17268 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17269 | *pBuf = 0x9a; |
| 17270 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17271 | *pBuf = 0x9; |
| 17272 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17273 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17274 | nConsumedNow = *pnConsumed; |
| 17275 | idxlast = idx; |
| 17276 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17277 | pnConsumed, |
| 17278 | TLVS_P2PDisAssoc + |
| 17279 | idx, &idx); |
| 17280 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17281 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17282 | pBuf += nConsumedNow; |
| 17283 | nBuf -= nConsumedNow; |
| 17284 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17285 | } |
| 17286 | return status; |
| 17287 | } /* End dot11f_pack_ie_p2_p_dis_assoc. */ |
| 17288 | |
| 17289 | uint32_t dot11f_pack_ie_p2_pie_opaque(tpAniSirGlobal pCtx, |
| 17290 | tDot11fIEP2PIEOpaque *pSrc, |
| 17291 | uint8_t *pBuf, |
| 17292 | uint32_t nBuf, |
| 17293 | uint32_t *pnConsumed) |
| 17294 | { |
| 17295 | uint8_t *pIeLen = 0; |
| 17296 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17297 | uint32_t nNeeded = 0U; |
| 17298 | nNeeded += pSrc->num_data; |
| 17299 | while (pSrc->present) { |
| 17300 | if (nNeeded > nBuf) |
| 17301 | return DOT11F_BUFFER_OVERFLOW; |
| 17302 | *pBuf = 221; |
| 17303 | ++pBuf; ++(*pnConsumed); |
| 17304 | pIeLen = pBuf; |
| 17305 | ++pBuf; ++(*pnConsumed); |
| 17306 | *pBuf = 0x50; |
| 17307 | ++pBuf; ++(*pnConsumed); |
| 17308 | *pBuf = 0x6f; |
| 17309 | ++pBuf; ++(*pnConsumed); |
| 17310 | *pBuf = 0x9a; |
| 17311 | ++pBuf; ++(*pnConsumed); |
| 17312 | *pBuf = 0x9; |
| 17313 | ++pBuf; ++(*pnConsumed); |
| 17314 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data); |
| 17315 | *pnConsumed += pSrc->num_data; |
| 17316 | /* fieldsEndFlag = 1 */ |
| 17317 | break; |
| 17318 | } |
| 17319 | (void)pCtx; |
| 17320 | if (pIeLen) { |
| 17321 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17322 | } |
| 17323 | return DOT11F_PARSE_SUCCESS; |
| 17324 | } /* End dot11f_pack_ie_p2_pie_opaque. */ |
| 17325 | |
| 17326 | uint32_t dot11f_pack_ie_p2_p_probe_req(tpAniSirGlobal pCtx, |
| 17327 | tDot11fIEP2PProbeReq *pSrc, |
| 17328 | uint8_t *pBuf, |
| 17329 | uint32_t nBuf, |
| 17330 | uint32_t *pnConsumed) |
| 17331 | { |
| 17332 | uint8_t *pIeLen = 0; |
| 17333 | uint32_t n, idx = 0, idxlast; |
| 17334 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17335 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17336 | uint32_t nNeeded = 0U; |
| 17337 | status = dot11f_get_packed_iep2_p_probe_req(pCtx, pSrc, &nNeeded); |
| 17338 | if (!DOT11F_SUCCEEDED(status)) |
| 17339 | return status; |
| 17340 | if (nNeeded > nBuf) |
| 17341 | return DOT11F_BUFFER_OVERFLOW; |
| 17342 | (void)pCtx; |
| 17343 | if (pSrc->present) { |
| 17344 | do { |
| 17345 | nConsumedSoFar = *pnConsumed; |
| 17346 | *pBuf = 221; |
| 17347 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17348 | pIeLen = pBuf; |
| 17349 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17350 | *pBuf = 0x50; |
| 17351 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17352 | *pBuf = 0x6f; |
| 17353 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17354 | *pBuf = 0x9a; |
| 17355 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17356 | *pBuf = 0x9; |
| 17357 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17358 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17359 | nConsumedNow = *pnConsumed; |
| 17360 | idxlast = idx; |
| 17361 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17362 | pnConsumed, |
| 17363 | TLVS_P2PProbeReq + |
| 17364 | idx, &idx); |
| 17365 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17366 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17367 | pBuf += nConsumedNow; |
| 17368 | nBuf -= nConsumedNow; |
| 17369 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17370 | } |
| 17371 | return status; |
| 17372 | } /* End dot11f_pack_ie_p2_p_probe_req. */ |
| 17373 | |
| 17374 | uint32_t dot11f_pack_ie_p2_p_probe_res(tpAniSirGlobal pCtx, |
| 17375 | tDot11fIEP2PProbeRes *pSrc, |
| 17376 | uint8_t *pBuf, |
| 17377 | uint32_t nBuf, |
| 17378 | uint32_t *pnConsumed) |
| 17379 | { |
| 17380 | uint8_t *pIeLen = 0; |
| 17381 | uint32_t n, idx = 0, idxlast; |
| 17382 | uint32_t nConsumedSoFar, nConsumedNow; |
| 17383 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17384 | uint32_t nNeeded = 0U; |
| 17385 | status = dot11f_get_packed_iep2_p_probe_res(pCtx, pSrc, &nNeeded); |
| 17386 | if (!DOT11F_SUCCEEDED(status)) |
| 17387 | return status; |
| 17388 | if (nNeeded > nBuf) |
| 17389 | return DOT11F_BUFFER_OVERFLOW; |
| 17390 | (void)pCtx; |
| 17391 | if (pSrc->present) { |
| 17392 | do { |
| 17393 | nConsumedSoFar = *pnConsumed; |
| 17394 | *pBuf = 221; |
| 17395 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17396 | pIeLen = pBuf; |
| 17397 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17398 | *pBuf = 0x50; |
| 17399 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17400 | *pBuf = 0x6f; |
| 17401 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17402 | *pBuf = 0x9a; |
| 17403 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17404 | *pBuf = 0x9; |
| 17405 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 17406 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 17407 | nConsumedNow = *pnConsumed; |
| 17408 | idxlast = idx; |
| 17409 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 17410 | pnConsumed, |
| 17411 | TLVS_P2PProbeRes + |
| 17412 | idx, &idx); |
| 17413 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 17414 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 17415 | pBuf += nConsumedNow; |
| 17416 | nBuf -= nConsumedNow; |
| 17417 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 17418 | } |
| 17419 | return status; |
| 17420 | } /* End dot11f_pack_ie_p2_p_probe_res. */ |
| 17421 | |
| 17422 | uint32_t dot11f_pack_ie_pti_control(tpAniSirGlobal pCtx, |
| 17423 | tDot11fIEPTIControl *pSrc, |
| 17424 | uint8_t *pBuf, |
| 17425 | uint32_t nBuf, |
| 17426 | uint32_t *pnConsumed) |
| 17427 | { |
| 17428 | uint8_t *pIeLen = 0; |
| 17429 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17430 | uint32_t nNeeded = 0U; |
| 17431 | nNeeded += 3; |
| 17432 | while (pSrc->present) { |
| 17433 | if (nNeeded > nBuf) |
| 17434 | return DOT11F_BUFFER_OVERFLOW; |
| 17435 | *pBuf = 105; |
| 17436 | ++pBuf; ++(*pnConsumed); |
| 17437 | pIeLen = pBuf; |
| 17438 | ++pBuf; ++(*pnConsumed); |
| 17439 | *pBuf = pSrc->tid; |
| 17440 | *pnConsumed += 1; |
| 17441 | pBuf += 1; |
| 17442 | frameshtons(pCtx, pBuf, pSrc->sequence_control, 0); |
| 17443 | *pnConsumed += 2; |
| 17444 | /* fieldsEndFlag = 1 */ |
| 17445 | break; |
| 17446 | } |
| 17447 | (void)pCtx; |
| 17448 | if (pIeLen) { |
| 17449 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17450 | } |
| 17451 | return DOT11F_PARSE_SUCCESS; |
| 17452 | } /* End dot11f_pack_ie_pti_control. */ |
| 17453 | |
| 17454 | uint32_t dot11f_pack_ie_pu_buffer_status(tpAniSirGlobal pCtx, |
| 17455 | tDot11fIEPUBufferStatus *pSrc, |
| 17456 | uint8_t *pBuf, |
| 17457 | uint32_t nBuf, |
| 17458 | uint32_t *pnConsumed) |
| 17459 | { |
| 17460 | uint8_t *pIeLen = 0; |
| 17461 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17462 | uint32_t nNeeded = 0U; |
| 17463 | uint8_t tmp116__; |
| 17464 | nNeeded += 1; |
| 17465 | while (pSrc->present) { |
| 17466 | if (nNeeded > nBuf) |
| 17467 | return DOT11F_BUFFER_OVERFLOW; |
| 17468 | *pBuf = 106; |
| 17469 | ++pBuf; ++(*pnConsumed); |
| 17470 | pIeLen = pBuf; |
| 17471 | ++pBuf; ++(*pnConsumed); |
| 17472 | tmp116__ = 0U; |
| 17473 | tmp116__ |= (pSrc->ac_bk_traffic_aval << 0); |
| 17474 | tmp116__ |= (pSrc->ac_be_traffic_aval << 1); |
| 17475 | tmp116__ |= (pSrc->ac_vi_traffic_aval << 2); |
| 17476 | tmp116__ |= (pSrc->ac_vo_traffic_aval << 3); |
| 17477 | tmp116__ |= (pSrc->reserved << 4); |
| 17478 | *pBuf = tmp116__; |
| 17479 | *pnConsumed += 1; |
| 17480 | /* fieldsEndFlag = 1 */ |
| 17481 | nBuf -= 1 ; |
| 17482 | break; |
| 17483 | } |
| 17484 | (void)pCtx; |
| 17485 | if (pIeLen) { |
| 17486 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17487 | } |
| 17488 | return DOT11F_PARSE_SUCCESS; |
| 17489 | } /* End dot11f_pack_ie_pu_buffer_status. */ |
| 17490 | |
| 17491 | uint32_t dot11f_pack_ie_power_caps(tpAniSirGlobal pCtx, |
| 17492 | tDot11fIEPowerCaps *pSrc, |
| 17493 | uint8_t *pBuf, |
| 17494 | uint32_t nBuf, |
| 17495 | uint32_t *pnConsumed) |
| 17496 | { |
| 17497 | uint8_t *pIeLen = 0; |
| 17498 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17499 | uint32_t nNeeded = 0U; |
| 17500 | nNeeded += 2; |
| 17501 | while (pSrc->present) { |
| 17502 | if (nNeeded > nBuf) |
| 17503 | return DOT11F_BUFFER_OVERFLOW; |
| 17504 | *pBuf = 33; |
| 17505 | ++pBuf; ++(*pnConsumed); |
| 17506 | pIeLen = pBuf; |
| 17507 | ++pBuf; ++(*pnConsumed); |
| 17508 | *pBuf = pSrc->minTxPower; |
| 17509 | *pnConsumed += 1; |
| 17510 | pBuf += 1; |
| 17511 | *pBuf = pSrc->maxTxPower; |
| 17512 | *pnConsumed += 1; |
| 17513 | /* fieldsEndFlag = 1 */ |
| 17514 | break; |
| 17515 | } |
| 17516 | (void)pCtx; |
| 17517 | if (pIeLen) { |
| 17518 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17519 | } |
| 17520 | return DOT11F_PARSE_SUCCESS; |
| 17521 | } /* End dot11f_pack_ie_power_caps. */ |
| 17522 | |
| 17523 | uint32_t dot11f_pack_ie_power_constraints(tpAniSirGlobal pCtx, |
| 17524 | tDot11fIEPowerConstraints *pSrc, |
| 17525 | uint8_t *pBuf, |
| 17526 | uint32_t nBuf, |
| 17527 | uint32_t *pnConsumed) |
| 17528 | { |
| 17529 | uint8_t *pIeLen = 0; |
| 17530 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17531 | uint32_t nNeeded = 0U; |
| 17532 | nNeeded += 1; |
| 17533 | while (pSrc->present) { |
| 17534 | if (nNeeded > nBuf) |
| 17535 | return DOT11F_BUFFER_OVERFLOW; |
| 17536 | *pBuf = 32; |
| 17537 | ++pBuf; ++(*pnConsumed); |
| 17538 | pIeLen = pBuf; |
| 17539 | ++pBuf; ++(*pnConsumed); |
| 17540 | *pBuf = pSrc->localPowerConstraints; |
| 17541 | *pnConsumed += 1; |
| 17542 | /* fieldsEndFlag = 1 */ |
| 17543 | break; |
| 17544 | } |
| 17545 | (void)pCtx; |
| 17546 | if (pIeLen) { |
| 17547 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17548 | } |
| 17549 | return DOT11F_PARSE_SUCCESS; |
| 17550 | } /* End dot11f_pack_ie_power_constraints. */ |
| 17551 | |
| 17552 | uint32_t dot11f_pack_ie_qbss_load(tpAniSirGlobal pCtx, |
| 17553 | tDot11fIEQBSSLoad *pSrc, |
| 17554 | uint8_t *pBuf, |
| 17555 | uint32_t nBuf, |
| 17556 | uint32_t *pnConsumed) |
| 17557 | { |
| 17558 | uint8_t *pIeLen = 0; |
| 17559 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17560 | uint32_t nNeeded = 0U; |
| 17561 | nNeeded += 5; |
| 17562 | while (pSrc->present) { |
| 17563 | if (nNeeded > nBuf) |
| 17564 | return DOT11F_BUFFER_OVERFLOW; |
| 17565 | *pBuf = 11; |
| 17566 | ++pBuf; ++(*pnConsumed); |
| 17567 | pIeLen = pBuf; |
| 17568 | ++pBuf; ++(*pnConsumed); |
| 17569 | frameshtons(pCtx, pBuf, pSrc->stacount, 0); |
| 17570 | *pnConsumed += 2; |
| 17571 | pBuf += 2; |
| 17572 | *pBuf = pSrc->chautil; |
| 17573 | *pnConsumed += 1; |
| 17574 | pBuf += 1; |
| 17575 | frameshtons(pCtx, pBuf, pSrc->avail, 0); |
| 17576 | *pnConsumed += 2; |
| 17577 | /* fieldsEndFlag = 1 */ |
| 17578 | break; |
| 17579 | } |
| 17580 | (void)pCtx; |
| 17581 | if (pIeLen) { |
| 17582 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17583 | } |
| 17584 | return DOT11F_PARSE_SUCCESS; |
| 17585 | } /* End dot11f_pack_ie_qbss_load. */ |
| 17586 | |
| 17587 | uint32_t dot11f_pack_ie_QComVendorIE(tpAniSirGlobal pCtx, |
| 17588 | tDot11fIEQComVendorIE *pSrc, |
| 17589 | uint8_t *pBuf, |
| 17590 | uint32_t nBuf, |
| 17591 | uint32_t *pnConsumed) |
| 17592 | { |
| 17593 | uint8_t *pIeLen = 0; |
| 17594 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17595 | uint32_t nNeeded = 0U; |
| 17596 | nNeeded += 2; |
| 17597 | while (pSrc->present) { |
| 17598 | if (nNeeded > nBuf) |
| 17599 | return DOT11F_BUFFER_OVERFLOW; |
| 17600 | *pBuf = 221; |
| 17601 | ++pBuf; ++(*pnConsumed); |
| 17602 | pIeLen = pBuf; |
| 17603 | ++pBuf; ++(*pnConsumed); |
| 17604 | *pBuf = 0x0; |
| 17605 | ++pBuf; ++(*pnConsumed); |
| 17606 | *pBuf = 0xa0; |
| 17607 | ++pBuf; ++(*pnConsumed); |
| 17608 | *pBuf = 0xc6; |
| 17609 | ++pBuf; ++(*pnConsumed); |
| 17610 | *pBuf = pSrc->type; |
| 17611 | *pnConsumed += 1; |
| 17612 | pBuf += 1; |
| 17613 | *pBuf = pSrc->channel; |
| 17614 | *pnConsumed += 1; |
| 17615 | /* fieldsEndFlag = 1 */ |
| 17616 | break; |
| 17617 | } |
| 17618 | (void)pCtx; |
| 17619 | if (pIeLen) { |
| 17620 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17621 | } |
| 17622 | return DOT11F_PARSE_SUCCESS; |
| 17623 | } /* End dot11f_pack_ie_QComVendorIE. */ |
| 17624 | |
| 17625 | uint32_t dot11f_pack_ie_qos_caps_ap(tpAniSirGlobal pCtx, |
| 17626 | tDot11fIEQOSCapsAp *pSrc, |
| 17627 | uint8_t *pBuf, |
| 17628 | uint32_t nBuf, |
| 17629 | uint32_t *pnConsumed) |
| 17630 | { |
| 17631 | uint8_t *pIeLen = 0; |
| 17632 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17633 | uint32_t nNeeded = 0U; |
| 17634 | uint8_t tmp117__; |
| 17635 | nNeeded += 1; |
| 17636 | while (pSrc->present) { |
| 17637 | if (nNeeded > nBuf) |
| 17638 | return DOT11F_BUFFER_OVERFLOW; |
| 17639 | *pBuf = 46; |
| 17640 | ++pBuf; ++(*pnConsumed); |
| 17641 | pIeLen = pBuf; |
| 17642 | ++pBuf; ++(*pnConsumed); |
| 17643 | tmp117__ = 0U; |
| 17644 | tmp117__ |= (pSrc->count << 0); |
| 17645 | tmp117__ |= (pSrc->qack << 4); |
| 17646 | tmp117__ |= (pSrc->qreq << 5); |
| 17647 | tmp117__ |= (pSrc->txopreq << 6); |
| 17648 | tmp117__ |= (pSrc->reserved << 7); |
| 17649 | *pBuf = tmp117__; |
| 17650 | *pnConsumed += 1; |
| 17651 | /* fieldsEndFlag = 1 */ |
| 17652 | nBuf -= 1 ; |
| 17653 | break; |
| 17654 | } |
| 17655 | (void)pCtx; |
| 17656 | if (pIeLen) { |
| 17657 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17658 | } |
| 17659 | return DOT11F_PARSE_SUCCESS; |
| 17660 | } /* End dot11f_pack_ie_qos_caps_ap. */ |
| 17661 | |
| 17662 | uint32_t dot11f_pack_ie_qos_caps_station(tpAniSirGlobal pCtx, |
| 17663 | tDot11fIEQOSCapsStation *pSrc, |
| 17664 | uint8_t *pBuf, |
| 17665 | uint32_t nBuf, |
| 17666 | uint32_t *pnConsumed) |
| 17667 | { |
| 17668 | uint8_t *pIeLen = 0; |
| 17669 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17670 | uint32_t nNeeded = 0U; |
| 17671 | uint8_t tmp118__; |
| 17672 | nNeeded += 1; |
| 17673 | while (pSrc->present) { |
| 17674 | if (nNeeded > nBuf) |
| 17675 | return DOT11F_BUFFER_OVERFLOW; |
| 17676 | *pBuf = 46; |
| 17677 | ++pBuf; ++(*pnConsumed); |
| 17678 | pIeLen = pBuf; |
| 17679 | ++pBuf; ++(*pnConsumed); |
| 17680 | tmp118__ = 0U; |
| 17681 | tmp118__ |= (pSrc->acvo_uapsd << 0); |
| 17682 | tmp118__ |= (pSrc->acvi_uapsd << 1); |
| 17683 | tmp118__ |= (pSrc->acbk_uapsd << 2); |
| 17684 | tmp118__ |= (pSrc->acbe_uapsd << 3); |
| 17685 | tmp118__ |= (pSrc->qack << 4); |
| 17686 | tmp118__ |= (pSrc->max_sp_length << 5); |
| 17687 | tmp118__ |= (pSrc->more_data_ack << 7); |
| 17688 | *pBuf = tmp118__; |
| 17689 | *pnConsumed += 1; |
| 17690 | /* fieldsEndFlag = 1 */ |
| 17691 | nBuf -= 1 ; |
| 17692 | break; |
| 17693 | } |
| 17694 | (void)pCtx; |
| 17695 | if (pIeLen) { |
| 17696 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17697 | } |
| 17698 | return DOT11F_PARSE_SUCCESS; |
| 17699 | } /* End dot11f_pack_ie_qos_caps_station. */ |
| 17700 | |
| 17701 | uint32_t dot11f_pack_ie_qos_map_set(tpAniSirGlobal pCtx, |
| 17702 | tDot11fIEQosMapSet *pSrc, |
| 17703 | uint8_t *pBuf, |
| 17704 | uint32_t nBuf, |
| 17705 | uint32_t *pnConsumed) |
| 17706 | { |
| 17707 | uint8_t *pIeLen = 0; |
| 17708 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17709 | uint32_t nNeeded = 0U; |
| 17710 | nNeeded += pSrc->num_dscp_exceptions; |
| 17711 | while (pSrc->present) { |
| 17712 | if (nNeeded > nBuf) |
| 17713 | return DOT11F_BUFFER_OVERFLOW; |
| 17714 | *pBuf = 110; |
| 17715 | ++pBuf; ++(*pnConsumed); |
| 17716 | pIeLen = pBuf; |
| 17717 | ++pBuf; ++(*pnConsumed); |
| 17718 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->dscp_exceptions), pSrc->num_dscp_exceptions); |
| 17719 | *pnConsumed += pSrc->num_dscp_exceptions; |
| 17720 | /* fieldsEndFlag = 1 */ |
| 17721 | break; |
| 17722 | } |
| 17723 | (void)pCtx; |
| 17724 | if (pIeLen) { |
| 17725 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17726 | } |
| 17727 | return DOT11F_PARSE_SUCCESS; |
| 17728 | } /* End dot11f_pack_ie_qos_map_set. */ |
| 17729 | |
| 17730 | uint32_t dot11f_pack_ie_quiet(tpAniSirGlobal pCtx, |
| 17731 | tDot11fIEQuiet *pSrc, |
| 17732 | uint8_t *pBuf, |
| 17733 | uint32_t nBuf, |
| 17734 | uint32_t *pnConsumed) |
| 17735 | { |
| 17736 | uint8_t *pIeLen = 0; |
| 17737 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17738 | uint32_t nNeeded = 0U; |
| 17739 | nNeeded += 6; |
| 17740 | while (pSrc->present) { |
| 17741 | if (nNeeded > nBuf) |
| 17742 | return DOT11F_BUFFER_OVERFLOW; |
| 17743 | *pBuf = 40; |
| 17744 | ++pBuf; ++(*pnConsumed); |
| 17745 | pIeLen = pBuf; |
| 17746 | ++pBuf; ++(*pnConsumed); |
| 17747 | *pBuf = pSrc->count; |
| 17748 | *pnConsumed += 1; |
| 17749 | pBuf += 1; |
| 17750 | *pBuf = pSrc->period; |
| 17751 | *pnConsumed += 1; |
| 17752 | pBuf += 1; |
| 17753 | frameshtons(pCtx, pBuf, pSrc->duration, 0); |
| 17754 | *pnConsumed += 2; |
| 17755 | pBuf += 2; |
| 17756 | frameshtons(pCtx, pBuf, pSrc->offset, 0); |
| 17757 | *pnConsumed += 2; |
| 17758 | /* fieldsEndFlag = 1 */ |
| 17759 | break; |
| 17760 | } |
| 17761 | (void)pCtx; |
| 17762 | if (pIeLen) { |
| 17763 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17764 | } |
| 17765 | return DOT11F_PARSE_SUCCESS; |
| 17766 | } /* End dot11f_pack_ie_quiet. */ |
| 17767 | |
| 17768 | uint32_t dot11f_pack_ie_rcpiie(tpAniSirGlobal pCtx, |
| 17769 | tDot11fIERCPIIE *pSrc, |
| 17770 | uint8_t *pBuf, |
| 17771 | uint32_t nBuf, |
| 17772 | uint32_t *pnConsumed) |
| 17773 | { |
| 17774 | uint8_t *pIeLen = 0; |
| 17775 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17776 | uint32_t nNeeded = 0U; |
| 17777 | nNeeded += 1; |
| 17778 | while (pSrc->present) { |
| 17779 | if (nNeeded > nBuf) |
| 17780 | return DOT11F_BUFFER_OVERFLOW; |
| 17781 | *pBuf = 53; |
| 17782 | ++pBuf; ++(*pnConsumed); |
| 17783 | pIeLen = pBuf; |
| 17784 | ++pBuf; ++(*pnConsumed); |
| 17785 | *pBuf = pSrc->rcpi; |
| 17786 | *pnConsumed += 1; |
| 17787 | /* fieldsEndFlag = 1 */ |
| 17788 | break; |
| 17789 | } |
| 17790 | (void)pCtx; |
| 17791 | if (pIeLen) { |
| 17792 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17793 | } |
| 17794 | return DOT11F_PARSE_SUCCESS; |
| 17795 | } /* End dot11f_pack_ie_rcpiie. */ |
| 17796 | |
| 17797 | uint32_t dot11f_pack_ie_ric_data_desc(tpAniSirGlobal pCtx, |
| 17798 | tDot11fIERICDataDesc *pSrc, |
| 17799 | uint8_t *pBuf, |
| 17800 | uint32_t nBuf, |
| 17801 | uint32_t *pnConsumed) |
| 17802 | { |
| 17803 | uint32_t nNeeded = 0U; |
| 17804 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17805 | status = dot11f_get_packed_ieric_data_desc(pCtx, pSrc, &nNeeded); |
| 17806 | if (!DOT11F_SUCCEEDED(status)) |
| 17807 | return status; |
| 17808 | while (pSrc->present) { |
| 17809 | if (nNeeded > nBuf) |
| 17810 | return DOT11F_BUFFER_OVERFLOW; |
| 17811 | status = pack_core(pCtx, |
| 17812 | (uint8_t *)pSrc, |
| 17813 | pBuf, |
| 17814 | nBuf, |
| 17815 | pnConsumed, |
| 17816 | FFS_RICDataDesc, |
| 17817 | IES_RICDataDesc); |
| 17818 | break; |
| 17819 | } |
| 17820 | (void)pCtx; |
| 17821 | return status; |
| 17822 | } /* End dot11f_pack_ie_ric_data_desc. */ |
| 17823 | |
| 17824 | uint32_t dot11f_pack_ie_rsn(tpAniSirGlobal pCtx, |
| 17825 | tDot11fIERSN *pSrc, |
| 17826 | uint8_t *pBuf, |
| 17827 | uint32_t nBuf, |
| 17828 | uint32_t *pnConsumed) |
| 17829 | { |
| 17830 | uint8_t *pIeLen = 0; |
| 17831 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17832 | uint32_t nNeeded = 0U; |
| 17833 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 17834 | status = dot11f_get_packed_iersn(pCtx, pSrc, &nNeeded); |
| 17835 | if (!DOT11F_SUCCEEDED(status)) |
| 17836 | return status; |
| 17837 | while (pSrc->present) { |
| 17838 | if (nNeeded > nBuf) |
| 17839 | return DOT11F_BUFFER_OVERFLOW; |
| 17840 | *pBuf = 48; |
| 17841 | ++pBuf; ++(*pnConsumed); |
| 17842 | pIeLen = pBuf; |
| 17843 | ++pBuf; ++(*pnConsumed); |
| 17844 | frameshtons(pCtx, pBuf, pSrc->version, 0); |
| 17845 | *pnConsumed += 2; |
| 17846 | pBuf += 2; |
| 17847 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->gp_cipher_suite, 4); |
| 17848 | *pnConsumed += 4; |
| 17849 | pBuf += 4; |
| 17850 | if (pSrc->pwise_cipher_suite_count) { |
| 17851 | frameshtons(pCtx, pBuf, pSrc->pwise_cipher_suite_count, 0); |
| 17852 | *pnConsumed += 2; |
| 17853 | pBuf += 2; |
| 17854 | } else { |
| 17855 | break; |
| 17856 | } |
| 17857 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->pwise_cipher_suites), (pSrc->pwise_cipher_suite_count * 4)); |
| 17858 | *pnConsumed += (pSrc->pwise_cipher_suite_count * 4); |
| 17859 | pBuf += (pSrc->pwise_cipher_suite_count * 4); |
| 17860 | if (pSrc->akm_suite_count) { |
| 17861 | frameshtons(pCtx, pBuf, pSrc->akm_suite_count, 0); |
| 17862 | *pnConsumed += 2; |
| 17863 | pBuf += 2; |
| 17864 | } else { |
| 17865 | break; |
| 17866 | } |
| 17867 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->akm_suites), (pSrc->akm_suite_count * 4)); |
| 17868 | *pnConsumed += (pSrc->akm_suite_count * 4); |
| 17869 | pBuf += (pSrc->akm_suite_count * 4); |
| 17870 | if (pSrc->RSN_Cap) { |
| 17871 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->RSN_Cap, 2); |
| 17872 | *pnConsumed += 2; |
| 17873 | pBuf += 2; |
| 17874 | } else { |
| 17875 | break; |
| 17876 | } |
| 17877 | if (pSrc->pmkid_count) { |
| 17878 | frameshtons(pCtx, pBuf, pSrc->pmkid_count, 0); |
| 17879 | *pnConsumed += 2; |
| 17880 | pBuf += 2; |
| 17881 | } else { |
| 17882 | break; |
| 17883 | } |
| 17884 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->pmkid), (pSrc->pmkid_count * 16)); |
| 17885 | *pnConsumed += (pSrc->pmkid_count * 16); |
| 17886 | pBuf += (pSrc->pmkid_count * 16); |
| 17887 | if (pSrc->gp_mgmt_cipher_suite) { |
| 17888 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->gp_mgmt_cipher_suite, 4); |
| 17889 | *pnConsumed += 4; |
| 17890 | /* fieldsEndFlag = 1 */ |
| 17891 | } else { |
| 17892 | break; |
| 17893 | } |
| 17894 | break; |
| 17895 | } |
| 17896 | (void)pCtx; |
| 17897 | if (pIeLen) { |
| 17898 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17899 | } |
| 17900 | return status; |
| 17901 | } /* End dot11f_pack_ie_rsn. */ |
| 17902 | |
| 17903 | uint32_t dot11f_pack_ie_rsniie(tpAniSirGlobal pCtx, |
| 17904 | tDot11fIERSNIIE *pSrc, |
| 17905 | uint8_t *pBuf, |
| 17906 | uint32_t nBuf, |
| 17907 | uint32_t *pnConsumed) |
| 17908 | { |
| 17909 | uint8_t *pIeLen = 0; |
| 17910 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17911 | uint32_t nNeeded = 0U; |
| 17912 | nNeeded += 1; |
| 17913 | while (pSrc->present) { |
| 17914 | if (nNeeded > nBuf) |
| 17915 | return DOT11F_BUFFER_OVERFLOW; |
| 17916 | *pBuf = 65; |
| 17917 | ++pBuf; ++(*pnConsumed); |
| 17918 | pIeLen = pBuf; |
| 17919 | ++pBuf; ++(*pnConsumed); |
| 17920 | *pBuf = pSrc->rsni; |
| 17921 | *pnConsumed += 1; |
| 17922 | /* fieldsEndFlag = 1 */ |
| 17923 | break; |
| 17924 | } |
| 17925 | (void)pCtx; |
| 17926 | if (pIeLen) { |
| 17927 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17928 | } |
| 17929 | return DOT11F_PARSE_SUCCESS; |
| 17930 | } /* End dot11f_pack_ie_rsniie. */ |
| 17931 | |
| 17932 | uint32_t dot11f_pack_ie_rsn_opaque(tpAniSirGlobal pCtx, |
| 17933 | tDot11fIERSNOpaque *pSrc, |
| 17934 | uint8_t *pBuf, |
| 17935 | uint32_t nBuf, |
| 17936 | uint32_t *pnConsumed) |
| 17937 | { |
| 17938 | uint8_t *pIeLen = 0; |
| 17939 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17940 | uint32_t nNeeded = 0U; |
| 17941 | nNeeded += pSrc->num_data; |
| 17942 | while (pSrc->present) { |
| 17943 | if (nNeeded > nBuf) |
| 17944 | return DOT11F_BUFFER_OVERFLOW; |
| 17945 | *pBuf = 48; |
| 17946 | ++pBuf; ++(*pnConsumed); |
| 17947 | pIeLen = pBuf; |
| 17948 | ++pBuf; ++(*pnConsumed); |
| 17949 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data); |
| 17950 | *pnConsumed += pSrc->num_data; |
| 17951 | /* fieldsEndFlag = 1 */ |
| 17952 | break; |
| 17953 | } |
| 17954 | (void)pCtx; |
| 17955 | if (pIeLen) { |
| 17956 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17957 | } |
| 17958 | return DOT11F_PARSE_SUCCESS; |
| 17959 | } /* End dot11f_pack_ie_rsn_opaque. */ |
| 17960 | |
| 17961 | uint32_t dot11f_pack_ie_supp_channels(tpAniSirGlobal pCtx, |
| 17962 | tDot11fIESuppChannels *pSrc, |
| 17963 | uint8_t *pBuf, |
| 17964 | uint32_t nBuf, |
| 17965 | uint32_t *pnConsumed) |
| 17966 | { |
| 17967 | uint8_t *pIeLen = 0; |
| 17968 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17969 | uint32_t nNeeded = 0U; |
| 17970 | nNeeded += pSrc->num_bands * 2; |
| 17971 | while (pSrc->present) { |
| 17972 | if (nNeeded > nBuf) |
| 17973 | return DOT11F_BUFFER_OVERFLOW; |
| 17974 | *pBuf = 36; |
| 17975 | ++pBuf; ++(*pnConsumed); |
| 17976 | pIeLen = pBuf; |
| 17977 | ++pBuf; ++(*pnConsumed); |
| 17978 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->bands), (pSrc->num_bands * 2)); |
| 17979 | *pnConsumed += (pSrc->num_bands * 2); |
| 17980 | /* fieldsEndFlag = 1 */ |
| 17981 | break; |
| 17982 | } |
| 17983 | (void)pCtx; |
| 17984 | if (pIeLen) { |
| 17985 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 17986 | } |
| 17987 | return DOT11F_PARSE_SUCCESS; |
| 17988 | } /* End dot11f_pack_ie_supp_channels. */ |
| 17989 | |
| 17990 | uint32_t dot11f_pack_ie_supp_operating_classes(tpAniSirGlobal pCtx, |
| 17991 | tDot11fIESuppOperatingClasses *pSrc, |
| 17992 | uint8_t *pBuf, |
| 17993 | uint32_t nBuf, |
| 17994 | uint32_t *pnConsumed) |
| 17995 | { |
| 17996 | uint8_t *pIeLen = 0; |
| 17997 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 17998 | uint32_t nNeeded = 0U; |
| 17999 | nNeeded += pSrc->num_classes; |
| 18000 | while (pSrc->present) { |
| 18001 | if (nNeeded > nBuf) |
| 18002 | return DOT11F_BUFFER_OVERFLOW; |
| 18003 | *pBuf = 59; |
| 18004 | ++pBuf; ++(*pnConsumed); |
| 18005 | pIeLen = pBuf; |
| 18006 | ++pBuf; ++(*pnConsumed); |
| 18007 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->classes), pSrc->num_classes); |
| 18008 | *pnConsumed += pSrc->num_classes; |
| 18009 | /* fieldsEndFlag = 1 */ |
| 18010 | break; |
| 18011 | } |
| 18012 | (void)pCtx; |
| 18013 | if (pIeLen) { |
| 18014 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18015 | } |
| 18016 | return DOT11F_PARSE_SUCCESS; |
| 18017 | } /* End dot11f_pack_ie_supp_operating_classes. */ |
| 18018 | |
| 18019 | uint32_t dot11f_pack_ie_supp_rates(tpAniSirGlobal pCtx, |
| 18020 | tDot11fIESuppRates *pSrc, |
| 18021 | uint8_t *pBuf, |
| 18022 | uint32_t nBuf, |
| 18023 | uint32_t *pnConsumed) |
| 18024 | { |
| 18025 | uint8_t *pIeLen = 0; |
| 18026 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18027 | uint32_t nNeeded = 0U; |
| 18028 | nNeeded += pSrc->num_rates; |
| 18029 | while (pSrc->present) { |
| 18030 | if (nNeeded > nBuf) |
| 18031 | return DOT11F_BUFFER_OVERFLOW; |
| 18032 | *pBuf = 1; |
| 18033 | ++pBuf; ++(*pnConsumed); |
| 18034 | pIeLen = pBuf; |
| 18035 | ++pBuf; ++(*pnConsumed); |
| 18036 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->rates), pSrc->num_rates); |
| 18037 | *pnConsumed += pSrc->num_rates; |
| 18038 | /* fieldsEndFlag = 1 */ |
| 18039 | break; |
| 18040 | } |
| 18041 | (void)pCtx; |
| 18042 | if (pIeLen) { |
| 18043 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18044 | } |
| 18045 | return DOT11F_PARSE_SUCCESS; |
| 18046 | } /* End dot11f_pack_ie_supp_rates. */ |
| 18047 | |
| 18048 | uint32_t dot11f_pack_ie_tim(tpAniSirGlobal pCtx, |
| 18049 | tDot11fIETIM *pSrc, |
| 18050 | uint8_t *pBuf, |
| 18051 | uint32_t nBuf, |
| 18052 | uint32_t *pnConsumed) |
| 18053 | { |
| 18054 | uint8_t *pIeLen = 0; |
| 18055 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18056 | uint32_t nNeeded = 0U; |
| 18057 | nNeeded += (pSrc->num_vbmp + 3); |
| 18058 | while (pSrc->present) { |
| 18059 | if (nNeeded > nBuf) |
| 18060 | return DOT11F_BUFFER_OVERFLOW; |
| 18061 | *pBuf = 5; |
| 18062 | ++pBuf; ++(*pnConsumed); |
| 18063 | pIeLen = pBuf; |
| 18064 | ++pBuf; ++(*pnConsumed); |
| 18065 | *pBuf = pSrc->dtim_count; |
| 18066 | *pnConsumed += 1; |
| 18067 | pBuf += 1; |
| 18068 | *pBuf = pSrc->dtim_period; |
| 18069 | *pnConsumed += 1; |
| 18070 | pBuf += 1; |
| 18071 | *pBuf = pSrc->bmpctl; |
| 18072 | *pnConsumed += 1; |
| 18073 | pBuf += 1; |
| 18074 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->vbmp), pSrc->num_vbmp); |
| 18075 | *pnConsumed += pSrc->num_vbmp; |
| 18076 | /* fieldsEndFlag = 1 */ |
| 18077 | break; |
| 18078 | } |
| 18079 | (void)pCtx; |
| 18080 | if (pIeLen) { |
| 18081 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18082 | } |
| 18083 | return DOT11F_PARSE_SUCCESS; |
| 18084 | } /* End dot11f_pack_ie_tim. */ |
| 18085 | |
| 18086 | uint32_t dot11f_pack_ie_tpc_report(tpAniSirGlobal pCtx, |
| 18087 | tDot11fIETPCReport *pSrc, |
| 18088 | uint8_t *pBuf, |
| 18089 | uint32_t nBuf, |
| 18090 | uint32_t *pnConsumed) |
| 18091 | { |
| 18092 | uint8_t *pIeLen = 0; |
| 18093 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18094 | uint32_t nNeeded = 0U; |
| 18095 | nNeeded += 2; |
| 18096 | while (pSrc->present) { |
| 18097 | if (nNeeded > nBuf) |
| 18098 | return DOT11F_BUFFER_OVERFLOW; |
| 18099 | *pBuf = 35; |
| 18100 | ++pBuf; ++(*pnConsumed); |
| 18101 | pIeLen = pBuf; |
| 18102 | ++pBuf; ++(*pnConsumed); |
| 18103 | *pBuf = pSrc->tx_power; |
| 18104 | *pnConsumed += 1; |
| 18105 | pBuf += 1; |
| 18106 | *pBuf = pSrc->link_margin; |
| 18107 | *pnConsumed += 1; |
| 18108 | /* fieldsEndFlag = 1 */ |
| 18109 | break; |
| 18110 | } |
| 18111 | (void)pCtx; |
| 18112 | if (pIeLen) { |
| 18113 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18114 | } |
| 18115 | return DOT11F_PARSE_SUCCESS; |
| 18116 | } /* End dot11f_pack_ie_tpc_report. */ |
| 18117 | |
| 18118 | uint32_t dot11f_pack_ie_tpc_request(tpAniSirGlobal pCtx, |
| 18119 | tDot11fIETPCRequest *pSrc, |
| 18120 | uint8_t *pBuf, |
| 18121 | uint32_t nBuf, |
| 18122 | uint32_t *pnConsumed) |
| 18123 | { |
| 18124 | uint8_t *pIeLen = 0; |
| 18125 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18126 | uint32_t nNeeded = 0U; |
| 18127 | nNeeded += 0; |
| 18128 | while (pSrc->present) { |
| 18129 | if (nNeeded > nBuf) |
| 18130 | return DOT11F_BUFFER_OVERFLOW; |
| 18131 | *pBuf = 34; |
| 18132 | ++pBuf; ++(*pnConsumed); |
| 18133 | pIeLen = pBuf; |
| 18134 | ++pBuf; ++(*pnConsumed); |
| 18135 | break; |
| 18136 | } |
| 18137 | (void)pCtx; |
| 18138 | if (pIeLen) { |
| 18139 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18140 | } |
| 18141 | return DOT11F_PARSE_SUCCESS; |
| 18142 | } /* End dot11f_pack_ie_tpc_request. */ |
| 18143 | |
| 18144 | uint32_t dot11f_pack_ie_time_advertisement(tpAniSirGlobal pCtx, |
| 18145 | tDot11fIETimeAdvertisement *pSrc, |
| 18146 | uint8_t *pBuf, |
| 18147 | uint32_t nBuf, |
| 18148 | uint32_t *pnConsumed) |
| 18149 | { |
| 18150 | uint8_t *pIeLen = 0; |
| 18151 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18152 | uint32_t nNeeded = 0U; |
| 18153 | nNeeded += 16; |
| 18154 | while (pSrc->present) { |
| 18155 | if (nNeeded > nBuf) |
| 18156 | return DOT11F_BUFFER_OVERFLOW; |
| 18157 | *pBuf = 69; |
| 18158 | ++pBuf; ++(*pnConsumed); |
| 18159 | pIeLen = pBuf; |
| 18160 | ++pBuf; ++(*pnConsumed); |
| 18161 | *pBuf = pSrc->timing_capabilities; |
| 18162 | *pnConsumed += 1; |
| 18163 | pBuf += 1; |
| 18164 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->time_value, 10); |
| 18165 | *pnConsumed += 10; |
| 18166 | pBuf += 10; |
| 18167 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->time_error, 5); |
| 18168 | *pnConsumed += 5; |
| 18169 | /* fieldsEndFlag = 1 */ |
| 18170 | break; |
| 18171 | } |
| 18172 | (void)pCtx; |
| 18173 | if (pIeLen) { |
| 18174 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18175 | } |
| 18176 | return DOT11F_PARSE_SUCCESS; |
| 18177 | } /* End dot11f_pack_ie_time_advertisement. */ |
| 18178 | |
| 18179 | uint32_t dot11f_pack_ie_timeout_interval(tpAniSirGlobal pCtx, |
| 18180 | tDot11fIETimeoutInterval *pSrc, |
| 18181 | uint8_t *pBuf, |
| 18182 | uint32_t nBuf, |
| 18183 | uint32_t *pnConsumed) |
| 18184 | { |
| 18185 | uint8_t *pIeLen = 0; |
| 18186 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18187 | uint32_t nNeeded = 0U; |
| 18188 | nNeeded += 5; |
| 18189 | while (pSrc->present) { |
| 18190 | if (nNeeded > nBuf) |
| 18191 | return DOT11F_BUFFER_OVERFLOW; |
| 18192 | *pBuf = 56; |
| 18193 | ++pBuf; ++(*pnConsumed); |
| 18194 | pIeLen = pBuf; |
| 18195 | ++pBuf; ++(*pnConsumed); |
| 18196 | *pBuf = pSrc->timeoutType; |
| 18197 | *pnConsumed += 1; |
| 18198 | pBuf += 1; |
| 18199 | frameshtonl(pCtx, pBuf, pSrc->timeoutValue, 0); |
| 18200 | *pnConsumed += 4; |
| 18201 | /* fieldsEndFlag = 1 */ |
| 18202 | break; |
| 18203 | } |
| 18204 | (void)pCtx; |
| 18205 | if (pIeLen) { |
| 18206 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18207 | } |
| 18208 | return DOT11F_PARSE_SUCCESS; |
| 18209 | } /* End dot11f_pack_ie_timeout_interval. */ |
| 18210 | |
| 18211 | uint32_t dot11f_pack_ie_vht_ext_bss_load(tpAniSirGlobal pCtx, |
| 18212 | tDot11fIEVHTExtBssLoad *pSrc, |
| 18213 | uint8_t *pBuf, |
| 18214 | uint32_t nBuf, |
| 18215 | uint32_t *pnConsumed) |
| 18216 | { |
| 18217 | uint8_t *pIeLen = 0; |
| 18218 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18219 | uint32_t nNeeded = 0U; |
| 18220 | nNeeded += 5; |
| 18221 | while (pSrc->present) { |
| 18222 | if (nNeeded > nBuf) |
| 18223 | return DOT11F_BUFFER_OVERFLOW; |
| 18224 | *pBuf = 193; |
| 18225 | ++pBuf; ++(*pnConsumed); |
| 18226 | pIeLen = pBuf; |
| 18227 | ++pBuf; ++(*pnConsumed); |
| 18228 | *pBuf = pSrc->muMIMOCapStaCount; |
| 18229 | *pnConsumed += 1; |
| 18230 | pBuf += 1; |
| 18231 | *pBuf = pSrc->ssUnderUtil; |
| 18232 | *pnConsumed += 1; |
| 18233 | pBuf += 1; |
| 18234 | *pBuf = pSrc->FortyMHzUtil; |
| 18235 | *pnConsumed += 1; |
| 18236 | pBuf += 1; |
| 18237 | *pBuf = pSrc->EightyMHzUtil; |
| 18238 | *pnConsumed += 1; |
| 18239 | pBuf += 1; |
| 18240 | *pBuf = pSrc->OneSixtyMHzUtil; |
| 18241 | *pnConsumed += 1; |
| 18242 | /* fieldsEndFlag = 1 */ |
| 18243 | break; |
| 18244 | } |
| 18245 | (void)pCtx; |
| 18246 | if (pIeLen) { |
| 18247 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18248 | } |
| 18249 | return DOT11F_PARSE_SUCCESS; |
| 18250 | } /* End dot11f_pack_ie_vht_ext_bss_load. */ |
| 18251 | |
| 18252 | uint32_t dot11f_pack_ie_vendor1_ie(tpAniSirGlobal pCtx, |
| 18253 | tDot11fIEVendor1IE *pSrc, |
| 18254 | uint8_t *pBuf, |
| 18255 | uint32_t nBuf, |
| 18256 | uint32_t *pnConsumed) |
| 18257 | { |
| 18258 | uint8_t *pIeLen = 0; |
| 18259 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18260 | uint32_t nNeeded = 0U; |
| 18261 | nNeeded += 0; |
| 18262 | while (pSrc->present) { |
| 18263 | if (nNeeded > nBuf) |
| 18264 | return DOT11F_BUFFER_OVERFLOW; |
| 18265 | *pBuf = 221; |
| 18266 | ++pBuf; ++(*pnConsumed); |
| 18267 | pIeLen = pBuf; |
| 18268 | ++pBuf; ++(*pnConsumed); |
| 18269 | *pBuf = 0x0; |
| 18270 | ++pBuf; ++(*pnConsumed); |
| 18271 | *pBuf = 0x10; |
| 18272 | ++pBuf; ++(*pnConsumed); |
| 18273 | *pBuf = 0x18; |
| 18274 | ++pBuf; ++(*pnConsumed); |
| 18275 | break; |
| 18276 | } |
| 18277 | (void)pCtx; |
| 18278 | if (pIeLen) { |
| 18279 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18280 | } |
| 18281 | return DOT11F_PARSE_SUCCESS; |
| 18282 | } /* End dot11f_pack_ie_vendor1_ie. */ |
| 18283 | |
| 18284 | uint32_t dot11f_pack_ie_vendor3_ie(tpAniSirGlobal pCtx, |
| 18285 | tDot11fIEVendor3IE *pSrc, |
| 18286 | uint8_t *pBuf, |
| 18287 | uint32_t nBuf, |
| 18288 | uint32_t *pnConsumed) |
| 18289 | { |
| 18290 | uint8_t *pIeLen = 0; |
| 18291 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18292 | uint32_t nNeeded = 0U; |
| 18293 | nNeeded += 0; |
| 18294 | while (pSrc->present) { |
| 18295 | if (nNeeded > nBuf) |
| 18296 | return DOT11F_BUFFER_OVERFLOW; |
| 18297 | *pBuf = 221; |
| 18298 | ++pBuf; ++(*pnConsumed); |
| 18299 | pIeLen = pBuf; |
| 18300 | ++pBuf; ++(*pnConsumed); |
| 18301 | *pBuf = 0x0; |
| 18302 | ++pBuf; ++(*pnConsumed); |
| 18303 | *pBuf = 0x16; |
| 18304 | ++pBuf; ++(*pnConsumed); |
| 18305 | *pBuf = 0x32; |
| 18306 | ++pBuf; ++(*pnConsumed); |
| 18307 | break; |
| 18308 | } |
| 18309 | (void)pCtx; |
| 18310 | if (pIeLen) { |
| 18311 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18312 | } |
| 18313 | return DOT11F_PARSE_SUCCESS; |
| 18314 | } /* End dot11f_pack_ie_vendor3_ie. */ |
| 18315 | |
| 18316 | uint32_t dot11f_pack_ie_wapi(tpAniSirGlobal pCtx, |
| 18317 | tDot11fIEWAPI *pSrc, |
| 18318 | uint8_t *pBuf, |
| 18319 | uint32_t nBuf, |
| 18320 | uint32_t *pnConsumed) |
| 18321 | { |
| 18322 | uint8_t *pIeLen = 0; |
| 18323 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18324 | uint32_t nNeeded = 0U; |
| 18325 | uint16_t tmp119__; |
| 18326 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 18327 | status = dot11f_get_packed_iewapi(pCtx, pSrc, &nNeeded); |
| 18328 | if (!DOT11F_SUCCEEDED(status)) |
| 18329 | return status; |
| 18330 | while (pSrc->present) { |
| 18331 | if (nNeeded > nBuf) |
| 18332 | return DOT11F_BUFFER_OVERFLOW; |
| 18333 | *pBuf = 68; |
| 18334 | ++pBuf; ++(*pnConsumed); |
| 18335 | pIeLen = pBuf; |
| 18336 | ++pBuf; ++(*pnConsumed); |
| 18337 | frameshtons(pCtx, pBuf, pSrc->version, 0); |
| 18338 | *pnConsumed += 2; |
| 18339 | pBuf += 2; |
| 18340 | frameshtons(pCtx, pBuf, pSrc->akm_suite_count, 0); |
| 18341 | *pnConsumed += 2; |
| 18342 | pBuf += 2; |
| 18343 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->akm_suites), (pSrc->akm_suite_count * 4)); |
| 18344 | *pnConsumed += (pSrc->akm_suite_count * 4); |
| 18345 | pBuf += (pSrc->akm_suite_count * 4); |
| 18346 | frameshtons(pCtx, pBuf, pSrc->unicast_cipher_suite_count, 0); |
| 18347 | *pnConsumed += 2; |
| 18348 | pBuf += 2; |
| 18349 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->unicast_cipher_suites), (pSrc->unicast_cipher_suite_count * 4)); |
| 18350 | *pnConsumed += (pSrc->unicast_cipher_suite_count * 4); |
| 18351 | pBuf += (pSrc->unicast_cipher_suite_count * 4); |
| 18352 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->multicast_cipher_suite, 4); |
| 18353 | *pnConsumed += 4; |
| 18354 | pBuf += 4; |
| 18355 | tmp119__ = 0U; |
| 18356 | tmp119__ |= (pSrc->preauth << 0); |
| 18357 | tmp119__ |= (pSrc->reserved << 1); |
| 18358 | frameshtons(pCtx, pBuf, tmp119__, 0); |
| 18359 | *pnConsumed += 2; |
| 18360 | pBuf += 2; |
| 18361 | nBuf -= 2 ; |
| 18362 | if (pSrc->bkid_count) { |
| 18363 | frameshtons(pCtx, pBuf, pSrc->bkid_count, 0); |
| 18364 | *pnConsumed += 2; |
| 18365 | pBuf += 2; |
| 18366 | } else { |
| 18367 | break; |
| 18368 | } |
| 18369 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->bkid), (pSrc->bkid_count * 16)); |
| 18370 | *pnConsumed += (pSrc->bkid_count * 16); |
| 18371 | /* fieldsEndFlag = 1 */ |
| 18372 | break; |
| 18373 | } |
| 18374 | (void)pCtx; |
| 18375 | if (pIeLen) { |
| 18376 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18377 | } |
| 18378 | return status; |
| 18379 | } /* End dot11f_pack_ie_wapi. */ |
| 18380 | |
| 18381 | uint32_t dot11f_pack_ie_wapi_opaque(tpAniSirGlobal pCtx, |
| 18382 | tDot11fIEWAPIOpaque *pSrc, |
| 18383 | uint8_t *pBuf, |
| 18384 | uint32_t nBuf, |
| 18385 | uint32_t *pnConsumed) |
| 18386 | { |
| 18387 | uint8_t *pIeLen = 0; |
| 18388 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18389 | uint32_t nNeeded = 0U; |
| 18390 | nNeeded += pSrc->num_data; |
| 18391 | while (pSrc->present) { |
| 18392 | if (nNeeded > nBuf) |
| 18393 | return DOT11F_BUFFER_OVERFLOW; |
| 18394 | *pBuf = 68; |
| 18395 | ++pBuf; ++(*pnConsumed); |
| 18396 | pIeLen = pBuf; |
| 18397 | ++pBuf; ++(*pnConsumed); |
| 18398 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data); |
| 18399 | *pnConsumed += pSrc->num_data; |
| 18400 | /* fieldsEndFlag = 1 */ |
| 18401 | break; |
| 18402 | } |
| 18403 | (void)pCtx; |
| 18404 | if (pIeLen) { |
| 18405 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18406 | } |
| 18407 | return DOT11F_PARSE_SUCCESS; |
| 18408 | } /* End dot11f_pack_ie_wapi_opaque. */ |
| 18409 | |
| 18410 | uint32_t dot11f_pack_ie_wfatpc(tpAniSirGlobal pCtx, |
| 18411 | tDot11fIEWFATPC *pSrc, |
| 18412 | uint8_t *pBuf, |
| 18413 | uint32_t nBuf, |
| 18414 | uint32_t *pnConsumed) |
| 18415 | { |
| 18416 | uint8_t *pIeLen = 0; |
| 18417 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18418 | uint32_t nNeeded = 0U; |
| 18419 | nNeeded += 2; |
| 18420 | while (pSrc->present) { |
| 18421 | if (nNeeded > nBuf) |
| 18422 | return DOT11F_BUFFER_OVERFLOW; |
| 18423 | *pBuf = 221; |
| 18424 | ++pBuf; ++(*pnConsumed); |
| 18425 | pIeLen = pBuf; |
| 18426 | ++pBuf; ++(*pnConsumed); |
| 18427 | *pBuf = 0x0; |
| 18428 | ++pBuf; ++(*pnConsumed); |
| 18429 | *pBuf = 0x50; |
| 18430 | ++pBuf; ++(*pnConsumed); |
| 18431 | *pBuf = 0xf2; |
| 18432 | ++pBuf; ++(*pnConsumed); |
| 18433 | *pBuf = 0x8; |
| 18434 | ++pBuf; ++(*pnConsumed); |
| 18435 | *pBuf = 0x0; |
| 18436 | ++pBuf; ++(*pnConsumed); |
| 18437 | *pBuf = pSrc->txPower; |
| 18438 | *pnConsumed += 1; |
| 18439 | pBuf += 1; |
| 18440 | *pBuf = pSrc->linkMargin; |
| 18441 | *pnConsumed += 1; |
| 18442 | /* fieldsEndFlag = 1 */ |
| 18443 | break; |
| 18444 | } |
| 18445 | (void)pCtx; |
| 18446 | if (pIeLen) { |
| 18447 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18448 | } |
| 18449 | return DOT11F_PARSE_SUCCESS; |
| 18450 | } /* End dot11f_pack_ie_wfatpc. */ |
| 18451 | |
| 18452 | uint32_t dot11f_pack_ie_wfdie_opaque(tpAniSirGlobal pCtx, |
| 18453 | tDot11fIEWFDIEOpaque *pSrc, |
| 18454 | uint8_t *pBuf, |
| 18455 | uint32_t nBuf, |
| 18456 | uint32_t *pnConsumed) |
| 18457 | { |
| 18458 | uint8_t *pIeLen = 0; |
| 18459 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18460 | uint32_t nNeeded = 0U; |
| 18461 | nNeeded += pSrc->num_data; |
| 18462 | while (pSrc->present) { |
| 18463 | if (nNeeded > nBuf) |
| 18464 | return DOT11F_BUFFER_OVERFLOW; |
| 18465 | *pBuf = 221; |
| 18466 | ++pBuf; ++(*pnConsumed); |
| 18467 | pIeLen = pBuf; |
| 18468 | ++pBuf; ++(*pnConsumed); |
| 18469 | *pBuf = 0x50; |
| 18470 | ++pBuf; ++(*pnConsumed); |
| 18471 | *pBuf = 0x6f; |
| 18472 | ++pBuf; ++(*pnConsumed); |
| 18473 | *pBuf = 0x9a; |
| 18474 | ++pBuf; ++(*pnConsumed); |
| 18475 | *pBuf = 0xa; |
| 18476 | ++pBuf; ++(*pnConsumed); |
| 18477 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data); |
| 18478 | *pnConsumed += pSrc->num_data; |
| 18479 | /* fieldsEndFlag = 1 */ |
| 18480 | break; |
| 18481 | } |
| 18482 | (void)pCtx; |
| 18483 | if (pIeLen) { |
| 18484 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18485 | } |
| 18486 | return DOT11F_PARSE_SUCCESS; |
| 18487 | } /* End dot11f_pack_ie_wfdie_opaque. */ |
| 18488 | |
| 18489 | uint32_t dot11f_pack_ie_wmm_caps(tpAniSirGlobal pCtx, |
| 18490 | tDot11fIEWMMCaps *pSrc, |
| 18491 | uint8_t *pBuf, |
| 18492 | uint32_t nBuf, |
| 18493 | uint32_t *pnConsumed) |
| 18494 | { |
| 18495 | uint8_t *pIeLen = 0; |
| 18496 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18497 | uint32_t nNeeded = 0U; |
| 18498 | uint8_t tmp120__; |
| 18499 | nNeeded += 2; |
| 18500 | while (pSrc->present) { |
| 18501 | if (nNeeded > nBuf) |
| 18502 | return DOT11F_BUFFER_OVERFLOW; |
| 18503 | *pBuf = 221; |
| 18504 | ++pBuf; ++(*pnConsumed); |
| 18505 | pIeLen = pBuf; |
| 18506 | ++pBuf; ++(*pnConsumed); |
| 18507 | *pBuf = 0x0; |
| 18508 | ++pBuf; ++(*pnConsumed); |
| 18509 | *pBuf = 0x50; |
| 18510 | ++pBuf; ++(*pnConsumed); |
| 18511 | *pBuf = 0xf2; |
| 18512 | ++pBuf; ++(*pnConsumed); |
| 18513 | *pBuf = 0x2; |
| 18514 | ++pBuf; ++(*pnConsumed); |
| 18515 | *pBuf = 0x5; |
| 18516 | ++pBuf; ++(*pnConsumed); |
| 18517 | *pBuf = pSrc->version; |
| 18518 | *pnConsumed += 1; |
| 18519 | pBuf += 1; |
| 18520 | tmp120__ = 0U; |
| 18521 | tmp120__ |= (pSrc->reserved << 0); |
| 18522 | tmp120__ |= (pSrc->qack << 4); |
| 18523 | tmp120__ |= (pSrc->queue_request << 5); |
| 18524 | tmp120__ |= (pSrc->txop_request << 6); |
| 18525 | tmp120__ |= (pSrc->more_ack << 7); |
| 18526 | *pBuf = tmp120__; |
| 18527 | *pnConsumed += 1; |
| 18528 | /* fieldsEndFlag = 1 */ |
| 18529 | nBuf -= 1 ; |
| 18530 | break; |
| 18531 | } |
| 18532 | (void)pCtx; |
| 18533 | if (pIeLen) { |
| 18534 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18535 | } |
| 18536 | return DOT11F_PARSE_SUCCESS; |
| 18537 | } /* End dot11f_pack_ie_wmm_caps. */ |
| 18538 | |
| 18539 | uint32_t dot11f_pack_ie_wmm_info_ap(tpAniSirGlobal pCtx, |
| 18540 | tDot11fIEWMMInfoAp *pSrc, |
| 18541 | uint8_t *pBuf, |
| 18542 | uint32_t nBuf, |
| 18543 | uint32_t *pnConsumed) |
| 18544 | { |
| 18545 | uint8_t *pIeLen = 0; |
| 18546 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18547 | uint32_t nNeeded = 0U; |
| 18548 | uint8_t tmp121__; |
| 18549 | nNeeded += 2; |
| 18550 | while (pSrc->present) { |
| 18551 | if (nNeeded > nBuf) |
| 18552 | return DOT11F_BUFFER_OVERFLOW; |
| 18553 | *pBuf = 221; |
| 18554 | ++pBuf; ++(*pnConsumed); |
| 18555 | pIeLen = pBuf; |
| 18556 | ++pBuf; ++(*pnConsumed); |
| 18557 | *pBuf = 0x0; |
| 18558 | ++pBuf; ++(*pnConsumed); |
| 18559 | *pBuf = 0x50; |
| 18560 | ++pBuf; ++(*pnConsumed); |
| 18561 | *pBuf = 0xf2; |
| 18562 | ++pBuf; ++(*pnConsumed); |
| 18563 | *pBuf = 0x2; |
| 18564 | ++pBuf; ++(*pnConsumed); |
| 18565 | *pBuf = 0x0; |
| 18566 | ++pBuf; ++(*pnConsumed); |
| 18567 | *pBuf = pSrc->version; |
| 18568 | *pnConsumed += 1; |
| 18569 | pBuf += 1; |
| 18570 | tmp121__ = 0U; |
| 18571 | tmp121__ |= (pSrc->param_set_count << 0); |
| 18572 | tmp121__ |= (pSrc->reserved << 4); |
| 18573 | tmp121__ |= (pSrc->uapsd << 7); |
| 18574 | *pBuf = tmp121__; |
| 18575 | *pnConsumed += 1; |
| 18576 | /* fieldsEndFlag = 1 */ |
| 18577 | nBuf -= 1 ; |
| 18578 | break; |
| 18579 | } |
| 18580 | (void)pCtx; |
| 18581 | if (pIeLen) { |
| 18582 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18583 | } |
| 18584 | return DOT11F_PARSE_SUCCESS; |
| 18585 | } /* End dot11f_pack_ie_wmm_info_ap. */ |
| 18586 | |
| 18587 | uint32_t dot11f_pack_ie_wmm_info_station(tpAniSirGlobal pCtx, |
| 18588 | tDot11fIEWMMInfoStation *pSrc, |
| 18589 | uint8_t *pBuf, |
| 18590 | uint32_t nBuf, |
| 18591 | uint32_t *pnConsumed) |
| 18592 | { |
| 18593 | uint8_t *pIeLen = 0; |
| 18594 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18595 | uint32_t nNeeded = 0U; |
| 18596 | uint8_t tmp122__; |
| 18597 | nNeeded += 2; |
| 18598 | while (pSrc->present) { |
| 18599 | if (nNeeded > nBuf) |
| 18600 | return DOT11F_BUFFER_OVERFLOW; |
| 18601 | *pBuf = 221; |
| 18602 | ++pBuf; ++(*pnConsumed); |
| 18603 | pIeLen = pBuf; |
| 18604 | ++pBuf; ++(*pnConsumed); |
| 18605 | *pBuf = 0x0; |
| 18606 | ++pBuf; ++(*pnConsumed); |
| 18607 | *pBuf = 0x50; |
| 18608 | ++pBuf; ++(*pnConsumed); |
| 18609 | *pBuf = 0xf2; |
| 18610 | ++pBuf; ++(*pnConsumed); |
| 18611 | *pBuf = 0x2; |
| 18612 | ++pBuf; ++(*pnConsumed); |
| 18613 | *pBuf = 0x0; |
| 18614 | ++pBuf; ++(*pnConsumed); |
| 18615 | *pBuf = pSrc->version; |
| 18616 | *pnConsumed += 1; |
| 18617 | pBuf += 1; |
| 18618 | tmp122__ = 0U; |
| 18619 | tmp122__ |= (pSrc->acvo_uapsd << 0); |
| 18620 | tmp122__ |= (pSrc->acvi_uapsd << 1); |
| 18621 | tmp122__ |= (pSrc->acbk_uapsd << 2); |
| 18622 | tmp122__ |= (pSrc->acbe_uapsd << 3); |
| 18623 | tmp122__ |= (pSrc->reserved1 << 4); |
| 18624 | tmp122__ |= (pSrc->max_sp_length << 5); |
| 18625 | tmp122__ |= (pSrc->reserved2 << 7); |
| 18626 | *pBuf = tmp122__; |
| 18627 | *pnConsumed += 1; |
| 18628 | /* fieldsEndFlag = 1 */ |
| 18629 | nBuf -= 1 ; |
| 18630 | break; |
| 18631 | } |
| 18632 | (void)pCtx; |
| 18633 | if (pIeLen) { |
| 18634 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18635 | } |
| 18636 | return DOT11F_PARSE_SUCCESS; |
| 18637 | } /* End dot11f_pack_ie_wmm_info_station. */ |
| 18638 | |
| 18639 | uint32_t dot11f_pack_ie_wmm_params(tpAniSirGlobal pCtx, |
| 18640 | tDot11fIEWMMParams *pSrc, |
| 18641 | uint8_t *pBuf, |
| 18642 | uint32_t nBuf, |
| 18643 | uint32_t *pnConsumed) |
| 18644 | { |
| 18645 | uint8_t *pIeLen = 0; |
| 18646 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18647 | uint32_t nNeeded = 0U; |
| 18648 | uint8_t tmp123__; |
| 18649 | uint8_t tmp124__; |
| 18650 | uint8_t tmp125__; |
| 18651 | uint8_t tmp126__; |
| 18652 | uint8_t tmp127__; |
| 18653 | uint8_t tmp128__; |
| 18654 | uint8_t tmp129__; |
| 18655 | uint8_t tmp130__; |
| 18656 | nNeeded += 19; |
| 18657 | while (pSrc->present) { |
| 18658 | if (nNeeded > nBuf) |
| 18659 | return DOT11F_BUFFER_OVERFLOW; |
| 18660 | *pBuf = 221; |
| 18661 | ++pBuf; ++(*pnConsumed); |
| 18662 | pIeLen = pBuf; |
| 18663 | ++pBuf; ++(*pnConsumed); |
| 18664 | *pBuf = 0x0; |
| 18665 | ++pBuf; ++(*pnConsumed); |
| 18666 | *pBuf = 0x50; |
| 18667 | ++pBuf; ++(*pnConsumed); |
| 18668 | *pBuf = 0xf2; |
| 18669 | ++pBuf; ++(*pnConsumed); |
| 18670 | *pBuf = 0x2; |
| 18671 | ++pBuf; ++(*pnConsumed); |
| 18672 | *pBuf = 0x1; |
| 18673 | ++pBuf; ++(*pnConsumed); |
| 18674 | *pBuf = pSrc->version; |
| 18675 | *pnConsumed += 1; |
| 18676 | pBuf += 1; |
| 18677 | *pBuf = pSrc->qosInfo; |
| 18678 | *pnConsumed += 1; |
| 18679 | pBuf += 1; |
| 18680 | *pBuf = pSrc->reserved2; |
| 18681 | *pnConsumed += 1; |
| 18682 | pBuf += 1; |
| 18683 | tmp123__ = 0U; |
| 18684 | tmp123__ |= (pSrc->acbe_aifsn << 0); |
| 18685 | tmp123__ |= (pSrc->acbe_acm << 4); |
| 18686 | tmp123__ |= (pSrc->acbe_aci << 5); |
| 18687 | tmp123__ |= (pSrc->unused1 << 7); |
| 18688 | *pBuf = tmp123__; |
| 18689 | *pnConsumed += 1; |
| 18690 | pBuf += 1; |
| 18691 | nBuf -= 1 ; |
| 18692 | tmp124__ = 0U; |
| 18693 | tmp124__ |= (pSrc->acbe_acwmin << 0); |
| 18694 | tmp124__ |= (pSrc->acbe_acwmax << 4); |
| 18695 | *pBuf = tmp124__; |
| 18696 | *pnConsumed += 1; |
| 18697 | pBuf += 1; |
| 18698 | nBuf -= 1 ; |
| 18699 | frameshtons(pCtx, pBuf, pSrc->acbe_txoplimit, 0); |
| 18700 | *pnConsumed += 2; |
| 18701 | pBuf += 2; |
| 18702 | tmp125__ = 0U; |
| 18703 | tmp125__ |= (pSrc->acbk_aifsn << 0); |
| 18704 | tmp125__ |= (pSrc->acbk_acm << 4); |
| 18705 | tmp125__ |= (pSrc->acbk_aci << 5); |
| 18706 | tmp125__ |= (pSrc->unused2 << 7); |
| 18707 | *pBuf = tmp125__; |
| 18708 | *pnConsumed += 1; |
| 18709 | pBuf += 1; |
| 18710 | nBuf -= 1 ; |
| 18711 | tmp126__ = 0U; |
| 18712 | tmp126__ |= (pSrc->acbk_acwmin << 0); |
| 18713 | tmp126__ |= (pSrc->acbk_acwmax << 4); |
| 18714 | *pBuf = tmp126__; |
| 18715 | *pnConsumed += 1; |
| 18716 | pBuf += 1; |
| 18717 | nBuf -= 1 ; |
| 18718 | frameshtons(pCtx, pBuf, pSrc->acbk_txoplimit, 0); |
| 18719 | *pnConsumed += 2; |
| 18720 | pBuf += 2; |
| 18721 | tmp127__ = 0U; |
| 18722 | tmp127__ |= (pSrc->acvi_aifsn << 0); |
| 18723 | tmp127__ |= (pSrc->acvi_acm << 4); |
| 18724 | tmp127__ |= (pSrc->acvi_aci << 5); |
| 18725 | tmp127__ |= (pSrc->unused3 << 7); |
| 18726 | *pBuf = tmp127__; |
| 18727 | *pnConsumed += 1; |
| 18728 | pBuf += 1; |
| 18729 | nBuf -= 1 ; |
| 18730 | tmp128__ = 0U; |
| 18731 | tmp128__ |= (pSrc->acvi_acwmin << 0); |
| 18732 | tmp128__ |= (pSrc->acvi_acwmax << 4); |
| 18733 | *pBuf = tmp128__; |
| 18734 | *pnConsumed += 1; |
| 18735 | pBuf += 1; |
| 18736 | nBuf -= 1 ; |
| 18737 | frameshtons(pCtx, pBuf, pSrc->acvi_txoplimit, 0); |
| 18738 | *pnConsumed += 2; |
| 18739 | pBuf += 2; |
| 18740 | tmp129__ = 0U; |
| 18741 | tmp129__ |= (pSrc->acvo_aifsn << 0); |
| 18742 | tmp129__ |= (pSrc->acvo_acm << 4); |
| 18743 | tmp129__ |= (pSrc->acvo_aci << 5); |
| 18744 | tmp129__ |= (pSrc->unused4 << 7); |
| 18745 | *pBuf = tmp129__; |
| 18746 | *pnConsumed += 1; |
| 18747 | pBuf += 1; |
| 18748 | nBuf -= 1 ; |
| 18749 | tmp130__ = 0U; |
| 18750 | tmp130__ |= (pSrc->acvo_acwmin << 0); |
| 18751 | tmp130__ |= (pSrc->acvo_acwmax << 4); |
| 18752 | *pBuf = tmp130__; |
| 18753 | *pnConsumed += 1; |
| 18754 | pBuf += 1; |
| 18755 | nBuf -= 1 ; |
| 18756 | frameshtons(pCtx, pBuf, pSrc->acvo_txoplimit, 0); |
| 18757 | *pnConsumed += 2; |
| 18758 | /* fieldsEndFlag = 1 */ |
| 18759 | break; |
| 18760 | } |
| 18761 | (void)pCtx; |
| 18762 | if (pIeLen) { |
| 18763 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18764 | } |
| 18765 | return DOT11F_PARSE_SUCCESS; |
| 18766 | } /* End dot11f_pack_ie_wmm_params. */ |
| 18767 | |
| 18768 | uint32_t dot11f_pack_ie_wpa(tpAniSirGlobal pCtx, |
| 18769 | tDot11fIEWPA *pSrc, |
| 18770 | uint8_t *pBuf, |
| 18771 | uint32_t nBuf, |
| 18772 | uint32_t *pnConsumed) |
| 18773 | { |
| 18774 | uint8_t *pIeLen = 0; |
| 18775 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18776 | uint32_t nNeeded = 0U; |
| 18777 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 18778 | status = dot11f_get_packed_iewpa(pCtx, pSrc, &nNeeded); |
| 18779 | if (!DOT11F_SUCCEEDED(status)) |
| 18780 | return status; |
| 18781 | while (pSrc->present) { |
| 18782 | if (nNeeded > nBuf) |
| 18783 | return DOT11F_BUFFER_OVERFLOW; |
| 18784 | *pBuf = 221; |
| 18785 | ++pBuf; ++(*pnConsumed); |
| 18786 | pIeLen = pBuf; |
| 18787 | ++pBuf; ++(*pnConsumed); |
| 18788 | *pBuf = 0x0; |
| 18789 | ++pBuf; ++(*pnConsumed); |
| 18790 | *pBuf = 0x50; |
| 18791 | ++pBuf; ++(*pnConsumed); |
| 18792 | *pBuf = 0xf2; |
| 18793 | ++pBuf; ++(*pnConsumed); |
| 18794 | *pBuf = 0x1; |
| 18795 | ++pBuf; ++(*pnConsumed); |
| 18796 | frameshtons(pCtx, pBuf, pSrc->version, 0); |
| 18797 | *pnConsumed += 2; |
| 18798 | pBuf += 2; |
| 18799 | if (pSrc->multicast_cipher_present) { |
| 18800 | DOT11F_MEMCPY(pCtx, pBuf, pSrc->multicast_cipher, 4); |
| 18801 | *pnConsumed += 4; |
| 18802 | pBuf += 4; |
| 18803 | } else { |
| 18804 | break; |
| 18805 | } |
| 18806 | if (pSrc->unicast_cipher_count) { |
| 18807 | frameshtons(pCtx, pBuf, pSrc->unicast_cipher_count, 0); |
| 18808 | *pnConsumed += 2; |
| 18809 | pBuf += 2; |
| 18810 | } else { |
| 18811 | break; |
| 18812 | } |
| 18813 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->unicast_ciphers), (pSrc->unicast_cipher_count * 4)); |
| 18814 | *pnConsumed += (pSrc->unicast_cipher_count * 4); |
| 18815 | pBuf += (pSrc->unicast_cipher_count * 4); |
| 18816 | if (pSrc->auth_suite_count) { |
| 18817 | frameshtons(pCtx, pBuf, pSrc->auth_suite_count, 0); |
| 18818 | *pnConsumed += 2; |
| 18819 | pBuf += 2; |
| 18820 | } else { |
| 18821 | break; |
| 18822 | } |
| 18823 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->auth_suites), (pSrc->auth_suite_count * 4)); |
| 18824 | *pnConsumed += (pSrc->auth_suite_count * 4); |
| 18825 | pBuf += (pSrc->auth_suite_count * 4); |
| 18826 | if (pSrc->caps) { |
| 18827 | frameshtons(pCtx, pBuf, pSrc->caps, 0); |
| 18828 | *pnConsumed += 2; |
| 18829 | /* fieldsEndFlag = 1 */ |
| 18830 | } else { |
| 18831 | break; |
| 18832 | } |
| 18833 | break; |
| 18834 | } |
| 18835 | (void)pCtx; |
| 18836 | if (pIeLen) { |
| 18837 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18838 | } |
| 18839 | return status; |
| 18840 | } /* End dot11f_pack_ie_wpa. */ |
| 18841 | |
| 18842 | uint32_t dot11f_pack_ie_wpa_opaque(tpAniSirGlobal pCtx, |
| 18843 | tDot11fIEWPAOpaque *pSrc, |
| 18844 | uint8_t *pBuf, |
| 18845 | uint32_t nBuf, |
| 18846 | uint32_t *pnConsumed) |
| 18847 | { |
| 18848 | uint8_t *pIeLen = 0; |
| 18849 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 18850 | uint32_t nNeeded = 0U; |
| 18851 | nNeeded += pSrc->num_data; |
| 18852 | while (pSrc->present) { |
| 18853 | if (nNeeded > nBuf) |
| 18854 | return DOT11F_BUFFER_OVERFLOW; |
| 18855 | *pBuf = 221; |
| 18856 | ++pBuf; ++(*pnConsumed); |
| 18857 | pIeLen = pBuf; |
| 18858 | ++pBuf; ++(*pnConsumed); |
| 18859 | *pBuf = 0x0; |
| 18860 | ++pBuf; ++(*pnConsumed); |
| 18861 | *pBuf = 0x50; |
| 18862 | ++pBuf; ++(*pnConsumed); |
| 18863 | *pBuf = 0xf2; |
| 18864 | ++pBuf; ++(*pnConsumed); |
| 18865 | *pBuf = 0x1; |
| 18866 | ++pBuf; ++(*pnConsumed); |
| 18867 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data); |
| 18868 | *pnConsumed += pSrc->num_data; |
| 18869 | /* fieldsEndFlag = 1 */ |
| 18870 | break; |
| 18871 | } |
| 18872 | (void)pCtx; |
| 18873 | if (pIeLen) { |
| 18874 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 18875 | } |
| 18876 | return DOT11F_PARSE_SUCCESS; |
| 18877 | } /* End dot11f_pack_ie_wpa_opaque. */ |
| 18878 | |
| 18879 | uint32_t dot11f_pack_ie_wsc(tpAniSirGlobal pCtx, |
| 18880 | tDot11fIEWSC *pSrc, |
| 18881 | uint8_t *pBuf, |
| 18882 | uint32_t nBuf, |
| 18883 | uint32_t *pnConsumed) |
| 18884 | { |
| 18885 | uint8_t *pIeLen = 0; |
| 18886 | uint32_t n, idx = 0, idxlast; |
| 18887 | uint32_t nConsumedSoFar, nConsumedNow; |
| 18888 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 18889 | uint32_t nNeeded = 0U; |
| 18890 | status = dot11f_get_packed_iewsc(pCtx, pSrc, &nNeeded); |
| 18891 | if (!DOT11F_SUCCEEDED(status)) |
| 18892 | return status; |
| 18893 | if (nNeeded > nBuf) |
| 18894 | return DOT11F_BUFFER_OVERFLOW; |
| 18895 | (void)pCtx; |
| 18896 | if (pSrc->present) { |
| 18897 | do { |
| 18898 | nConsumedSoFar = *pnConsumed; |
| 18899 | *pBuf = 221; |
| 18900 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18901 | pIeLen = pBuf; |
| 18902 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18903 | *pBuf = 0x0; |
| 18904 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18905 | *pBuf = 0x50; |
| 18906 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18907 | *pBuf = 0xf2; |
| 18908 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18909 | *pBuf = 0x4; |
| 18910 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18911 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 18912 | nConsumedNow = *pnConsumed; |
| 18913 | idxlast = idx; |
| 18914 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 18915 | pnConsumed, |
| 18916 | TLVS_WSC + |
| 18917 | idx, &idx); |
| 18918 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 18919 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 18920 | pBuf += nConsumedNow; |
| 18921 | nBuf -= nConsumedNow; |
| 18922 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 18923 | } |
| 18924 | return status; |
| 18925 | } /* End dot11f_pack_ie_wsc. */ |
| 18926 | |
| 18927 | uint32_t dot11f_pack_ie_wsc_assoc_req(tpAniSirGlobal pCtx, |
| 18928 | tDot11fIEWscAssocReq *pSrc, |
| 18929 | uint8_t *pBuf, |
| 18930 | uint32_t nBuf, |
| 18931 | uint32_t *pnConsumed) |
| 18932 | { |
| 18933 | uint8_t *pIeLen = 0; |
| 18934 | uint32_t n, idx = 0, idxlast; |
| 18935 | uint32_t nConsumedSoFar, nConsumedNow; |
| 18936 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 18937 | uint32_t nNeeded = 0U; |
| 18938 | status = dot11f_get_packed_ie_wsc_assoc_req(pCtx, pSrc, &nNeeded); |
| 18939 | if (!DOT11F_SUCCEEDED(status)) |
| 18940 | return status; |
| 18941 | if (nNeeded > nBuf) |
| 18942 | return DOT11F_BUFFER_OVERFLOW; |
| 18943 | (void)pCtx; |
| 18944 | if (pSrc->present) { |
| 18945 | do { |
| 18946 | nConsumedSoFar = *pnConsumed; |
| 18947 | *pBuf = 221; |
| 18948 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18949 | pIeLen = pBuf; |
| 18950 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18951 | *pBuf = 0x0; |
| 18952 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18953 | *pBuf = 0x50; |
| 18954 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18955 | *pBuf = 0xf2; |
| 18956 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18957 | *pBuf = 0x4; |
| 18958 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18959 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 18960 | nConsumedNow = *pnConsumed; |
| 18961 | idxlast = idx; |
| 18962 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 18963 | pnConsumed, |
| 18964 | TLVS_WscAssocReq + |
| 18965 | idx, &idx); |
| 18966 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 18967 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 18968 | pBuf += nConsumedNow; |
| 18969 | nBuf -= nConsumedNow; |
| 18970 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 18971 | } |
| 18972 | return status; |
| 18973 | } /* End dot11f_pack_ie_wsc_assoc_req. */ |
| 18974 | |
| 18975 | uint32_t dot11f_pack_ie_wsc_assoc_res(tpAniSirGlobal pCtx, |
| 18976 | tDot11fIEWscAssocRes *pSrc, |
| 18977 | uint8_t *pBuf, |
| 18978 | uint32_t nBuf, |
| 18979 | uint32_t *pnConsumed) |
| 18980 | { |
| 18981 | uint8_t *pIeLen = 0; |
| 18982 | uint32_t n, idx = 0, idxlast; |
| 18983 | uint32_t nConsumedSoFar, nConsumedNow; |
| 18984 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 18985 | uint32_t nNeeded = 0U; |
| 18986 | status = dot11f_get_packed_ie_wsc_assoc_res(pCtx, pSrc, &nNeeded); |
| 18987 | if (!DOT11F_SUCCEEDED(status)) |
| 18988 | return status; |
| 18989 | if (nNeeded > nBuf) |
| 18990 | return DOT11F_BUFFER_OVERFLOW; |
| 18991 | (void)pCtx; |
| 18992 | if (pSrc->present) { |
| 18993 | do { |
| 18994 | nConsumedSoFar = *pnConsumed; |
| 18995 | *pBuf = 221; |
| 18996 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18997 | pIeLen = pBuf; |
| 18998 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 18999 | *pBuf = 0x0; |
| 19000 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19001 | *pBuf = 0x50; |
| 19002 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19003 | *pBuf = 0xf2; |
| 19004 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19005 | *pBuf = 0x4; |
| 19006 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19007 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 19008 | nConsumedNow = *pnConsumed; |
| 19009 | idxlast = idx; |
| 19010 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 19011 | pnConsumed, |
| 19012 | TLVS_WscAssocRes + |
| 19013 | idx, &idx); |
| 19014 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 19015 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 19016 | pBuf += nConsumedNow; |
| 19017 | nBuf -= nConsumedNow; |
| 19018 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 19019 | } |
| 19020 | return status; |
| 19021 | } /* End dot11f_pack_ie_wsc_assoc_res. */ |
| 19022 | |
| 19023 | uint32_t dot11f_pack_ie_wsc_beacon(tpAniSirGlobal pCtx, |
| 19024 | tDot11fIEWscBeacon *pSrc, |
| 19025 | uint8_t *pBuf, |
| 19026 | uint32_t nBuf, |
| 19027 | uint32_t *pnConsumed) |
| 19028 | { |
| 19029 | uint8_t *pIeLen = 0; |
| 19030 | uint32_t n, idx = 0, idxlast; |
| 19031 | uint32_t nConsumedSoFar, nConsumedNow; |
| 19032 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 19033 | uint32_t nNeeded = 0U; |
| 19034 | status = dot11f_get_packed_ie_wsc_beacon(pCtx, pSrc, &nNeeded); |
| 19035 | if (!DOT11F_SUCCEEDED(status)) |
| 19036 | return status; |
| 19037 | if (nNeeded > nBuf) |
| 19038 | return DOT11F_BUFFER_OVERFLOW; |
| 19039 | (void)pCtx; |
| 19040 | if (pSrc->present) { |
| 19041 | do { |
| 19042 | nConsumedSoFar = *pnConsumed; |
| 19043 | *pBuf = 221; |
| 19044 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19045 | pIeLen = pBuf; |
| 19046 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19047 | *pBuf = 0x0; |
| 19048 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19049 | *pBuf = 0x50; |
| 19050 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19051 | *pBuf = 0xf2; |
| 19052 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19053 | *pBuf = 0x4; |
| 19054 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19055 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 19056 | nConsumedNow = *pnConsumed; |
| 19057 | idxlast = idx; |
| 19058 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 19059 | pnConsumed, |
| 19060 | TLVS_WscBeacon + |
| 19061 | idx, &idx); |
| 19062 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 19063 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 19064 | pBuf += nConsumedNow; |
| 19065 | nBuf -= nConsumedNow; |
| 19066 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 19067 | } |
| 19068 | return status; |
| 19069 | } /* End dot11f_pack_ie_wsc_beacon. */ |
| 19070 | |
| 19071 | uint32_t dot11f_pack_ie_wsc_beacon_probe_res(tpAniSirGlobal pCtx, |
| 19072 | tDot11fIEWscBeaconProbeRes *pSrc, |
| 19073 | uint8_t *pBuf, |
| 19074 | uint32_t nBuf, |
| 19075 | uint32_t *pnConsumed) |
| 19076 | { |
| 19077 | uint8_t *pIeLen = 0; |
| 19078 | uint32_t n, idx = 0, idxlast; |
| 19079 | uint32_t nConsumedSoFar, nConsumedNow; |
| 19080 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 19081 | uint32_t nNeeded = 0U; |
| 19082 | status = dot11f_get_packed_ie_wsc_beacon_probe_res(pCtx, pSrc, &nNeeded); |
| 19083 | if (!DOT11F_SUCCEEDED(status)) |
| 19084 | return status; |
| 19085 | if (nNeeded > nBuf) |
| 19086 | return DOT11F_BUFFER_OVERFLOW; |
| 19087 | (void)pCtx; |
| 19088 | if (pSrc->present) { |
| 19089 | do { |
| 19090 | nConsumedSoFar = *pnConsumed; |
| 19091 | *pBuf = 221; |
| 19092 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19093 | pIeLen = pBuf; |
| 19094 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19095 | *pBuf = 0x0; |
| 19096 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19097 | *pBuf = 0x50; |
| 19098 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19099 | *pBuf = 0xf2; |
| 19100 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19101 | *pBuf = 0x4; |
| 19102 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19103 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 19104 | nConsumedNow = *pnConsumed; |
| 19105 | idxlast = idx; |
| 19106 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 19107 | pnConsumed, |
| 19108 | TLVS_WscBeaconProbeRes + |
| 19109 | idx, &idx); |
| 19110 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 19111 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 19112 | pBuf += nConsumedNow; |
| 19113 | nBuf -= nConsumedNow; |
| 19114 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 19115 | } |
| 19116 | return status; |
| 19117 | } /* End dot11f_pack_ie_wsc_beacon_probe_res. */ |
| 19118 | |
| 19119 | uint32_t dot11f_pack_ie_wsc_ie_opaque(tpAniSirGlobal pCtx, |
| 19120 | tDot11fIEWscIEOpaque *pSrc, |
| 19121 | uint8_t *pBuf, |
| 19122 | uint32_t nBuf, |
| 19123 | uint32_t *pnConsumed) |
| 19124 | { |
| 19125 | uint8_t *pIeLen = 0; |
| 19126 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 19127 | uint32_t nNeeded = 0U; |
| 19128 | nNeeded += pSrc->num_data; |
| 19129 | while (pSrc->present) { |
| 19130 | if (nNeeded > nBuf) |
| 19131 | return DOT11F_BUFFER_OVERFLOW; |
| 19132 | *pBuf = 221; |
| 19133 | ++pBuf; ++(*pnConsumed); |
| 19134 | pIeLen = pBuf; |
| 19135 | ++pBuf; ++(*pnConsumed); |
| 19136 | *pBuf = 0x0; |
| 19137 | ++pBuf; ++(*pnConsumed); |
| 19138 | *pBuf = 0x50; |
| 19139 | ++pBuf; ++(*pnConsumed); |
| 19140 | *pBuf = 0xf2; |
| 19141 | ++pBuf; ++(*pnConsumed); |
| 19142 | *pBuf = 0x4; |
| 19143 | ++pBuf; ++(*pnConsumed); |
| 19144 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data); |
| 19145 | *pnConsumed += pSrc->num_data; |
| 19146 | /* fieldsEndFlag = 1 */ |
| 19147 | break; |
| 19148 | } |
| 19149 | (void)pCtx; |
| 19150 | if (pIeLen) { |
| 19151 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 19152 | } |
| 19153 | return DOT11F_PARSE_SUCCESS; |
| 19154 | } /* End dot11f_pack_ie_wsc_ie_opaque. */ |
| 19155 | |
| 19156 | uint32_t dot11f_pack_ie_wsc_probe_req(tpAniSirGlobal pCtx, |
| 19157 | tDot11fIEWscProbeReq *pSrc, |
| 19158 | uint8_t *pBuf, |
| 19159 | uint32_t nBuf, |
| 19160 | uint32_t *pnConsumed) |
| 19161 | { |
| 19162 | uint8_t *pIeLen = 0; |
| 19163 | uint32_t n, idx = 0, idxlast; |
| 19164 | uint32_t nConsumedSoFar, nConsumedNow; |
| 19165 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 19166 | uint32_t nNeeded = 0U; |
| 19167 | status = dot11f_get_packed_ie_wsc_probe_req(pCtx, pSrc, &nNeeded); |
| 19168 | if (!DOT11F_SUCCEEDED(status)) |
| 19169 | return status; |
| 19170 | if (nNeeded > nBuf) |
| 19171 | return DOT11F_BUFFER_OVERFLOW; |
| 19172 | (void)pCtx; |
| 19173 | if (pSrc->present) { |
| 19174 | do { |
| 19175 | nConsumedSoFar = *pnConsumed; |
| 19176 | *pBuf = 221; |
| 19177 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19178 | pIeLen = pBuf; |
| 19179 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19180 | *pBuf = 0x0; |
| 19181 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19182 | *pBuf = 0x50; |
| 19183 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19184 | *pBuf = 0xf2; |
| 19185 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19186 | *pBuf = 0x4; |
| 19187 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19188 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 19189 | nConsumedNow = *pnConsumed; |
| 19190 | idxlast = idx; |
| 19191 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 19192 | pnConsumed, |
| 19193 | TLVS_WscProbeReq + |
| 19194 | idx, &idx); |
| 19195 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 19196 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 19197 | pBuf += nConsumedNow; |
| 19198 | nBuf -= nConsumedNow; |
| 19199 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 19200 | } |
| 19201 | return status; |
| 19202 | } /* End dot11f_pack_ie_wsc_probe_req. */ |
| 19203 | |
| 19204 | uint32_t dot11f_pack_ie_wsc_probe_res(tpAniSirGlobal pCtx, |
| 19205 | tDot11fIEWscProbeRes *pSrc, |
| 19206 | uint8_t *pBuf, |
| 19207 | uint32_t nBuf, |
| 19208 | uint32_t *pnConsumed) |
| 19209 | { |
| 19210 | uint8_t *pIeLen = 0; |
| 19211 | uint32_t n, idx = 0, idxlast; |
| 19212 | uint32_t nConsumedSoFar, nConsumedNow; |
| 19213 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 19214 | uint32_t nNeeded = 0U; |
| 19215 | status = dot11f_get_packed_ie_wsc_probe_res(pCtx, pSrc, &nNeeded); |
| 19216 | if (!DOT11F_SUCCEEDED(status)) |
| 19217 | return status; |
| 19218 | if (nNeeded > nBuf) |
| 19219 | return DOT11F_BUFFER_OVERFLOW; |
| 19220 | (void)pCtx; |
| 19221 | if (pSrc->present) { |
| 19222 | do { |
| 19223 | nConsumedSoFar = *pnConsumed; |
| 19224 | *pBuf = 221; |
| 19225 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19226 | pIeLen = pBuf; |
| 19227 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19228 | *pBuf = 0x0; |
| 19229 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19230 | *pBuf = 0x50; |
| 19231 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19232 | *pBuf = 0xf2; |
| 19233 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19234 | *pBuf = 0x4; |
| 19235 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19236 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 19237 | nConsumedNow = *pnConsumed; |
| 19238 | idxlast = idx; |
| 19239 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 19240 | pnConsumed, |
| 19241 | TLVS_WscProbeRes + |
| 19242 | idx, &idx); |
| 19243 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 19244 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 19245 | pBuf += nConsumedNow; |
| 19246 | nBuf -= nConsumedNow; |
| 19247 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 19248 | } |
| 19249 | return status; |
| 19250 | } /* End dot11f_pack_ie_wsc_probe_res. */ |
| 19251 | |
| 19252 | uint32_t dot11f_pack_ie_wsc_reassoc_res(tpAniSirGlobal pCtx, |
| 19253 | tDot11fIEWscReassocRes *pSrc, |
| 19254 | uint8_t *pBuf, |
| 19255 | uint32_t nBuf, |
| 19256 | uint32_t *pnConsumed) |
| 19257 | { |
| 19258 | uint8_t *pIeLen = 0; |
| 19259 | uint32_t n, idx = 0, idxlast; |
| 19260 | uint32_t nConsumedSoFar, nConsumedNow; |
| 19261 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 19262 | uint32_t nNeeded = 0U; |
| 19263 | status = dot11f_get_packed_ie_wsc_reassoc_res(pCtx, pSrc, &nNeeded); |
| 19264 | if (!DOT11F_SUCCEEDED(status)) |
| 19265 | return status; |
| 19266 | if (nNeeded > nBuf) |
| 19267 | return DOT11F_BUFFER_OVERFLOW; |
| 19268 | (void)pCtx; |
| 19269 | if (pSrc->present) { |
| 19270 | do { |
| 19271 | nConsumedSoFar = *pnConsumed; |
| 19272 | *pBuf = 221; |
| 19273 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19274 | pIeLen = pBuf; |
| 19275 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19276 | *pBuf = 0x0; |
| 19277 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19278 | *pBuf = 0x50; |
| 19279 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19280 | *pBuf = 0xf2; |
| 19281 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19282 | *pBuf = 0x4; |
| 19283 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19284 | n = (255 - 4) < nBuf ? (255 - 4) : nBuf; |
| 19285 | nConsumedNow = *pnConsumed; |
| 19286 | idxlast = idx; |
| 19287 | status = pack_tlv_core(pCtx, (uint8_t *)pSrc, pBuf, n, |
| 19288 | pnConsumed, |
| 19289 | TLVS_WscReassocRes + |
| 19290 | idx, &idx); |
| 19291 | nConsumedNow = *pnConsumed - nConsumedNow; |
| 19292 | *pIeLen = *pnConsumed - nConsumedSoFar - 2; |
| 19293 | pBuf += nConsumedNow; |
| 19294 | nBuf -= nConsumedNow; |
| 19295 | } while (DOT11F_BUFFER_OVERFLOW == status && idxlast != idx); |
| 19296 | } |
| 19297 | return status; |
| 19298 | } /* End dot11f_pack_ie_wsc_reassoc_res. */ |
| 19299 | |
| 19300 | uint32_t dot11f_pack_ie_ext_chan_switch_ann(tpAniSirGlobal pCtx, |
| 19301 | tDot11fIEext_chan_switch_ann *pSrc, |
| 19302 | uint8_t *pBuf, |
| 19303 | uint32_t nBuf, |
| 19304 | uint32_t *pnConsumed) |
| 19305 | { |
| 19306 | uint8_t *pIeLen = 0; |
| 19307 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 19308 | uint32_t nNeeded = 0U; |
| 19309 | nNeeded += 4; |
| 19310 | while (pSrc->present) { |
| 19311 | if (nNeeded > nBuf) |
| 19312 | return DOT11F_BUFFER_OVERFLOW; |
| 19313 | *pBuf = 60; |
| 19314 | ++pBuf; ++(*pnConsumed); |
| 19315 | pIeLen = pBuf; |
| 19316 | ++pBuf; ++(*pnConsumed); |
| 19317 | *pBuf = pSrc->switch_mode; |
| 19318 | *pnConsumed += 1; |
| 19319 | pBuf += 1; |
| 19320 | *pBuf = pSrc->new_reg_class; |
| 19321 | *pnConsumed += 1; |
| 19322 | pBuf += 1; |
| 19323 | *pBuf = pSrc->new_channel; |
| 19324 | *pnConsumed += 1; |
| 19325 | pBuf += 1; |
| 19326 | *pBuf = pSrc->switch_count; |
| 19327 | *pnConsumed += 1; |
| 19328 | /* fieldsEndFlag = 1 */ |
| 19329 | break; |
| 19330 | } |
| 19331 | (void)pCtx; |
| 19332 | if (pIeLen) { |
| 19333 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 19334 | } |
| 19335 | return DOT11F_PARSE_SUCCESS; |
| 19336 | } /* End dot11f_pack_ie_ext_chan_switch_ann. */ |
| 19337 | |
| 19338 | uint32_t dot11f_pack_ie_ht2040_bss_coexistence(tpAniSirGlobal pCtx, |
| 19339 | tDot11fIEht2040_bss_coexistence *pSrc, |
| 19340 | uint8_t *pBuf, |
| 19341 | uint32_t nBuf, |
| 19342 | uint32_t *pnConsumed) |
| 19343 | { |
| 19344 | uint8_t *pIeLen = 0; |
| 19345 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 19346 | uint32_t nNeeded = 0U; |
| 19347 | uint8_t tmp131__; |
| 19348 | nNeeded += 1; |
| 19349 | while (pSrc->present) { |
| 19350 | if (nNeeded > nBuf) |
| 19351 | return DOT11F_BUFFER_OVERFLOW; |
| 19352 | *pBuf = 72; |
| 19353 | ++pBuf; ++(*pnConsumed); |
| 19354 | pIeLen = pBuf; |
| 19355 | ++pBuf; ++(*pnConsumed); |
| 19356 | tmp131__ = 0U; |
| 19357 | tmp131__ |= (pSrc->info_request << 0); |
| 19358 | tmp131__ |= (pSrc->forty_mhz_intolerant << 1); |
| 19359 | tmp131__ |= (pSrc->twenty_mhz_bsswidth_req << 2); |
| 19360 | tmp131__ |= (pSrc->obss_scan_exemption_req << 3); |
| 19361 | tmp131__ |= (pSrc->obss_scan_exemption_grant << 4); |
| 19362 | tmp131__ |= (pSrc->unused << 5); |
| 19363 | *pBuf = tmp131__; |
| 19364 | *pnConsumed += 1; |
| 19365 | /* fieldsEndFlag = 1 */ |
| 19366 | nBuf -= 1 ; |
| 19367 | break; |
| 19368 | } |
| 19369 | (void)pCtx; |
| 19370 | if (pIeLen) { |
| 19371 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 19372 | } |
| 19373 | return DOT11F_PARSE_SUCCESS; |
| 19374 | } /* End dot11f_pack_ie_ht2040_bss_coexistence. */ |
| 19375 | |
| 19376 | uint32_t dot11f_pack_ie_ht2040_bss_intolerant_report(tpAniSirGlobal pCtx, |
| 19377 | tDot11fIEht2040_bss_intolerant_report *pSrc, |
| 19378 | uint8_t *pBuf, |
| 19379 | uint32_t nBuf, |
| 19380 | uint32_t *pnConsumed) |
| 19381 | { |
| 19382 | uint8_t *pIeLen = 0; |
| 19383 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 19384 | uint32_t nNeeded = 0U; |
| 19385 | nNeeded += (pSrc->num_channel_list + 1); |
| 19386 | while (pSrc->present) { |
| 19387 | if (nNeeded > nBuf) |
| 19388 | return DOT11F_BUFFER_OVERFLOW; |
| 19389 | *pBuf = 73; |
| 19390 | ++pBuf; ++(*pnConsumed); |
| 19391 | pIeLen = pBuf; |
| 19392 | ++pBuf; ++(*pnConsumed); |
| 19393 | *pBuf = pSrc->operating_class; |
| 19394 | *pnConsumed += 1; |
| 19395 | pBuf += 1; |
| 19396 | DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->channel_list), pSrc->num_channel_list); |
| 19397 | *pnConsumed += pSrc->num_channel_list; |
| 19398 | /* fieldsEndFlag = 1 */ |
| 19399 | break; |
| 19400 | } |
| 19401 | (void)pCtx; |
| 19402 | if (pIeLen) { |
| 19403 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 19404 | } |
| 19405 | return DOT11F_PARSE_SUCCESS; |
| 19406 | } /* End dot11f_pack_ie_ht2040_bss_intolerant_report. */ |
| 19407 | |
| 19408 | uint32_t dot11f_pack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx, |
| 19409 | tDot11fIEsec_chan_offset_ele *pSrc, |
| 19410 | uint8_t *pBuf, |
| 19411 | uint32_t nBuf, |
| 19412 | uint32_t *pnConsumed) |
| 19413 | { |
| 19414 | uint8_t *pIeLen = 0; |
| 19415 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 19416 | uint32_t nNeeded = 0U; |
| 19417 | nNeeded += 1; |
| 19418 | while (pSrc->present) { |
| 19419 | if (nNeeded > nBuf) |
| 19420 | return DOT11F_BUFFER_OVERFLOW; |
| 19421 | *pBuf = 62; |
| 19422 | ++pBuf; ++(*pnConsumed); |
| 19423 | pIeLen = pBuf; |
| 19424 | ++pBuf; ++(*pnConsumed); |
| 19425 | *pBuf = pSrc->secondaryChannelOffset; |
| 19426 | *pnConsumed += 1; |
| 19427 | /* fieldsEndFlag = 1 */ |
| 19428 | break; |
| 19429 | } |
| 19430 | (void)pCtx; |
| 19431 | if (pIeLen) { |
| 19432 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 19433 | } |
| 19434 | return DOT11F_PARSE_SUCCESS; |
| 19435 | } /* End dot11f_pack_ie_sec_chan_offset_ele. */ |
| 19436 | |
| 19437 | uint32_t dot11f_pack_ie_vendor2_ie(tpAniSirGlobal pCtx, |
| 19438 | tDot11fIEvendor2_ie *pSrc, |
| 19439 | uint8_t *pBuf, |
| 19440 | uint32_t nBuf, |
| 19441 | uint32_t *pnConsumed) |
| 19442 | { |
| 19443 | uint8_t *pIeLen = 0; |
| 19444 | uint32_t nConsumedOnEntry = *pnConsumed; |
| 19445 | uint32_t nNeeded = 0U; |
| 19446 | uint32_t status = DOT11F_PARSE_SUCCESS; |
| 19447 | status = dot11f_get_packed_ie_vendor2_ie(pCtx, pSrc, &nNeeded); |
| 19448 | if (!DOT11F_SUCCEEDED(status)) |
| 19449 | return status; |
| 19450 | while (pSrc->present) { |
| 19451 | if (nNeeded > nBuf) |
| 19452 | return DOT11F_BUFFER_OVERFLOW; |
| 19453 | *pBuf = 221; |
| 19454 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19455 | pIeLen = pBuf; |
| 19456 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19457 | *pBuf = 0x0; |
| 19458 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19459 | *pBuf = 0x90; |
| 19460 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19461 | *pBuf = 0x4c; |
| 19462 | ++pBuf; --nBuf; ++(*pnConsumed); |
| 19463 | *pBuf = pSrc->type; |
| 19464 | *pnConsumed += 1; |
| 19465 | pBuf += 1; |
| 19466 | *pBuf = pSrc->sub_type; |
| 19467 | *pnConsumed += 1; |
| 19468 | pBuf += 1; |
| 19469 | status = pack_core(pCtx, |
| 19470 | (uint8_t *)pSrc, |
| 19471 | pBuf, |
| 19472 | nBuf, |
| 19473 | pnConsumed, |
| 19474 | FFS_vendor2_ie, |
| 19475 | IES_vendor2_ie); |
| 19476 | break; |
| 19477 | } |
| 19478 | (void)pCtx; |
| 19479 | if (pIeLen) { |
| 19480 | *pIeLen = *pnConsumed - nConsumedOnEntry - 2; |
| 19481 | } |
| 19482 | return status; |
| 19483 | } /* End dot11f_pack_ie_vendor2_ie. */ |
| 19484 | |
| 19485 | uint32_t dot11f_pack_add_ts_request(tpAniSirGlobal pCtx, |
| 19486 | tDot11fAddTSRequest *pFrm, |
| 19487 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19488 | { |
| 19489 | uint32_t i = 0; |
| 19490 | uint32_t status = 0; |
| 19491 | (void)i; |
| 19492 | *pnConsumed = 0U; |
| 19493 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19494 | FFS_AddTSRequest, IES_AddTSRequest); |
| 19495 | |
| 19496 | return status; |
| 19497 | |
| 19498 | } /* End dot11f_unpack_add_ts_request. */ |
| 19499 | |
| 19500 | uint32_t dot11f_pack_add_ts_response(tpAniSirGlobal pCtx, |
| 19501 | tDot11fAddTSResponse *pFrm, |
| 19502 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19503 | { |
| 19504 | uint32_t i = 0; |
| 19505 | uint32_t status = 0; |
| 19506 | (void)i; |
| 19507 | *pnConsumed = 0U; |
| 19508 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19509 | FFS_AddTSResponse, IES_AddTSResponse); |
| 19510 | |
| 19511 | return status; |
| 19512 | |
| 19513 | } /* End dot11f_unpack_add_ts_response. */ |
| 19514 | |
| 19515 | uint32_t dot11f_pack_assoc_request(tpAniSirGlobal pCtx, |
| 19516 | tDot11fAssocRequest *pFrm, |
| 19517 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19518 | { |
| 19519 | uint32_t i = 0; |
| 19520 | uint32_t status = 0; |
| 19521 | (void)i; |
| 19522 | *pnConsumed = 0U; |
| 19523 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19524 | FFS_AssocRequest, IES_AssocRequest); |
| 19525 | |
| 19526 | return status; |
| 19527 | |
| 19528 | } /* End dot11f_unpack_assoc_request. */ |
| 19529 | |
| 19530 | uint32_t dot11f_pack_assoc_response(tpAniSirGlobal pCtx, |
| 19531 | tDot11fAssocResponse *pFrm, |
| 19532 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19533 | { |
| 19534 | uint32_t i = 0; |
| 19535 | uint32_t status = 0; |
| 19536 | (void)i; |
| 19537 | *pnConsumed = 0U; |
| 19538 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19539 | FFS_AssocResponse, IES_AssocResponse); |
| 19540 | |
| 19541 | return status; |
| 19542 | |
| 19543 | } /* End dot11f_unpack_assoc_response. */ |
| 19544 | |
| 19545 | uint32_t dot11f_pack_authentication(tpAniSirGlobal pCtx, |
| 19546 | tDot11fAuthentication *pFrm, |
| 19547 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19548 | { |
| 19549 | uint32_t i = 0; |
| 19550 | uint32_t status = 0; |
| 19551 | (void)i; |
| 19552 | *pnConsumed = 0U; |
| 19553 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19554 | FFS_Authentication, IES_Authentication); |
| 19555 | |
| 19556 | return status; |
| 19557 | |
| 19558 | } /* End dot11f_unpack_authentication. */ |
| 19559 | |
| 19560 | uint32_t dot11f_pack_beacon(tpAniSirGlobal pCtx, |
| 19561 | tDot11fBeacon *pFrm, |
| 19562 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19563 | { |
| 19564 | uint32_t i = 0; |
| 19565 | uint32_t status = 0; |
| 19566 | (void)i; |
| 19567 | *pnConsumed = 0U; |
| 19568 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19569 | FFS_Beacon, IES_Beacon); |
| 19570 | |
| 19571 | return status; |
| 19572 | |
| 19573 | } /* End dot11f_unpack_beacon. */ |
| 19574 | |
| 19575 | uint32_t dot11f_pack_beacon1(tpAniSirGlobal pCtx, |
| 19576 | tDot11fBeacon1 *pFrm, |
| 19577 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19578 | { |
| 19579 | uint32_t i = 0; |
| 19580 | uint32_t status = 0; |
| 19581 | (void)i; |
| 19582 | *pnConsumed = 0U; |
| 19583 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19584 | FFS_Beacon1, IES_Beacon1); |
| 19585 | |
| 19586 | return status; |
| 19587 | |
| 19588 | } /* End dot11f_unpack_beacon1. */ |
| 19589 | |
| 19590 | uint32_t dot11f_pack_beacon2(tpAniSirGlobal pCtx, |
| 19591 | tDot11fBeacon2 *pFrm, |
| 19592 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19593 | { |
| 19594 | uint32_t i = 0; |
| 19595 | uint32_t status = 0; |
| 19596 | (void)i; |
| 19597 | *pnConsumed = 0U; |
| 19598 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19599 | FFS_Beacon2, IES_Beacon2); |
| 19600 | |
| 19601 | return status; |
| 19602 | |
| 19603 | } /* End dot11f_unpack_beacon2. */ |
| 19604 | |
| 19605 | uint32_t dot11f_pack_beacon_i_es(tpAniSirGlobal pCtx, |
| 19606 | tDot11fBeaconIEs *pFrm, |
| 19607 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19608 | { |
| 19609 | uint32_t i = 0; |
| 19610 | uint32_t status = 0; |
| 19611 | (void)i; |
| 19612 | *pnConsumed = 0U; |
| 19613 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19614 | FFS_BeaconIEs, IES_BeaconIEs); |
| 19615 | |
| 19616 | return status; |
| 19617 | |
| 19618 | } /* End dot11f_unpack_beacon_i_es. */ |
| 19619 | |
| 19620 | uint32_t dot11f_pack_channel_switch(tpAniSirGlobal pCtx, |
| 19621 | tDot11fChannelSwitch *pFrm, |
| 19622 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19623 | { |
| 19624 | uint32_t i = 0; |
| 19625 | uint32_t status = 0; |
| 19626 | (void)i; |
| 19627 | *pnConsumed = 0U; |
| 19628 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19629 | FFS_ChannelSwitch, IES_ChannelSwitch); |
| 19630 | |
| 19631 | return status; |
| 19632 | |
| 19633 | } /* End dot11f_unpack_channel_switch. */ |
| 19634 | |
| 19635 | uint32_t dot11f_pack_de_auth(tpAniSirGlobal pCtx, |
| 19636 | tDot11fDeAuth *pFrm, |
| 19637 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19638 | { |
| 19639 | uint32_t i = 0; |
| 19640 | uint32_t status = 0; |
| 19641 | (void)i; |
| 19642 | *pnConsumed = 0U; |
| 19643 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19644 | FFS_DeAuth, IES_DeAuth); |
| 19645 | |
| 19646 | return status; |
| 19647 | |
| 19648 | } /* End dot11f_unpack_de_auth. */ |
| 19649 | |
| 19650 | uint32_t dot11f_pack_del_ts(tpAniSirGlobal pCtx, |
| 19651 | tDot11fDelTS *pFrm, |
| 19652 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19653 | { |
| 19654 | uint32_t i = 0; |
| 19655 | uint32_t status = 0; |
| 19656 | (void)i; |
| 19657 | *pnConsumed = 0U; |
| 19658 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19659 | FFS_DelTS, IES_DelTS); |
| 19660 | |
| 19661 | return status; |
| 19662 | |
| 19663 | } /* End dot11f_unpack_del_ts. */ |
| 19664 | |
| 19665 | uint32_t dot11f_pack_disassociation(tpAniSirGlobal pCtx, |
| 19666 | tDot11fDisassociation *pFrm, |
| 19667 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19668 | { |
| 19669 | uint32_t i = 0; |
| 19670 | uint32_t status = 0; |
| 19671 | (void)i; |
| 19672 | *pnConsumed = 0U; |
| 19673 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19674 | FFS_Disassociation, IES_Disassociation); |
| 19675 | |
| 19676 | return status; |
| 19677 | |
| 19678 | } /* End dot11f_unpack_disassociation. */ |
| 19679 | |
| 19680 | uint32_t dot11f_pack_link_measurement_report(tpAniSirGlobal pCtx, |
| 19681 | tDot11fLinkMeasurementReport *pFrm, |
| 19682 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19683 | { |
| 19684 | uint32_t i = 0; |
| 19685 | uint32_t status = 0; |
| 19686 | (void)i; |
| 19687 | *pnConsumed = 0U; |
| 19688 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19689 | FFS_LinkMeasurementReport, IES_LinkMeasurementReport); |
| 19690 | |
| 19691 | return status; |
| 19692 | |
| 19693 | } /* End dot11f_unpack_link_measurement_report. */ |
| 19694 | |
| 19695 | uint32_t dot11f_pack_link_measurement_request(tpAniSirGlobal pCtx, |
| 19696 | tDot11fLinkMeasurementRequest *pFrm, |
| 19697 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19698 | { |
| 19699 | uint32_t i = 0; |
| 19700 | uint32_t status = 0; |
| 19701 | (void)i; |
| 19702 | *pnConsumed = 0U; |
| 19703 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19704 | FFS_LinkMeasurementRequest, IES_LinkMeasurementRequest); |
| 19705 | |
| 19706 | return status; |
| 19707 | |
| 19708 | } /* End dot11f_unpack_link_measurement_request. */ |
| 19709 | |
| 19710 | uint32_t dot11f_pack_measurement_report(tpAniSirGlobal pCtx, |
| 19711 | tDot11fMeasurementReport *pFrm, |
| 19712 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19713 | { |
| 19714 | uint32_t i = 0; |
| 19715 | uint32_t status = 0; |
| 19716 | (void)i; |
| 19717 | *pnConsumed = 0U; |
| 19718 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19719 | FFS_MeasurementReport, IES_MeasurementReport); |
| 19720 | |
| 19721 | return status; |
| 19722 | |
| 19723 | } /* End dot11f_unpack_measurement_report. */ |
| 19724 | |
| 19725 | uint32_t dot11f_pack_measurement_request(tpAniSirGlobal pCtx, |
| 19726 | tDot11fMeasurementRequest *pFrm, |
| 19727 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19728 | { |
| 19729 | uint32_t i = 0; |
| 19730 | uint32_t status = 0; |
| 19731 | (void)i; |
| 19732 | *pnConsumed = 0U; |
| 19733 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19734 | FFS_MeasurementRequest, IES_MeasurementRequest); |
| 19735 | |
| 19736 | return status; |
| 19737 | |
| 19738 | } /* End dot11f_unpack_measurement_request. */ |
| 19739 | |
| 19740 | uint32_t dot11f_pack_neighbor_report_request(tpAniSirGlobal pCtx, |
| 19741 | tDot11fNeighborReportRequest *pFrm, |
| 19742 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19743 | { |
| 19744 | uint32_t i = 0; |
| 19745 | uint32_t status = 0; |
| 19746 | (void)i; |
| 19747 | *pnConsumed = 0U; |
| 19748 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19749 | FFS_NeighborReportRequest, IES_NeighborReportRequest); |
| 19750 | |
| 19751 | return status; |
| 19752 | |
| 19753 | } /* End dot11f_unpack_neighbor_report_request. */ |
| 19754 | |
| 19755 | uint32_t dot11f_pack_neighbor_report_response(tpAniSirGlobal pCtx, |
| 19756 | tDot11fNeighborReportResponse *pFrm, |
| 19757 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19758 | { |
| 19759 | uint32_t i = 0; |
| 19760 | uint32_t status = 0; |
| 19761 | (void)i; |
| 19762 | *pnConsumed = 0U; |
| 19763 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19764 | FFS_NeighborReportResponse, IES_NeighborReportResponse); |
| 19765 | |
| 19766 | return status; |
| 19767 | |
| 19768 | } /* End dot11f_unpack_neighbor_report_response. */ |
| 19769 | |
| 19770 | uint32_t dot11f_pack_operating_mode(tpAniSirGlobal pCtx, |
| 19771 | tDot11fOperatingMode *pFrm, |
| 19772 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19773 | { |
| 19774 | uint32_t i = 0; |
| 19775 | uint32_t status = 0; |
| 19776 | (void)i; |
| 19777 | *pnConsumed = 0U; |
| 19778 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19779 | FFS_OperatingMode, IES_OperatingMode); |
| 19780 | |
| 19781 | return status; |
| 19782 | |
| 19783 | } /* End dot11f_unpack_operating_mode. */ |
| 19784 | |
| 19785 | uint32_t dot11f_pack_probe_request(tpAniSirGlobal pCtx, |
| 19786 | tDot11fProbeRequest *pFrm, |
| 19787 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19788 | { |
| 19789 | uint32_t i = 0; |
| 19790 | uint32_t status = 0; |
| 19791 | (void)i; |
| 19792 | *pnConsumed = 0U; |
| 19793 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19794 | FFS_ProbeRequest, IES_ProbeRequest); |
| 19795 | |
| 19796 | return status; |
| 19797 | |
| 19798 | } /* End dot11f_unpack_probe_request. */ |
| 19799 | |
| 19800 | uint32_t dot11f_pack_probe_response(tpAniSirGlobal pCtx, |
| 19801 | tDot11fProbeResponse *pFrm, |
| 19802 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19803 | { |
| 19804 | uint32_t i = 0; |
| 19805 | uint32_t status = 0; |
| 19806 | (void)i; |
| 19807 | *pnConsumed = 0U; |
| 19808 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19809 | FFS_ProbeResponse, IES_ProbeResponse); |
| 19810 | |
| 19811 | return status; |
| 19812 | |
| 19813 | } /* End dot11f_unpack_probe_response. */ |
| 19814 | |
| 19815 | uint32_t dot11f_pack_qos_map_configure(tpAniSirGlobal pCtx, |
| 19816 | tDot11fQosMapConfigure *pFrm, |
| 19817 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19818 | { |
| 19819 | uint32_t i = 0; |
| 19820 | uint32_t status = 0; |
| 19821 | (void)i; |
| 19822 | *pnConsumed = 0U; |
| 19823 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19824 | FFS_QosMapConfigure, IES_QosMapConfigure); |
| 19825 | |
| 19826 | return status; |
| 19827 | |
| 19828 | } /* End dot11f_unpack_qos_map_configure. */ |
| 19829 | |
| 19830 | uint32_t dot11f_pack_radio_measurement_report(tpAniSirGlobal pCtx, |
| 19831 | tDot11fRadioMeasurementReport *pFrm, |
| 19832 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19833 | { |
| 19834 | uint32_t i = 0; |
| 19835 | uint32_t status = 0; |
| 19836 | (void)i; |
| 19837 | *pnConsumed = 0U; |
| 19838 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19839 | FFS_RadioMeasurementReport, IES_RadioMeasurementReport); |
| 19840 | |
| 19841 | return status; |
| 19842 | |
| 19843 | } /* End dot11f_unpack_radio_measurement_report. */ |
| 19844 | |
| 19845 | uint32_t dot11f_pack_radio_measurement_request(tpAniSirGlobal pCtx, |
| 19846 | tDot11fRadioMeasurementRequest *pFrm, |
| 19847 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19848 | { |
| 19849 | uint32_t i = 0; |
| 19850 | uint32_t status = 0; |
| 19851 | (void)i; |
| 19852 | *pnConsumed = 0U; |
| 19853 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19854 | FFS_RadioMeasurementRequest, IES_RadioMeasurementRequest); |
| 19855 | |
| 19856 | return status; |
| 19857 | |
| 19858 | } /* End dot11f_unpack_radio_measurement_request. */ |
| 19859 | |
| 19860 | uint32_t dot11f_pack_re_assoc_request(tpAniSirGlobal pCtx, |
| 19861 | tDot11fReAssocRequest *pFrm, |
| 19862 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19863 | { |
| 19864 | uint32_t i = 0; |
| 19865 | uint32_t status = 0; |
| 19866 | (void)i; |
| 19867 | *pnConsumed = 0U; |
| 19868 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19869 | FFS_ReAssocRequest, IES_ReAssocRequest); |
| 19870 | |
| 19871 | return status; |
| 19872 | |
| 19873 | } /* End dot11f_unpack_re_assoc_request. */ |
| 19874 | |
| 19875 | uint32_t dot11f_pack_re_assoc_response(tpAniSirGlobal pCtx, |
| 19876 | tDot11fReAssocResponse *pFrm, |
| 19877 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19878 | { |
| 19879 | uint32_t i = 0; |
| 19880 | uint32_t status = 0; |
| 19881 | (void)i; |
| 19882 | *pnConsumed = 0U; |
| 19883 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19884 | FFS_ReAssocResponse, IES_ReAssocResponse); |
| 19885 | |
| 19886 | return status; |
| 19887 | |
| 19888 | } /* End dot11f_unpack_re_assoc_response. */ |
| 19889 | |
| 19890 | uint32_t dot11f_pack_sm_power_save(tpAniSirGlobal pCtx, |
| 19891 | tDot11fSMPowerSave *pFrm, |
| 19892 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19893 | { |
| 19894 | uint32_t i = 0; |
| 19895 | uint32_t status = 0; |
| 19896 | (void)i; |
| 19897 | *pnConsumed = 0U; |
| 19898 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19899 | FFS_SMPowerSave, IES_SMPowerSave); |
| 19900 | |
| 19901 | return status; |
| 19902 | |
| 19903 | } /* End dot11f_unpack_sm_power_save. */ |
| 19904 | |
| 19905 | uint32_t dot11f_pack_sa_query_req(tpAniSirGlobal pCtx, |
| 19906 | tDot11fSaQueryReq *pFrm, |
| 19907 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19908 | { |
| 19909 | uint32_t i = 0; |
| 19910 | uint32_t status = 0; |
| 19911 | (void)i; |
| 19912 | *pnConsumed = 0U; |
| 19913 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19914 | FFS_SaQueryReq, IES_SaQueryReq); |
| 19915 | |
| 19916 | return status; |
| 19917 | |
| 19918 | } /* End dot11f_unpack_sa_query_req. */ |
| 19919 | |
| 19920 | uint32_t dot11f_pack_sa_query_rsp(tpAniSirGlobal pCtx, |
| 19921 | tDot11fSaQueryRsp *pFrm, |
| 19922 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19923 | { |
| 19924 | uint32_t i = 0; |
| 19925 | uint32_t status = 0; |
| 19926 | (void)i; |
| 19927 | *pnConsumed = 0U; |
| 19928 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19929 | FFS_SaQueryRsp, IES_SaQueryRsp); |
| 19930 | |
| 19931 | return status; |
| 19932 | |
| 19933 | } /* End dot11f_unpack_sa_query_rsp. */ |
| 19934 | |
| 19935 | uint32_t dot11f_pack_tdls_dis_req(tpAniSirGlobal pCtx, |
| 19936 | tDot11fTDLSDisReq *pFrm, |
| 19937 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19938 | { |
| 19939 | uint32_t i = 0; |
| 19940 | uint32_t status = 0; |
| 19941 | (void)i; |
| 19942 | *pnConsumed = 0U; |
| 19943 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19944 | FFS_TDLSDisReq, IES_TDLSDisReq); |
| 19945 | |
| 19946 | return status; |
| 19947 | |
| 19948 | } /* End dot11f_unpack_tdls_dis_req. */ |
| 19949 | |
| 19950 | uint32_t dot11f_pack_tdls_dis_rsp(tpAniSirGlobal pCtx, |
| 19951 | tDot11fTDLSDisRsp *pFrm, |
| 19952 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19953 | { |
| 19954 | uint32_t i = 0; |
| 19955 | uint32_t status = 0; |
| 19956 | (void)i; |
| 19957 | *pnConsumed = 0U; |
| 19958 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19959 | FFS_TDLSDisRsp, IES_TDLSDisRsp); |
| 19960 | |
| 19961 | return status; |
| 19962 | |
| 19963 | } /* End dot11f_unpack_tdls_dis_rsp. */ |
| 19964 | |
| 19965 | uint32_t dot11f_pack_tdls_peer_traffic_ind(tpAniSirGlobal pCtx, |
| 19966 | tDot11fTDLSPeerTrafficInd *pFrm, |
| 19967 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19968 | { |
| 19969 | uint32_t i = 0; |
| 19970 | uint32_t status = 0; |
| 19971 | (void)i; |
| 19972 | *pnConsumed = 0U; |
| 19973 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19974 | FFS_TDLSPeerTrafficInd, IES_TDLSPeerTrafficInd); |
| 19975 | |
| 19976 | return status; |
| 19977 | |
| 19978 | } /* End dot11f_unpack_tdls_peer_traffic_ind. */ |
| 19979 | |
| 19980 | uint32_t dot11f_pack_tdls_peer_traffic_rsp(tpAniSirGlobal pCtx, |
| 19981 | tDot11fTDLSPeerTrafficRsp *pFrm, |
| 19982 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19983 | { |
| 19984 | uint32_t i = 0; |
| 19985 | uint32_t status = 0; |
| 19986 | (void)i; |
| 19987 | *pnConsumed = 0U; |
| 19988 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 19989 | FFS_TDLSPeerTrafficRsp, IES_TDLSPeerTrafficRsp); |
| 19990 | |
| 19991 | return status; |
| 19992 | |
| 19993 | } /* End dot11f_unpack_tdls_peer_traffic_rsp. */ |
| 19994 | |
| 19995 | uint32_t dot11f_pack_tdls_setup_cnf(tpAniSirGlobal pCtx, |
| 19996 | tDot11fTDLSSetupCnf *pFrm, |
| 19997 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 19998 | { |
| 19999 | uint32_t i = 0; |
| 20000 | uint32_t status = 0; |
| 20001 | (void)i; |
| 20002 | *pnConsumed = 0U; |
| 20003 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20004 | FFS_TDLSSetupCnf, IES_TDLSSetupCnf); |
| 20005 | |
| 20006 | return status; |
| 20007 | |
| 20008 | } /* End dot11f_unpack_tdls_setup_cnf. */ |
| 20009 | |
| 20010 | uint32_t dot11f_pack_tdls_setup_req(tpAniSirGlobal pCtx, |
| 20011 | tDot11fTDLSSetupReq *pFrm, |
| 20012 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20013 | { |
| 20014 | uint32_t i = 0; |
| 20015 | uint32_t status = 0; |
| 20016 | (void)i; |
| 20017 | *pnConsumed = 0U; |
| 20018 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20019 | FFS_TDLSSetupReq, IES_TDLSSetupReq); |
| 20020 | |
| 20021 | return status; |
| 20022 | |
| 20023 | } /* End dot11f_unpack_tdls_setup_req. */ |
| 20024 | |
| 20025 | uint32_t dot11f_pack_tdls_setup_rsp(tpAniSirGlobal pCtx, |
| 20026 | tDot11fTDLSSetupRsp *pFrm, |
| 20027 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20028 | { |
| 20029 | uint32_t i = 0; |
| 20030 | uint32_t status = 0; |
| 20031 | (void)i; |
| 20032 | *pnConsumed = 0U; |
| 20033 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20034 | FFS_TDLSSetupRsp, IES_TDLSSetupRsp); |
| 20035 | |
| 20036 | return status; |
| 20037 | |
| 20038 | } /* End dot11f_unpack_tdls_setup_rsp. */ |
| 20039 | |
| 20040 | uint32_t dot11f_pack_tdls_teardown(tpAniSirGlobal pCtx, |
| 20041 | tDot11fTDLSTeardown *pFrm, |
| 20042 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20043 | { |
| 20044 | uint32_t i = 0; |
| 20045 | uint32_t status = 0; |
| 20046 | (void)i; |
| 20047 | *pnConsumed = 0U; |
| 20048 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20049 | FFS_TDLSTeardown, IES_TDLSTeardown); |
| 20050 | |
| 20051 | return status; |
| 20052 | |
| 20053 | } /* End dot11f_unpack_tdls_teardown. */ |
| 20054 | |
| 20055 | uint32_t dot11f_pack_tpc_report(tpAniSirGlobal pCtx, |
| 20056 | tDot11fTPCReport *pFrm, |
| 20057 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20058 | { |
| 20059 | uint32_t i = 0; |
| 20060 | uint32_t status = 0; |
| 20061 | (void)i; |
| 20062 | *pnConsumed = 0U; |
| 20063 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20064 | FFS_TPCReport, IES_TPCReport); |
| 20065 | |
| 20066 | return status; |
| 20067 | |
| 20068 | } /* End dot11f_unpack_tpc_report. */ |
| 20069 | |
| 20070 | uint32_t dot11f_pack_tpc_request(tpAniSirGlobal pCtx, |
| 20071 | tDot11fTPCRequest *pFrm, |
| 20072 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20073 | { |
| 20074 | uint32_t i = 0; |
| 20075 | uint32_t status = 0; |
| 20076 | (void)i; |
| 20077 | *pnConsumed = 0U; |
| 20078 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20079 | FFS_TPCRequest, IES_TPCRequest); |
| 20080 | |
| 20081 | return status; |
| 20082 | |
| 20083 | } /* End dot11f_unpack_tpc_request. */ |
| 20084 | |
| 20085 | uint32_t dot11f_pack_timing_advertisement_frame(tpAniSirGlobal pCtx, |
| 20086 | tDot11fTimingAdvertisementFrame *pFrm, |
| 20087 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20088 | { |
| 20089 | uint32_t i = 0; |
| 20090 | uint32_t status = 0; |
| 20091 | (void)i; |
| 20092 | *pnConsumed = 0U; |
| 20093 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20094 | FFS_TimingAdvertisementFrame, IES_TimingAdvertisementFrame); |
| 20095 | |
| 20096 | return status; |
| 20097 | |
| 20098 | } /* End dot11f_unpack_timing_advertisement_frame. */ |
| 20099 | |
| 20100 | uint32_t dot11f_pack_vht_gid_management_action_frame(tpAniSirGlobal pCtx, |
| 20101 | tDot11fVHTGidManagementActionFrame *pFrm, |
| 20102 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20103 | { |
| 20104 | uint32_t i = 0; |
| 20105 | uint32_t status = 0; |
| 20106 | (void)i; |
| 20107 | *pnConsumed = 0U; |
| 20108 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20109 | FFS_VHTGidManagementActionFrame, IES_VHTGidManagementActionFrame); |
| 20110 | |
| 20111 | return status; |
| 20112 | |
| 20113 | } /* End dot11f_unpack_vht_gid_management_action_frame. */ |
| 20114 | |
| 20115 | uint32_t dot11f_pack_wmm_add_ts_request(tpAniSirGlobal pCtx, |
| 20116 | tDot11fWMMAddTSRequest *pFrm, |
| 20117 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20118 | { |
| 20119 | uint32_t i = 0; |
| 20120 | uint32_t status = 0; |
| 20121 | (void)i; |
| 20122 | *pnConsumed = 0U; |
| 20123 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20124 | FFS_WMMAddTSRequest, IES_WMMAddTSRequest); |
| 20125 | |
| 20126 | return status; |
| 20127 | |
| 20128 | } /* End dot11f_unpack_wmm_add_ts_request. */ |
| 20129 | |
| 20130 | uint32_t dot11f_pack_wmm_add_ts_response(tpAniSirGlobal pCtx, |
| 20131 | tDot11fWMMAddTSResponse *pFrm, |
| 20132 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20133 | { |
| 20134 | uint32_t i = 0; |
| 20135 | uint32_t status = 0; |
| 20136 | (void)i; |
| 20137 | *pnConsumed = 0U; |
| 20138 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20139 | FFS_WMMAddTSResponse, IES_WMMAddTSResponse); |
| 20140 | |
| 20141 | return status; |
| 20142 | |
| 20143 | } /* End dot11f_unpack_wmm_add_ts_response. */ |
| 20144 | |
| 20145 | uint32_t dot11f_pack_wmm_del_ts(tpAniSirGlobal pCtx, |
| 20146 | tDot11fWMMDelTS *pFrm, |
| 20147 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20148 | { |
| 20149 | uint32_t i = 0; |
| 20150 | uint32_t status = 0; |
| 20151 | (void)i; |
| 20152 | *pnConsumed = 0U; |
| 20153 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20154 | FFS_WMMDelTS, IES_WMMDelTS); |
| 20155 | |
| 20156 | return status; |
| 20157 | |
| 20158 | } /* End dot11f_unpack_wmm_del_ts. */ |
| 20159 | |
| 20160 | uint32_t dot11f_pack_ht2040_bss_coexistence_mgmt_action_frame(tpAniSirGlobal pCtx, |
| 20161 | tDot11fht2040_bss_coexistence_mgmt_action_frame *pFrm, |
| 20162 | uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed) |
| 20163 | { |
| 20164 | uint32_t i = 0; |
| 20165 | uint32_t status = 0; |
| 20166 | (void)i; |
| 20167 | *pnConsumed = 0U; |
| 20168 | status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed, |
| 20169 | FFS_ht2040_bss_coexistence_mgmt_action_frame, IES_ht2040_bss_coexistence_mgmt_action_frame); |
| 20170 | |
| 20171 | return status; |
| 20172 | |
| 20173 | } /* End dot11f_unpack_ht2040_bss_coexistence_mgmt_action_frame. */ |
| 20174 | |
| 20175 | static uint32_t pack_core(tpAniSirGlobal pCtx, |
| 20176 | uint8_t *pSrc, |
| 20177 | uint8_t *pBuf, |
| 20178 | uint32_t nBuf, |
| 20179 | uint32_t *pnConsumed, |
| 20180 | const tFFDefn FFs[], |
| 20181 | const tIEDefn IEs[]) |
| 20182 | { |
| 20183 | const tFFDefn *pFf; |
| 20184 | const tIEDefn *pIe; |
| 20185 | tFRAMES_BOOL *pfFound; |
| 20186 | uint8_t *pBufRemaining; |
| 20187 | uint16_t i; |
| 20188 | uint32_t nBufRemaining, status, len; |
| 20189 | uint32_t countOffset = 0; |
| 20190 | |
| 20191 | (void)pCtx; /* Shutup the compiler if we have no FFs nor IEs... */ |
| 20192 | i = 0; |
| 20193 | |
| 20194 | DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed); |
| 20195 | |
| 20196 | status = DOT11F_PARSE_SUCCESS; |
| 20197 | pBufRemaining = pBuf; |
| 20198 | nBufRemaining = nBuf; |
| 20199 | |
| 20200 | pFf = &(FFs[0]); |
| 20201 | while (pFf->size) { |
| 20202 | if (pFf->size > nBufRemaining) { |
| 20203 | FRAMES_LOG3(pCtx, FRLOGE, FRFL("The Fixed Field %s req" |
| 20204 | "uires %d bytes, but there are only %d remaining.\n"), |
| 20205 | pFf->name, pFf->size, nBufRemaining); |
| 20206 | return DOT11F_BUFFER_OVERFLOW; |
| 20207 | } |
| 20208 | |
| 20209 | switch (pFf->sig) { |
| 20210 | case SigFfAID: |
| 20211 | dot11f_pack_ff_aid( |
| 20212 | pCtx, (tDot11fFfAID *) |
| 20213 | (pSrc + pFf->offset), pBufRemaining); |
| 20214 | break; |
| 20215 | case SigFfAction: |
| 20216 | dot11f_pack_ff_action( |
| 20217 | pCtx, (tDot11fFfAction *) |
| 20218 | (pSrc + pFf->offset), pBufRemaining); |
| 20219 | break; |
| 20220 | case SigFfAuthAlgo: |
| 20221 | dot11f_pack_ff_auth_algo( |
| 20222 | pCtx, (tDot11fFfAuthAlgo *) |
| 20223 | (pSrc + pFf->offset), pBufRemaining); |
| 20224 | break; |
| 20225 | case SigFfAuthSeqNo: |
| 20226 | dot11f_pack_ff_auth_seq_no( |
| 20227 | pCtx, (tDot11fFfAuthSeqNo *) |
| 20228 | (pSrc + pFf->offset), pBufRemaining); |
| 20229 | break; |
| 20230 | case SigFfBeaconInterval: |
| 20231 | dot11f_pack_ff_beacon_interval( |
| 20232 | pCtx, (tDot11fFfBeaconInterval *) |
| 20233 | (pSrc + pFf->offset), pBufRemaining); |
| 20234 | break; |
| 20235 | case SigFfCapabilities: |
| 20236 | dot11f_pack_ff_capabilities( |
| 20237 | pCtx, (tDot11fFfCapabilities *) |
| 20238 | (pSrc + pFf->offset), pBufRemaining); |
| 20239 | break; |
| 20240 | case SigFfCategory: |
| 20241 | dot11f_pack_ff_category( |
| 20242 | pCtx, (tDot11fFfCategory *) |
| 20243 | (pSrc + pFf->offset), pBufRemaining); |
| 20244 | break; |
| 20245 | case SigFfCurrentAPAddress: |
| 20246 | dot11f_pack_ff_current_ap_address( |
| 20247 | pCtx, (tDot11fFfCurrentAPAddress *) |
| 20248 | (pSrc + pFf->offset), pBufRemaining); |
| 20249 | break; |
| 20250 | case SigFfDialogToken: |
| 20251 | dot11f_pack_ff_dialog_token( |
| 20252 | pCtx, (tDot11fFfDialogToken *) |
| 20253 | (pSrc + pFf->offset), pBufRemaining); |
| 20254 | break; |
| 20255 | case SigFfLinkMargin: |
| 20256 | dot11f_pack_ff_link_margin( |
| 20257 | pCtx, (tDot11fFfLinkMargin *) |
| 20258 | (pSrc + pFf->offset), pBufRemaining); |
| 20259 | break; |
| 20260 | case SigFfListenInterval: |
| 20261 | dot11f_pack_ff_listen_interval( |
| 20262 | pCtx, (tDot11fFfListenInterval *) |
| 20263 | (pSrc + pFf->offset), pBufRemaining); |
| 20264 | break; |
| 20265 | case SigFfMaxTxPower: |
| 20266 | dot11f_pack_ff_max_tx_power( |
| 20267 | pCtx, (tDot11fFfMaxTxPower *) |
| 20268 | (pSrc + pFf->offset), pBufRemaining); |
| 20269 | break; |
| 20270 | case SigFfNumOfRepetitions: |
| 20271 | dot11f_pack_ff_num_of_repetitions( |
| 20272 | pCtx, (tDot11fFfNumOfRepetitions *) |
| 20273 | (pSrc + pFf->offset), pBufRemaining); |
| 20274 | break; |
| 20275 | case SigFfOperatingMode: |
| 20276 | dot11f_pack_ff_operating_mode( |
| 20277 | pCtx, (tDot11fFfOperatingMode *) |
| 20278 | (pSrc + pFf->offset), pBufRemaining); |
| 20279 | break; |
| 20280 | case SigFfRCPI: |
| 20281 | dot11f_pack_ff_rcpi( |
| 20282 | pCtx, (tDot11fFfRCPI *) |
| 20283 | (pSrc + pFf->offset), pBufRemaining); |
| 20284 | break; |
| 20285 | case SigFfRSNI: |
| 20286 | dot11f_pack_ff_rsni( |
| 20287 | pCtx, (tDot11fFfRSNI *) |
| 20288 | (pSrc + pFf->offset), pBufRemaining); |
| 20289 | break; |
| 20290 | case SigFfReason: |
| 20291 | dot11f_pack_ff_reason( |
| 20292 | pCtx, (tDot11fFfReason *) |
| 20293 | (pSrc + pFf->offset), pBufRemaining); |
| 20294 | break; |
| 20295 | case SigFfRxAntennaId: |
| 20296 | dot11f_pack_ff_rx_antenna_id( |
| 20297 | pCtx, (tDot11fFfRxAntennaId *) |
| 20298 | (pSrc + pFf->offset), pBufRemaining); |
| 20299 | break; |
| 20300 | case SigFfSMPowerModeSet: |
| 20301 | dot11f_pack_ff_sm_power_mode_set( |
| 20302 | pCtx, (tDot11fFfSMPowerModeSet *) |
| 20303 | (pSrc + pFf->offset), pBufRemaining); |
| 20304 | break; |
| 20305 | case SigFfStatus: |
| 20306 | dot11f_pack_ff_status( |
| 20307 | pCtx, (tDot11fFfStatus *) |
| 20308 | (pSrc + pFf->offset), pBufRemaining); |
| 20309 | break; |
| 20310 | case SigFfStatusCode: |
| 20311 | dot11f_pack_ff_status_code( |
| 20312 | pCtx, (tDot11fFfStatusCode *) |
| 20313 | (pSrc + pFf->offset), pBufRemaining); |
| 20314 | break; |
| 20315 | case SigFfTPCEleID: |
| 20316 | dot11f_pack_ff_tpc_ele_id( |
| 20317 | pCtx, (tDot11fFfTPCEleID *) |
| 20318 | (pSrc + pFf->offset), pBufRemaining); |
| 20319 | break; |
| 20320 | case SigFfTPCEleLen: |
| 20321 | dot11f_pack_ff_tpc_ele_len( |
| 20322 | pCtx, (tDot11fFfTPCEleLen *) |
| 20323 | (pSrc + pFf->offset), pBufRemaining); |
| 20324 | break; |
| 20325 | case SigFfTSInfo: |
| 20326 | dot11f_pack_ff_ts_info( |
| 20327 | pCtx, (tDot11fFfTSInfo *) |
| 20328 | (pSrc + pFf->offset), pBufRemaining); |
| 20329 | break; |
| 20330 | case SigFfTimeStamp: |
| 20331 | dot11f_pack_ff_time_stamp( |
| 20332 | pCtx, (tDot11fFfTimeStamp *) |
| 20333 | (pSrc + pFf->offset), pBufRemaining); |
| 20334 | break; |
| 20335 | case SigFfTransactionId: |
| 20336 | dot11f_pack_ff_transaction_id( |
| 20337 | pCtx, (tDot11fFfTransactionId *) |
| 20338 | (pSrc + pFf->offset), pBufRemaining); |
| 20339 | break; |
| 20340 | case SigFfTxAntennaId: |
| 20341 | dot11f_pack_ff_tx_antenna_id( |
| 20342 | pCtx, (tDot11fFfTxAntennaId *) |
| 20343 | (pSrc + pFf->offset), pBufRemaining); |
| 20344 | break; |
| 20345 | case SigFfTxPower: |
| 20346 | dot11f_pack_ff_tx_power( |
| 20347 | pCtx, (tDot11fFfTxPower *) |
| 20348 | (pSrc + pFf->offset), pBufRemaining); |
| 20349 | break; |
| 20350 | case SigFfVhtMembershipStatusArray: |
| 20351 | dot11f_pack_ff_vht_membership_status_array( |
| 20352 | pCtx, (tDot11fFfVhtMembershipStatusArray *) |
| 20353 | (pSrc + pFf->offset), pBufRemaining); |
| 20354 | break; |
| 20355 | case SigFfVhtUserPositionArray: |
| 20356 | dot11f_pack_ff_vht_user_position_array( |
| 20357 | pCtx, (tDot11fFfVhtUserPositionArray *) |
| 20358 | (pSrc + pFf->offset), pBufRemaining); |
| 20359 | break; |
| 20360 | default: |
| 20361 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR-- I don" |
| 20362 | "'t know about the Fixed Field %d; this is most l" |
| 20363 | "ikely a bug in 'framesg'.\n"), pFf->sig); |
| 20364 | return DOT11F_INTERNAL_ERROR; |
| 20365 | } |
| 20366 | |
| 20367 | pBufRemaining += pFf->size; |
| 20368 | nBufRemaining -= pFf->size; |
| 20369 | *pnConsumed += pFf->size; |
| 20370 | ++pFf; |
| 20371 | |
| 20372 | } |
| 20373 | |
| 20374 | pIe = &(IEs[0]); |
| 20375 | while (0xff != pIe->eid) { |
| 20376 | pfFound = (tFRAMES_BOOL *)(pSrc + pIe->offset + |
| 20377 | pIe->presenceOffset); |
| 20378 | if (*pfFound && pIe->minSize > nBufRemaining) { |
| 20379 | FRAMES_LOG3(pCtx, FRLOGE, FRFL("The IE %s takes at le" |
| 20380 | "ast %d bytes, but there are only %d left in the b" |
| 20381 | "uffer.\n"), pIe->name, pIe->minSize, nBufRemaining); |
| 20382 | return DOT11F_BUFFER_OVERFLOW; |
| 20383 | } |
| 20384 | |
| 20385 | |
| 20386 | countOffset = ((0 == pIe->arraybound) ? 1 : *(uint16_t *)(pSrc + pIe->countOffset)); |
| 20387 | for (i = 0; i < countOffset; ++i) { |
| 20388 | len = 0U; |
| 20389 | switch (pIe->sig) { |
| 20390 | case SigIeCondensedCountryStr: |
| 20391 | status |= |
| 20392 | dot11f_pack_ie_condensed_country_str( |
| 20393 | pCtx, (tDot11fIECondensedCountryStr *) |
| 20394 | (pSrc + pIe->offset + |
| 20395 | sizeof(tDot11fIECondensedCountryStr) * i), |
| 20396 | pBufRemaining, nBufRemaining, &len); |
| 20397 | break; |
| 20398 | case SigIeGTK: |
| 20399 | status |= |
| 20400 | dot11f_pack_ie_gtk( |
| 20401 | pCtx, (tDot11fIEGTK *) |
| 20402 | (pSrc + pIe->offset + |
| 20403 | sizeof(tDot11fIEGTK) * i), |
| 20404 | pBufRemaining, nBufRemaining, &len); |
| 20405 | break; |
| 20406 | case SigIeIGTK: |
| 20407 | status |= |
| 20408 | dot11f_pack_ie_igtk( |
| 20409 | pCtx, (tDot11fIEIGTK *) |
| 20410 | (pSrc + pIe->offset + |
| 20411 | sizeof(tDot11fIEIGTK) * i), |
| 20412 | pBufRemaining, nBufRemaining, &len); |
| 20413 | break; |
| 20414 | case SigIeR0KH_ID: |
| 20415 | status |= |
| 20416 | dot11f_pack_ie_r0_kh_id( |
| 20417 | pCtx, (tDot11fIER0KH_ID *) |
| 20418 | (pSrc + pIe->offset + |
| 20419 | sizeof(tDot11fIER0KH_ID) * i), |
| 20420 | pBufRemaining, nBufRemaining, &len); |
| 20421 | break; |
| 20422 | case SigIeR1KH_ID: |
| 20423 | status |= |
| 20424 | dot11f_pack_ie_r1_kh_id( |
| 20425 | pCtx, (tDot11fIER1KH_ID *) |
| 20426 | (pSrc + pIe->offset + |
| 20427 | sizeof(tDot11fIER1KH_ID) * i), |
| 20428 | pBufRemaining, nBufRemaining, &len); |
| 20429 | break; |
| 20430 | case SigIeTSFInfo: |
| 20431 | status |= |
| 20432 | dot11f_pack_ie_tsf_info( |
| 20433 | pCtx, (tDot11fIETSFInfo *) |
| 20434 | (pSrc + pIe->offset + |
| 20435 | sizeof(tDot11fIETSFInfo) * i), |
| 20436 | pBufRemaining, nBufRemaining, &len); |
| 20437 | break; |
| 20438 | case SigIeAPChannelReport: |
| 20439 | status |= |
| 20440 | dot11f_pack_ie_ap_channel_report( |
| 20441 | pCtx, (tDot11fIEAPChannelReport *) |
| 20442 | (pSrc + pIe->offset + |
| 20443 | sizeof(tDot11fIEAPChannelReport) * i), |
| 20444 | pBufRemaining, nBufRemaining, &len); |
| 20445 | break; |
| 20446 | case SigIeBcnReportingDetail: |
| 20447 | status |= |
| 20448 | dot11f_pack_ie_bcn_reporting_detail( |
| 20449 | pCtx, (tDot11fIEBcnReportingDetail *) |
| 20450 | (pSrc + pIe->offset + |
| 20451 | sizeof(tDot11fIEBcnReportingDetail) * i), |
| 20452 | pBufRemaining, nBufRemaining, &len); |
| 20453 | break; |
| 20454 | case SigIeBeaconReportFrmBody: |
| 20455 | status |= |
| 20456 | dot11f_pack_ie_beacon_report_frm_body( |
| 20457 | pCtx, (tDot11fIEBeaconReportFrmBody *) |
| 20458 | (pSrc + pIe->offset + |
| 20459 | sizeof(tDot11fIEBeaconReportFrmBody) * i), |
| 20460 | pBufRemaining, nBufRemaining, &len); |
| 20461 | break; |
| 20462 | case SigIeBeaconReporting: |
| 20463 | status |= |
| 20464 | dot11f_pack_ie_beacon_reporting( |
| 20465 | pCtx, (tDot11fIEBeaconReporting *) |
| 20466 | (pSrc + pIe->offset + |
| 20467 | sizeof(tDot11fIEBeaconReporting) * i), |
| 20468 | pBufRemaining, nBufRemaining, &len); |
| 20469 | break; |
| 20470 | case SigIeMeasurementPilot: |
| 20471 | status |= |
| 20472 | dot11f_pack_ie_measurement_pilot( |
| 20473 | pCtx, (tDot11fIEMeasurementPilot *) |
| 20474 | (pSrc + pIe->offset + |
| 20475 | sizeof(tDot11fIEMeasurementPilot) * i), |
| 20476 | pBufRemaining, nBufRemaining, &len); |
| 20477 | break; |
| 20478 | case SigIeMultiBssid: |
| 20479 | status |= |
| 20480 | dot11f_pack_ie_multi_bssid( |
| 20481 | pCtx, (tDot11fIEMultiBssid *) |
| 20482 | (pSrc + pIe->offset + |
| 20483 | sizeof(tDot11fIEMultiBssid) * i), |
| 20484 | pBufRemaining, nBufRemaining, &len); |
| 20485 | break; |
| 20486 | case SigIeRICData: |
| 20487 | status |= |
| 20488 | dot11f_pack_ie_ric_data( |
| 20489 | pCtx, (tDot11fIERICData *) |
| 20490 | (pSrc + pIe->offset + |
| 20491 | sizeof(tDot11fIERICData) * i), |
| 20492 | pBufRemaining, nBufRemaining, &len); |
| 20493 | break; |
| 20494 | case SigIeRICDescriptor: |
| 20495 | status |= |
| 20496 | dot11f_pack_ie_ric_descriptor( |
| 20497 | pCtx, (tDot11fIERICDescriptor *) |
| 20498 | (pSrc + pIe->offset + |
| 20499 | sizeof(tDot11fIERICDescriptor) * i), |
| 20500 | pBufRemaining, nBufRemaining, &len); |
| 20501 | break; |
| 20502 | case SigIeRRMEnabledCap: |
| 20503 | status |= |
| 20504 | dot11f_pack_ie_rrm_enabled_cap( |
| 20505 | pCtx, (tDot11fIERRMEnabledCap *) |
| 20506 | (pSrc + pIe->offset + |
| 20507 | sizeof(tDot11fIERRMEnabledCap) * i), |
| 20508 | pBufRemaining, nBufRemaining, &len); |
| 20509 | break; |
| 20510 | case SigIeRequestedInfo: |
| 20511 | status |= |
| 20512 | dot11f_pack_ie_requested_info( |
| 20513 | pCtx, (tDot11fIERequestedInfo *) |
| 20514 | (pSrc + pIe->offset + |
| 20515 | sizeof(tDot11fIERequestedInfo) * i), |
| 20516 | pBufRemaining, nBufRemaining, &len); |
| 20517 | break; |
| 20518 | case SigIeSSID: |
| 20519 | status |= |
| 20520 | dot11f_pack_ie_ssid( |
| 20521 | pCtx, (tDot11fIESSID *) |
| 20522 | (pSrc + pIe->offset + |
| 20523 | sizeof(tDot11fIESSID) * i), |
| 20524 | pBufRemaining, nBufRemaining, &len); |
| 20525 | break; |
| 20526 | case SigIeSchedule: |
| 20527 | status |= |
| 20528 | dot11f_pack_ie_schedule( |
| 20529 | pCtx, (tDot11fIESchedule *) |
| 20530 | (pSrc + pIe->offset + |
| 20531 | sizeof(tDot11fIESchedule) * i), |
| 20532 | pBufRemaining, nBufRemaining, &len); |
| 20533 | break; |
| 20534 | case SigIeTCLAS: |
| 20535 | status |= |
| 20536 | dot11f_pack_ie_tclas( |
| 20537 | pCtx, (tDot11fIETCLAS *) |
| 20538 | (pSrc + pIe->offset + |
| 20539 | sizeof(tDot11fIETCLAS) * i), |
| 20540 | pBufRemaining, nBufRemaining, &len); |
| 20541 | break; |
| 20542 | case SigIeTCLASSPROC: |
| 20543 | status |= |
| 20544 | dot11f_pack_ie_tclassproc( |
| 20545 | pCtx, (tDot11fIETCLASSPROC *) |
| 20546 | (pSrc + pIe->offset + |
| 20547 | sizeof(tDot11fIETCLASSPROC) * i), |
| 20548 | pBufRemaining, nBufRemaining, &len); |
| 20549 | break; |
| 20550 | case SigIeTSDelay: |
| 20551 | status |= |
| 20552 | dot11f_pack_ie_ts_delay( |
| 20553 | pCtx, (tDot11fIETSDelay *) |
| 20554 | (pSrc + pIe->offset + |
| 20555 | sizeof(tDot11fIETSDelay) * i), |
| 20556 | pBufRemaining, nBufRemaining, &len); |
| 20557 | break; |
| 20558 | case SigIeTSPEC: |
| 20559 | status |= |
| 20560 | dot11f_pack_ie_tspec( |
| 20561 | pCtx, (tDot11fIETSPEC *) |
| 20562 | (pSrc + pIe->offset + |
| 20563 | sizeof(tDot11fIETSPEC) * i), |
| 20564 | pBufRemaining, nBufRemaining, &len); |
| 20565 | break; |
| 20566 | case SigIeVHTCaps: |
| 20567 | status |= |
| 20568 | dot11f_pack_ie_vht_caps( |
| 20569 | pCtx, (tDot11fIEVHTCaps *) |
| 20570 | (pSrc + pIe->offset + |
| 20571 | sizeof(tDot11fIEVHTCaps) * i), |
| 20572 | pBufRemaining, nBufRemaining, &len); |
| 20573 | break; |
| 20574 | case SigIeVHTOperation: |
| 20575 | status |= |
| 20576 | dot11f_pack_ie_vht_operation( |
| 20577 | pCtx, (tDot11fIEVHTOperation *) |
| 20578 | (pSrc + pIe->offset + |
| 20579 | sizeof(tDot11fIEVHTOperation) * i), |
| 20580 | pBufRemaining, nBufRemaining, &len); |
| 20581 | break; |
| 20582 | case SigIeWMMSchedule: |
| 20583 | status |= |
| 20584 | dot11f_pack_ie_wmm_schedule( |
| 20585 | pCtx, (tDot11fIEWMMSchedule *) |
| 20586 | (pSrc + pIe->offset + |
| 20587 | sizeof(tDot11fIEWMMSchedule) * i), |
| 20588 | pBufRemaining, nBufRemaining, &len); |
| 20589 | break; |
| 20590 | case SigIeWMMTCLAS: |
| 20591 | status |= |
| 20592 | dot11f_pack_ie_wmmtclas( |
| 20593 | pCtx, (tDot11fIEWMMTCLAS *) |
| 20594 | (pSrc + pIe->offset + |
| 20595 | sizeof(tDot11fIEWMMTCLAS) * i), |
| 20596 | pBufRemaining, nBufRemaining, &len); |
| 20597 | break; |
| 20598 | case SigIeWMMTCLASPROC: |
| 20599 | status |= |
| 20600 | dot11f_pack_ie_wmmtclasproc( |
| 20601 | pCtx, (tDot11fIEWMMTCLASPROC *) |
| 20602 | (pSrc + pIe->offset + |
| 20603 | sizeof(tDot11fIEWMMTCLASPROC) * i), |
| 20604 | pBufRemaining, nBufRemaining, &len); |
| 20605 | break; |
| 20606 | case SigIeWMMTSDelay: |
| 20607 | status |= |
| 20608 | dot11f_pack_ie_wmmts_delay( |
| 20609 | pCtx, (tDot11fIEWMMTSDelay *) |
| 20610 | (pSrc + pIe->offset + |
| 20611 | sizeof(tDot11fIEWMMTSDelay) * i), |
| 20612 | pBufRemaining, nBufRemaining, &len); |
| 20613 | break; |
| 20614 | case SigIeWMMTSPEC: |
| 20615 | status |= |
| 20616 | dot11f_pack_ie_wmmtspec( |
| 20617 | pCtx, (tDot11fIEWMMTSPEC *) |
| 20618 | (pSrc + pIe->offset + |
| 20619 | sizeof(tDot11fIEWMMTSPEC) * i), |
| 20620 | pBufRemaining, nBufRemaining, &len); |
| 20621 | break; |
| 20622 | case SigIeWiderBWChanSwitchAnn: |
| 20623 | status |= |
| 20624 | dot11f_pack_ie_wider_bw_chan_switch_ann( |
| 20625 | pCtx, (tDot11fIEWiderBWChanSwitchAnn *) |
| 20626 | (pSrc + pIe->offset + |
| 20627 | sizeof(tDot11fIEWiderBWChanSwitchAnn) * i), |
| 20628 | pBufRemaining, nBufRemaining, &len); |
| 20629 | break; |
| 20630 | case SigIeAID: |
| 20631 | status |= |
| 20632 | dot11f_pack_ie_aid( |
| 20633 | pCtx, (tDot11fIEAID *) |
| 20634 | (pSrc + pIe->offset + |
| 20635 | sizeof(tDot11fIEAID) * i), |
| 20636 | pBufRemaining, nBufRemaining, &len); |
| 20637 | break; |
| 20638 | case SigIeCFParams: |
| 20639 | status |= |
| 20640 | dot11f_pack_ie_cf_params( |
| 20641 | pCtx, (tDot11fIECFParams *) |
| 20642 | (pSrc + pIe->offset + |
| 20643 | sizeof(tDot11fIECFParams) * i), |
| 20644 | pBufRemaining, nBufRemaining, &len); |
| 20645 | break; |
| 20646 | case SigIeChallengeText: |
| 20647 | status |= |
| 20648 | dot11f_pack_ie_challenge_text( |
| 20649 | pCtx, (tDot11fIEChallengeText *) |
| 20650 | (pSrc + pIe->offset + |
| 20651 | sizeof(tDot11fIEChallengeText) * i), |
| 20652 | pBufRemaining, nBufRemaining, &len); |
| 20653 | break; |
| 20654 | case SigIeChanSwitchAnn: |
| 20655 | status |= |
| 20656 | dot11f_pack_ie_chan_switch_ann( |
| 20657 | pCtx, (tDot11fIEChanSwitchAnn *) |
| 20658 | (pSrc + pIe->offset + |
| 20659 | sizeof(tDot11fIEChanSwitchAnn) * i), |
| 20660 | pBufRemaining, nBufRemaining, &len); |
| 20661 | break; |
| 20662 | case SigIeChannelSwitchWrapper: |
| 20663 | status |= |
| 20664 | dot11f_pack_ie_channel_switch_wrapper( |
| 20665 | pCtx, (tDot11fIEChannelSwitchWrapper *) |
| 20666 | (pSrc + pIe->offset + |
| 20667 | sizeof(tDot11fIEChannelSwitchWrapper) * i), |
| 20668 | pBufRemaining, nBufRemaining, &len); |
| 20669 | break; |
| 20670 | case SigIeCountry: |
| 20671 | status |= |
| 20672 | dot11f_pack_ie_country( |
| 20673 | pCtx, (tDot11fIECountry *) |
| 20674 | (pSrc + pIe->offset + |
| 20675 | sizeof(tDot11fIECountry) * i), |
| 20676 | pBufRemaining, nBufRemaining, &len); |
| 20677 | break; |
| 20678 | case SigIeDSParams: |
| 20679 | status |= |
| 20680 | dot11f_pack_ie_ds_params( |
| 20681 | pCtx, (tDot11fIEDSParams *) |
| 20682 | (pSrc + pIe->offset + |
| 20683 | sizeof(tDot11fIEDSParams) * i), |
| 20684 | pBufRemaining, nBufRemaining, &len); |
| 20685 | break; |
| 20686 | case SigIeEDCAParamSet: |
| 20687 | status |= |
| 20688 | dot11f_pack_ie_edca_param_set( |
| 20689 | pCtx, (tDot11fIEEDCAParamSet *) |
| 20690 | (pSrc + pIe->offset + |
| 20691 | sizeof(tDot11fIEEDCAParamSet) * i), |
| 20692 | pBufRemaining, nBufRemaining, &len); |
| 20693 | break; |
| 20694 | case SigIeERPInfo: |
| 20695 | status |= |
| 20696 | dot11f_pack_ie_erp_info( |
| 20697 | pCtx, (tDot11fIEERPInfo *) |
| 20698 | (pSrc + pIe->offset + |
| 20699 | sizeof(tDot11fIEERPInfo) * i), |
| 20700 | pBufRemaining, nBufRemaining, &len); |
| 20701 | break; |
| 20702 | case SigIeESECckmOpaque: |
| 20703 | status |= |
| 20704 | dot11f_pack_ie_ese_cckm_opaque( |
| 20705 | pCtx, (tDot11fIEESECckmOpaque *) |
| 20706 | (pSrc + pIe->offset + |
| 20707 | sizeof(tDot11fIEESECckmOpaque) * i), |
| 20708 | pBufRemaining, nBufRemaining, &len); |
| 20709 | break; |
| 20710 | case SigIeESERadMgmtCap: |
| 20711 | status |= |
| 20712 | dot11f_pack_ie_ese_rad_mgmt_cap( |
| 20713 | pCtx, (tDot11fIEESERadMgmtCap *) |
| 20714 | (pSrc + pIe->offset + |
| 20715 | sizeof(tDot11fIEESERadMgmtCap) * i), |
| 20716 | pBufRemaining, nBufRemaining, &len); |
| 20717 | break; |
| 20718 | case SigIeESETrafStrmMet: |
| 20719 | status |= |
| 20720 | dot11f_pack_ie_ese_traf_strm_met( |
| 20721 | pCtx, (tDot11fIEESETrafStrmMet *) |
| 20722 | (pSrc + pIe->offset + |
| 20723 | sizeof(tDot11fIEESETrafStrmMet) * i), |
| 20724 | pBufRemaining, nBufRemaining, &len); |
| 20725 | break; |
| 20726 | case SigIeESETrafStrmRateSet: |
| 20727 | status |= |
| 20728 | dot11f_pack_ie_ese_traf_strm_rate_set( |
| 20729 | pCtx, (tDot11fIEESETrafStrmRateSet *) |
| 20730 | (pSrc + pIe->offset + |
| 20731 | sizeof(tDot11fIEESETrafStrmRateSet) * i), |
| 20732 | pBufRemaining, nBufRemaining, &len); |
| 20733 | break; |
| 20734 | case SigIeESETxmitPower: |
| 20735 | status |= |
| 20736 | dot11f_pack_ie_ese_txmit_power( |
| 20737 | pCtx, (tDot11fIEESETxmitPower *) |
| 20738 | (pSrc + pIe->offset + |
| 20739 | sizeof(tDot11fIEESETxmitPower) * i), |
| 20740 | pBufRemaining, nBufRemaining, &len); |
| 20741 | break; |
| 20742 | case SigIeESEVersion: |
| 20743 | status |= |
| 20744 | dot11f_pack_ie_ese_version( |
| 20745 | pCtx, (tDot11fIEESEVersion *) |
| 20746 | (pSrc + pIe->offset + |
| 20747 | sizeof(tDot11fIEESEVersion) * i), |
| 20748 | pBufRemaining, nBufRemaining, &len); |
| 20749 | break; |
| 20750 | case SigIeExtCap: |
| 20751 | status |= |
| 20752 | dot11f_pack_ie_ext_cap( |
| 20753 | pCtx, (tDot11fIEExtCap *) |
| 20754 | (pSrc + pIe->offset + |
| 20755 | sizeof(tDot11fIEExtCap) * i), |
| 20756 | pBufRemaining, nBufRemaining, &len); |
| 20757 | break; |
| 20758 | case SigIeExtSuppRates: |
| 20759 | status |= |
| 20760 | dot11f_pack_ie_ext_supp_rates( |
| 20761 | pCtx, (tDot11fIEExtSuppRates *) |
| 20762 | (pSrc + pIe->offset + |
| 20763 | sizeof(tDot11fIEExtSuppRates) * i), |
| 20764 | pBufRemaining, nBufRemaining, &len); |
| 20765 | break; |
| 20766 | case SigIeFHParamSet: |
| 20767 | status |= |
| 20768 | dot11f_pack_ie_fh_param_set( |
| 20769 | pCtx, (tDot11fIEFHParamSet *) |
| 20770 | (pSrc + pIe->offset + |
| 20771 | sizeof(tDot11fIEFHParamSet) * i), |
| 20772 | pBufRemaining, nBufRemaining, &len); |
| 20773 | break; |
| 20774 | case SigIeFHParams: |
| 20775 | status |= |
| 20776 | dot11f_pack_ie_fh_params( |
| 20777 | pCtx, (tDot11fIEFHParams *) |
| 20778 | (pSrc + pIe->offset + |
| 20779 | sizeof(tDot11fIEFHParams) * i), |
| 20780 | pBufRemaining, nBufRemaining, &len); |
| 20781 | break; |
| 20782 | case SigIeFHPattTable: |
| 20783 | status |= |
| 20784 | dot11f_pack_ie_fh_patt_table( |
| 20785 | pCtx, (tDot11fIEFHPattTable *) |
| 20786 | (pSrc + pIe->offset + |
| 20787 | sizeof(tDot11fIEFHPattTable) * i), |
| 20788 | pBufRemaining, nBufRemaining, &len); |
| 20789 | break; |
| 20790 | case SigIeFTInfo: |
| 20791 | status |= |
| 20792 | dot11f_pack_ie_ft_info( |
| 20793 | pCtx, (tDot11fIEFTInfo *) |
| 20794 | (pSrc + pIe->offset + |
| 20795 | sizeof(tDot11fIEFTInfo) * i), |
| 20796 | pBufRemaining, nBufRemaining, &len); |
| 20797 | break; |
| 20798 | case SigIeHTCaps: |
| 20799 | status |= |
| 20800 | dot11f_pack_ie_ht_caps( |
| 20801 | pCtx, (tDot11fIEHTCaps *) |
| 20802 | (pSrc + pIe->offset + |
| 20803 | sizeof(tDot11fIEHTCaps) * i), |
| 20804 | pBufRemaining, nBufRemaining, &len); |
| 20805 | break; |
| 20806 | case SigIeHTInfo: |
| 20807 | status |= |
| 20808 | dot11f_pack_ie_ht_info( |
| 20809 | pCtx, (tDot11fIEHTInfo *) |
| 20810 | (pSrc + pIe->offset + |
| 20811 | sizeof(tDot11fIEHTInfo) * i), |
| 20812 | pBufRemaining, nBufRemaining, &len); |
| 20813 | break; |
| 20814 | case SigIeIBSSParams: |
| 20815 | status |= |
| 20816 | dot11f_pack_ie_ibss_params( |
| 20817 | pCtx, (tDot11fIEIBSSParams *) |
| 20818 | (pSrc + pIe->offset + |
| 20819 | sizeof(tDot11fIEIBSSParams) * i), |
| 20820 | pBufRemaining, nBufRemaining, &len); |
| 20821 | break; |
| 20822 | case SigIeLinkIdentifier: |
| 20823 | status |= |
| 20824 | dot11f_pack_ie_link_identifier( |
| 20825 | pCtx, (tDot11fIELinkIdentifier *) |
| 20826 | (pSrc + pIe->offset + |
| 20827 | sizeof(tDot11fIELinkIdentifier) * i), |
| 20828 | pBufRemaining, nBufRemaining, &len); |
| 20829 | break; |
| 20830 | case SigIeMeasurementReport: |
| 20831 | status |= |
| 20832 | dot11f_pack_ie_measurement_report( |
| 20833 | pCtx, (tDot11fIEMeasurementReport *) |
| 20834 | (pSrc + pIe->offset + |
| 20835 | sizeof(tDot11fIEMeasurementReport) * i), |
| 20836 | pBufRemaining, nBufRemaining, &len); |
| 20837 | break; |
| 20838 | case SigIeMeasurementRequest: |
| 20839 | status |= |
| 20840 | dot11f_pack_ie_measurement_request( |
| 20841 | pCtx, (tDot11fIEMeasurementRequest *) |
| 20842 | (pSrc + pIe->offset + |
| 20843 | sizeof(tDot11fIEMeasurementRequest) * i), |
| 20844 | pBufRemaining, nBufRemaining, &len); |
| 20845 | break; |
| 20846 | case SigIeMobilityDomain: |
| 20847 | status |= |
| 20848 | dot11f_pack_ie_mobility_domain( |
| 20849 | pCtx, (tDot11fIEMobilityDomain *) |
| 20850 | (pSrc + pIe->offset + |
| 20851 | sizeof(tDot11fIEMobilityDomain) * i), |
| 20852 | pBufRemaining, nBufRemaining, &len); |
| 20853 | break; |
| 20854 | case SigIeNeighborReport: |
| 20855 | status |= |
| 20856 | dot11f_pack_ie_neighbor_report( |
| 20857 | pCtx, (tDot11fIENeighborReport *) |
| 20858 | (pSrc + pIe->offset + |
| 20859 | sizeof(tDot11fIENeighborReport) * i), |
| 20860 | pBufRemaining, nBufRemaining, &len); |
| 20861 | break; |
| 20862 | case SigIeOBSSScanParameters: |
| 20863 | status |= |
| 20864 | dot11f_pack_ie_obss_scan_parameters( |
| 20865 | pCtx, (tDot11fIEOBSSScanParameters *) |
| 20866 | (pSrc + pIe->offset + |
| 20867 | sizeof(tDot11fIEOBSSScanParameters) * i), |
| 20868 | pBufRemaining, nBufRemaining, &len); |
| 20869 | break; |
| 20870 | case SigIeOperatingMode: |
| 20871 | status |= |
| 20872 | dot11f_pack_ie_operating_mode( |
| 20873 | pCtx, (tDot11fIEOperatingMode *) |
| 20874 | (pSrc + pIe->offset + |
| 20875 | sizeof(tDot11fIEOperatingMode) * i), |
| 20876 | pBufRemaining, nBufRemaining, &len); |
| 20877 | break; |
| 20878 | case SigIeP2PAssocReq: |
| 20879 | status |= |
| 20880 | dot11f_pack_ie_p2_p_assoc_req( |
| 20881 | pCtx, (tDot11fIEP2PAssocReq *) |
| 20882 | (pSrc + pIe->offset + |
| 20883 | sizeof(tDot11fIEP2PAssocReq) * i), |
| 20884 | pBufRemaining, nBufRemaining, &len); |
| 20885 | break; |
| 20886 | case SigIeP2PAssocRes: |
| 20887 | status |= |
| 20888 | dot11f_pack_ie_p2_p_assoc_res( |
| 20889 | pCtx, (tDot11fIEP2PAssocRes *) |
| 20890 | (pSrc + pIe->offset + |
| 20891 | sizeof(tDot11fIEP2PAssocRes) * i), |
| 20892 | pBufRemaining, nBufRemaining, &len); |
| 20893 | break; |
| 20894 | case SigIeP2PBeacon: |
| 20895 | status |= |
| 20896 | dot11f_pack_ie_p2_p_beacon( |
| 20897 | pCtx, (tDot11fIEP2PBeacon *) |
| 20898 | (pSrc + pIe->offset + |
| 20899 | sizeof(tDot11fIEP2PBeacon) * i), |
| 20900 | pBufRemaining, nBufRemaining, &len); |
| 20901 | break; |
| 20902 | case SigIeP2PBeaconProbeRes: |
| 20903 | status |= |
| 20904 | dot11f_pack_ie_p2_p_beacon_probe_res( |
| 20905 | pCtx, (tDot11fIEP2PBeaconProbeRes *) |
| 20906 | (pSrc + pIe->offset + |
| 20907 | sizeof(tDot11fIEP2PBeaconProbeRes) * i), |
| 20908 | pBufRemaining, nBufRemaining, &len); |
| 20909 | break; |
| 20910 | case SigIeP2PDeAuth: |
| 20911 | status |= |
| 20912 | dot11f_pack_ie_p2_p_de_auth( |
| 20913 | pCtx, (tDot11fIEP2PDeAuth *) |
| 20914 | (pSrc + pIe->offset + |
| 20915 | sizeof(tDot11fIEP2PDeAuth) * i), |
| 20916 | pBufRemaining, nBufRemaining, &len); |
| 20917 | break; |
| 20918 | case SigIeP2PDisAssoc: |
| 20919 | status |= |
| 20920 | dot11f_pack_ie_p2_p_dis_assoc( |
| 20921 | pCtx, (tDot11fIEP2PDisAssoc *) |
| 20922 | (pSrc + pIe->offset + |
| 20923 | sizeof(tDot11fIEP2PDisAssoc) * i), |
| 20924 | pBufRemaining, nBufRemaining, &len); |
| 20925 | break; |
| 20926 | case SigIeP2PIEOpaque: |
| 20927 | status |= |
| 20928 | dot11f_pack_ie_p2_pie_opaque( |
| 20929 | pCtx, (tDot11fIEP2PIEOpaque *) |
| 20930 | (pSrc + pIe->offset + |
| 20931 | sizeof(tDot11fIEP2PIEOpaque) * i), |
| 20932 | pBufRemaining, nBufRemaining, &len); |
| 20933 | break; |
| 20934 | case SigIeP2PProbeReq: |
| 20935 | status |= |
| 20936 | dot11f_pack_ie_p2_p_probe_req( |
| 20937 | pCtx, (tDot11fIEP2PProbeReq *) |
| 20938 | (pSrc + pIe->offset + |
| 20939 | sizeof(tDot11fIEP2PProbeReq) * i), |
| 20940 | pBufRemaining, nBufRemaining, &len); |
| 20941 | break; |
| 20942 | case SigIeP2PProbeRes: |
| 20943 | status |= |
| 20944 | dot11f_pack_ie_p2_p_probe_res( |
| 20945 | pCtx, (tDot11fIEP2PProbeRes *) |
| 20946 | (pSrc + pIe->offset + |
| 20947 | sizeof(tDot11fIEP2PProbeRes) * i), |
| 20948 | pBufRemaining, nBufRemaining, &len); |
| 20949 | break; |
| 20950 | case SigIePTIControl: |
| 20951 | status |= |
| 20952 | dot11f_pack_ie_pti_control( |
| 20953 | pCtx, (tDot11fIEPTIControl *) |
| 20954 | (pSrc + pIe->offset + |
| 20955 | sizeof(tDot11fIEPTIControl) * i), |
| 20956 | pBufRemaining, nBufRemaining, &len); |
| 20957 | break; |
| 20958 | case SigIePUBufferStatus: |
| 20959 | status |= |
| 20960 | dot11f_pack_ie_pu_buffer_status( |
| 20961 | pCtx, (tDot11fIEPUBufferStatus *) |
| 20962 | (pSrc + pIe->offset + |
| 20963 | sizeof(tDot11fIEPUBufferStatus) * i), |
| 20964 | pBufRemaining, nBufRemaining, &len); |
| 20965 | break; |
| 20966 | case SigIePowerCaps: |
| 20967 | status |= |
| 20968 | dot11f_pack_ie_power_caps( |
| 20969 | pCtx, (tDot11fIEPowerCaps *) |
| 20970 | (pSrc + pIe->offset + |
| 20971 | sizeof(tDot11fIEPowerCaps) * i), |
| 20972 | pBufRemaining, nBufRemaining, &len); |
| 20973 | break; |
| 20974 | case SigIePowerConstraints: |
| 20975 | status |= |
| 20976 | dot11f_pack_ie_power_constraints( |
| 20977 | pCtx, (tDot11fIEPowerConstraints *) |
| 20978 | (pSrc + pIe->offset + |
| 20979 | sizeof(tDot11fIEPowerConstraints) * i), |
| 20980 | pBufRemaining, nBufRemaining, &len); |
| 20981 | break; |
| 20982 | case SigIeQBSSLoad: |
| 20983 | status |= |
| 20984 | dot11f_pack_ie_qbss_load( |
| 20985 | pCtx, (tDot11fIEQBSSLoad *) |
| 20986 | (pSrc + pIe->offset + |
| 20987 | sizeof(tDot11fIEQBSSLoad) * i), |
| 20988 | pBufRemaining, nBufRemaining, &len); |
| 20989 | break; |
| 20990 | case SigIeQComVendorIE: |
| 20991 | status |= |
| 20992 | dot11f_pack_ie_QComVendorIE( |
| 20993 | pCtx, (tDot11fIEQComVendorIE *) |
| 20994 | (pSrc + pIe->offset + |
| 20995 | sizeof(tDot11fIEQComVendorIE) * i), |
| 20996 | pBufRemaining, nBufRemaining, &len); |
| 20997 | break; |
| 20998 | case SigIeQOSCapsAp: |
| 20999 | status |= |
| 21000 | dot11f_pack_ie_qos_caps_ap( |
| 21001 | pCtx, (tDot11fIEQOSCapsAp *) |
| 21002 | (pSrc + pIe->offset + |
| 21003 | sizeof(tDot11fIEQOSCapsAp) * i), |
| 21004 | pBufRemaining, nBufRemaining, &len); |
| 21005 | break; |
| 21006 | case SigIeQOSCapsStation: |
| 21007 | status |= |
| 21008 | dot11f_pack_ie_qos_caps_station( |
| 21009 | pCtx, (tDot11fIEQOSCapsStation *) |
| 21010 | (pSrc + pIe->offset + |
| 21011 | sizeof(tDot11fIEQOSCapsStation) * i), |
| 21012 | pBufRemaining, nBufRemaining, &len); |
| 21013 | break; |
| 21014 | case SigIeQosMapSet: |
| 21015 | status |= |
| 21016 | dot11f_pack_ie_qos_map_set( |
| 21017 | pCtx, (tDot11fIEQosMapSet *) |
| 21018 | (pSrc + pIe->offset + |
| 21019 | sizeof(tDot11fIEQosMapSet) * i), |
| 21020 | pBufRemaining, nBufRemaining, &len); |
| 21021 | break; |
| 21022 | case SigIeQuiet: |
| 21023 | status |= |
| 21024 | dot11f_pack_ie_quiet( |
| 21025 | pCtx, (tDot11fIEQuiet *) |
| 21026 | (pSrc + pIe->offset + |
| 21027 | sizeof(tDot11fIEQuiet) * i), |
| 21028 | pBufRemaining, nBufRemaining, &len); |
| 21029 | break; |
| 21030 | case SigIeRCPIIE: |
| 21031 | status |= |
| 21032 | dot11f_pack_ie_rcpiie( |
| 21033 | pCtx, (tDot11fIERCPIIE *) |
| 21034 | (pSrc + pIe->offset + |
| 21035 | sizeof(tDot11fIERCPIIE) * i), |
| 21036 | pBufRemaining, nBufRemaining, &len); |
| 21037 | break; |
| 21038 | case SigIeRICDataDesc: |
| 21039 | status |= |
| 21040 | dot11f_pack_ie_ric_data_desc( |
| 21041 | pCtx, (tDot11fIERICDataDesc *) |
| 21042 | (pSrc + pIe->offset + |
| 21043 | sizeof(tDot11fIERICDataDesc) * i), |
| 21044 | pBufRemaining, nBufRemaining, &len); |
| 21045 | break; |
| 21046 | case SigIeRSN: |
| 21047 | status |= |
| 21048 | dot11f_pack_ie_rsn( |
| 21049 | pCtx, (tDot11fIERSN *) |
| 21050 | (pSrc + pIe->offset + |
| 21051 | sizeof(tDot11fIERSN) * i), |
| 21052 | pBufRemaining, nBufRemaining, &len); |
| 21053 | break; |
| 21054 | case SigIeRSNIIE: |
| 21055 | status |= |
| 21056 | dot11f_pack_ie_rsniie( |
| 21057 | pCtx, (tDot11fIERSNIIE *) |
| 21058 | (pSrc + pIe->offset + |
| 21059 | sizeof(tDot11fIERSNIIE) * i), |
| 21060 | pBufRemaining, nBufRemaining, &len); |
| 21061 | break; |
| 21062 | case SigIeRSNOpaque: |
| 21063 | status |= |
| 21064 | dot11f_pack_ie_rsn_opaque( |
| 21065 | pCtx, (tDot11fIERSNOpaque *) |
| 21066 | (pSrc + pIe->offset + |
| 21067 | sizeof(tDot11fIERSNOpaque) * i), |
| 21068 | pBufRemaining, nBufRemaining, &len); |
| 21069 | break; |
| 21070 | case SigIeSuppChannels: |
| 21071 | status |= |
| 21072 | dot11f_pack_ie_supp_channels( |
| 21073 | pCtx, (tDot11fIESuppChannels *) |
| 21074 | (pSrc + pIe->offset + |
| 21075 | sizeof(tDot11fIESuppChannels) * i), |
| 21076 | pBufRemaining, nBufRemaining, &len); |
| 21077 | break; |
| 21078 | case SigIeSuppOperatingClasses: |
| 21079 | status |= |
| 21080 | dot11f_pack_ie_supp_operating_classes( |
| 21081 | pCtx, (tDot11fIESuppOperatingClasses *) |
| 21082 | (pSrc + pIe->offset + |
| 21083 | sizeof(tDot11fIESuppOperatingClasses) * i), |
| 21084 | pBufRemaining, nBufRemaining, &len); |
| 21085 | break; |
| 21086 | case SigIeSuppRates: |
| 21087 | status |= |
| 21088 | dot11f_pack_ie_supp_rates( |
| 21089 | pCtx, (tDot11fIESuppRates *) |
| 21090 | (pSrc + pIe->offset + |
| 21091 | sizeof(tDot11fIESuppRates) * i), |
| 21092 | pBufRemaining, nBufRemaining, &len); |
| 21093 | break; |
| 21094 | case SigIeTIM: |
| 21095 | status |= |
| 21096 | dot11f_pack_ie_tim( |
| 21097 | pCtx, (tDot11fIETIM *) |
| 21098 | (pSrc + pIe->offset + |
| 21099 | sizeof(tDot11fIETIM) * i), |
| 21100 | pBufRemaining, nBufRemaining, &len); |
| 21101 | break; |
| 21102 | case SigIeTPCReport: |
| 21103 | status |= |
| 21104 | dot11f_pack_ie_tpc_report( |
| 21105 | pCtx, (tDot11fIETPCReport *) |
| 21106 | (pSrc + pIe->offset + |
| 21107 | sizeof(tDot11fIETPCReport) * i), |
| 21108 | pBufRemaining, nBufRemaining, &len); |
| 21109 | break; |
| 21110 | case SigIeTPCRequest: |
| 21111 | status |= |
| 21112 | dot11f_pack_ie_tpc_request( |
| 21113 | pCtx, (tDot11fIETPCRequest *) |
| 21114 | (pSrc + pIe->offset + |
| 21115 | sizeof(tDot11fIETPCRequest) * i), |
| 21116 | pBufRemaining, nBufRemaining, &len); |
| 21117 | break; |
| 21118 | case SigIeTimeAdvertisement: |
| 21119 | status |= |
| 21120 | dot11f_pack_ie_time_advertisement( |
| 21121 | pCtx, (tDot11fIETimeAdvertisement *) |
| 21122 | (pSrc + pIe->offset + |
| 21123 | sizeof(tDot11fIETimeAdvertisement) * i), |
| 21124 | pBufRemaining, nBufRemaining, &len); |
| 21125 | break; |
| 21126 | case SigIeTimeoutInterval: |
| 21127 | status |= |
| 21128 | dot11f_pack_ie_timeout_interval( |
| 21129 | pCtx, (tDot11fIETimeoutInterval *) |
| 21130 | (pSrc + pIe->offset + |
| 21131 | sizeof(tDot11fIETimeoutInterval) * i), |
| 21132 | pBufRemaining, nBufRemaining, &len); |
| 21133 | break; |
| 21134 | case SigIeVHTExtBssLoad: |
| 21135 | status |= |
| 21136 | dot11f_pack_ie_vht_ext_bss_load( |
| 21137 | pCtx, (tDot11fIEVHTExtBssLoad *) |
| 21138 | (pSrc + pIe->offset + |
| 21139 | sizeof(tDot11fIEVHTExtBssLoad) * i), |
| 21140 | pBufRemaining, nBufRemaining, &len); |
| 21141 | break; |
| 21142 | case SigIeVendor1IE: |
| 21143 | status |= |
| 21144 | dot11f_pack_ie_vendor1_ie( |
| 21145 | pCtx, (tDot11fIEVendor1IE *) |
| 21146 | (pSrc + pIe->offset + |
| 21147 | sizeof(tDot11fIEVendor1IE) * i), |
| 21148 | pBufRemaining, nBufRemaining, &len); |
| 21149 | break; |
| 21150 | case SigIeVendor3IE: |
| 21151 | status |= |
| 21152 | dot11f_pack_ie_vendor3_ie( |
| 21153 | pCtx, (tDot11fIEVendor3IE *) |
| 21154 | (pSrc + pIe->offset + |
| 21155 | sizeof(tDot11fIEVendor3IE) * i), |
| 21156 | pBufRemaining, nBufRemaining, &len); |
| 21157 | break; |
| 21158 | case SigIeWAPI: |
| 21159 | status |= |
| 21160 | dot11f_pack_ie_wapi( |
| 21161 | pCtx, (tDot11fIEWAPI *) |
| 21162 | (pSrc + pIe->offset + |
| 21163 | sizeof(tDot11fIEWAPI) * i), |
| 21164 | pBufRemaining, nBufRemaining, &len); |
| 21165 | break; |
| 21166 | case SigIeWAPIOpaque: |
| 21167 | status |= |
| 21168 | dot11f_pack_ie_wapi_opaque( |
| 21169 | pCtx, (tDot11fIEWAPIOpaque *) |
| 21170 | (pSrc + pIe->offset + |
| 21171 | sizeof(tDot11fIEWAPIOpaque) * i), |
| 21172 | pBufRemaining, nBufRemaining, &len); |
| 21173 | break; |
| 21174 | case SigIeWFATPC: |
| 21175 | status |= |
| 21176 | dot11f_pack_ie_wfatpc( |
| 21177 | pCtx, (tDot11fIEWFATPC *) |
| 21178 | (pSrc + pIe->offset + |
| 21179 | sizeof(tDot11fIEWFATPC) * i), |
| 21180 | pBufRemaining, nBufRemaining, &len); |
| 21181 | break; |
| 21182 | case SigIeWFDIEOpaque: |
| 21183 | status |= |
| 21184 | dot11f_pack_ie_wfdie_opaque( |
| 21185 | pCtx, (tDot11fIEWFDIEOpaque *) |
| 21186 | (pSrc + pIe->offset + |
| 21187 | sizeof(tDot11fIEWFDIEOpaque) * i), |
| 21188 | pBufRemaining, nBufRemaining, &len); |
| 21189 | break; |
| 21190 | case SigIeWMMCaps: |
| 21191 | status |= |
| 21192 | dot11f_pack_ie_wmm_caps( |
| 21193 | pCtx, (tDot11fIEWMMCaps *) |
| 21194 | (pSrc + pIe->offset + |
| 21195 | sizeof(tDot11fIEWMMCaps) * i), |
| 21196 | pBufRemaining, nBufRemaining, &len); |
| 21197 | break; |
| 21198 | case SigIeWMMInfoAp: |
| 21199 | status |= |
| 21200 | dot11f_pack_ie_wmm_info_ap( |
| 21201 | pCtx, (tDot11fIEWMMInfoAp *) |
| 21202 | (pSrc + pIe->offset + |
| 21203 | sizeof(tDot11fIEWMMInfoAp) * i), |
| 21204 | pBufRemaining, nBufRemaining, &len); |
| 21205 | break; |
| 21206 | case SigIeWMMInfoStation: |
| 21207 | status |= |
| 21208 | dot11f_pack_ie_wmm_info_station( |
| 21209 | pCtx, (tDot11fIEWMMInfoStation *) |
| 21210 | (pSrc + pIe->offset + |
| 21211 | sizeof(tDot11fIEWMMInfoStation) * i), |
| 21212 | pBufRemaining, nBufRemaining, &len); |
| 21213 | break; |
| 21214 | case SigIeWMMParams: |
| 21215 | status |= |
| 21216 | dot11f_pack_ie_wmm_params( |
| 21217 | pCtx, (tDot11fIEWMMParams *) |
| 21218 | (pSrc + pIe->offset + |
| 21219 | sizeof(tDot11fIEWMMParams) * i), |
| 21220 | pBufRemaining, nBufRemaining, &len); |
| 21221 | break; |
| 21222 | case SigIeWPA: |
| 21223 | status |= |
| 21224 | dot11f_pack_ie_wpa( |
| 21225 | pCtx, (tDot11fIEWPA *) |
| 21226 | (pSrc + pIe->offset + |
| 21227 | sizeof(tDot11fIEWPA) * i), |
| 21228 | pBufRemaining, nBufRemaining, &len); |
| 21229 | break; |
| 21230 | case SigIeWPAOpaque: |
| 21231 | status |= |
| 21232 | dot11f_pack_ie_wpa_opaque( |
| 21233 | pCtx, (tDot11fIEWPAOpaque *) |
| 21234 | (pSrc + pIe->offset + |
| 21235 | sizeof(tDot11fIEWPAOpaque) * i), |
| 21236 | pBufRemaining, nBufRemaining, &len); |
| 21237 | break; |
| 21238 | case SigIeWSC: |
| 21239 | status |= |
| 21240 | dot11f_pack_ie_wsc( |
| 21241 | pCtx, (tDot11fIEWSC *) |
| 21242 | (pSrc + pIe->offset + |
| 21243 | sizeof(tDot11fIEWSC) * i), |
| 21244 | pBufRemaining, nBufRemaining, &len); |
| 21245 | break; |
| 21246 | case SigIeWscAssocReq: |
| 21247 | status |= |
| 21248 | dot11f_pack_ie_wsc_assoc_req( |
| 21249 | pCtx, (tDot11fIEWscAssocReq *) |
| 21250 | (pSrc + pIe->offset + |
| 21251 | sizeof(tDot11fIEWscAssocReq) * i), |
| 21252 | pBufRemaining, nBufRemaining, &len); |
| 21253 | break; |
| 21254 | case SigIeWscAssocRes: |
| 21255 | status |= |
| 21256 | dot11f_pack_ie_wsc_assoc_res( |
| 21257 | pCtx, (tDot11fIEWscAssocRes *) |
| 21258 | (pSrc + pIe->offset + |
| 21259 | sizeof(tDot11fIEWscAssocRes) * i), |
| 21260 | pBufRemaining, nBufRemaining, &len); |
| 21261 | break; |
| 21262 | case SigIeWscBeacon: |
| 21263 | status |= |
| 21264 | dot11f_pack_ie_wsc_beacon( |
| 21265 | pCtx, (tDot11fIEWscBeacon *) |
| 21266 | (pSrc + pIe->offset + |
| 21267 | sizeof(tDot11fIEWscBeacon) * i), |
| 21268 | pBufRemaining, nBufRemaining, &len); |
| 21269 | break; |
| 21270 | case SigIeWscBeaconProbeRes: |
| 21271 | status |= |
| 21272 | dot11f_pack_ie_wsc_beacon_probe_res( |
| 21273 | pCtx, (tDot11fIEWscBeaconProbeRes *) |
| 21274 | (pSrc + pIe->offset + |
| 21275 | sizeof(tDot11fIEWscBeaconProbeRes) * i), |
| 21276 | pBufRemaining, nBufRemaining, &len); |
| 21277 | break; |
| 21278 | case SigIeWscIEOpaque: |
| 21279 | status |= |
| 21280 | dot11f_pack_ie_wsc_ie_opaque( |
| 21281 | pCtx, (tDot11fIEWscIEOpaque *) |
| 21282 | (pSrc + pIe->offset + |
| 21283 | sizeof(tDot11fIEWscIEOpaque) * i), |
| 21284 | pBufRemaining, nBufRemaining, &len); |
| 21285 | break; |
| 21286 | case SigIeWscProbeReq: |
| 21287 | status |= |
| 21288 | dot11f_pack_ie_wsc_probe_req( |
| 21289 | pCtx, (tDot11fIEWscProbeReq *) |
| 21290 | (pSrc + pIe->offset + |
| 21291 | sizeof(tDot11fIEWscProbeReq) * i), |
| 21292 | pBufRemaining, nBufRemaining, &len); |
| 21293 | break; |
| 21294 | case SigIeWscProbeRes: |
| 21295 | status |= |
| 21296 | dot11f_pack_ie_wsc_probe_res( |
| 21297 | pCtx, (tDot11fIEWscProbeRes *) |
| 21298 | (pSrc + pIe->offset + |
| 21299 | sizeof(tDot11fIEWscProbeRes) * i), |
| 21300 | pBufRemaining, nBufRemaining, &len); |
| 21301 | break; |
| 21302 | case SigIeWscReassocRes: |
| 21303 | status |= |
| 21304 | dot11f_pack_ie_wsc_reassoc_res( |
| 21305 | pCtx, (tDot11fIEWscReassocRes *) |
| 21306 | (pSrc + pIe->offset + |
| 21307 | sizeof(tDot11fIEWscReassocRes) * i), |
| 21308 | pBufRemaining, nBufRemaining, &len); |
| 21309 | break; |
| 21310 | case SigIeext_chan_switch_ann: |
| 21311 | status |= |
| 21312 | dot11f_pack_ie_ext_chan_switch_ann( |
| 21313 | pCtx, (tDot11fIEext_chan_switch_ann *) |
| 21314 | (pSrc + pIe->offset + |
| 21315 | sizeof(tDot11fIEext_chan_switch_ann) * i), |
| 21316 | pBufRemaining, nBufRemaining, &len); |
| 21317 | break; |
| 21318 | case SigIeht2040_bss_coexistence: |
| 21319 | status |= |
| 21320 | dot11f_pack_ie_ht2040_bss_coexistence( |
| 21321 | pCtx, (tDot11fIEht2040_bss_coexistence *) |
| 21322 | (pSrc + pIe->offset + |
| 21323 | sizeof(tDot11fIEht2040_bss_coexistence) * i), |
| 21324 | pBufRemaining, nBufRemaining, &len); |
| 21325 | break; |
| 21326 | case SigIeht2040_bss_intolerant_report: |
| 21327 | status |= |
| 21328 | dot11f_pack_ie_ht2040_bss_intolerant_report( |
| 21329 | pCtx, (tDot11fIEht2040_bss_intolerant_report *) |
| 21330 | (pSrc + pIe->offset + |
| 21331 | sizeof(tDot11fIEht2040_bss_intolerant_report) * i), |
| 21332 | pBufRemaining, nBufRemaining, &len); |
| 21333 | break; |
| 21334 | case SigIesec_chan_offset_ele: |
| 21335 | status |= |
| 21336 | dot11f_pack_ie_sec_chan_offset_ele( |
| 21337 | pCtx, (tDot11fIEsec_chan_offset_ele *) |
| 21338 | (pSrc + pIe->offset + |
| 21339 | sizeof(tDot11fIEsec_chan_offset_ele) * i), |
| 21340 | pBufRemaining, nBufRemaining, &len); |
| 21341 | break; |
| 21342 | case SigIevendor2_ie: |
| 21343 | status |= |
| 21344 | dot11f_pack_ie_vendor2_ie( |
| 21345 | pCtx, (tDot11fIEvendor2_ie *) |
| 21346 | (pSrc + pIe->offset + |
| 21347 | sizeof(tDot11fIEvendor2_ie) * i), |
| 21348 | pBufRemaining, nBufRemaining, &len); |
| 21349 | break; |
| 21350 | default: |
| 21351 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR-- I don" |
| 21352 | "'t know about the IE %d; this is most likely a b" |
| 21353 | "ug in 'framesc'.\n"), pFf->sig); |
| 21354 | return DOT11F_INTERNAL_ERROR; |
| 21355 | } |
| 21356 | |
| 21357 | pBufRemaining += len; |
| 21358 | nBufRemaining -= len; |
| 21359 | *pnConsumed += len; |
| 21360 | } |
| 21361 | |
| 21362 | ++pIe; |
| 21363 | |
| 21364 | } |
| 21365 | |
| 21366 | return status; |
| 21367 | |
| 21368 | } |
| 21369 | |
| 21370 | static uint32_t pack_tlv_core(tpAniSirGlobal pCtx, |
| 21371 | uint8_t *pSrc, |
| 21372 | uint8_t *pBuf, |
| 21373 | uint32_t nBuf, |
| 21374 | uint32_t *pnConsumed, |
| 21375 | const tTLVDefn TLVs[], |
| 21376 | uint32_t *pidx) |
| 21377 | { |
| 21378 | const tTLVDefn *pTlv; |
| 21379 | tFRAMES_BOOL *pfFound; |
| 21380 | uint8_t *pBufRemaining; |
| 21381 | uint32_t nBufRemaining, status, len; |
| 21382 | |
| 21383 | DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed); |
| 21384 | |
| 21385 | (void)pCtx; |
| 21386 | status = DOT11F_PARSE_SUCCESS; |
| 21387 | pBufRemaining = pBuf; |
| 21388 | nBufRemaining = nBuf; |
| 21389 | |
| 21390 | pTlv = &(TLVs[0]); |
| 21391 | while (0xffff != pTlv->id) { |
| 21392 | pfFound = (tFRAMES_BOOL *)(pSrc + pTlv->offset + |
| 21393 | pTlv->presenceOffset); |
| 21394 | if (*pfFound && pTlv->minSize > nBufRemaining) { |
| 21395 | FRAMES_LOG3(pCtx, FRLOGE, FRFL("The TLV %s takes at least" |
| 21396 | " %d bytes, but there are only %d left in the buffer." |
| 21397 | "\n"), pTlv->name, pTlv->minSize, nBufRemaining); |
| 21398 | return DOT11F_BUFFER_OVERFLOW; |
| 21399 | } |
| 21400 | |
| 21401 | len = 0U; |
| 21402 | |
| 21403 | if (*pfFound) { |
| 21404 | switch (pTlv->sig) { |
| 21405 | case SigTlvAuthorizedMACs: |
| 21406 | status |= |
| 21407 | dot11f_pack_tlv_authorized_ma_cs( |
| 21408 | pCtx, (tDot11fTLVAuthorizedMACs *) |
| 21409 | (pSrc + pTlv->offset), pBufRemaining, |
| 21410 | nBufRemaining, &len); |
| 21411 | break; |
| 21412 | case SigTlvRequestToEnroll: |
| 21413 | status |= |
| 21414 | dot11f_pack_tlv_request_to_enroll( |
| 21415 | pCtx, (tDot11fTLVRequestToEnroll *) |
| 21416 | (pSrc + pTlv->offset), pBufRemaining, |
| 21417 | nBufRemaining, &len); |
| 21418 | break; |
| 21419 | case SigTlvVersion2: |
| 21420 | status |= |
| 21421 | dot11f_pack_tlv_version2( |
| 21422 | pCtx, (tDot11fTLVVersion2 *) |
| 21423 | (pSrc + pTlv->offset), pBufRemaining, |
| 21424 | nBufRemaining, &len); |
| 21425 | break; |
| 21426 | case SigTlvAPSetupLocked: |
| 21427 | status |= |
| 21428 | dot11f_pack_tlv_ap_setup_locked( |
| 21429 | pCtx, (tDot11fTLVAPSetupLocked *) |
| 21430 | (pSrc + pTlv->offset), pBufRemaining, |
| 21431 | nBufRemaining, &len); |
| 21432 | break; |
| 21433 | case SigTlvAssociationState: |
| 21434 | status |= |
| 21435 | dot11f_pack_tlv_association_state( |
| 21436 | pCtx, (tDot11fTLVAssociationState *) |
| 21437 | (pSrc + pTlv->offset), pBufRemaining, |
| 21438 | nBufRemaining, &len); |
| 21439 | break; |
| 21440 | case SigTlvConfigMethods: |
| 21441 | status |= |
| 21442 | dot11f_pack_tlv_config_methods( |
| 21443 | pCtx, (tDot11fTLVConfigMethods *) |
| 21444 | (pSrc + pTlv->offset), pBufRemaining, |
| 21445 | nBufRemaining, &len); |
| 21446 | break; |
| 21447 | case SigTlvConfigurationError: |
| 21448 | status |= |
| 21449 | dot11f_pack_tlv_configuration_error( |
| 21450 | pCtx, (tDot11fTLVConfigurationError *) |
| 21451 | (pSrc + pTlv->offset), pBufRemaining, |
| 21452 | nBufRemaining, &len); |
| 21453 | break; |
| 21454 | case SigTlvDeviceName: |
| 21455 | status |= |
| 21456 | dot11f_pack_tlv_device_name( |
| 21457 | pCtx, (tDot11fTLVDeviceName *) |
| 21458 | (pSrc + pTlv->offset), pBufRemaining, |
| 21459 | nBufRemaining, &len); |
| 21460 | break; |
| 21461 | case SigTlvDevicePasswordID: |
| 21462 | status |= |
| 21463 | dot11f_pack_tlv_device_password_id( |
| 21464 | pCtx, (tDot11fTLVDevicePasswordID *) |
| 21465 | (pSrc + pTlv->offset), pBufRemaining, |
| 21466 | nBufRemaining, &len); |
| 21467 | break; |
| 21468 | case SigTlvExtendedListenTiming: |
| 21469 | status |= |
| 21470 | dot11f_pack_tlv_extended_listen_timing( |
| 21471 | pCtx, (tDot11fTLVExtendedListenTiming *) |
| 21472 | (pSrc + pTlv->offset), pBufRemaining, |
| 21473 | nBufRemaining, &len); |
| 21474 | break; |
| 21475 | case SigTlvListenChannel: |
| 21476 | status |= |
| 21477 | dot11f_pack_tlv_listen_channel( |
| 21478 | pCtx, (tDot11fTLVListenChannel *) |
| 21479 | (pSrc + pTlv->offset), pBufRemaining, |
| 21480 | nBufRemaining, &len); |
| 21481 | break; |
| 21482 | case SigTlvManufacturer: |
| 21483 | status |= |
| 21484 | dot11f_pack_tlv_manufacturer( |
| 21485 | pCtx, (tDot11fTLVManufacturer *) |
| 21486 | (pSrc + pTlv->offset), pBufRemaining, |
| 21487 | nBufRemaining, &len); |
| 21488 | break; |
| 21489 | case SigTlvMinorReasonCode: |
| 21490 | status |= |
| 21491 | dot11f_pack_tlv_minor_reason_code( |
| 21492 | pCtx, (tDot11fTLVMinorReasonCode *) |
| 21493 | (pSrc + pTlv->offset), pBufRemaining, |
| 21494 | nBufRemaining, &len); |
| 21495 | break; |
| 21496 | case SigTlvModelName: |
| 21497 | status |= |
| 21498 | dot11f_pack_tlv_model_name( |
| 21499 | pCtx, (tDot11fTLVModelName *) |
| 21500 | (pSrc + pTlv->offset), pBufRemaining, |
| 21501 | nBufRemaining, &len); |
| 21502 | break; |
| 21503 | case SigTlvModelNumber: |
| 21504 | status |= |
| 21505 | dot11f_pack_tlv_model_number( |
| 21506 | pCtx, (tDot11fTLVModelNumber *) |
| 21507 | (pSrc + pTlv->offset), pBufRemaining, |
| 21508 | nBufRemaining, &len); |
| 21509 | break; |
| 21510 | case SigTlvNoticeOfAbsence: |
| 21511 | status |= |
| 21512 | dot11f_pack_tlv_notice_of_absence( |
| 21513 | pCtx, (tDot11fTLVNoticeOfAbsence *) |
| 21514 | (pSrc + pTlv->offset), pBufRemaining, |
| 21515 | nBufRemaining, &len); |
| 21516 | break; |
| 21517 | case SigTlvOperatingChannel: |
| 21518 | status |= |
| 21519 | dot11f_pack_tlv_operating_channel( |
| 21520 | pCtx, (tDot11fTLVOperatingChannel *) |
| 21521 | (pSrc + pTlv->offset), pBufRemaining, |
| 21522 | nBufRemaining, &len); |
| 21523 | break; |
| 21524 | case SigTlvP2PCapability: |
| 21525 | status |= |
| 21526 | dot11f_pack_tlv_p2_p_capability( |
| 21527 | pCtx, (tDot11fTLVP2PCapability *) |
| 21528 | (pSrc + pTlv->offset), pBufRemaining, |
| 21529 | nBufRemaining, &len); |
| 21530 | break; |
| 21531 | case SigTlvP2PDeviceId: |
| 21532 | status |= |
| 21533 | dot11f_pack_tlv_p2_p_device_id( |
| 21534 | pCtx, (tDot11fTLVP2PDeviceId *) |
| 21535 | (pSrc + pTlv->offset), pBufRemaining, |
| 21536 | nBufRemaining, &len); |
| 21537 | break; |
| 21538 | case SigTlvP2PDeviceInfo: |
| 21539 | status |= |
| 21540 | dot11f_pack_tlv_p2_p_device_info( |
| 21541 | pCtx, (tDot11fTLVP2PDeviceInfo *) |
| 21542 | (pSrc + pTlv->offset), pBufRemaining, |
| 21543 | nBufRemaining, &len); |
| 21544 | break; |
| 21545 | case SigTlvP2PGroupInfo: |
| 21546 | status |= |
| 21547 | dot11f_pack_tlv_p2_p_group_info( |
| 21548 | pCtx, (tDot11fTLVP2PGroupInfo *) |
| 21549 | (pSrc + pTlv->offset), pBufRemaining, |
| 21550 | nBufRemaining, &len); |
| 21551 | break; |
| 21552 | case SigTlvP2PStatus: |
| 21553 | status |= |
| 21554 | dot11f_pack_tlv_p2_p_status( |
| 21555 | pCtx, (tDot11fTLVP2PStatus *) |
| 21556 | (pSrc + pTlv->offset), pBufRemaining, |
| 21557 | nBufRemaining, &len); |
| 21558 | break; |
| 21559 | case SigTlvPrimaryDeviceType: |
| 21560 | status |= |
| 21561 | dot11f_pack_tlv_primary_device_type( |
| 21562 | pCtx, (tDot11fTLVPrimaryDeviceType *) |
| 21563 | (pSrc + pTlv->offset), pBufRemaining, |
| 21564 | nBufRemaining, &len); |
| 21565 | break; |
| 21566 | case SigTlvRFBands: |
| 21567 | status |= |
| 21568 | dot11f_pack_tlv_rf_bands( |
| 21569 | pCtx, (tDot11fTLVRFBands *) |
| 21570 | (pSrc + pTlv->offset), pBufRemaining, |
| 21571 | nBufRemaining, &len); |
| 21572 | break; |
| 21573 | case SigTlvRequestDeviceType: |
| 21574 | status |= |
| 21575 | dot11f_pack_tlv_request_device_type( |
| 21576 | pCtx, (tDot11fTLVRequestDeviceType *) |
| 21577 | (pSrc + pTlv->offset), pBufRemaining, |
| 21578 | nBufRemaining, &len); |
| 21579 | break; |
| 21580 | case SigTlvRequestType: |
| 21581 | status |= |
| 21582 | dot11f_pack_tlv_request_type( |
| 21583 | pCtx, (tDot11fTLVRequestType *) |
| 21584 | (pSrc + pTlv->offset), pBufRemaining, |
| 21585 | nBufRemaining, &len); |
| 21586 | break; |
| 21587 | case SigTlvResponseType: |
| 21588 | status |= |
| 21589 | dot11f_pack_tlv_response_type( |
| 21590 | pCtx, (tDot11fTLVResponseType *) |
| 21591 | (pSrc + pTlv->offset), pBufRemaining, |
| 21592 | nBufRemaining, &len); |
| 21593 | break; |
| 21594 | case SigTlvSelectedRegistrar: |
| 21595 | status |= |
| 21596 | dot11f_pack_tlv_selected_registrar( |
| 21597 | pCtx, (tDot11fTLVSelectedRegistrar *) |
| 21598 | (pSrc + pTlv->offset), pBufRemaining, |
| 21599 | nBufRemaining, &len); |
| 21600 | break; |
| 21601 | case SigTlvSelectedRegistrarConfigMethods: |
| 21602 | status |= |
| 21603 | dot11f_pack_tlv_selected_registrar_config_methods( |
| 21604 | pCtx, (tDot11fTLVSelectedRegistrarConfigMethods *) |
| 21605 | (pSrc + pTlv->offset), pBufRemaining, |
| 21606 | nBufRemaining, &len); |
| 21607 | break; |
| 21608 | case SigTlvSerialNumber: |
| 21609 | status |= |
| 21610 | dot11f_pack_tlv_serial_number( |
| 21611 | pCtx, (tDot11fTLVSerialNumber *) |
| 21612 | (pSrc + pTlv->offset), pBufRemaining, |
| 21613 | nBufRemaining, &len); |
| 21614 | break; |
| 21615 | case SigTlvUUID_E: |
| 21616 | status |= |
| 21617 | dot11f_pack_tlv_uuid_e( |
| 21618 | pCtx, (tDot11fTLVUUID_E *) |
| 21619 | (pSrc + pTlv->offset), pBufRemaining, |
| 21620 | nBufRemaining, &len); |
| 21621 | break; |
| 21622 | case SigTlvUUID_R: |
| 21623 | status |= |
| 21624 | dot11f_pack_tlv_uuid_r( |
| 21625 | pCtx, (tDot11fTLVUUID_R *) |
| 21626 | (pSrc + pTlv->offset), pBufRemaining, |
| 21627 | nBufRemaining, &len); |
| 21628 | break; |
| 21629 | case SigTlvVendorExtension: |
| 21630 | status |= |
| 21631 | dot11f_pack_tlv_vendor_extension( |
| 21632 | pCtx, (tDot11fTLVVendorExtension *) |
| 21633 | (pSrc + pTlv->offset), pBufRemaining, |
| 21634 | nBufRemaining, &len); |
| 21635 | break; |
| 21636 | case SigTlvVersion: |
| 21637 | status |= |
| 21638 | dot11f_pack_tlv_version( |
| 21639 | pCtx, (tDot11fTLVVersion *) |
| 21640 | (pSrc + pTlv->offset), pBufRemaining, |
| 21641 | nBufRemaining, &len); |
| 21642 | break; |
| 21643 | case SigTlvWPSState: |
| 21644 | status |= |
| 21645 | dot11f_pack_tlv_wps_state( |
| 21646 | pCtx, (tDot11fTLVWPSState *) |
| 21647 | (pSrc + pTlv->offset), pBufRemaining, |
| 21648 | nBufRemaining, &len); |
| 21649 | break; |
| 21650 | case SigTlvP2PInterface: |
| 21651 | status |= |
| 21652 | dot11f_pack_tlv_p2_p_interface( |
| 21653 | pCtx, (tDot11fTLVP2PInterface *) |
| 21654 | (pSrc + pTlv->offset), pBufRemaining, |
| 21655 | nBufRemaining, &len); |
| 21656 | break; |
| 21657 | case SigTlvP2PManageability: |
| 21658 | status |= |
| 21659 | dot11f_pack_tlv_p2_p_manageability( |
| 21660 | pCtx, (tDot11fTLVP2PManageability *) |
| 21661 | (pSrc + pTlv->offset), pBufRemaining, |
| 21662 | nBufRemaining, &len); |
| 21663 | break; |
| 21664 | default: |
| 21665 | FRAMES_LOG1(pCtx, FRLOGE, FRFL("INTERNAL ERROR-- I don't " |
| 21666 | "know about the TLV %d; this is most likely a bug in " |
| 21667 | "'framesc'.\n"), pTlv->sig); |
| 21668 | return DOT11F_INTERNAL_ERROR; |
| 21669 | } |
| 21670 | |
| 21671 | } /* End if on *pfFound */ |
| 21672 | pBufRemaining += len; |
| 21673 | nBufRemaining -= len; |
| 21674 | *pnConsumed += len; |
| 21675 | ++pTlv; |
| 21676 | if (len) |
| 21677 | ++*pidx; |
| 21678 | } |
| 21679 | |
| 21680 | return status; |
| 21681 | |
| 21682 | } |