Selaa lähdekoodia

qcacld-3.0: Do not advertise 80MHz/160MHz capabilities in 40/20MHz

This is qcacld-2.0 to qcacld-3.0 propagation

Do not advertise the short GI capability for 80MHz and 160MHz
if the  operating channel width is 20MHz or 40MHz.

Change-Id: I93f0b2e94e27b50fa0baa2a263fc866ba3807fb3
CRs-Fixed: 908743
Naveen Rawat 9 vuotta sitten
vanhempi
sitoutus
abb0de459c

+ 2 - 0
core/mac/src/pe/lim/lim_prop_exts_utils.c

@@ -126,6 +126,8 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
 			beacon_struct->VHTOperation.present &&
 			session->vhtCapability) {
 			session->vhtCapabilityPresentInBeacon = 1;
+			session->vhtTxChannelWidthSet =
+				beacon_struct->VHTOperation.chanWidth;
 			if (((beacon_struct->Vendor1IEPresent &&
 				beacon_struct->vendor2_ie.present &&
 				beacon_struct->Vendor3IEPresent)) &&

+ 23 - 14
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -915,21 +915,30 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
 				    nCfgValue);
 
 		pDot11f->ldpcCodingCap = (nCfgValue & 0x0001);
+		if (psessionEntry->vhtTxChannelWidthSet <
+			WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ) {
+			 pDot11f->shortGI80MHz = 0;
+		} else {
+			nCfgValue = 0;
+			if (psessionEntry->htConfig.ht_sgi)
+				CFG_GET_INT(nStatus, pMac,
+					    WNI_CFG_VHT_SHORT_GI_80MHZ,
+					    nCfgValue);
+			pDot11f->shortGI80MHz = (nCfgValue & 0x0001);
+		}
 
-		nCfgValue = 0;
-		if (psessionEntry->htConfig.ht_sgi)
-			CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_SHORT_GI_80MHZ,
-				    nCfgValue);
-
-		pDot11f->shortGI80MHz = (nCfgValue & 0x0001);
-
-		nCfgValue = 0;
-		if (psessionEntry->htConfig.ht_sgi)
-			CFG_GET_INT(nStatus, pMac,
-				    WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
-				    nCfgValue);
-
-		pDot11f->shortGI160and80plus80MHz = (nCfgValue & 0x0001);
+		if (psessionEntry->vhtTxChannelWidthSet <
+			WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ) {
+			pDot11f->shortGI160and80plus80MHz = 0;
+		} else {
+			nCfgValue = 0;
+			if (psessionEntry->htConfig.ht_sgi)
+				CFG_GET_INT(nStatus, pMac,
+				WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
+				nCfgValue);
+			pDot11f->shortGI160and80plus80MHz =
+				(nCfgValue & 0x0001);
+		}
 
 		nCfgValue = 0;
 		if (psessionEntry->htConfig.ht_tx_stbc)