qcacld-3.0: Add Roaming consortium sel OUI support in frame parser

Adds support for Roaming consortium selection OUI
(0x50, 0x6f, 0x9a, 0x1d) in frame parser.

Change-Id: Ib17eb712a30713f1798969a5565f685333aa6bcc
CRs-Fixed: 2353999
This commit is contained in:
Abhishek Singh 2018-11-16 12:16:29 +05:30 • committed by nshrivas
commit d10262551e
3 changed files with 177 additions and 42 deletions

View file

@ -2071,6 +2071,11 @@ IE osen_ie (EID_VENDOR_SPECIFIC) OUI (0x50, 0x6F, 0x9A, 0x12)
data[0..255];
}
IE roaming_consortium_sel (EID_VENDOR_SPECIFIC) OUI (0x50, 0x6F, 0x9A, 0x1d)
{
data[0..255];
}
IE QComVendorIE (EID_VENDOR_SPECIFIC) OUI (0x00, 0xA0, 0xC6)
{
type, 1;
@ -3679,6 +3684,7 @@ FRAME AssocRequest // 7.2.3.4
OPTIE QCN_IE;
OPTIE he_cap;
OPTIE osen_ie;
OPTIE roaming_consortium_sel;
} // End frame AssocRequest.
FRAME AssocResponse // 7.2.3.5

View file

