Browse Source

qcacld-3.0: update EHT operation IE as per draft 1.5

Update dot11f EHT operation IE definitions as per 11be draft 1.5
specification.

Change-Id: If0027436148c6a88dbef7caf42a6a11a9cf3a5bf
CRs-Fixed: 3197295
Deeksha Gupta 2 years ago
parent
commit
fe52433b9d

+ 8 - 6
core/mac/src/cfg/cfgUtil/dot11f.frms

@@ -3359,15 +3359,17 @@ IE eht_cap (EID_EXTN_ID_ELEMENT) OUI (0x6C)
 IE eht_op (EID_EXTN_ID_ELEMENT) OUI (0x6A)
 {
     {
-        width: 3;
-	reserved: 5;
+        eht_op_information_present: 1;
+	disabled_sub_chan_bitmap_present: 1;
+	reserved: 6;
     }
-    ccfs, 2;
     {
-        disable_sub_chan_bitmap_present: 1;
-        reserved2: 7;
+        channel_width: 3;
+	reserved_1: 5;
     }
-    disable_sub_chan_bitmap[2][0..1] COUNTIS disable_sub_chan_bitmap_present;
+    ccfs0, 1;
+    ccfs1, 1;
+    disabled_sub_chan_bitmap[2][0..1] COUNTIS disabled_sub_chan_bitmap_present;
 }
 
 IE mu_edca_param_set (EID_EXTN_ID_ELEMENT) OUI (0x26)

+ 9 - 7
core/mac/src/include/dot11f.h

@@ -27,7 +27,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Thu May 26 11:57:28 2022 from the following file(s):
+ * Wed Jun  1 12:12:18 2022 from the following file(s):
  *
  * dot11f.frms
  *
