blob: 0d25f085c5e79f66ca07173e96470cfaa62912c3 [file] [log] [blame]
/*
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* This file was originally distributed by Qualcomm Atheros, Inc.
* under proprietary terms before Copyright ownership was assigned
* to the Linux Foundation.
*/
/**
* \file dot11f.c
*
* \brief Structures, functions & definitions for
* working with 802.11 Frames
* This file was automatically generated by 'framesc'
* Thu Dec 28 13:33:15 2017 from the following file(s):
*
* dot11f.frms
*
* PLEASE DON'T EDIT THIS FILE BY HAND!
*
*
*/
#if !defined ANI_OS_TYPE_OSX && !defined ANI_OS_TYPE_LINUX && !defined ANI_OS_TYPE_ANDROID
#include <memory.h> /* For memcpy */
#include <stdio.h> /* For _vsnprintf */
#include <stddef.h> /* For offsetof */
#endif
#include <aniGlobal.h>
#include <utilsApi.h>
#include "dot11fdefs.h"
#include "dot11f.h"
#if defined ( _MSC_VER )
# pragma warning (disable: 4244)
# pragma warning (disable: 4505)
# pragma warning (disable: 4702)
# pragma warning (disable: 4996) /* ... was declared deprecated */
#endif /* Microsoft C/C++ */
typedef unsigned char tFRAMES_BOOL;
typedef void (*pfnGeneric_t)(void);
typedef struct sFFDefn {
const char *name;
tANI_U32 offset;
tANI_U16 sig;
tANI_U8 size;
} tFFDefn;
typedef struct sIEDefn {
tANI_U32 offset;
tANI_U32 presenceOffset;
tANI_U32 countOffset;
const char *name;
tANI_U16 arraybound;
tANI_U16 minSize;
tANI_U16 maxSize;
tANI_U16 sig;
unsigned char oui[5];
unsigned char noui;
tANI_U8 eid;
tANI_U8 extn_eid;
tFRAMES_BOOL fMandatory;
} tIEDefn;
#if !defined(countof)
#define countof(x) ( sizeof( (x) ) / sizeof( (x)[0] ) )
#endif
#if ! defined(DOT11F_MEMCPY)
# define DOT11F_MEMCPY(ctx, dst, src, len) \
memcpy( (dst), (src), (len) ) \
#endif
#if ! defined(DOT11F_MEMCMP)
# define DOT11F_MEMCMP(ctx, lhs, rhs, len) \
memcmp( (lhs), (rhs), (len) ) \
#endif
#ifndef DOT11F_HAVE_LOG_SEVERITIES
# define FRLOG_OFF ( 0 )
# define FRLOGP ( 1 )
# define FRLOGE ( 2 )
# define FRLOGW ( 3 )
# define FRLOG1 ( 4 )
# define FRLOG2 ( 5 )
# define FRLOG3 ( 6 )
# define FRLOG4 ( 7 )
#endif
#define FRFL(x) x
#ifdef DOT11F_ENABLE_LOGGING
#ifndef DOT11F_HAVE_LOG_MACROS
#include <stdio.h>
#include <stdarg.h>
#ifndef DOT11F_LOG_GATE
# define DOT11F_LOG_GATE FRLOGW
#endif // DOT11F_LOG_GATE
#ifdef WIN32
#if defined ( _CONSOLE ) || defined ( _WINDOWS ) || defined ( _DLL ) || defined ( _LIB )
#include <windows.h>
#define DBGPRINT OutputDebugStringA
#else /* Not User mode */
#define DBGPRINT DbgPrint
#endif /* User mode */
static void framesLog(tpAniSirGlobal pCtx, int nSev,
const char *lpszFormat, ...)
{
#ifdef WLAN_DEBUG
va_list val;
char buffer[1024];
(void)pCtx;
if ( nSev <= DOT11F_LOG_GATE )
{
va_start(val, lpszFormat);
_vsnprintf(buffer, 1024, lpszFormat, val);
va_end(val);
DBGPRINT(buffer);
}
#endif
}
static void framesDump(tpAniSirGlobal pCtx, int nSev, tANI_U8 *pBuf, int nBuf)
{
#ifdef WLAN_DEBUG
char buffer[35];
int i, offset;
pCtx;
offset = 0;
if ( nSev > DOT11F_LOG_GATE ) return;
for (i = 0; i < nBuf/8; ++i)
{
_snprintf(buffer, 35, "%08x: %02x %02x %02x %02x %02x %02x %02x %02x\n", offset, *pBuf, *(pBuf + 1), *(pBuf + 2), *(pBuf + 3), *(pBuf + 4), *(pBuf + 5), *(pBuf + 6), *(pBuf + 7));
pBuf += 8; offset += 8;
DBGPRINT(buffer);
}
_snprintf(buffer, 35, "%08x: ", offset);
DBGPRINT(buffer);
for (i = 0; i < nBuf % 8; ++i)
{
_snprintf(buffer, 35, "%02x ", *pBuf);
++pBuf;
DBGPRINT(buffer);
}
DBGPRINT("\n");
#endif
}
#elif defined OS_X /* Not WIN32 */
static void framesLog(tpAniSirGlobal pCtx, int nSev,
const char *lpszFormat, ...)
{// To fill in when needed using IOLog
}
static void framesDump(tpAniSirGlobal pCtx, int nSev, tANI_U8 *pBuf, int nBuf)
{
}
#elif defined LINUX
static void framesLog(tpAniSirGlobal pCtx, int nSev,
const char *lpszFormat, ...)
{
#ifdef WLAN_DEBUG
va_list marker;
(void)pCtx;
if ( nSev <= DOT11F_LOG_GATE )
{
va_start( marker, lpszFormat );
vprintf(lpszFormat, marker);
va_end( marker );
}
#endif
}
static void framesDump(tpAniSirGlobal pCtx, int nSev, tANI_U8 *pBuf, int nBuf)
{
#ifdef WLAN_DEBUG
char buffer[35];
int i, offset;
(void)pCtx;
offset = 0;
if ( nSev > DOT11F_LOG_GATE ) return;
for (i = 0; i < nBuf/8; ++i)
{
printf("%08x: %02x %02x %02x %02x %02x %02x %02x %02x\n", offset, *pBuf, *(pBuf + 1), *(pBuf + 2), *(pBuf + 3), *(pBuf + 4), *(pBuf + 5), *(pBuf + 6), *(pBuf + 7));
pBuf += 8; offset += 8;
}
printf("%08x: ", offset);
for (i = 0; i < nBuf % 8; ++i)
{
printf("%02x ", *pBuf);
++pBuf;
}
printf("\n");
#endif
}
#endif /* WIN32 */
#define FRAMES_LOG0(ctx, sev, fmt) \
framesLog((ctx), (sev), (fmt));
#define FRAMES_LOG1(ctx, sev, fmt, p1) \
framesLog((ctx), (sev), (fmt), (p1));
#define FRAMES_LOG2(ctx, sev, fmt, p1, p2) \
framesLog((ctx), (sev), (fmt), (p1), (p2));
#define FRAMES_LOG3(ctx, sev, fmt, p1, p2, p3) \
framesLog((ctx), (sev), (fmt), (p1), (p2), (p3));
#define FRAMES_LOG4(ctx, sev, fmt, p1, p2, p3, p4) \
framesLog((ctx), (sev), (fmt), (p1), (p2), (p3), (p4));
#define FRAMES_DUMP(ctx, sev, p, n) \
framesDump((ctx), (sev), (p), (n));
#ifndef FRAMES_SEV_FOR_FRAME
# define FRAMES_SEV_FOR_FRAME(ctx, sig) FRLOG3
#endif
#endif /* End DOT11F_HAVE_LOG_MACROS */
#else // ! DOT11F_ENABLE_LOGGING
# define FRAMES_LOG0(ctx, sev, fmt)
# define FRAMES_LOG1(ctx, sev, fmt, p1)
# define FRAMES_LOG2(ctx, sev, fmt, p1, p2)
# define FRAMES_LOG3(ctx, sev, fmt, p1, p2, p3)
# define FRAMES_LOG4(ctx, sev, fmt, p1, p2, p3, p4)
# define FRAMES_DUMP(ctx, sev, p, n)
# ifndef FRAMES_SEV_FOR_FRAME
# define FRAMES_SEV_FOR_FRAME(ctx, sig) FRLOG3
# endif
#endif // DOT11F_ENABLE_LOGGING
#if defined( DOT11F_ENABLE_DBG_BREAK ) && defined ( WIN32 )
# define FRAMES_DBG_BREAK() { _asm int 3 }
#else
# define FRAMES_DBG_BREAK()
#endif
#if ! defined(DOT11F_PARAMETER_CHECK)
# if defined (DOT11F_HAVE_WIN32_API)
# define DOT11F_PARAMETER_CHECK(pBuf, nBuf, pFrm, nFrm) \
if (!pBuf || IsBadReadPtr(pBuf, nBuf)) return DOT11F_BAD_INPUT_BUFFER; \
if (!pFrm || IsBadWritePtr(pFrm, nFrm)) return DOT11F_BAD_OUTPUT_BUFFER \
# define DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed) \
if (!pSrc || IsBadReadPtr(pSrc, 4)) return DOT11F_BAD_INPUT_BUFFER; \
if (!pBuf || IsBadWritePtr(pBuf, nBuf)) return DOT11F_BAD_OUTPUT_BUFFER; \
if (!nBuf) return DOT11F_BAD_OUTPUT_BUFFER; \
if (IsBadWritePtr(pnConsumed, 4)) return DOT11F_BAD_OUTPUT_BUFFER \
# else
# define DOT11F_PARAMETER_CHECK(pBuf, nBuf, pFrm, nFrm) \
if (!pBuf) return DOT11F_BAD_INPUT_BUFFER; \
if (!pFrm) return DOT11F_BAD_OUTPUT_BUFFER \
# define DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed) \
if (!pSrc) return DOT11F_BAD_INPUT_BUFFER; \
if (!pBuf) return DOT11F_BAD_OUTPUT_BUFFER; \
if (!nBuf) return DOT11F_BAD_OUTPUT_BUFFER; \
if (!pnConsumed) return DOT11F_BAD_OUTPUT_BUFFER \
# endif
#endif
static void framesntohs(tpAniSirGlobal pCtx,
tANI_U16 *pOut,
tANI_U8 *pIn,
tFRAMES_BOOL fMsb)
{
(void)pCtx;
# if defined ( DOT11F_LITTLE_ENDIAN_HOST )
if ( !fMsb )
{
DOT11F_MEMCPY(pCtx, ( tANI_U16* )pOut, pIn, 2);
}
else
{
*pOut = ( tANI_U16 )( *pIn << 8 ) | *( pIn + 1 );
}
# else
if ( !fMsb )
{
*pOut = ( tANI_U16 )( *pIn | ( *( pIn + 1 ) << 8 ) );
}
else
{
DOT11F_MEMCPY(pCtx, ( tANI_U16* )pOut, pIn, 2);
}
# endif
}
static void framesntohl(tpAniSirGlobal pCtx,
tANI_U32 *pOut,
tANI_U8 *pIn,
tFRAMES_BOOL fMsb)
{
(void)pCtx;
# if defined ( DOT11F_LITTLE_ENDIAN_HOST )
if ( !fMsb )
{
DOT11F_MEMCPY(pCtx, ( tANI_U32* )pOut, pIn, 4);
}
else
{
*pOut = ( tANI_U32 )( *pIn << 24 ) |
( *( pIn + 1 ) << 16 ) |
( *( pIn + 2 ) << 8 ) |
( *( pIn + 3 ) );
}
# else
if ( !fMsb )
{
*pOut = ( tANI_U32 )( *( pIn + 3 ) << 24 ) |
( *( pIn + 2 ) << 16 ) |
( *( pIn + 1 ) << 8 ) |
( *( pIn ) );
}
else
{
*pOut = * ( tANI_U32* )pIn;
}
# endif
}
static void framesntohq(tpAniSirGlobal pCtx,
tDOT11F_U64 *pOut,
tANI_U8 *pIn,
tFRAMES_BOOL fMsb)
{
# if defined ( DOT11F_LITTLE_ENDIAN_HOST )
framesntohl( pCtx, &((*pOut)[0]), pIn, fMsb);
framesntohl( pCtx, &((*pOut)[1]), pIn + 4, fMsb);
# else
framesntohl( pCtx, &((*pOut)[1]), pIn, fMsb);
framesntohl( pCtx, &((*pOut)[0]), pIn + 4, fMsb);
# endif
}
static void frameshtons(tpAniSirGlobal pCtx
, tANI_U8 *pOut,
tANI_U16 pIn,
tFRAMES_BOOL fMsb)
{
(void)pCtx;
# if defined ( DOT11F_LITTLE_ENDIAN_HOST )
if ( !fMsb )
{
DOT11F_MEMCPY(pCtx, pOut, &pIn, 2);
}
else
{
*pOut = ( pIn & 0xff00 ) >> 8;
*( pOut + 1 ) = pIn & 0xff;
}
# else
if ( !fMsb )
{
*pOut = pIn & 0xff;
*( pOut + 1 ) = ( pIn & 0xff00 ) >> 8;
}
else
{
DOT11F_MEMCPY(pCtx, pOut, &pIn, 2);
}
# endif
}
static void frameshtonl(tpAniSirGlobal pCtx,
tANI_U8 *pOut,
tANI_U32 pIn,
tFRAMES_BOOL fMsb)
{
(void)pCtx;
# if defined ( DOT11F_LITTLE_ENDIAN_HOST )
if ( !fMsb )
{
DOT11F_MEMCPY(pCtx, pOut, &pIn, 4);
}
else
{
*pOut = ( pIn & 0xff000000 ) >> 24;
*( pOut + 1 ) = ( pIn & 0x00ff0000 ) >> 16;
*( pOut + 2 ) = ( pIn & 0x0000ff00 ) >> 8;
*( pOut + 3 ) = ( pIn & 0x000000ff );
}
# else
if ( !fMsb )
{
*( pOut ) = ( pIn & 0x000000ff );
*( pOut + 1 ) = ( pIn & 0x0000ff00 ) >> 8;
*( pOut + 2 ) = ( pIn & 0x00ff0000 ) >> 16;
*( pOut + 3 ) = ( pIn & 0xff000000 ) >> 24;
}
else
{
DOT11F_MEMCPY(pCtx, pOut, &pIn, 4);
}
# endif
}
static void frameshtonq(tpAniSirGlobal pCtx,
tANI_U8 *pOut,
tDOT11F_U64 pIn,
tFRAMES_BOOL fMsb)
{
# if defined ( DOT11F_LITTLE_ENDIAN_HOST )
frameshtonl( pCtx, pOut, pIn[0], fMsb);
frameshtonl( pCtx, pOut + 4, pIn[1], fMsb);
# else
frameshtonl( pCtx, pOut + 4, pIn[1], fMsb);
frameshtonl( pCtx, pOut, pIn[0], fMsb);
# endif
}
static const tIEDefn* FindIEDefn(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tANI_U32 nBuf,
const tIEDefn IEs[])
{
const tIEDefn *pIe;
(void)pCtx;
pIe = &(IEs[0]);
while (0xff != pIe->eid || pIe->extn_eid)
{
if (*pBuf == pIe->eid)
{
if (pIe->eid == 0xff) {
if ((*(pBuf + 2)) == pIe->extn_eid)
return pIe;
} else {
if (0 == pIe->noui)
return pIe;
if ((nBuf > (tANI_U32)(pIe->noui + 2)) &&
(!DOT11F_MEMCMP(pCtx, pBuf + 2, pIe->oui,
pIe->noui)))
return pIe;
}
}
++pIe;
}
return NULL;
}
static tANI_U32 GetContainerIesLen(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tANI_U32 nBuf,
tANI_U8 *pnConsumed,
const tIEDefn IEs[])
{
const tIEDefn *pIe, *pIeFirst;
tANI_U8 *pBufRemaining = pBuf;
tANI_U32 len = 0;
(void)pCtx;
pIeFirst = &(IEs[0]);
if( *pBufRemaining != pIeFirst->eid )
return DOT11F_INTERNAL_ERROR;
len += *(pBufRemaining+1);
pBufRemaining += len + 2;
len += 2;
while ( len < nBuf )
{
if( NULL == (pIe = FindIEDefn(pCtx, pBufRemaining, nBuf - len, IEs)))
break;
if( pIe->eid == pIeFirst->eid )
break;
len += *(pBufRemaining + 1) + 2;
pBufRemaining += *(pBufRemaining + 1) + 2;
}
if ((len > 0xFF) || (len > nBuf))
return DOT11F_INTERNAL_ERROR;
*pnConsumed = len;
return DOT11F_PARSE_SUCCESS;
}
static tANI_U32 UnpackCore(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tANI_U32 nBuf,
const tFFDefn FFs[],
const tIEDefn IEs[],
tANI_U8 *pFrm,
size_t nFrm);
static tANI_U32 PackCore(tpAniSirGlobal pCtx,
tANI_U8 *pSrc,
tANI_U8 *pBuf,
tANI_U32 nBuf,
tANI_U32 *pnConsumed,
const tFFDefn FFs[],
const tIEDefn IEs[]);
static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx,
tANI_U8 *pFrm,
tANI_U32 *pnNeeded,
const tIEDefn IEs[]);
tANI_U32 dot11fUnpackTlvCommonFunc(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tANI_U8 *pDstPresent, tANI_U8 *pDstField)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void)tlvlen; /* Shutup the compiler */
*pDstPresent = 1;
*pDstField = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvCommonFunc. */
tANI_U32 dot11fUnpackTlvCommonFunc2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tANI_U8 *pDstPresent, tANI_U16 *pDstState)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void)tlvlen; /* Shutup the compiler */
*pDstPresent = 1;
framesntohs(pCtx, pDstState, pBuf, 1);
(void)pCtx;
return status;
} /* End dot11fUnpackTlvCommonFunc2. */
void dot11fUnpackFfCommonFunc(tpAniSirGlobal pCtx,
tANI_U8 *pBuf, tANI_U16 *pDstField)
{
framesntohs(pCtx, pDstField, pBuf, 0);
(void)pCtx;
} /* End dot11fUnpackFfCommonFunc. */
tANI_U32 dot11fUnpackIeCommonFunc(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen,
tANI_U8 *pDstPresent , tANI_U8 *pDstField)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void)ielen;
(void)pBuf;
if ((*pDstPresent)) status = DOT11F_DUPLICATE_IE;
*pDstPresent = 1;
*pDstField = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeComonFunc. */
typedef struct sTLVDefn {
tANI_U32 offset;
tANI_U32 presenceOffset;
const char * name;
tANI_U16 sig;
tANI_U32 id;
tANI_U32 pec;
tANI_U32 minSize;
tANI_U32 maxSize;
tANI_U8 fMandatory;
tANI_U8 sType;
tANI_U8 sLen;
tANI_U8 fMsb;
} tTLVDefn;
static const tTLVDefn* FindTLVDefn( tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tANI_U32 nBuf,
const tTLVDefn TLVs[ ] )
{
const tTLVDefn *pTlv;
tANI_U32 pec;
tANI_U16 id;
pTlv = &( TLVs[ 0 ] );
(void)pCtx;
if ( pTlv->sType == 2 )
framesntohs( pCtx, &id, pBuf, 1 );
else
id = *pBuf;
while ( 0xffff != pTlv->id )
{
if ( id == pTlv->id )
{
if ( 0 == pTlv->pec ) return pTlv;
if( nBuf > 5 )
{
pec = ( ( * ( pBuf + 4 ) ) << 16 ) |
( ( * ( pBuf + 5 ) ) << 8 ) |
* ( pBuf + 6 );
if ( pec == pTlv->pec )
{
return pTlv;
}
}
}
++pTlv;
}
return NULL;
}
static tANI_U32 UnpackTlvCore( tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tANI_U32 nBuf,
const tTLVDefn TLVs[ ],
tANI_U8 *pFrm,
size_t nFrm );
static tANI_U32 PackTlvCore(tpAniSirGlobal pCtx,
tANI_U8 *pSrc,
tANI_U8 *pBuf,
tANI_U32 nBuf,
tANI_U32 *pnConsumed,
const tTLVDefn TLVs[],
tANI_U32 *pidx);
static tANI_U32 GetPackedSizeTlvCore(tpAniSirGlobal pCtx,
tANI_U8 *pFrm,
tANI_U32 *pnNeeded,
const tTLVDefn TLVs[]);
#define SigFfAID ( 0x0001 )
void dot11fUnpackFfAction(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfAction *pDst)
{
pDst->action = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfAction. */
#define SigFfAction ( 0x0002 )
void dot11fUnpackFfAddBAParameterSet(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfAddBAParameterSet *pDst)
{
tANI_U16 tmp0__;
framesntohs(pCtx, &tmp0__, pBuf, 0);
pDst->amsduSupported = tmp0__ >> 0 & 0x1;
pDst->policy = tmp0__ >> 1 & 0x1;
pDst->tid = tmp0__ >> 2 & 0xf;
pDst->bufferSize = tmp0__ >> 6 & 0x3ff;
(void)pCtx;
} /* End dot11fUnpackFfAddBAParameterSet. */
#define SigFfAddBAParameterSet ( 0x0003 )
#define SigFfAuthAlgo ( 0x0004 )
#define SigFfAuthSeqNo ( 0x0005 )
void dot11fUnpackFfBAStartingSequenceControl(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfBAStartingSequenceControl *pDst)
{
tANI_U16 tmp1__;
framesntohs(pCtx, &tmp1__, pBuf, 0);
pDst->fragNumber = tmp1__ >> 0 & 0xf;
pDst->ssn = tmp1__ >> 4 & 0xfff;
(void)pCtx;
} /* End dot11fUnpackFfBAStartingSequenceControl. */
#define SigFfBAStartingSequenceControl ( 0x0006 )
#define SigFfBATimeout ( 0x0007 )
#define SigFfBeaconInterval ( 0x0008 )
void dot11fUnpackFfCapabilities(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfCapabilities *pDst)
{
tANI_U16 tmp2__;
framesntohs(pCtx, &tmp2__, pBuf, 0);
pDst->ess = tmp2__ >> 0 & 0x1;
pDst->ibss = tmp2__ >> 1 & 0x1;
pDst->cfPollable = tmp2__ >> 2 & 0x1;
pDst->cfPollReq = tmp2__ >> 3 & 0x1;
pDst->privacy = tmp2__ >> 4 & 0x1;
pDst->shortPreamble = tmp2__ >> 5 & 0x1;
pDst->pbcc = tmp2__ >> 6 & 0x1;
pDst->channelAgility = tmp2__ >> 7 & 0x1;
pDst->spectrumMgt = tmp2__ >> 8 & 0x1;
pDst->qos = tmp2__ >> 9 & 0x1;
pDst->shortSlotTime = tmp2__ >> 10 & 0x1;
pDst->apsd = tmp2__ >> 11 & 0x1;
pDst->rrm = tmp2__ >> 12 & 0x1;
pDst->dsssOfdm = tmp2__ >> 13 & 0x1;
pDst->delayedBA = tmp2__ >> 14 & 0x1;
pDst->immediateBA = tmp2__ >> 15 & 0x1;
(void)pCtx;
} /* End dot11fUnpackFfCapabilities. */
#define SigFfCapabilities ( 0x0009 )
void dot11fUnpackFfCategory(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfCategory *pDst)
{
pDst->category = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfCategory. */
#define SigFfCategory ( 0x000a )
void dot11fUnpackFfCurrentAPAddress(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfCurrentAPAddress *pDst)
{
DOT11F_MEMCPY(pCtx, pDst->mac, pBuf, 6);
(void)pCtx;
} /* End dot11fUnpackFfCurrentAPAddress. */
#define SigFfCurrentAPAddress ( 0x000b )
void dot11fUnpackFfDelBAParameterSet(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfDelBAParameterSet *pDst)
{
tANI_U16 tmp3__;
framesntohs(pCtx, &tmp3__, pBuf, 0);
pDst->reserved = tmp3__ >> 0 & 0x7ff;
pDst->initiator = tmp3__ >> 11 & 0x1;
pDst->tid = tmp3__ >> 12 & 0xf;
(void)pCtx;
} /* End dot11fUnpackFfDelBAParameterSet. */
#define SigFfDelBAParameterSet ( 0x000c )
void dot11fUnpackFfDialogToken(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfDialogToken *pDst)
{
pDst->token = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfDialogToken. */
#define SigFfDialogToken ( 0x000d )
void dot11fUnpackFfLinkMargin(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfLinkMargin *pDst)
{
pDst->linkMargin = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfLinkMargin. */
#define SigFfLinkMargin ( 0x000e )
#define SigFfListenInterval ( 0x000f )
void dot11fUnpackFfMaxTxPower(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfMaxTxPower *pDst)
{
pDst->maxTxPower = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfMaxTxPower. */
#define SigFfMaxTxPower ( 0x0010 )
void dot11fUnpackFfNumOfRepetitions(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfNumOfRepetitions *pDst)
{
framesntohs(pCtx, &pDst->repetitions, pBuf, 0);
(void)pCtx;
} /* End dot11fUnpackFfNumOfRepetitions. */
#define SigFfNumOfRepetitions ( 0x0011 )
void dot11fUnpackFfOperatingMode(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfOperatingMode *pDst)
{
tANI_U8 tmp4__;
tmp4__ = *pBuf;
pDst->chanWidth = tmp4__ >> 0 & 0x3;
pDst->reserved = tmp4__ >> 2 & 0x3;
pDst->rxNSS = tmp4__ >> 4 & 0x7;
pDst->rxNSSType = tmp4__ >> 7 & 0x1;
(void)pCtx;
} /* End dot11fUnpackFfOperatingMode. */
#define SigFfOperatingMode ( 0x0012 )
void dot11fUnpackFfP2POUI(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfP2POUI *pDst)
{
framesntohl(pCtx, &pDst->oui, pBuf, 0);
(void)pCtx;
} /* End dot11fUnpackFfP2POUI. */
#define SigFfP2POUI ( 0x0013 )
void dot11fUnpackFfP2POUISubType(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfP2POUISubType *pDst)
{
pDst->ouiSubtype = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfP2POUISubType. */
#define SigFfP2POUISubType ( 0x0014 )
void dot11fUnpackFfRCPI(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfRCPI *pDst)
{
pDst->rcpi = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfRCPI. */
#define SigFfRCPI ( 0x0015 )
void dot11fUnpackFfRSNI(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfRSNI *pDst)
{
pDst->rsni = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfRSNI. */
#define SigFfRSNI ( 0x0016 )
#define SigFfReason ( 0x0017 )
void dot11fUnpackFfRxAntennaId(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfRxAntennaId *pDst)
{
pDst->antennaId = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfRxAntennaId. */
#define SigFfRxAntennaId ( 0x0018 )
void dot11fUnpackFfSMPowerModeSet(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfSMPowerModeSet *pDst)
{
tANI_U8 tmp5__;
tmp5__ = *pBuf;
pDst->PowerSave_En = tmp5__ >> 0 & 0x1;
pDst->Mode = tmp5__ >> 1 & 0x1;
pDst->reserved = tmp5__ >> 2 & 0x3f;
(void)pCtx;
} /* End dot11fUnpackFfSMPowerModeSet. */
#define SigFfSMPowerModeSet ( 0x0019 )
#define SigFfStatus ( 0x001a )
void dot11fUnpackFfStatusCode(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfStatusCode *pDst)
{
pDst->statusCode = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfStatusCode. */
#define SigFfStatusCode ( 0x001b )
void dot11fUnpackFfTPCEleID(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfTPCEleID *pDst)
{
pDst->TPCId = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfTPCEleID. */
#define SigFfTPCEleID ( 0x001c )
void dot11fUnpackFfTPCEleLen(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfTPCEleLen *pDst)
{
pDst->TPCLen = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfTPCEleLen. */
#define SigFfTPCEleLen ( 0x001d )
void dot11fUnpackFfTSInfo(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfTSInfo *pDst)
{
tANI_U32 tmp6__;
framesntohl(pCtx, &tmp6__, pBuf, 0);
pDst->traffic_type = tmp6__ >> 0 & 0x1;
pDst->tsid = tmp6__ >> 1 & 0xf;
pDst->direction = tmp6__ >> 5 & 0x3;
pDst->access_policy = tmp6__ >> 7 & 0x3;
pDst->aggregation = tmp6__ >> 9 & 0x1;
pDst->psb = tmp6__ >> 10 & 0x1;
pDst->user_priority = tmp6__ >> 11 & 0x7;
pDst->tsinfo_ack_pol = tmp6__ >> 14 & 0x3;
pDst->schedule = tmp6__ >> 16 & 0x1;
pDst->unused = tmp6__ >> 17 & 0x7fff;
(void)pCtx;
} /* End dot11fUnpackFfTSInfo. */
#define SigFfTSInfo ( 0x001e )
void dot11fUnpackFfTimeStamp(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfTimeStamp *pDst)
{
framesntohq(pCtx, &pDst->timestamp, pBuf, 0);
(void)pCtx;
} /* End dot11fUnpackFfTimeStamp. */
#define SigFfTimeStamp ( 0x001f )
void dot11fUnpackFfTransactionId(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfTransactionId *pDst)
{
DOT11F_MEMCPY(pCtx, pDst->transId, pBuf, 2);
(void)pCtx;
} /* End dot11fUnpackFfTransactionId. */
#define SigFfTransactionId ( 0x0020 )
void dot11fUnpackFfTxAntennaId(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfTxAntennaId *pDst)
{
pDst->antennaId = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfTxAntennaId. */
#define SigFfTxAntennaId ( 0x0021 )
void dot11fUnpackFfTxPower(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfTxPower *pDst)
{
pDst->txPower = *pBuf;
(void)pCtx;
} /* End dot11fUnpackFfTxPower. */
#define SigFfTxPower ( 0x0022 )
void dot11fUnpackFfVhtMembershipStatusArray(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfVhtMembershipStatusArray *pDst)
{
DOT11F_MEMCPY(pCtx, pDst->membershipStatusArray, pBuf, 8);
(void)pCtx;
} /* End dot11fUnpackFfVhtMembershipStatusArray. */
#define SigFfVhtMembershipStatusArray ( 0x0023 )
void dot11fUnpackFfVhtUserPositionArray(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfVhtUserPositionArray *pDst)
{
DOT11F_MEMCPY(pCtx, pDst->userPositionArray, pBuf, 16);
(void)pCtx;
} /* End dot11fUnpackFfVhtUserPositionArray. */
#define SigFfVhtUserPositionArray ( 0x0024 )
void dot11fUnpackFfext_chan_switch_ann_action(tpAniSirGlobal pCtx,
tANI_U8 *pBuf,
tDot11fFfext_chan_switch_ann_action *pDst)
{
tANI_U32 tmp7__;
framesntohl(pCtx, &tmp7__, pBuf, 0);
pDst->switch_mode = tmp7__ >> 0 & 0xff;
pDst->op_class = tmp7__ >> 8 & 0xff;
pDst->new_channel = tmp7__ >> 16 & 0xff;
pDst->switch_count = tmp7__ >> 24 & 0xff;
(void)pCtx;
} /* End dot11fUnpackFfext_chan_switch_ann_action. */
#define SigFfext_chan_switch_ann_action ( 0x0025 )
tANI_U32 dot11fUnpackTlvAuthorizedMACs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVAuthorizedMACs *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->mac, pBuf, 6);
pBuf += 6;
tlvlen -= (tANI_U8)6;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvAuthorizedMACs. */
#define SigTlvAuthorizedMACs ( 0x0001 )
#define SigTlvRequestToEnroll ( 0x0002 )
tANI_U32 dot11fUnpackTlvVersion2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVVersion2 *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U8 tmp8__;
pDst->present = 1;
tmp8__ = *pBuf;
pBuf += 1;
tlvlen -= 1;
pDst->minor = tmp8__ >> 0 & 0xf;
pDst->major = tmp8__ >> 4 & 0xf;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvVersion2. */
#define SigTlvVersion2 ( 0x0003 )
#define SigTlvAPSetupLocked ( 0x0004 )
#define SigTlvAssociationState ( 0x0005 )
tANI_U32 dot11fUnpackTlvChannelList(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVChannelList *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->countryString, pBuf, 3);
pBuf += 3;
tlvlen -= (tANI_U8)3;
pDst->num_channelList = (tANI_U8)( tlvlen );
if (tlvlen > 251){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->channelList, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvChannelList. */
#define SigTlvChannelList ( 0x0006 )
#define SigTlvConfigMethods ( 0x0007 )
#define SigTlvConfigurationError ( 0x0008 )
tANI_U32 dot11fUnpackTlvConfigurationTimeout(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVConfigurationTimeout *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->GOConfigTimeout = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
pDst->CLConfigTimeout = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvConfigurationTimeout. */
#define SigTlvConfigurationTimeout ( 0x0009 )
tANI_U32 dot11fUnpackTlvDeviceName(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVDeviceName *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->num_text = (tANI_U8)( tlvlen );
if (tlvlen > 32){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->text, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvDeviceName. */
#define SigTlvDeviceName ( 0x000a )
#define SigTlvDevicePasswordID ( 0x000b )
tANI_U32 dot11fUnpackTlvExtendedListenTiming(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVExtendedListenTiming *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
framesntohs(pCtx, &pDst->availibilityPeriod, pBuf, 0);
pBuf += 2;
tlvlen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->availibilityInterval, pBuf, 0);
pBuf += 2;
tlvlen -= (tANI_U8)2;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvExtendedListenTiming. */
#define SigTlvExtendedListenTiming ( 0x000c )
#define SigTlvGOIntent ( 0x000d )
tANI_U32 dot11fUnpackTlvIntendedP2PInterfaceAddress(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVIntendedP2PInterfaceAddress *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->P2PInterfaceAddress, pBuf, 6);
pBuf += 6;
tlvlen -= (tANI_U8)6;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvIntendedP2PInterfaceAddress. */
#define SigTlvIntendedP2PInterfaceAddress ( 0x000e )
#define SigTlvInvitationFlags ( 0x000f )
tANI_U32 dot11fUnpackTlvListenChannel(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVListenChannel *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->countryString, pBuf, 3);
pBuf += 3;
tlvlen -= (tANI_U8)3;
pDst->regulatoryClass = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
pDst->channel = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvListenChannel. */
#define SigTlvListenChannel ( 0x0010 )
tANI_U32 dot11fUnpackTlvManufacturer(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVManufacturer *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->num_name = (tANI_U8)( tlvlen );
if (tlvlen > 64){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->name, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvManufacturer. */
#define SigTlvManufacturer ( 0x0011 )
#define SigTlvMinorReasonCode ( 0x0012 )
tANI_U32 dot11fUnpackTlvModelName(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVModelName *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->num_text = (tANI_U8)( tlvlen );
if (tlvlen > 32){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->text, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvModelName. */
#define SigTlvModelName ( 0x0013 )
tANI_U32 dot11fUnpackTlvModelNumber(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVModelNumber *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->num_text = (tANI_U8)( tlvlen );
if (tlvlen > 32){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->text, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvModelNumber. */
#define SigTlvModelNumber ( 0x0014 )
tANI_U32 dot11fUnpackTlvNoticeOfAbsence(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVNoticeOfAbsence *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->index = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
pDst->CTSWindowOppPS = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
pDst->num_NoADesc = (tANI_U8)( tlvlen );
if (tlvlen > 36){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->NoADesc, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvNoticeOfAbsence. */
#define SigTlvNoticeOfAbsence ( 0x0015 )
tANI_U32 dot11fUnpackTlvOperatingChannel(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVOperatingChannel *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->countryString, pBuf, 3);
pBuf += 3;
tlvlen -= (tANI_U8)3;
pDst->regulatoryClass = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
pDst->channel = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvOperatingChannel. */
#define SigTlvOperatingChannel ( 0x0016 )
tANI_U32 dot11fUnpackTlvP2PCapability(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVP2PCapability *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->deviceCapability = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
pDst->groupCapability = *pBuf;
pBuf += 1;
tlvlen -= (tANI_U8)1;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvP2PCapability. */
#define SigTlvP2PCapability ( 0x0017 )
tANI_U32 dot11fUnpackTlvP2PDeviceId(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVP2PDeviceId *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->P2PDeviceAddress, pBuf, 6);
pBuf += 6;
tlvlen -= (tANI_U8)6;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvP2PDeviceId. */
#define SigTlvP2PDeviceId ( 0x0018 )
static const tTLVDefn TLVS_P2PDeviceInfo[] = {
{offsetof(tDot11fTLVP2PDeviceInfo, DeviceName), offsetof(tDot11fTLVDeviceName, present), "DeviceName", SigTlvDeviceName, DOT11F_TLV_DEVICENAME, 0, 4, 36, 1, 2, 2, 1, },
{0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0},
};
tANI_U32 dot11fUnpackTlvP2PDeviceInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVP2PDeviceInfo *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->P2PDeviceAddress, pBuf, 6);
pBuf += 6;
tlvlen -= (tANI_U8)6;
framesntohs(pCtx, &pDst->configMethod, pBuf, 0);
pBuf += 2;
tlvlen -= (tANI_U8)2;
DOT11F_MEMCPY(pCtx, pDst->primaryDeviceType, pBuf, 8);
pBuf += 8;
tlvlen -= (tANI_U8)8;
(void)pCtx;
status |= UnpackTlvCore(pCtx,
pBuf,
tlvlen,
TLVS_P2PDeviceInfo,
( tANI_U8* )pDst,
sizeof(*pDst));
return status;
} /* End dot11fUnpackTlvP2PDeviceInfo. */
#define SigTlvP2PDeviceInfo ( 0x0019 )
tANI_U32 dot11fUnpackTlvP2PGroupBssid(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVP2PGroupBssid *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->P2PGroupBssid, pBuf, 6);
pBuf += 6;
tlvlen -= (tANI_U8)6;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvP2PGroupBssid. */
#define SigTlvP2PGroupBssid ( 0x001a )
tANI_U32 dot11fUnpackTlvP2PGroupId(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVP2PGroupId *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->deviceAddress, pBuf, 6);
pBuf += 6;
tlvlen -= (tANI_U8)6;
pDst->num_ssid = (tANI_U8)( tlvlen );
if (tlvlen > 32){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->ssid, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvP2PGroupId. */
#define SigTlvP2PGroupId ( 0x001b )
tANI_U32 dot11fUnpackTlvP2PGroupInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVP2PGroupInfo *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->num_P2PClientInfoDesc = (tANI_U8)( tlvlen );
DOT11F_MEMCPY(pCtx, pDst->P2PClientInfoDesc, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvP2PGroupInfo. */
#define SigTlvP2PGroupInfo ( 0x001c )
#define SigTlvP2PStatus ( 0x001d )
tANI_U32 dot11fUnpackTlvPrimaryDeviceType(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVPrimaryDeviceType *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void)pBuf; (void)tlvlen; /* Shutup the compiler */
pDst->present = 1;
framesntohs(pCtx, &pDst->primary_category, pBuf, 1);
pBuf += 2;
tlvlen -= (tANI_U8)2;
DOT11F_MEMCPY(pCtx, pDst->oui, pBuf, 4);
pBuf += 4;
tlvlen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->sub_category, pBuf, 1);
pBuf += 2;
tlvlen -= (tANI_U8)2;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvPrimaryDeviceType. */
#define SigTlvPrimaryDeviceType ( 0x001e )
#define SigTlvRFBands ( 0x001f )
tANI_U32 dot11fUnpackTlvRequestDeviceType(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVRequestDeviceType *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
framesntohs(pCtx, &pDst->primary_category, pBuf, 1);
pBuf += 2;
tlvlen -= (tANI_U8)2;
DOT11F_MEMCPY(pCtx, pDst->oui, pBuf, 4);
pBuf += 4;
tlvlen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->sub_category, pBuf, 1);
pBuf += 2;
tlvlen -= (tANI_U8)2;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvRequestDeviceType. */
#define SigTlvRequestDeviceType ( 0x0020 )
#define SigTlvRequestType ( 0x0021 )
#define SigTlvResponseType ( 0x0022 )
#define SigTlvSelectedRegistrar ( 0x0023 )
#define SigTlvSelectedRegistrarConfigMethods ( 0x0024 )
tANI_U32 dot11fUnpackTlvSerialNumber(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVSerialNumber *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
pDst->num_text = (tANI_U8)( tlvlen );
if (tlvlen > 32){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->text, pBuf, ( tlvlen ) );
pBuf += ( tlvlen );
tlvlen -= ( tlvlen );
(void)pCtx;
return status;
} /* End dot11fUnpackTlvSerialNumber. */
#define SigTlvSerialNumber ( 0x0025 )
tANI_U32 dot11fUnpackTlvUUID_E(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVUUID_E *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->uuid, pBuf, 16);
pBuf += 16;
tlvlen -= (tANI_U8)16;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvUUID_E. */
#define SigTlvUUID_E ( 0x0026 )
tANI_U32 dot11fUnpackTlvUUID_R(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVUUID_R *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->uuid, pBuf, 16);
pBuf += 16;
tlvlen -= (tANI_U8)16;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvUUID_R. */
#define SigTlvUUID_R ( 0x0027 )
static const tTLVDefn TLVS_VendorExtension[] = {
{offsetof(tDot11fTLVVendorExtension, Version2), offsetof(tDot11fTLVVersion2, present), "Version2", SigTlvVersion2, DOT11F_TLV_VERSION2, 0, 3, 3, 0, 1, 1, 1, },
{offsetof(tDot11fTLVVendorExtension, AuthorizedMACs), offsetof(tDot11fTLVAuthorizedMACs, present), "AuthorizedMACs", SigTlvAuthorizedMACs, DOT11F_TLV_AUTHORIZEDMACS, 0, 8, 8, 0, 1, 1, 1, },
{offsetof(tDot11fTLVVendorExtension, RequestToEnroll), offsetof(tDot11fTLVRequestToEnroll, present), "RequestToEnroll", SigTlvRequestToEnroll, DOT11F_TLV_REQUESTTOENROLL, 0, 3, 3, 0, 1, 1, 1, },
{0, 0, NULL, 0, 0xffff, 0, 0, 0, 0, 0, 0},
};
tANI_U32 dot11fUnpackTlvVendorExtension(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVVendorExtension *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->vendorId, pBuf, 3);
pBuf += 3;
tlvlen -= (tANI_U8)3;
(void)pCtx;
status |= UnpackTlvCore(pCtx,
pBuf,
tlvlen,
TLVS_VendorExtension,
( tANI_U8* )pDst,
sizeof(*pDst));
return status;
} /* End dot11fUnpackTlvVendorExtension. */
#define SigTlvVendorExtension ( 0x0028 )
tANI_U32 dot11fUnpackTlvVersion(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVVersion *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U8 tmp9__;
pDst->present = 1;
tmp9__ = *pBuf;
pBuf += 1;
tlvlen -= 1;
pDst->minor = tmp9__ >> 0 & 0xf;
pDst->major = tmp9__ >> 4 & 0xf;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvVersion. */
#define SigTlvVersion ( 0x0029 )
#define SigTlvWPSState ( 0x002a )
tANI_U32 dot11fUnpackTlvP2PInterface(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U16 tlvlen, tDot11fTLVP2PInterface *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->P2PDeviceAddress, pBuf, 6);
pBuf += 6;
tlvlen -= (tANI_U8)6;
(void)pCtx;
return status;
} /* End dot11fUnpackTlvP2PInterface. */
#define SigTlvP2PInterface ( 0x002b )
#define SigTlvP2PManageability ( 0x002c )
tANI_U32 dot11fUnpackIeCondensedCountryStr(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIECondensedCountryStr *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->countryStr, pBuf, 2);
(void)pCtx;
return status;
} /* End dot11fUnpackIeCondensedCountryStr. */
#define SigIeCondensedCountryStr ( 0x0001 )
tANI_U32 dot11fUnpackIeGTK(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEGTK *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U16 tmp10__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
framesntohs(pCtx, &tmp10__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->keyId = tmp10__ >> 0 & 0x3;
pDst->reserved = tmp10__ >> 2 & 0x3feb;
pDst->keyLength = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
DOT11F_MEMCPY(pCtx, pDst->RSC, pBuf, 8);
pBuf += 8;
ielen -= (tANI_U8)8;
pDst->num_key = (tANI_U8)( ielen );
if (ielen > 32){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->key, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeGTK. */
#define SigIeGTK ( 0x0002 )
tANI_U32 dot11fUnpackIeIGTK(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEIGTK *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->keyID, pBuf, 2);
pBuf += 2;
ielen -= (tANI_U8)2;
DOT11F_MEMCPY(pCtx, pDst->IPN, pBuf, 6);
pBuf += 6;
ielen -= (tANI_U8)6;
pDst->keyLength = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
DOT11F_MEMCPY(pCtx, pDst->key, pBuf, 24);
(void)pCtx;
return status;
} /* End dot11fUnpackIeIGTK. */
#define SigIeIGTK ( 0x0003 )
tANI_U32 dot11fUnpackIeMccChanInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEMccChanInfo *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->channel = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeMccChanInfo. */
#define SigIeMccChanInfo ( 0x0004 )
tANI_U32 dot11fUnpackIeR0KH_ID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIER0KH_ID *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_PMK_R0_ID = (tANI_U8)( ielen );
if (ielen > 48){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->PMK_R0_ID, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeR0KH_ID. */
#define SigIeR0KH_ID ( 0x0005 )
tANI_U32 dot11fUnpackIeR1KH_ID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIER1KH_ID *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->PMK_R1_ID, pBuf, 6);
(void)pCtx;
return status;
} /* End dot11fUnpackIeR1KH_ID. */
#define SigIeR1KH_ID ( 0x0006 )
tANI_U32 dot11fUnpackIeSub20Info(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESub20Info *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->capability = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->csa_chanwidth = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeSub20Info. */
#define SigIeSub20Info ( 0x0007 )
tANI_U32 dot11fUnpackIeTSFInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETSFInfo *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
framesntohs(pCtx, &pDst->TsfOffset, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->BeaconIntvl, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeTSFInfo. */
#define SigIeTSFInfo ( 0x0008 )
tANI_U32 dot11fUnpackIeAPChannelReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEAPChannelReport *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->regulatoryClass = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->num_channelList = (tANI_U8)( ielen );
if (ielen > 50){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->channelList, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeAPChannelReport. */
#define SigIeAPChannelReport ( 0x0009 )
tANI_U32 dot11fUnpackIeBcnReportingDetail(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEBcnReportingDetail *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->reportingDetail = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeBcnReportingDetail. */
#define SigIeBcnReportingDetail ( 0x000a )
tANI_U32 dot11fUnpackIeBeaconReportFrmBody(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEBeaconReportFrmBody *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_reportedFields = (tANI_U8)( ielen );
if (ielen > 224){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->reportedFields, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeBeaconReportFrmBody. */
#define SigIeBeaconReportFrmBody ( 0x000b )
tANI_U32 dot11fUnpackIeBeaconReporting(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEBeaconReporting *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->reportingCondition = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->threshold = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeBeaconReporting. */
#define SigIeBeaconReporting ( 0x000c )
tANI_U32 dot11fUnpackIeMeasurementPilot(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEMeasurementPilot *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->measurementPilot = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->num_vendorSpecific = (tANI_U8)( ielen );
DOT11F_MEMCPY(pCtx, pDst->vendorSpecific, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeMeasurementPilot. */
#define SigIeMeasurementPilot ( 0x000d )
tANI_U32 dot11fUnpackIeMultiBssid(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEMultiBssid *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->maxBSSIDIndicator = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->num_vendorSpecific = (tANI_U8)( ielen );
DOT11F_MEMCPY(pCtx, pDst->vendorSpecific, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeMultiBssid. */
#define SigIeMultiBssid ( 0x000e )
tANI_U32 dot11fUnpackIeRICData(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERICData *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->Identifier = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->resourceDescCount = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
framesntohs(pCtx, &pDst->statusCode, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeRICData. */
#define SigIeRICData ( 0x000f )
tANI_U32 dot11fUnpackIeRICDescriptor(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERICDescriptor *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->resourceType = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->num_variableData = (tANI_U8)( ielen );
DOT11F_MEMCPY(pCtx, pDst->variableData, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeRICDescriptor. */
#define SigIeRICDescriptor ( 0x0010 )
tANI_U32 dot11fUnpackIeRRMEnabledCap(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERRMEnabledCap *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U8 tmp11__;
tANI_U8 tmp12__;
tANI_U8 tmp13__;
tANI_U8 tmp14__;
tANI_U8 tmp15__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
tmp11__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->LinkMeasurement = tmp11__ >> 0 & 0x1;
pDst->NeighborRpt = tmp11__ >> 1 & 0x1;
pDst->parallel = tmp11__ >> 2 & 0x1;
pDst->repeated = tmp11__ >> 3 & 0x1;
pDst->BeaconPassive = tmp11__ >> 4 & 0x1;
pDst->BeaconActive = tmp11__ >> 5 & 0x1;
pDst->BeaconTable = tmp11__ >> 6 & 0x1;
pDst->BeaconRepCond = tmp11__ >> 7 & 0x1;
tmp12__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->FrameMeasurement = tmp12__ >> 0 & 0x1;
pDst->ChannelLoad = tmp12__ >> 1 & 0x1;
pDst->NoiseHistogram = tmp12__ >> 2 & 0x1;
pDst->statistics = tmp12__ >> 3 & 0x1;
pDst->LCIMeasurement = tmp12__ >> 4 & 0x1;
pDst->LCIAzimuth = tmp12__ >> 5 & 0x1;
pDst->TCMCapability = tmp12__ >> 6 & 0x1;
pDst->triggeredTCM = tmp12__ >> 7 & 0x1;
tmp13__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->APChanReport = tmp13__ >> 0 & 0x1;
pDst->RRMMIBEnabled = tmp13__ >> 1 & 0x1;
pDst->operatingChanMax = tmp13__ >> 2 & 0x7;
pDst->nonOperatinChanMax = tmp13__ >> 5 & 0x7;
tmp14__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->MeasurementPilot = tmp14__ >> 0 & 0x7;
pDst->MeasurementPilotEnabled = tmp14__ >> 3 & 0x1;
pDst->NeighborTSFOffset = tmp14__ >> 4 & 0x1;
pDst->RCPIMeasurement = tmp14__ >> 5 & 0x1;
pDst->RSNIMeasurement = tmp14__ >> 6 & 0x1;
pDst->BssAvgAccessDelay = tmp14__ >> 7 & 0x1;
tmp15__ = *pBuf;
pDst->BSSAvailAdmission = tmp15__ >> 0 & 0x1;
pDst->AntennaInformation = tmp15__ >> 1 & 0x1;
pDst->fine_time_meas_rpt = tmp15__ >> 2 & 0x1;
pDst->lci_capability = tmp15__ >> 3 & 0x1;
pDst->reserved = tmp15__ >> 4 & 0xf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeRRMEnabledCap. */
#define SigIeRRMEnabledCap ( 0x0011 )
tANI_U32 dot11fUnpackIeRequestedInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERequestedInfo *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_requested_eids = (tANI_U8)( ielen );
DOT11F_MEMCPY(pCtx, pDst->requested_eids, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeRequestedInfo. */
#define SigIeRequestedInfo ( 0x0012 )
tANI_U32 dot11fUnpackIeSSID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESSID *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
{
status = DOT11F_DUPLICATE_IE;
return status;
}
pDst->present = 1;
pDst->num_ssid = (tANI_U8)( ielen );
if (ielen > 32){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->ssid, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeSSID. */
#define SigIeSSID ( 0x0013 )
tANI_U32 dot11fUnpackIeSchedule(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESchedule *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U16 tmp16__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
framesntohs(pCtx, &tmp16__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->aggregation = tmp16__ >> 0 & 0x1;
pDst->tsid = tmp16__ >> 1 & 0xf;
pDst->direction = tmp16__ >> 5 & 0x3;
pDst->reserved = tmp16__ >> 7 & 0x1ff;
framesntohl(pCtx, &pDst->service_start_time, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->service_interval, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->max_service_dur, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->spec_interval, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeSchedule. */
#define SigIeSchedule ( 0x0014 )
tANI_U32 dot11fUnpackIeTCLAS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETCLAS *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->user_priority = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->classifier_type = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->classifier_mask = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
switch (pDst->classifier_type)
{
case 0:
DOT11F_MEMCPY(pCtx, pDst->info.EthParams.source, pBuf, 6);
pBuf += 6;
ielen -= (tANI_U8)6;
DOT11F_MEMCPY(pCtx, pDst->info.EthParams.dest, pBuf, 6);
pBuf += 6;
ielen -= (tANI_U8)6;
framesntohs(pCtx, &pDst->info.EthParams.type, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
break;
case 1:
pDst->info.IpParams.version = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
switch (pDst->info.IpParams.version)
{
case 4:
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.source, pBuf, 4);
pBuf += 4;
ielen -= (tANI_U8)4;
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.dest, pBuf, 4);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.src_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.dest_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
pDst->info.IpParams.params.IpV4Params.DSCP = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->info.IpParams.params.IpV4Params.proto = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->info.IpParams.params.IpV4Params.reserved = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
break;
case 6:
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.source, pBuf, 16);
pBuf += 16;
ielen -= (tANI_U8)16;
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.dest, pBuf, 16);
pBuf += 16;
ielen -= (tANI_U8)16;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.src_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.dest_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.flow_label, pBuf, 3);
pBuf += 3;
ielen -= (tANI_U8)3;
break;
}
break;
case 2:
framesntohs(pCtx, &pDst->info.Params8021dq.tag_type, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
break;
}
(void)pCtx;
return status;
} /* End dot11fUnpackIeTCLAS. */
#define SigIeTCLAS ( 0x0015 )
#define SigIeTCLASSPROC ( 0x0016 )
tANI_U32 dot11fUnpackIeTSDelay(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETSDelay *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
framesntohl(pCtx, &pDst->delay, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeTSDelay. */
#define SigIeTSDelay ( 0x0017 )
tANI_U32 dot11fUnpackIeTSPEC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETSPEC *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U16 tmp17__;
tANI_U8 tmp18__;
tANI_U16 tmp19__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
framesntohs(pCtx, &tmp17__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->traffic_type = tmp17__ >> 0 & 0x1;
pDst->tsid = tmp17__ >> 1 & 0xf;
pDst->direction = tmp17__ >> 5 & 0x3;
pDst->access_policy = tmp17__ >> 7 & 0x3;
pDst->aggregation = tmp17__ >> 9 & 0x1;
pDst->psb = tmp17__ >> 10 & 0x1;
pDst->user_priority = tmp17__ >> 11 & 0x7;
pDst->tsinfo_ack_pol = tmp17__ >> 14 & 0x3;
tmp18__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->schedule = tmp18__ >> 0 & 0x1;
pDst->unused = tmp18__ >> 1 & 0x7f;
framesntohs(pCtx, &tmp19__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->size = tmp19__ >> 0 & 0x7fff;
pDst->fixed = tmp19__ >> 15 & 0x1;
framesntohs(pCtx, &pDst->max_msdu_size, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohl(pCtx, &pDst->min_service_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->max_service_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->inactivity_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->suspension_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->service_start_time, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->min_data_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->mean_data_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->peak_data_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->burst_size, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->delay_bound, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->min_phy_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->surplus_bw_allowance, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->medium_time, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeTSPEC. */
#define SigIeTSPEC ( 0x0018 )
tANI_U32 dot11fUnpackIeVHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTCaps *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U32 tmp20__;
tANI_U16 tmp21__;
tANI_U16 tmp22__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
framesntohl(pCtx, &tmp20__, pBuf, 0);
pBuf += 4;
ielen -= 4;
pDst->maxMPDULen = tmp20__ >> 0 & 0x3;
pDst->supportedChannelWidthSet = tmp20__ >> 2 & 0x3;
pDst->ldpcCodingCap = tmp20__ >> 4 & 0x1;
pDst->shortGI80MHz = tmp20__ >> 5 & 0x1;
pDst->shortGI160and80plus80MHz = tmp20__ >> 6 & 0x1;
pDst->txSTBC = tmp20__ >> 7 & 0x1;
pDst->rxSTBC = tmp20__ >> 8 & 0x7;
pDst->suBeamFormerCap = tmp20__ >> 11 & 0x1;
pDst->suBeamformeeCap = tmp20__ >> 12 & 0x1;
pDst->csnofBeamformerAntSup = tmp20__ >> 13 & 0x7;
pDst->numSoundingDim = tmp20__ >> 16 & 0x7;
pDst->muBeamformerCap = tmp20__ >> 19 & 0x1;
pDst->muBeamformeeCap = tmp20__ >> 20 & 0x1;
pDst->vhtTXOPPS = tmp20__ >> 21 & 0x1;
pDst->htcVHTCap = tmp20__ >> 22 & 0x1;
pDst->maxAMPDULenExp = tmp20__ >> 23 & 0x7;
pDst->vhtLinkAdaptCap = tmp20__ >> 26 & 0x3;
pDst->rxAntPattern = tmp20__ >> 28 & 0x1;
pDst->txAntPattern = tmp20__ >> 29 & 0x1;
pDst->reserved1 = tmp20__ >> 30 & 0x3;
framesntohs(pCtx, &pDst->rxMCSMap, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &tmp21__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->rxHighSupDataRate = tmp21__ >> 0 & 0x1fff;
pDst->reserved2 = tmp21__ >> 13 & 0x7;
framesntohs(pCtx, &pDst->txMCSMap, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &tmp22__, pBuf, 0);
pDst->txSupDataRate = tmp22__ >> 0 & 0x1fff;
pDst->reserved3 = tmp22__ >> 13 & 0x7;
(void)pCtx;
return status;
} /* End dot11fUnpackIeVHTCaps. */
#define SigIeVHTCaps ( 0x0019 )
tANI_U32 dot11fUnpackIeVHTOperation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTOperation *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->chanWidth = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->chanCenterFreqSeg1 = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->chanCenterFreqSeg2 = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
framesntohs(pCtx, &pDst->basicMCSSet, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeVHTOperation. */
#define SigIeVHTOperation ( 0x001a )
tANI_U32 dot11fUnpackIeWMMSchedule(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMSchedule *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U16 tmp23__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->version = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
if (pDst->version != 0x1)
{
pDst->present = 0;
return ( status | DOT11F_BAD_FIXED_VALUE );
}
framesntohs(pCtx, &tmp23__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->aggregation = tmp23__ >> 0 & 0x1;
pDst->tsid = tmp23__ >> 1 & 0xf;
pDst->direction = tmp23__ >> 5 & 0x3;
pDst->reserved = tmp23__ >> 7 & 0x1ff;
framesntohl(pCtx, &pDst->service_start_time, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->service_interval, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->max_service_dur, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->spec_interval, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeWMMSchedule. */
#define SigIeWMMSchedule ( 0x001b )
tANI_U32 dot11fUnpackIeWMMTCLAS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTCLAS *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->version = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
if (pDst->version != 0x1)
{
pDst->present = 0;
return ( status | DOT11F_BAD_FIXED_VALUE );
}
pDst->user_priority = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->classifier_type = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->classifier_mask = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
switch (pDst->classifier_type)
{
case 0:
DOT11F_MEMCPY(pCtx, pDst->info.EthParams.source, pBuf, 6);
pBuf += 6;
ielen -= (tANI_U8)6;
DOT11F_MEMCPY(pCtx, pDst->info.EthParams.dest, pBuf, 6);
pBuf += 6;
ielen -= (tANI_U8)6;
framesntohs(pCtx, &pDst->info.EthParams.type, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
break;
case 1:
pDst->info.IpParams.version = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
switch (pDst->info.IpParams.version)
{
case 4:
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.source, pBuf, 4);
pBuf += 4;
ielen -= (tANI_U8)4;
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV4Params.dest, pBuf, 4);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.src_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV4Params.dest_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
pDst->info.IpParams.params.IpV4Params.DSCP = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->info.IpParams.params.IpV4Params.proto = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->info.IpParams.params.IpV4Params.reserved = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
break;
case 6:
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.source, pBuf, 16);
pBuf += 16;
ielen -= (tANI_U8)16;
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.dest, pBuf, 16);
pBuf += 16;
ielen -= (tANI_U8)16;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.src_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->info.IpParams.params.IpV6Params.dest_port, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
DOT11F_MEMCPY(pCtx, pDst->info.IpParams.params.IpV6Params.flow_label, pBuf, 3);
pBuf += 3;
ielen -= (tANI_U8)3;
break;
}
break;
case 2:
framesntohs(pCtx, &pDst->info.Params8021dq.tag_type, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
break;
}
(void)pCtx;
return status;
} /* End dot11fUnpackIeWMMTCLAS. */
#define SigIeWMMTCLAS ( 0x001c )
tANI_U32 dot11fUnpackIeWMMTCLASPROC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTCLASPROC *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->version = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
if (pDst->version != 0x1)
{
pDst->present = 0;
return ( status | DOT11F_BAD_FIXED_VALUE );
}
pDst->processing = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeWMMTCLASPROC. */
#define SigIeWMMTCLASPROC ( 0x001d )
tANI_U32 dot11fUnpackIeWMMTSDelay(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTSDelay *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->version = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
if (pDst->version != 0x1)
{
pDst->present = 0;
return ( status | DOT11F_BAD_FIXED_VALUE );
}
framesntohl(pCtx, &pDst->delay, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeWMMTSDelay. */
#define SigIeWMMTSDelay ( 0x001e )
tANI_U32 dot11fUnpackIeWMMTSPEC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTSPEC *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U16 tmp24__;
tANI_U8 tmp25__;
tANI_U16 tmp26__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->version = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
if (pDst->version != 0x1)
{
pDst->present = 0;
return ( status | DOT11F_BAD_FIXED_VALUE );
}
framesntohs(pCtx, &tmp24__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->traffic_type = tmp24__ >> 0 & 0x1;
pDst->tsid = tmp24__ >> 1 & 0xf;
pDst->direction = tmp24__ >> 5 & 0x3;
pDst->access_policy = tmp24__ >> 7 & 0x3;
pDst->aggregation = tmp24__ >> 9 & 0x1;
pDst->psb = tmp24__ >> 10 & 0x1;
pDst->user_priority = tmp24__ >> 11 & 0x7;
pDst->tsinfo_ack_pol = tmp24__ >> 14 & 0x3;
tmp25__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->tsinfo_rsvd = tmp25__ >> 0 & 0x7f;
pDst->burst_size_defn = tmp25__ >> 7 & 0x1;
framesntohs(pCtx, &tmp26__, pBuf, 0);
pBuf += 2;
ielen -= 2;
pDst->size = tmp26__ >> 0 & 0x7fff;
pDst->fixed = tmp26__ >> 15 & 0x1;
framesntohs(pCtx, &pDst->max_msdu_size, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohl(pCtx, &pDst->min_service_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->max_service_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->inactivity_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->suspension_int, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->service_start_time, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->min_data_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->mean_data_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->peak_data_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->burst_size, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->delay_bound, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohl(pCtx, &pDst->min_phy_rate, pBuf, 0);
pBuf += 4;
ielen -= (tANI_U8)4;
framesntohs(pCtx, &pDst->surplus_bw_allowance, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->medium_time, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeWMMTSPEC. */
#define SigIeWMMTSPEC ( 0x001f )
tANI_U32 dot11fUnpackIeWiderBWChanSwitchAnn(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWiderBWChanSwitchAnn *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->newChanWidth = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->newCenterChanFreq0 = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->newCenterChanFreq1 = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeWiderBWChanSwitchAnn. */
#define SigIeWiderBWChanSwitchAnn ( 0x0020 )
tANI_U32 dot11fUnpackIevht_transmit_power_env(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEvht_transmit_power_env *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_bytes = (tANI_U8)( ielen );
if (ielen > 5){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->bytes, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIevht_transmit_power_env. */
#define SigIevht_transmit_power_env ( 0x0021 )
tANI_U32 dot11fUnpackIeAID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEAID *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
framesntohs(pCtx, &pDst->assocId, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeAID. */
#define SigIeAID ( 0x0022 )
tANI_U32 dot11fUnpackIeCFParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIECFParams *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->cfp_count = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->cfp_period = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
framesntohs(pCtx, &pDst->cfp_maxduration, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
framesntohs(pCtx, &pDst->cfp_durremaining, pBuf, 0);
(void)pCtx;
return status;
} /* End dot11fUnpackIeCFParams. */
#define SigIeCFParams ( 0x0023 )
tANI_U32 dot11fUnpackIeChallengeText(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEChallengeText *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_text = (tANI_U8)( ielen );
if (ielen > 253){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->text, pBuf, ( ielen ) );
(void)pCtx;
return status;
} /* End dot11fUnpackIeChallengeText. */
#define SigIeChallengeText ( 0x0024 )
tANI_U32 dot11fUnpackIeChanSwitchAnn(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEChanSwitchAnn *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->switchMode = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->newChannel = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->switchCount = *pBuf;
(void)pCtx;
return status;
} /* End dot11fUnpackIeChanSwitchAnn. */
#define SigIeChanSwitchAnn ( 0x0025 )
static const tFFDefn FFS_ChannelSwitchWrapper[ ] = {
{ NULL, 0, 0, 0,},
};
static const tIEDefn IES_ChannelSwitchWrapper[ ] = {
{offsetof(tDot11fIEChannelSwitchWrapper, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, 0, },
{offsetof(tDot11fIEChannelSwitchWrapper, vht_transmit_power_env), offsetof(tDot11fIEvht_transmit_power_env, present), 0, "vht_transmit_power_env" , 0, 4, 7, SigIevht_transmit_power_env, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHT_TRANSMIT_POWER_ENV, 0, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },
};
tANI_U32 dot11fUnpackIeChannelSwitchWrapper(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEChannelSwitchWrapper *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
(void)pCtx;
status |= UnpackCore(pCtx,
pBuf,
ielen,
FFS_ChannelSwitchWrapper,
IES_ChannelSwitchWrapper,
( tANI_U8* )pDst,
sizeof(*pDst));
return status;
} /* End dot11fUnpackIeChannelSwitchWrapper. */
#define SigIeChannelSwitchWrapper ( 0x0026 )
tANI_U32 dot11fUnpackIeCountry(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIECountry *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
DOT11F_MEMCPY(pCtx, pDst->country, pBuf, 3);
pBuf += 3;
ielen -= (tANI_U8)3;
if ( ! ielen )
{
pDst->num_triplets = 0U;
return 0U;
}
else
{
pDst->num_triplets = (tANI_U8)( ielen / 3 );
if (ielen > 84 * 3){
pDst->present = 0;
return DOT11F_SKIPPED_BAD_IE;
}
DOT11F_MEMCPY(pCtx, pDst->triplets, pBuf, ( ielen ) );
}
(void)pCtx;
return status;
} /* End dot11fUnpackIeCountry. */
#define SigIeCountry ( 0x0027 )
#define SigIeDSParams ( 0x0028 )
tANI_U32 dot11fUnpackIeEDCAParamSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEEDCAParamSet *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
tANI_U8 tmp27__;
tANI_U8 tmp28__;
tANI_U8 tmp29__;
tANI_U8 tmp30__;
tANI_U8 tmp31__;
tANI_U8 tmp32__;
tANI_U8 tmp33__;
tANI_U8 tmp34__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present) status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->qos = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
pDst->reserved = *pBuf;
pBuf += 1;
ielen -= (tANI_U8)1;
tmp27__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->acbe_aifsn = tmp27__ >> 0 & 0xf;
pDst->acbe_acm = tmp27__ >> 4 & 0x1;
pDst->acbe_aci = tmp27__ >> 5 & 0x3;
pDst->unused1 = tmp27__ >> 7 & 0x1;
tmp28__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->acbe_acwmin = tmp28__ >> 0 & 0xf;
pDst->acbe_acwmax = tmp28__ >> 4 & 0xf;
framesntohs(pCtx, &pDst->acbe_txoplimit, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
tmp29__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->acbk_aifsn = tmp29__ >> 0 & 0xf;
pDst->acbk_acm = tmp29__ >> 4 & 0x1;
pDst->acbk_aci = tmp29__ >> 5 & 0x3;
pDst->unused2 = tmp29__ >> 7 & 0x1;
tmp30__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->acbk_acwmin = tmp30__ >> 0 & 0xf;
pDst->acbk_acwmax = tmp30__ >> 4 & 0xf;
framesntohs(pCtx, &pDst->acbk_txoplimit, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
tmp31__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->acvi_aifsn = tmp31__ >> 0 & 0xf;
pDst->acvi_acm = tmp31__ >> 4 & 0x1;
pDst->acvi_aci = tmp31__ >> 5 & 0x3;
pDst->unused3 = tmp31__ >> 7 & 0x1;
tmp32__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->acvi_acwmin = tmp32__ >> 0 & 0xf;
pDst->acvi_acwmax = tmp32__ >> 4 & 0xf;
framesntohs(pCtx, &pDst->acvi_txoplimit, pBuf, 0);
pBuf += 2;
ielen -= (tANI_U8)2;
tmp33__ = *pBuf;
pBuf += 1;
ielen -= 1;
pDst->acvo_aifsn = tmp33__ >> 0 & 0xf;
pDst->acvo_acm = tmp33__ >> 4 & 0x1;