@ -26,7 +26,7 @@
*
*
* This file was automatically generated by 'framesc'
* Thu Sep 27 15:54:27 2018 from the following file(s):
* Fri Nov 23 09:33:04 2018 from the following file(s):
*
* dot11f.frms
*
@ -9268,6 +9268,46 @@ uint32_t dot11f_get_packed_ie_osen_ie(
}; /* End extern "C". */
#endif /* C++ */
/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x1d} */
typedef struct sDot11fIEroaming_consortium_sel {
uint8_t present;
uint8_t num_data;
uint8_t data[255];
} tDot11fIEroaming_consortium_sel;
#define DOT11F_EID_ROAMING_CONSORTIUM_SEL (221)
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_ROAMING_CONSORTIUM_SEL_MIN_LEN (4)
#define DOT11F_IE_ROAMING_CONSORTIUM_SEL_MAX_LEN (259)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
__must_check uint32_t dot11f_unpack_ie_roaming_consortium_sel(
tpAniSirGlobal,
uint8_t *,
uint8_t,
tDot11fIEroaming_consortium_sel*,
bool);
uint32_t dot11f_pack_ie_roaming_consortium_sel(
tpAniSirGlobal,
tDot11fIEroaming_consortium_sel *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_ie_roaming_consortium_sel(
tpAniSirGlobal,
tDot11fIEroaming_consortium_sel *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* EID 62 (0x3e) */
typedef struct sDot11fIEsec_chan_offset_ele {
uint8_t present;
@ -9427,44 +9467,45 @@ uint32_t dot11f_get_packed_add_ts_response_size(tpAniSirGlobal pCtx,
#endif /* C++ */
typedef struct sDot11fAssocRequest{
tDot11fFfCapabilities Capabilities;
tDot11fFfListenInterval ListenInterval;
tDot11fIESSID SSID;
tDot11fIESuppRates SuppRates;
tDot11fIEOperatingMode OperatingMode;
tDot11fIEPowerCaps PowerCaps;
tDot11fIESuppChannels SuppChannels;
tDot11fIEHTCaps HTCaps;
tDot11fIEQOSCapsStation QOSCapsStation;
tDot11fIERSNOpaque RSNOpaque;
tDot11fIEExtSuppRates ExtSuppRates;
tDot11fIEMobilityDomain MobilityDomain;
tDot11fIESuppOperatingClasses SuppOperatingClasses;
tDot11fIEWAPIOpaque WAPIOpaque;
tDot11fIEWAPI WAPI;
tDot11fIERRMEnabledCap RRMEnabledCap;
tDot11fIEQosMapSet QosMapSet;
tDot11fIEExtCap ExtCap;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEfils_session fils_session;
tDot11fIEfils_public_key fils_public_key;
tDot11fIEfils_key_confirmation fils_key_confirmation;
tDot11fIEfils_hlp_container fils_hlp_container;
tDot11fIEfragment_ie fragment_ie;
tDot11fIEdh_parameter_element dh_parameter_element;
tDot11fIEWPAOpaque WPAOpaque;
tDot11fIEWMMCaps WMMCaps;
tDot11fIEWMMInfoStation WMMInfoStation;
tDot11fIEWscIEOpaque WscIEOpaque;
tDot11fIEESERadMgmtCap ESERadMgmtCap;
tDot11fIEESEVersion ESEVersion;
tDot11fIEP2PIEOpaque P2PIEOpaque;
tDot11fIEWFDIEOpaque WFDIEOpaque;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEhe_cap he_cap;
tDot11fIEosen_ie osen_ie;
tDot11fFfCapabilities Capabilities;
tDot11fFfListenInterval ListenInterval;
tDot11fIESSID SSID;
tDot11fIESuppRates SuppRates;
tDot11fIEOperatingMode OperatingMode;
tDot11fIEPowerCaps PowerCaps;
tDot11fIESuppChannels SuppChannels;
tDot11fIEHTCaps HTCaps;
tDot11fIEQOSCapsStation QOSCapsStation;
tDot11fIERSNOpaque RSNOpaque;
tDot11fIEExtSuppRates ExtSuppRates;
tDot11fIEMobilityDomain MobilityDomain;
tDot11fIESuppOperatingClasses SuppOperatingClasses;
tDot11fIEWAPIOpaque WAPIOpaque;
tDot11fIEWAPI WAPI;
tDot11fIERRMEnabledCap RRMEnabledCap;
tDot11fIEQosMapSet QosMapSet;
tDot11fIEExtCap ExtCap;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEfils_session fils_session;
tDot11fIEfils_public_key fils_public_key;
tDot11fIEfils_key_confirmation fils_key_confirmation;
tDot11fIEfils_hlp_container fils_hlp_container;
tDot11fIEfragment_ie fragment_ie;
tDot11fIEdh_parameter_element dh_parameter_element;
tDot11fIEWPAOpaque WPAOpaque;
tDot11fIEWMMCaps WMMCaps;
tDot11fIEWMMInfoStation WMMInfoStation;
tDot11fIEWscIEOpaque WscIEOpaque;
tDot11fIEESERadMgmtCap ESERadMgmtCap;
tDot11fIEESEVersion ESEVersion;
tDot11fIEP2PIEOpaque P2PIEOpaque;
tDot11fIEWFDIEOpaque WFDIEOpaque;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEhe_cap he_cap;
tDot11fIEosen_ie osen_ie;
tDot11fIEroaming_consortium_sel roaming_consortium_sel;
} tDot11fAssocRequest;
#define DOT11F_ASSOCREQUEST (3)

View file

@ -24,7 +24,7 @@
*
*
* This file was automatically generated by 'framesc'
* Thu Sep 27 15:54:27 2018 from the following file(s):
* Fri Nov 23 09:33:04 2018 from the following file(s):
*
* dot11f.frms
*
@ -9322,6 +9322,26 @@ uint32_t dot11f_unpack_ie_osen_ie(tpAniSirGlobal pCtx,
#define SigIeosen_ie (0x0093)
uint32_t dot11f_unpack_ie_roaming_consortium_sel(tpAniSirGlobal pCtx,
uint8_t *pBuf,
uint8_t ielen,
tDot11fIEroaming_consortium_sel *pDst,
bool append_ie)
{
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen));
(void)pCtx;
return status;
} /* End dot11f_unpack_ie_roaming_consortium_sel. */
#define SigIeroaming_consortium_sel (0x0094)
uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
uint8_t *pBuf,
uint8_t ielen,
@ -9343,7 +9363,7 @@ uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_sec_chan_offset_ele. */
#define SigIesec_chan_offset_ele (0x0094)
#define SigIesec_chan_offset_ele (0x0095)
static const tFFDefn FFS_vendor_vht_ie[] = {
@ -9392,7 +9412,7 @@ uint32_t dot11f_unpack_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_vendor_vht_ie. */
#define SigIevendor_vht_ie (0x0095)
#define SigIevendor_vht_ie (0x0096)
static const tFFDefn FFS_AddTSRequest[] = {
@ -9655,6 +9675,10 @@ static const tIEDefn IES_AssocRequest[] = {
{ offsetof(tDot11fAssocRequest, osen_ie), offsetof(tDot11fIEosen_ie,
present), 0, "osen_ie", 0, 6, 261, SigIeosen_ie, {80, 111, 154, 18, 0},
4, DOT11F_EID_OSEN_IE, 0, 0, },
{ offsetof(tDot11fAssocRequest, roaming_consortium_sel),
offsetof(tDot11fIEroaming_consortium_sel, present), 0,
"roaming_consortium_sel", 0, 6, 261, SigIeroaming_consortium_sel,
{80, 111, 154, 29, 0}, 4, DOT11F_EID_ROAMING_CONSORTIUM_SEL, 0, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
uint32_t dot11f_unpack_assoc_request(tpAniSirGlobal pCtx,
@ -14475,6 +14499,16 @@ static uint32_t unpack_core(tpAniSirGlobal pCtx,
countOffset),
append_ie);
break;
case SigIeroaming_consortium_sel:
status |=
dot11f_unpack_ie_roaming_consortium_sel(
pCtx, pBufRemaining, len,
(tDot11fIEroaming_consortium_sel *)
(pFrm + pIe->offset +
sizeof(tDot11fIEroaming_consortium_sel) *
countOffset),
append_ie);
break;
case SigIesec_chan_offset_ele:
status |=
dot11f_unpack_ie_sec_chan_offset_ele(
@ -17552,6 +17586,15 @@ static uint32_t get_packed_size_core(tpAniSirGlobal pCtx,
(pFrm + pIe->offset + offset * i))->
present;
break;
case SigIeroaming_consortium_sel:
offset = sizeof(tDot11fIEroaming_consortium_sel);
byteCount = ((tDot11fIEroaming_consortium_sel *)
(pFrm + pIe->offset + offset * i))->
num_data;
pIePresent = ((tDot11fIEroaming_consortium_sel *)
(pFrm + pIe->offset + offset * i))->
present;
break;
case SigIesec_chan_offset_ele:
offset = sizeof(tDot11fIEsec_chan_offset_ele);
byteCount = 1;
@ -26738,6 +26781,43 @@ uint32_t dot11f_pack_ie_osen_ie(tpAniSirGlobal pCtx,
return DOT11F_PARSE_SUCCESS;
} /* End dot11f_pack_ie_osen_ie. */
uint32_t dot11f_pack_ie_roaming_consortium_sel(tpAniSirGlobal pCtx,
tDot11fIEroaming_consortium_sel *pSrc,
uint8_t *pBuf,
uint32_t nBuf,
uint32_t *pnConsumed)
{
uint8_t *pIeLen = 0;
uint32_t nConsumedOnEntry = *pnConsumed;
uint32_t nNeeded = 0U;
nNeeded += pSrc->num_data;
while (pSrc->present) {
if (nNeeded > nBuf)
return DOT11F_BUFFER_OVERFLOW;
*pBuf = 221;
++pBuf; ++(*pnConsumed);
pIeLen = pBuf;
++pBuf; ++(*pnConsumed);
*pBuf = 0x50;
++pBuf; ++(*pnConsumed);
*pBuf = 0x6f;
++pBuf; ++(*pnConsumed);
*pBuf = 0x9a;
++pBuf; ++(*pnConsumed);
*pBuf = 0x1d;
++pBuf; ++(*pnConsumed);
DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->data), pSrc->num_data);
*pnConsumed += pSrc->num_data;
/* fieldsEndFlag = 1 */
break;
}
(void)pCtx;
if (pIeLen) {
*pIeLen = *pnConsumed - nConsumedOnEntry - 2;
}
return DOT11F_PARSE_SUCCESS;
} /* End dot11f_pack_ie_roaming_consortium_sel. */
uint32_t dot11f_pack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
tDot11fIEsec_chan_offset_ele *pSrc,
uint8_t *pBuf,
@ -29030,6 +29110,14 @@ static uint32_t pack_core(tpAniSirGlobal pCtx,
sizeof(tDot11fIEosen_ie) * i),
pBufRemaining, nBufRemaining, &len);
break;
case SigIeroaming_consortium_sel:
status |=
dot11f_pack_ie_roaming_consortium_sel(
pCtx, (tDot11fIEroaming_consortium_sel *)
(pSrc + pIe->offset +
sizeof(tDot11fIEroaming_consortium_sel) * i),
pBufRemaining, nBufRemaining, &len);
break;
case SigIesec_chan_offset_ele:
status |=
dot11f_pack_ie_sec_chan_offset_ele(