@@ -8941,12 +8941,14 @@ uint32_t dot11f_get_packed_ie_eht_cap(
 /* EID 255 (0xff) Extended EID 106 (0x6a) */
 typedef struct sDot11fIEeht_op {
 	uint8_t             present;
-	uint8_t                width:3;
-	uint8_t             reserved:5;
-	uint16_t            ccfs;
-	uint8_t disable_sub_chan_bitmap_present:1;
-	uint8_t            reserved2:7;
-	uint8_t             disable_sub_chan_bitmap[1][2];
+	uint8_t eht_op_information_present:1;
+	uint8_t disabled_sub_chan_bitmap_present:1;
+	uint8_t             reserved:6;
+	uint8_t        channel_width:3;
+	uint8_t           reserved_1:5;
+	uint8_t             ccfs0;
+	uint8_t             ccfs1;
+	uint8_t             disabled_sub_chan_bitmap[1][2];
 } tDot11fIEeht_op;
 
 #define DOT11F_EID_EHT_OP (255)

+ 38 - 25
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -25,7 +25,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Thu May 26 11:57:28 2022 from the following file(s):
+ * Wed Jun  1 12:12:18 2022 from the following file(s):
  *
  * dot11f.frms
  *
@@ -8833,37 +8833,46 @@ uint32_t dot11f_unpack_ie_eht_op(tpAniSirGlobal pCtx,
 	tmp86__ = *pBuf;
 	pBuf += 1;
 	ielen -= 1;
-	pDst->width = tmp86__ >> 0 & 0x7;
-	pDst->reserved = tmp86__ >> 3 & 0x1f;
-	if (unlikely(ielen < 2)) {
+	pDst->eht_op_information_present = tmp86__ >> 0 & 0x1;
+	pDst->disabled_sub_chan_bitmap_present = tmp86__ >> 1 & 0x1;
+	pDst->reserved = tmp86__ >> 2 & 0x3f;
+	if (unlikely(ielen < 1)) {
 		pDst->present = 0;
 		return DOT11F_INCOMPLETE_IE;
 	}
 
-	framesntohs(pCtx, &pDst->ccfs, pBuf, 0);
-	pBuf += 2;
-	ielen -= (uint8_t)2;
+	tmp87__ = *pBuf;
+	pBuf += 1;
+	ielen -= 1;
+	pDst->channel_width = tmp87__ >> 0 & 0x7;
+	pDst->reserved_1 = tmp87__ >> 3 & 0x1f;
 	if (unlikely(ielen < 1)) {
 		pDst->present = 0;
 		return DOT11F_INCOMPLETE_IE;
 	}
 
-	tmp87__ = *pBuf;
+	pDst->ccfs0 = *pBuf;
 	pBuf += 1;
-	ielen -= 1;
-	pDst->disable_sub_chan_bitmap_present = tmp87__ >> 0 & 0x1;
-	pDst->reserved2 = tmp87__ >> 1 & 0x7f;
-	if (unlikely(ielen < pDst->disable_sub_chan_bitmap_present * 2)) {
+	ielen -= (uint8_t)1;
+	if (unlikely(ielen < 1)) {
 		pDst->present = 0;
 		return DOT11F_INCOMPLETE_IE;
 	}
 
-	if (pDst->disable_sub_chan_bitmap_present > 1) {
+	pDst->ccfs1 = *pBuf;
+	pBuf += 1;
+	ielen -= (uint8_t)1;
+	if (unlikely(ielen < pDst->disabled_sub_chan_bitmap_present * 2)) {
+		pDst->present = 0;
+		return DOT11F_INCOMPLETE_IE;
+	}
+
+	if (pDst->disabled_sub_chan_bitmap_present > 1) {
 		pDst->present = 0;
 		return DOT11F_SKIPPED_BAD_IE;
 	}
 
-	DOT11F_MEMCPY(pCtx, pDst->disable_sub_chan_bitmap, pBuf, (pDst->disable_sub_chan_bitmap_present * 2));
+	DOT11F_MEMCPY(pCtx, pDst->disabled_sub_chan_bitmap, pBuf, (pDst->disabled_sub_chan_bitmap_present * 2));
 	(void)pCtx;
 	return status;
 } /* End dot11f_unpack_ie_eht_op. */
@@ -19406,7 +19415,7 @@ static uint32_t get_packed_size_core(tpAniSirGlobal pCtx,
 					offset = sizeof(tDot11fIEeht_op);
 					byteCount = ((tDot11fIEeht_op *)
 					  (pFrm + pIe->offset + offset * i))->
-					  disable_sub_chan_bitmap_present * 2 + 4;
+					  disabled_sub_chan_bitmap_present * 2 + 4;
 					pIePresent = ((tDot11fIEeht_op *)
 					  (pFrm + pIe->offset + offset * i))->
 					  present;
@@ -28465,7 +28474,7 @@ uint32_t dot11f_pack_ie_eht_op(tpAniSirGlobal pCtx,
 	uint32_t nNeeded = 0U;
 	uint8_t tmp203__;
 	uint8_t tmp204__;
-	nNeeded  +=  (pSrc->disable_sub_chan_bitmap_present * 2 + 4);
+	nNeeded  +=  (pSrc->disabled_sub_chan_bitmap_present * 2 + 4);
 	while (pSrc->present) {
 		if (nNeeded > nBuf)
 			return DOT11F_BUFFER_OVERFLOW;
@@ -28476,8 +28485,9 @@ uint32_t dot11f_pack_ie_eht_op(tpAniSirGlobal pCtx,
 		*pBuf = 106;
 		++pBuf; ++(*pnConsumed);
 		tmp203__ = 0U;
-		tmp203__ |= (pSrc->width << 0);
-		tmp203__ |= (pSrc->reserved << 3);
+		tmp203__ |= (pSrc->eht_op_information_present << 0);
+		tmp203__ |= (pSrc->disabled_sub_chan_bitmap_present << 1);
+		tmp203__ |= (pSrc->reserved << 2);
 		if (unlikely(nBuf < 1))
 			return DOT11F_INCOMPLETE_IE;
 
@@ -28485,12 +28495,9 @@ uint32_t dot11f_pack_ie_eht_op(tpAniSirGlobal pCtx,
 		*pnConsumed += 1;
 		pBuf += 1;
 		nBuf -=  1 ;
-		frameshtons(pCtx, pBuf, pSrc->ccfs, 0);
-		*pnConsumed += 2;
-		pBuf += 2;
 		tmp204__ = 0U;
-		tmp204__ |= (pSrc->disable_sub_chan_bitmap_present << 0);
-		tmp204__ |= (pSrc->reserved2 << 1);
+		tmp204__ |= (pSrc->channel_width << 0);
+		tmp204__ |= (pSrc->reserved_1 << 3);
 		if (unlikely(nBuf < 1))
 			return DOT11F_INCOMPLETE_IE;
 
@@ -28498,8 +28505,14 @@ uint32_t dot11f_pack_ie_eht_op(tpAniSirGlobal pCtx,
 		*pnConsumed += 1;
 		pBuf += 1;
 		nBuf -=  1 ;
-		DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->disable_sub_chan_bitmap), (pSrc->disable_sub_chan_bitmap_present * 2));
-		*pnConsumed += (pSrc->disable_sub_chan_bitmap_present * 2);
+		*pBuf = pSrc->ccfs0;
+		*pnConsumed += 1;
+		pBuf += 1;
+		*pBuf = pSrc->ccfs1;
+		*pnConsumed += 1;
+		pBuf += 1;
+		DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->disabled_sub_chan_bitmap), (pSrc->disabled_sub_chan_bitmap_present * 2));
+		*pnConsumed += (pSrc->disabled_sub_chan_bitmap_present * 2);
 		/* fieldsEndFlag = 1 */
 		break;
 	}