Ver Fonte

qcacld-3.0: Add OUI type(0x10) to HS2.0 IE frame parser

Add OUI type(0x10) to HS2.0 IE frame parser. In current implementation
without OUI type being set, the first IE with WFA OUI is parsed as
HS2.0 IE, even though the OUI type is not 0x10.

Change-Id: I63d97fc100f419c09bc22d1747f434fb9a5c3b06
CRs-Fixed: 1067816
Selvaraj, Sridhar há 8 anos atrás
pai
commit
7f42b5f1d7

+ 1 - 2
core/mac/src/cfg/cfgUtil/dot11f.frms

@@ -1861,9 +1861,8 @@ IE Vendor3IE (EID_VENDOR_SPECIFIC) OUI (0x00, 0x16, 0x32)
 {
 }
 
-IE hs20vendor_ie (EID_VENDOR_SPECIFIC) OUI (0x50, 0x6F, 0x9A)
+IE hs20vendor_ie (EID_VENDOR_SPECIFIC) OUI (0x50, 0x6F, 0x9A, 0x10)
 {
-    type,                       1;
     /* hotspot_configurations */
     {
         dgaf_dis:               1;

+ 2 - 3
core/mac/src/include/dot11f.h

@@ -35,7 +35,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Mon Aug 29 23:01:24 2016 from the following file(s):
+ * Mon Sep 19 14:42:34 2016 from the following file(s):
  *
  * dot11f.frms
  *
@@ -7441,10 +7441,9 @@ uint32_t dot11f_get_packed_ie_ext_chan_switch_ann(
 }; /* End extern "C". */
 #endif /* C++ */
 
-/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a} */
+/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x10} */
 typedef struct sDot11fIEhs20vendor_ie {
 	uint8_t             present;
-	uint8_t             type;
 	uint8_t             dgaf_dis:1;
 	uint8_t        hs_id_present:2;
 	uint8_t             reserved:1;

+ 16 - 21
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -25,7 +25,7 @@
  * to the Linux Foundation.
  */
 
- /*
+/*
  * \file dot11f.c
  *
  * \brief Structures, functions & definitions for
@@ -33,7 +33,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Mon Aug 29 23:01:24 2016 from the following file(s):
+ * Mon Sep 19 14:42:34 2016 from the following file(s):
  *
  * dot11f.frms
  *
@@ -5849,9 +5849,6 @@ uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
 	if (pDst->present)
 		status = DOT11F_DUPLICATE_IE;
 	pDst->present = 1;
-	pDst->type = *pBuf;
-	pBuf += 1;
-	ielen -= (uint8_t)1;
 	tmp68__ = *pBuf;
 	pBuf += 1;
 	ielen -= 1;
@@ -6217,8 +6214,8 @@ static const tIEDefn IES_AssocRequest[] = {
 	3, DOT11F_EID_VENDOR2_IE, 0, },
 	{ offsetof(tDot11fAssocRequest, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
-	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 0, 0},
-	3, DOT11F_EID_HS20VENDOR_IE, 0, },
+	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
+	4, DOT11F_EID_HS20VENDOR_IE, 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,
@@ -6578,8 +6575,8 @@ static const tIEDefn IES_Beacon[] = {
 	3, DOT11F_EID_VENDOR3IE, 0, },
 	{ offsetof(tDot11fBeacon, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
-	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 0, 0},
-	3, DOT11F_EID_HS20VENDOR_IE, 0, },
+	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
+	4, DOT11F_EID_HS20VENDOR_IE, 0, },
 	{ offsetof(tDot11fBeacon, ChannelSwitchWrapper),
 	offsetof(tDot11fIEChannelSwitchWrapper, present), 0,
 	"ChannelSwitchWrapper", 0, 2, 14, SigIeChannelSwitchWrapper,
@@ -6779,8 +6776,8 @@ static const tIEDefn IES_Beacon2[] = {
 	3, DOT11F_EID_VENDOR3IE, 0, },
 	{ offsetof(tDot11fBeacon2, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
-	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 0, 0},
-	3, DOT11F_EID_HS20VENDOR_IE, 0, },
+	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
+	4, DOT11F_EID_HS20VENDOR_IE, 0, },
 	{ offsetof(tDot11fBeacon2, ChannelSwitchWrapper),
 	offsetof(tDot11fIEChannelSwitchWrapper, present), 0,
 	"ChannelSwitchWrapper", 0, 2, 14, SigIeChannelSwitchWrapper,
@@ -6976,8 +6973,8 @@ static const tIEDefn IES_BeaconIEs[] = {
 	3, DOT11F_EID_VENDOR3IE, 0, },
 	{ offsetof(tDot11fBeaconIEs, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
-	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 0, 0},
-	3, DOT11F_EID_HS20VENDOR_IE, 0, },
+	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
+	4, DOT11F_EID_HS20VENDOR_IE, 0, },
 	{ offsetof(tDot11fBeaconIEs, ChannelSwitchWrapper),
 	offsetof(tDot11fIEChannelSwitchWrapper, present), 0,
 	"ChannelSwitchWrapper", 0, 2, 14, SigIeChannelSwitchWrapper,
@@ -7585,8 +7582,8 @@ static const tIEDefn IES_ProbeResponse[] = {
 	3, DOT11F_EID_VENDOR3IE, 0, },
 	{ offsetof(tDot11fProbeResponse, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
-	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 0, 0},
-	3, DOT11F_EID_HS20VENDOR_IE, 0, },
+	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
+	4, DOT11F_EID_HS20VENDOR_IE, 0, },
 	{ offsetof(tDot11fProbeResponse, ChannelSwitchWrapper),
 	offsetof(tDot11fIEChannelSwitchWrapper, present), 0,
 	"ChannelSwitchWrapper", 0, 2, 14, SigIeChannelSwitchWrapper,
@@ -7840,8 +7837,8 @@ static const tIEDefn IES_ReAssocRequest[] = {
 	3, DOT11F_EID_VENDOR2_IE, 0, },
 	{ offsetof(tDot11fReAssocRequest, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
-	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 0, 0},
-	3, DOT11F_EID_HS20VENDOR_IE, 0, },
+	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
+	4, DOT11F_EID_HS20VENDOR_IE, 0, },
 	{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
 
 uint32_t dot11f_unpack_re_assoc_request(tpAniSirGlobal pCtx,
@@ -11438,7 +11435,6 @@ uint32_t dot11f_get_packed_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
 	uint32_t status = DOT11F_PARSE_SUCCESS;
 	(void)pCtx;
 	while (pIe->present) {
-		*pnNeeded += 1;
 		*pnNeeded += 1;
 		if (pIe->hs_id_present) {
 			switch (pIe->hs_id_present) {
@@ -20282,9 +20278,8 @@ uint32_t dot11f_pack_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
 		++pBuf; ++(*pnConsumed);
 		*pBuf = 0x9a;
 		++pBuf; ++(*pnConsumed);
-		*pBuf = pSrc->type;
-		*pnConsumed += 1;
-		pBuf += 1;
+		*pBuf = 0x10;
+		++pBuf; ++(*pnConsumed);
 		tmp138__ = 0U;
 		tmp138__ |= (pSrc->dgaf_dis << 0);
 		tmp138__ |= (pSrc->hs_id_present << 1);