Просмотр исходного кода

qcacld-3.0: Add support for 2.4G VHT Interop in SAP

qcacld-2.0 to qcacld-3.0 propagation

In 2.4GHz some stations advertise VHT capability IE in Assoc Req frame.
Add support to detect the VHT capability in vendor specific IE in
Assoc Req frame and establish the connection with VHT mode to
improve performance.

Change-Id: I08dbcb3ce1895aa2108924d7a672e5d9be514e3d
CRs-Fixed: 924814
Kapil Gupta 8 лет назад
Родитель
Сommit
4b2efbbb0c

+ 11 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -1974,6 +1974,16 @@ typedef enum {
 #define CFG_ENABLE_VHT_FOR_24GHZ_MAX              (1)
 #define CFG_ENABLE_VHT_FOR_24GHZ_DEFAULT          (0)
 
+/*
+ * Parameter to control VHT support based on vendor ie in 2.4 GHz band
+ * This parameter will enable SAP to read VHT capability in vendor ie in Assoc
+ * Req and send VHT caps in Resp to establish connection in VHT Mode.
+ */
+#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_NAME      "gEnableVendorVhtFor24GHzBand"
+#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MIN       (0)
+#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MAX       (1)
+#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_DEFAULT   (1)
+
 #define CFG_MAX_MEDIUM_TIME                      "gMaxMediumTime"
 #define CFG_MAX_MEDIUM_TIME_STAMIN               WNI_CFG_MAX_MEDIUM_TIME_STAMIN
 #define CFG_MAX_MEDIUM_TIME_STAMAX               WNI_CFG_MAX_MEDIUM_TIME_STAMAX
@@ -3889,6 +3899,7 @@ struct hdd_config {
 	bool enableSSR;
 	uint32_t cfgMaxMediumTime;
 	bool enableVhtFor24GHzBand;
+	bool enable_sap_vendor_vht;
 	/* Flag indicating whether legacy fast roam during concurrency is enabled in cfg.ini or not */
 	bool bFastRoamInConIniFeatureEnabled;
 	bool fEnableAdaptRxDrain;

+ 13 - 0
core/hdd/src/wlan_hdd_cfg.c

@@ -2468,6 +2468,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
 		     CFG_ENABLE_VHT_FOR_24GHZ_MIN,
 		     CFG_ENABLE_VHT_FOR_24GHZ_MAX),
 
+
+	REG_VARIABLE(CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_NAME, WLAN_PARAM_Integer,
+		     struct hdd_config, enable_sap_vendor_vht,
+		     VAR_FLAGS_OPTIONAL,
+		     CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_DEFAULT,
+		     CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MIN,
+		     CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MAX),
+
 	REG_DYNAMIC_VARIABLE(CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY,
 			     WLAN_PARAM_Integer,
 			     struct hdd_config, bFastRoamInConIniFeatureEnabled,
@@ -5567,6 +5575,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
 	hdd_info("Name = [%s] Value = [%u]",
 		CFG_IGNORE_PEER_HT_MODE_NAME,
 		pHddCtx->config->ignore_peer_ht_opmode);
+	hdd_info("Name = [%s] Value = [%u]",
+		 CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_NAME,
+		 pHddCtx->config->enable_sap_vendor_vht);
 	hdd_info("Name = [%s] Value = [%u]",
 		CFG_ENABLE_FATAL_EVENT_TRIGGER,
 		pHddCtx->config->enable_fatal_event);
@@ -6918,6 +6929,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
 		pConfig->enable_txbf_sap_mode;
 	smeConfig->csrConfig.enable2x2 = pConfig->enable2x2;
 	smeConfig->csrConfig.enableVhtFor24GHz = pConfig->enableVhtFor24GHzBand;
+	smeConfig->csrConfig.vendor_vht_sap =
+		pConfig->enable_sap_vendor_vht;
 	smeConfig->csrConfig.enableMuBformee = pConfig->enableMuBformee;
 	smeConfig->csrConfig.enableVhtpAid = pConfig->enableVhtpAid;
 	smeConfig->csrConfig.enableVhtGid = pConfig->enableVhtGid;

+ 1 - 0
core/mac/inc/sir_api.h

@@ -695,6 +695,7 @@ typedef struct sSirSmeStartBssReq {
 	bool obssEnabled;
 	uint8_t sap_dot11mc;
 	uint8_t beacon_tx_rate;
+	bool vendor_vht_sap;
 
 } tSirSmeStartBssReq, *tpSirSmeStartBssReq;
 

+ 9 - 9
core/mac/src/cfg/cfgUtil/dot11f.frms

@@ -2894,7 +2894,7 @@ MULTIIE P2PDisAssoc ( EID_VENDOR_SPECIFIC ) OUI( 0x50, 0x6F, 0x9A, 0x09 )
    MANDATORYTLV MinorReasonCode;
 }
 
-IE vendor2_ie (EID_VENDOR_SPECIFIC) OUI (0x00, 0x90, 0x4c)
+IE vendor_vht_ie (EID_VENDOR_SPECIFIC) OUI (0x00, 0x90, 0x4c)
 {
    type, 1;
    sub_type, 1;
@@ -2957,7 +2957,7 @@ FRAME Beacon                              // C.f. Sec. 7.2.3.1
     OPTIE  WiderBWChanSwitchAnn;
     OPTIE  OBSSScanParameters;
     OPTIE  Vendor1IE;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
     OPTIE  Vendor3IE;
     OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;
@@ -3046,7 +3046,7 @@ FRAME Beacon2
     OPTIE  WiderBWChanSwitchAnn;
     OPTIE  OBSSScanParameters;
     OPTIE  Vendor1IE;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
     OPTIE  Vendor3IE;
     OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;
@@ -3111,7 +3111,7 @@ FRAME BeaconIEs
     OPTIE  WiderBWChanSwitchAnn;
     OPTIE  OBSSScanParameters;
     OPTIE  Vendor1IE;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
     OPTIE  Vendor3IE;
     OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;
@@ -3153,7 +3153,7 @@ FRAME AssocRequest                        // 7.2.3.4
     OPTIE  ExtCap;
     OPTIE  OperatingMode;
     OPTIE  QosMapSet;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
     OPTIE  hs20vendor_ie;
 } // End frame AssocRequest.
 
@@ -3188,7 +3188,7 @@ FRAME AssocResponse                       // 7.2.3.5
     OPTIE  ExtCap;
     OPTIE  OBSSScanParameters;
     OPTIE  QosMapSet;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
 } // End frame AssocResponse.
 
 FRAME ReAssocRequest                      // 7.2.3.6
@@ -3225,7 +3225,7 @@ FRAME ReAssocRequest                      // 7.2.3.6
     OPTIE  ExtCap;
     OPTIE  OperatingMode;
     OPTIE  QosMapSet;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
     OPTIE  hs20vendor_ie;
 } // End frame ReAssocRequest.
 
@@ -3261,7 +3261,7 @@ FRAME ReAssocResponse                     // 7.2.3.7
     OPTIE  ExtCap;
     OPTIE  OBSSScanParameters;
     OPTIE  QosMapSet;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
 } // End frame ReAssocResponse.
 
 FRAME ProbeRequest                        // 7.2.3.8
@@ -3328,7 +3328,7 @@ FRAME ProbeResponse                       // 7.2.3.9
     OPTIE  ExtCap;
     OPTIE  OBSSScanParameters;
     OPTIE  Vendor1IE;
-    OPTIE  vendor2_ie;
+    OPTIE  vendor_vht_ie;
     OPTIE  Vendor3IE;
     OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;

+ 20 - 20
core/mac/src/include/dot11f.h

@@ -35,7 +35,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Mon Sep 19 14:42:34 2016 from the following file(s):
+ * Mon Oct  3 12:40:25 2016 from the following file(s):
  *
  * dot11f.frms
  *
@@ -7612,40 +7612,40 @@ uint32_t dot11f_get_packed_ie_sec_chan_offset_ele(
 #endif /* C++ */
 
 /* EID 221 (0xdd) {OUI 0x00, 0x90, 0x4c} */
-typedef struct sDot11fIEvendor2_ie {
+typedef struct sDot11fIEvendor_vht_ie {
 	uint8_t                      present;
 	uint8_t                      type;
 	uint8_t                      sub_type;
 	tDot11fIEVHTCaps             VHTCaps;
 	tDot11fIEVHTOperation        VHTOperation;
-} tDot11fIEvendor2_ie;
+} tDot11fIEvendor_vht_ie;
 
-#define DOT11F_EID_VENDOR2_IE (221)
+#define DOT11F_EID_VENDOR_VHT_IE (221)
 
 /* N.B. These #defines do *not* include the EID & length */
-#define DOT11F_IE_VENDOR2_IE_MIN_LEN (5)
+#define DOT11F_IE_VENDOR_VHT_IE_MIN_LEN (5)
 
-#define DOT11F_IE_VENDOR2_IE_MAX_LEN (26)
+#define DOT11F_IE_VENDOR_VHT_IE_MAX_LEN (26)
 
 #ifdef __cplusplus
 extern "C" {
 #endif /* C++ */
-uint32_t dot11f_unpack_ie_vendor2_ie(
+uint32_t dot11f_unpack_ie_vendor_vht_ie(
 	tpAniSirGlobal,
 	uint8_t *,
 	uint8_t,
-	tDot11fIEvendor2_ie*);
+	tDot11fIEvendor_vht_ie*);
 
-uint32_t dot11f_pack_ie_vendor2_ie(
+uint32_t dot11f_pack_ie_vendor_vht_ie(
 	tpAniSirGlobal,
-	tDot11fIEvendor2_ie *,
+	tDot11fIEvendor_vht_ie *,
 	uint8_t *,
 	uint32_t,
 	uint32_t*);
 
-uint32_t dot11f_get_packed_ie_vendor2_ie(
+uint32_t dot11f_get_packed_ie_vendor_vht_ie(
 	tpAniSirGlobal,
-	tDot11fIEvendor2_ie *,
+	tDot11fIEvendor_vht_ie *,
 	uint32_t*);
 
 #ifdef __cplusplus
@@ -7757,7 +7757,7 @@ typedef struct sDot11fAssocRequest{
 	tDot11fIEExtCap                ExtCap;
 	tDot11fIEOperatingMode         OperatingMode;
 	tDot11fIEQosMapSet             QosMapSet;
-	tDot11fIEvendor2_ie            vendor2_ie;
+	tDot11fIEvendor_vht_ie         vendor_vht_ie;
 	tDot11fIEhs20vendor_ie         hs20vendor_ie;
 } tDot11fAssocRequest;
 
@@ -7813,7 +7813,7 @@ typedef struct sDot11fAssocResponse{
 	tDot11fIEExtCap                    ExtCap;
 	tDot11fIEOBSSScanParameters        OBSSScanParameters;
 	tDot11fIEQosMapSet                 QosMapSet;
-	tDot11fIEvendor2_ie                vendor2_ie;
+	tDot11fIEvendor_vht_ie             vendor_vht_ie;
 } tDot11fAssocResponse;
 
 #define DOT11F_ASSOCRESPONSE (4)
@@ -7919,7 +7919,7 @@ typedef struct sDot11fBeacon{
 	tDot11fIEWiderBWChanSwitchAnn        WiderBWChanSwitchAnn;
 	tDot11fIEOBSSScanParameters          OBSSScanParameters;
 	tDot11fIEVendor1IE                   Vendor1IE;
-	tDot11fIEvendor2_ie                  vendor2_ie;
+	tDot11fIEvendor_vht_ie               vendor_vht_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
 	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
@@ -8014,7 +8014,7 @@ typedef struct sDot11fBeacon2{
 	tDot11fIEWiderBWChanSwitchAnn        WiderBWChanSwitchAnn;
 	tDot11fIEOBSSScanParameters          OBSSScanParameters;
 	tDot11fIEVendor1IE                   Vendor1IE;
-	tDot11fIEvendor2_ie                  vendor2_ie;
+	tDot11fIEvendor_vht_ie               vendor_vht_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
 	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
@@ -8090,7 +8090,7 @@ typedef struct sDot11fBeaconIEs{
 	tDot11fIEWiderBWChanSwitchAnn        WiderBWChanSwitchAnn;
 	tDot11fIEOBSSScanParameters          OBSSScanParameters;
 	tDot11fIEVendor1IE                   Vendor1IE;
-	tDot11fIEvendor2_ie                  vendor2_ie;
+	tDot11fIEvendor_vht_ie               vendor_vht_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
 	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
@@ -8501,7 +8501,7 @@ typedef struct sDot11fProbeResponse{
 	tDot11fIEExtCap                      ExtCap;
 	tDot11fIEOBSSScanParameters          OBSSScanParameters;
 	tDot11fIEVendor1IE                   Vendor1IE;
-	tDot11fIEvendor2_ie                  vendor2_ie;
+	tDot11fIEvendor_vht_ie               vendor_vht_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
 	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
@@ -8648,7 +8648,7 @@ typedef struct sDot11fReAssocRequest{
 	tDot11fIEExtCap                    ExtCap;
 	tDot11fIEOperatingMode             OperatingMode;
 	tDot11fIEQosMapSet                 QosMapSet;
-	tDot11fIEvendor2_ie                vendor2_ie;
+	tDot11fIEvendor_vht_ie             vendor_vht_ie;
 	tDot11fIEhs20vendor_ie             hs20vendor_ie;
 } tDot11fReAssocRequest;
 
@@ -8705,7 +8705,7 @@ typedef struct sDot11fReAssocResponse{
 	tDot11fIEExtCap                    ExtCap;
 	tDot11fIEOBSSScanParameters        OBSSScanParameters;
 	tDot11fIEQosMapSet                 QosMapSet;
-	tDot11fIEvendor2_ie                vendor2_ie;
+	tDot11fIEvendor_vht_ie             vendor_vht_ie;
 } tDot11fReAssocResponse;
 
 #define DOT11F_REASSOCRESPONSE (27)

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

@@ -164,7 +164,7 @@ typedef struct sSirProbeRespBeacon {
 	uint8_t WiderBWChanSwitchAnnPresent;
 	tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
 	uint8_t Vendor1IEPresent;
-	tDot11fIEvendor2_ie vendor2_ie;
+	tDot11fIEvendor_vht_ie vendor_vht_ie;
 	uint8_t Vendor3IEPresent;
 	tDot11fIEhs20vendor_ie hs20vendor_ie;
 	tDot11fIEIBSSParams IBSSParams;
@@ -245,6 +245,7 @@ typedef struct sSirAssocReq {
 	tDot11fIEVHTCaps VHTCaps;
 	tDot11fIEOperatingMode operMode;
 	tDot11fIEExtCap ExtCap;
+	tDot11fIEvendor_vht_ie vendor_vht_ie;
 	tDot11fIEhs20vendor_ie hs20vendor_ie;
 } tSirAssocReq, *tpSirAssocReq;
 
@@ -294,7 +295,7 @@ typedef struct sSirAssocRsp {
 #ifdef WLAN_FEATURE_11W
 	tDot11fIETimeoutInterval TimeoutInterval;
 #endif
-	tDot11fIEvendor2_ie vendor2_ie;
+	tDot11fIEvendor_vht_ie vendor_vht_ie;
 	tDot11fIEOBSSScanParameters obss_scanparams;
 } tSirAssocRsp, *tpSirAssocRsp;
 

+ 1 - 0
core/mac/src/pe/include/lim_session.h

@@ -464,6 +464,7 @@ typedef struct sPESession       /* Added to Support BT-AMP */
 	bool is_vendor_specific_vhtcaps;
 	uint8_t vendor_specific_vht_ie_type;
 	uint8_t vendor_specific_vht_ie_sub_type;
+	bool vendor_vht_sap;
 	/* HS 2.0 Indication */
 	tDot11fIEhs20vendor_ie hs20vendor_ie;
 	/* flag to indicate country code in beacon */

+ 25 - 23
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -3224,12 +3224,12 @@ lim_check_and_announce_join_success(tpAniSirGlobal mac_ctx,
 	wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &selfStaDot11Mode);
 
 	if ((IS_DOT11_MODE_VHT(selfStaDot11Mode)) &&
-		beacon_probe_rsp->vendor2_ie.VHTCaps.present) {
+		beacon_probe_rsp->vendor_vht_ie.VHTCaps.present) {
 		session_entry->is_vendor_specific_vhtcaps = true;
 		session_entry->vendor_specific_vht_ie_type =
-			beacon_probe_rsp->vendor2_ie.type;
+			beacon_probe_rsp->vendor_vht_ie.type;
 		session_entry->vendor_specific_vht_ie_sub_type =
-			beacon_probe_rsp->vendor2_ie.sub_type;
+			beacon_probe_rsp->vendor_vht_ie.sub_type;
 		lim_log(mac_ctx, LOG1, FL(
 			"VHT caps are present in vendor specific IE"));
 	}
@@ -3678,13 +3678,13 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
 		vht_caps =  &pAssocRsp->VHTCaps;
 		vht_oper = &pAssocRsp->VHTOperation;
 	} else if (psessionEntry->vhtCapability &&
-			pAssocRsp->vendor2_ie.VHTCaps.present){
+			pAssocRsp->vendor_vht_ie.VHTCaps.present){
 		pAddBssParams->vhtCapable =
-			pAssocRsp->vendor2_ie.VHTCaps.present;
+			pAssocRsp->vendor_vht_ie.VHTCaps.present;
 		lim_log(pMac, LOG1,
 			FL("VHT Caps and Operation are present in vendor Specfic IE"));
-		vht_caps = &pAssocRsp->vendor2_ie.VHTCaps;
-		vht_oper = &pAssocRsp->vendor2_ie.VHTOperation;
+		vht_caps = &pAssocRsp->vendor_vht_ie.VHTCaps;
+		vht_oper = &pAssocRsp->vendor_vht_ie.VHTOperation;
 	} else {
 		pAddBssParams->vhtCapable = 0;
 	}
@@ -3757,15 +3757,15 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
 				pAddBssParams->staContext.lsigTxopProtection);
 		if (psessionEntry->vhtCapability &&
 				(IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps) ||
-				 IS_BSS_VHT_CAPABLE(
-					 pBeaconStruct->vendor2_ie.VHTCaps))) {
+				 IS_BSS_VHT_CAPABLE(pBeaconStruct->
+						    vendor_vht_ie.VHTCaps))) {
 			pAddBssParams->staContext.vhtCapable = 1;
 			pAddBssParams->staContext.vhtSupportedRxNss =
 				pStaDs->vhtSupportedRxNss;
 			if (pAssocRsp->VHTCaps.present)
 				vht_caps = &pAssocRsp->VHTCaps;
-			else if (pAssocRsp->vendor2_ie.VHTCaps.present) {
-				vht_caps = &pAssocRsp->vendor2_ie.VHTCaps;
+			else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) {
+				vht_caps = &pAssocRsp->vendor_vht_ie.VHTCaps;
 				lim_log(pMac, LOG1, FL(
 					"VHT Caps are in vendor Specfic IE"));
 			}
@@ -3790,8 +3790,9 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
 				pAssocRsp->HTInfo.recommendedTxWidthSet;
 			if (pAssocRsp->VHTCaps.present)
 				vht_oper = &pAssocRsp->VHTOperation;
-			else if (pAssocRsp->vendor2_ie.VHTCaps.present) {
-				vht_oper = &pAssocRsp->vendor2_ie.VHTOperation;
+			else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) {
+				vht_oper = &pAssocRsp->
+						vendor_vht_ie.VHTOperation;
 				lim_log(pMac, LOG1, FL(
 					"VHT Op IE is in vendor Specfic IE"));
 			}
@@ -3874,8 +3875,8 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
 
 			if (pAssocRsp->VHTCaps.present)
 				vht_caps = &pAssocRsp->VHTCaps;
-			else if (pAssocRsp->vendor2_ie.VHTCaps.present) {
-				vht_caps = &pAssocRsp->vendor2_ie.VHTCaps;
+			else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) {
+				vht_caps = &pAssocRsp->vendor_vht_ie.VHTCaps;
 				lim_log(pMac, LOG1, FL(
 					"VHT Caps is in vendor Specfic IE"));
 			}
@@ -4218,13 +4219,13 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update
 		pAddBssParams->currentOperChannel);
 	if (psessionEntry->vhtCapability &&
 		(IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps) ||
-		 IS_BSS_VHT_CAPABLE(pBeaconStruct->vendor2_ie.VHTCaps))) {
+		 IS_BSS_VHT_CAPABLE(pBeaconStruct->vendor_vht_ie.VHTCaps))) {
 
 		pAddBssParams->vhtCapable = 1;
 		if (pBeaconStruct->VHTOperation.present)
 			vht_oper = &pBeaconStruct->VHTOperation;
-		else if (pBeaconStruct->vendor2_ie.VHTOperation.present) {
-			vht_oper = &pBeaconStruct->vendor2_ie.VHTOperation;
+		else if (pBeaconStruct->vendor_vht_ie.VHTOperation.present) {
+			vht_oper = &pBeaconStruct->vendor_vht_ie.VHTOperation;
 			lim_log(pMac, LOG1,
 					FL("VHT Operation is present in vendor Specfic IE"));
 		}
@@ -4301,12 +4302,13 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update
 		if (psessionEntry->vhtCapability &&
 			(IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps) ||
 			 IS_BSS_VHT_CAPABLE(
-				 pBeaconStruct->vendor2_ie.VHTCaps))) {
+				 pBeaconStruct->vendor_vht_ie.VHTCaps))) {
 			pAddBssParams->staContext.vhtCapable = 1;
 			if (pBeaconStruct->VHTCaps.present)
 				vht_caps = &pBeaconStruct->VHTCaps;
-			else if (pBeaconStruct->vendor2_ie.VHTCaps.present)
-				vht_caps = &pBeaconStruct->vendor2_ie.VHTCaps;
+			else if (pBeaconStruct->vendor_vht_ie.VHTCaps.present)
+				vht_caps = &pBeaconStruct->
+						vendor_vht_ie.VHTCaps;
 
 			if ((vht_caps != NULL) && (vht_caps->suBeamFormerCap ||
 				vht_caps->muBeamformerCap) &&
@@ -4389,9 +4391,9 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update
 
 			if (pBeaconStruct->VHTCaps.present)
 				vht_caps = &pBeaconStruct->VHTCaps;
-			else if (pBeaconStruct->vendor2_ie.VHTCaps.present) {
+			else if (pBeaconStruct->vendor_vht_ie.VHTCaps.present) {
 				vht_caps =
-					&pBeaconStruct->vendor2_ie.VHTCaps;
+					&pBeaconStruct->vendor_vht_ie.VHTCaps;
 				lim_log(pMac, LOG1, FL(
 					"VHT Caps are in vendor Specfic IE"));
 			}

+ 31 - 8
core/mac/src/pe/lim/lim_process_assoc_req_frame.c

@@ -504,9 +504,19 @@ static bool lim_chk_11ac_only(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
 			      tpPESession session, tpSirAssocReq assoc_req,
 			      uint8_t sub_type)
 {
+	tDot11fIEVHTCaps *vht_caps;
+
+	if (assoc_req->VHTCaps.present)
+		vht_caps = &assoc_req->VHTCaps;
+	else if (assoc_req->vendor_vht_ie.VHTCaps.present &&
+		 session->vendor_vht_sap)
+		vht_caps = &assoc_req->vendor_vht_ie.VHTCaps;
+	else
+		vht_caps = NULL;
+
 	if (LIM_IS_AP_ROLE(session) &&
 		(session->dot11mode == WNI_CFG_DOT11_MODE_11AC_ONLY) &&
-		(!assoc_req->VHTCaps.present)) {
+		((vht_caps != NULL) && (!vht_caps->present))) {
 		lim_send_assoc_rsp_mgmt_frame(mac_ctx,
 			eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS,
 			1, hdr->sa, sub_type, 0, session);
@@ -1231,6 +1241,16 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
 	tPmfSaQueryTimerId timer_id;
 	uint32_t retry_interval;
 #endif
+	tDot11fIEVHTCaps *vht_caps;
+
+	if (assoc_req->VHTCaps.present)
+		vht_caps = &assoc_req->VHTCaps;
+	else if (assoc_req->vendor_vht_ie.VHTCaps.present &&
+		 session->vendor_vht_sap)
+		vht_caps = &assoc_req->vendor_vht_ie.VHTCaps;
+	else
+		vht_caps = NULL;
+
 	/*
 	 * check here if the parsedAssocReq already pointing to the assoc_req
 	 * and free it before assigning this new assoc_req
@@ -1252,7 +1272,10 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
 	}
 
 	sta_ds->mlmStaContext.htCapability = assoc_req->HTCaps.present;
-	sta_ds->mlmStaContext.vhtCapability = assoc_req->VHTCaps.present;
+	if ((vht_caps != NULL) && vht_caps->present)
+		sta_ds->mlmStaContext.vhtCapability = vht_caps->present;
+	else
+		sta_ds->mlmStaContext.vhtCapability = false;
 	sta_ds->qos.addtsPresent =
 		(assoc_req->addtsPresent == 0) ? false : true;
 	sta_ds->qos.addts = assoc_req->addtsReq;
@@ -1348,7 +1371,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
 				(uint8_t) (assoc_req->operMode.chanWidth ?
 				eHT_CHANNEL_WIDTH_40MHZ :
 				eHT_CHANNEL_WIDTH_20MHZ);
-		} else if (assoc_req->VHTCaps.present) {
+		} else if ((vht_caps != NULL) && vht_caps->present) {
 			/*
 			 * Check if STA has enabled it's channel bonding mode.
 			 * If channel bonding mode is enabled, we decide based
@@ -1360,7 +1383,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
 					WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ :
 					session->ch_width - 1);
 			sta_ds->htMaxRxAMpduFactor =
-				assoc_req->VHTCaps.maxAMPDULenExp;
+				vht_caps->maxAMPDULenExp;
 		}
 		/* Lesser among the AP and STA bandwidth of operation. */
 		sta_ds->htSupportedChannelWidthSet =
@@ -1373,9 +1396,10 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
 			(uint8_t) assoc_req->HTCaps.advCodingCap;
 	}
 
-	if (assoc_req->VHTCaps.present && assoc_req->wmeInfoPresent) {
+	if ((vht_caps != NULL) && vht_caps->present &&
+	    assoc_req->wmeInfoPresent) {
 		sta_ds->vhtLdpcCapable =
-			(uint8_t) assoc_req->VHTCaps.ldpcCodingCap;
+			(uint8_t) vht_caps->ldpcCodingCap;
 	}
 
 	if (!assoc_req->wmeInfoPresent) {
@@ -1398,8 +1422,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
 			&(assoc_req->supportedRates),
 			&(assoc_req->extendedRates),
 			assoc_req->HTCaps.supportedMCSSet,
-			session, &assoc_req->VHTCaps) != eSIR_SUCCESS)
-	{
+			session, vht_caps) != eSIR_SUCCESS) {
 		/* Could not update hash table entry at DPH with rateset */
 		lim_log(mac_ctx, LOGE,
 			FL("Couldn't update hash entry for aid=%d, MacAddr: "

+ 2 - 2
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -172,8 +172,8 @@ void lim_update_assoc_sta_datas(tpAniSirGlobal mac_ctx,
 
 	if (assoc_rsp->VHTCaps.present)
 		vht_caps = &assoc_rsp->VHTCaps;
-	else if (assoc_rsp->vendor2_ie.VHTCaps.present)
-		vht_caps = &assoc_rsp->vendor2_ie.VHTCaps;
+	else if (assoc_rsp->vendor_vht_ie.VHTCaps.present)
+		vht_caps = &assoc_rsp->vendor_vht_ie.VHTCaps;
 
 	if (IS_DOT11_MODE_VHT(session_entry->dot11mode)) {
 		if ((vht_caps != NULL) && vht_caps->present) {

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

@@ -610,6 +610,8 @@ lim_configure_ap_start_bss_session(tpAniSirGlobal mac_ctx, tpPESession session,
 	session->ssidHidden = sme_start_bss_req->ssidHidden;
 	session->wps_state = sme_start_bss_req->wps_state;
 	session->sap_dot11mc = sme_start_bss_req->sap_dot11mc;
+	session->vendor_vht_sap =
+			sme_start_bss_req->vendor_vht_sap;
 	lim_get_short_slot_from_phy_mode(mac_ctx, session, session->gLimPhyMode,
 		&session->shortSlotTimeSupported);
 	session->isCoalesingInIBSSAllowed =

+ 1 - 1
core/mac/src/pe/lim/lim_prop_exts_utils.c

@@ -167,7 +167,7 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
 			session->vhtCapability) {
 		session->vhtCapabilityPresentInBeacon = 1;
 		if (((beacon_struct->Vendor1IEPresent &&
-		      beacon_struct->vendor2_ie.present &&
+		      beacon_struct->vendor_vht_ie.present &&
 		      beacon_struct->Vendor3IEPresent)) &&
 		      (((beacon_struct->VHTCaps.txMCSMap & VHT_MCS_3x3_MASK) ==
 			VHT_MCS_3x3_MASK) &&

+ 5 - 5
core/mac/src/pe/lim/lim_send_frames_host_roam.c

@@ -304,14 +304,14 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx,
 			pe_session->is_vendor_specific_vhtcaps) {
 		lim_log(mac_ctx, LOG1,
 			FL("Populate Vendor VHT IEs in Re-Assoc Request"));
-		frm.vendor2_ie.present = 1;
-		frm.vendor2_ie.type =
+		frm.vendor_vht_ie.present = 1;
+		frm.vendor_vht_ie.type =
 			pe_session->vendor_specific_vht_ie_type;
-		frm.vendor2_ie.sub_type =
+		frm.vendor_vht_ie.sub_type =
 			pe_session->vendor_specific_vht_ie_sub_type;
-		frm.vendor2_ie.VHTCaps.present = 1;
+		frm.vendor_vht_ie.VHTCaps.present = 1;
 		populate_dot11f_vht_caps(mac_ctx, pe_session,
-				&frm.vendor2_ie.VHTCaps);
+				&frm.vendor_vht_ie.VHTCaps);
 		vht_enabled = true;
 	}
 	status = dot11f_get_packed_re_assoc_request_size(mac_ctx, &frm,

+ 23 - 6
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1243,7 +1243,24 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
 			populate_dot11f_vht_caps(mac_ctx, pe_session,
 				&frm.VHTCaps);
 			populate_dot11f_vht_operation(mac_ctx, pe_session,
-				&frm.VHTOperation);
+					&frm.VHTOperation);
+			is_vht = true;
+		}
+		if (pe_session->vhtCapability &&
+		    pe_session->vendor_vht_sap &&
+		    (assoc_req != NULL) &&
+		    assoc_req->vendor_vht_ie.VHTCaps.present) {
+			lim_log(mac_ctx, LOG1,
+				FL("Populate Vendor VHT IEs in Assoc Rsponse"));
+			frm.vendor_vht_ie.present = 1;
+			frm.vendor_vht_ie.type =
+				pe_session->vendor_specific_vht_ie_type;
+			frm.vendor_vht_ie.sub_type =
+				pe_session->vendor_specific_vht_ie_sub_type;
+
+			frm.vendor_vht_ie.VHTCaps.present = 1;
+			populate_dot11f_vht_caps(mac_ctx, pe_session,
+				&frm.vendor_vht_ie.VHTCaps);
 			is_vht = true;
 		}
 		populate_dot11f_ext_cap(mac_ctx, is_vht, &frm.ExtCap,
@@ -1812,15 +1829,15 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
 			pe_session->is_vendor_specific_vhtcaps) {
 		lim_log(mac_ctx, LOG1,
 			FL("Populate Vendor VHT IEs in Assoc Request"));
-		frm->vendor2_ie.present = 1;
-		frm->vendor2_ie.type =
+		frm->vendor_vht_ie.present = 1;
+		frm->vendor_vht_ie.type =
 			pe_session->vendor_specific_vht_ie_type;
-		frm->vendor2_ie.sub_type =
+		frm->vendor_vht_ie.sub_type =
 			pe_session->vendor_specific_vht_ie_sub_type;
 
-		frm->vendor2_ie.VHTCaps.present = 1;
+		frm->vendor_vht_ie.VHTCaps.present = 1;
 		populate_dot11f_vht_caps(mac_ctx, pe_session,
-				&frm->vendor2_ie.VHTCaps);
+				&frm->vendor_vht_ie.VHTCaps);
 		vht_enabled = true;
 	}
 	if (pe_session->is_ext_caps_present)

+ 70 - 67
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -33,7 +33,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Mon Sep 19 14:42:34 2016 from the following file(s):
+ * Mon Oct  3 12:40:25 2016 from the following file(s):
  *
  * dot11f.frms
  *
@@ -5949,25 +5949,25 @@ uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
 #define SigIesec_chan_offset_ele (0x007f)
 
 
-static const tFFDefn FFS_vendor2_ie[] = {
+static const tFFDefn FFS_vendor_vht_ie[] = {
 	{ NULL, 0, 0, 0,},
 };
 
-static const tIEDefn IES_vendor2_ie[] = {
-	{ offsetof(tDot11fIEvendor2_ie, VHTCaps), offsetof(tDot11fIEVHTCaps,
+static const tIEDefn IES_vendor_vht_ie[] = {
+	{ offsetof(tDot11fIEvendor_vht_ie, VHTCaps), offsetof(tDot11fIEVHTCaps,
 	present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_VHTCAPS, 0, },
-	{ offsetof(tDot11fIEvendor2_ie, VHTOperation),
+	{ offsetof(tDot11fIEvendor_vht_ie, VHTOperation),
 	offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation",
 	0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_VHTOPERATION, 0, },
 	{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },
 };
 
-uint32_t dot11f_unpack_ie_vendor2_ie(tpAniSirGlobal pCtx,
-				     uint8_t *pBuf,
-				     uint8_t ielen,
-				     tDot11fIEvendor2_ie *pDst)
+uint32_t dot11f_unpack_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
+					 uint8_t *pBuf,
+					 uint8_t ielen,
+					 tDot11fIEvendor_vht_ie *pDst)
 {
 	uint32_t status = DOT11F_PARSE_SUCCESS;
 	(void) pBuf; (void)ielen; /* Shutup the compiler */
@@ -5984,14 +5984,14 @@ uint32_t dot11f_unpack_ie_vendor2_ie(tpAniSirGlobal pCtx,
 	status |= unpack_core(pCtx,
 				pBuf,
 				ielen,
-				FFS_vendor2_ie,
-				IES_vendor2_ie,
+				FFS_vendor_vht_ie,
+				IES_vendor_vht_ie,
 				(uint8_t *)pDst,
 				sizeof(*pDst));
 	return status;
-} /* End dot11f_unpack_ie_vendor2_ie. */
+} /* End dot11f_unpack_ie_vendor_vht_ie. */
 
-#define SigIevendor2_ie (0x0080)
+#define SigIevendor_vht_ie (0x0080)
 
 
 static const tFFDefn FFS_AddTSRequest[] = {
@@ -6208,10 +6208,10 @@ static const tIEDefn IES_AssocRequest[] = {
 	{ offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet,
 	present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_QOSMAPSET, 0, },
-	{ offsetof(tDot11fAssocRequest, vendor2_ie),
-	offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie",
-	0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fAssocRequest, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{ offsetof(tDot11fAssocRequest, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
 	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
@@ -6336,10 +6336,10 @@ static const tIEDefn IES_AssocResponse[] = {
 	{ offsetof(tDot11fAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet,
 	present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_QOSMAPSET, 0, },
-	{ offsetof(tDot11fAssocResponse, vendor2_ie),
-	offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie",
-	0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fAssocResponse, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
 
 uint32_t dot11f_unpack_assoc_response(tpAniSirGlobal pCtx,
@@ -6567,9 +6567,10 @@ static const tIEDefn IES_Beacon[] = {
 	{ offsetof(tDot11fBeacon, Vendor1IE), offsetof(tDot11fIEVendor1IE,
 	present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0},
 	3, DOT11F_EID_VENDOR1IE, 0, },
-	{ offsetof(tDot11fBeacon, vendor2_ie), offsetof(tDot11fIEvendor2_ie,
-	present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fBeacon, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{ offsetof(tDot11fBeacon, Vendor3IE), offsetof(tDot11fIEVendor3IE,
 	present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
 	3, DOT11F_EID_VENDOR3IE, 0, },
@@ -6768,9 +6769,10 @@ static const tIEDefn IES_Beacon2[] = {
 	{ offsetof(tDot11fBeacon2, Vendor1IE), offsetof(tDot11fIEVendor1IE,
 	present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0},
 	3, DOT11F_EID_VENDOR1IE, 0, },
-	{ offsetof(tDot11fBeacon2, vendor2_ie), offsetof(tDot11fIEvendor2_ie,
-	present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fBeacon2, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{ offsetof(tDot11fBeacon2, Vendor3IE), offsetof(tDot11fIEVendor3IE,
 	present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
 	3, DOT11F_EID_VENDOR3IE, 0, },
@@ -6965,9 +6967,10 @@ static const tIEDefn IES_BeaconIEs[] = {
 	{ offsetof(tDot11fBeaconIEs, Vendor1IE), offsetof(tDot11fIEVendor1IE,
 	present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0},
 	3, DOT11F_EID_VENDOR1IE, 0, },
-	{ offsetof(tDot11fBeaconIEs, vendor2_ie), offsetof(tDot11fIEvendor2_ie,
-	present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fBeaconIEs, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{ offsetof(tDot11fBeaconIEs, Vendor3IE), offsetof(tDot11fIEVendor3IE,
 	present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
 	3, DOT11F_EID_VENDOR3IE, 0, },
@@ -7573,10 +7576,10 @@ static const tIEDefn IES_ProbeResponse[] = {
 	{ offsetof(tDot11fProbeResponse, Vendor1IE), offsetof(tDot11fIEVendor1IE,
 	present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0},
 	3, DOT11F_EID_VENDOR1IE, 0, },
-	{ offsetof(tDot11fProbeResponse, vendor2_ie),
-	offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie",
-	0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fProbeResponse, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{ offsetof(tDot11fProbeResponse, Vendor3IE), offsetof(tDot11fIEVendor3IE,
 	present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
 	3, DOT11F_EID_VENDOR3IE, 0, },
@@ -7831,10 +7834,10 @@ static const tIEDefn IES_ReAssocRequest[] = {
 	{ offsetof(tDot11fReAssocRequest, QosMapSet),
 	offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet",
 	0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, },
-	{ offsetof(tDot11fReAssocRequest, vendor2_ie),
-	offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie",
-	0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fReAssocRequest, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{ offsetof(tDot11fReAssocRequest, hs20vendor_ie),
 	offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
 	0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
@@ -7965,10 +7968,10 @@ static const tIEDefn IES_ReAssocResponse[] = {
 	{ offsetof(tDot11fReAssocResponse, QosMapSet),
 	offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet",
 	0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, },
-	{ offsetof(tDot11fReAssocResponse, vendor2_ie),
-	offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie",
-	0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0},
-	3, DOT11F_EID_VENDOR2_IE, 0, },
+	{ offsetof(tDot11fReAssocResponse, vendor_vht_ie),
+	offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
+	0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0},
+	3, DOT11F_EID_VENDOR_VHT_IE, 0, },
 	{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
 
 uint32_t dot11f_unpack_re_assoc_response(tpAniSirGlobal pCtx,
@@ -10274,13 +10277,13 @@ static uint32_t unpack_core(tpAniSirGlobal pCtx,
 						    sizeof(tDot11fIEsec_chan_offset_ele) *
 						    countOffset));
 					break;
-				case SigIevendor2_ie:
+				case SigIevendor_vht_ie:
 					status |=
-						dot11f_unpack_ie_vendor2_ie(
+						dot11f_unpack_ie_vendor_vht_ie(
 						    pCtx, pBufRemaining, len,
-						    (tDot11fIEvendor2_ie *)
+						    (tDot11fIEvendor_vht_ie *)
 						    (pFrm + pIe->offset +
-						    sizeof(tDot11fIEvendor2_ie) *
+						    sizeof(tDot11fIEvendor_vht_ie) *
 						    countOffset));
 					break;
 				default:
@@ -11453,8 +11456,8 @@ uint32_t dot11f_get_packed_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
 	return status;
 } /* End dot11f_get_packed_ie_hs20vendor_ie. */
 
-uint32_t dot11f_get_packed_ie_vendor2_ie(tpAniSirGlobal pCtx,
-	tDot11fIEvendor2_ie *pIe, uint32_t *pnNeeded)
+uint32_t dot11f_get_packed_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
+	tDot11fIEvendor_vht_ie *pIe, uint32_t *pnNeeded)
 {
 	uint32_t status = DOT11F_PARSE_SUCCESS;
 	(void)pCtx;
@@ -11462,11 +11465,11 @@ uint32_t dot11f_get_packed_ie_vendor2_ie(tpAniSirGlobal pCtx,
 		*pnNeeded += 1;
 		*pnNeeded += 1;
 		status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded,
-				IES_vendor2_ie);
+				IES_vendor_vht_ie);
 		break;
 	}
 	return status;
-} /* End dot11f_get_packed_ie_vendor2_ie. */
+} /* End dot11f_get_packed_ie_vendor_vht_ie. */
 
 uint32_t dot11f_get_packed_add_ts_request_size(tpAniSirGlobal pCtx,
 	tDot11fAddTSRequest *pFrm, uint32_t *pnNeeded)
@@ -12949,11 +12952,11 @@ static uint32_t get_packed_size_core(tpAniSirGlobal pCtx,
 					  (pFrm + pIe->offset + offset * i))->
 					  present;
 					break;
-				case SigIevendor2_ie:
-					offset = sizeof(tDot11fIEvendor2_ie);
+				case SigIevendor_vht_ie:
+					offset = sizeof(tDot11fIEvendor_vht_ie);
 					status |=
-						dot11f_get_packed_ie_vendor2_ie(
-						pCtx, (tDot11fIEvendor2_ie *)
+						dot11f_get_packed_ie_vendor_vht_ie(
+						pCtx, (tDot11fIEvendor_vht_ie *)
 						(pFrm + pIe->offset + offset * i),
 						pnNeeded);
 					break;
@@ -20413,17 +20416,17 @@ uint32_t dot11f_pack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
 	return DOT11F_PARSE_SUCCESS;
 } /* End dot11f_pack_ie_sec_chan_offset_ele. */
 
-uint32_t dot11f_pack_ie_vendor2_ie(tpAniSirGlobal pCtx,
-				   tDot11fIEvendor2_ie *pSrc,
-				   uint8_t *pBuf,
-				   uint32_t nBuf,
-				   uint32_t *pnConsumed)
+uint32_t dot11f_pack_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
+				      tDot11fIEvendor_vht_ie *pSrc,
+				      uint8_t *pBuf,
+				      uint32_t nBuf,
+				      uint32_t *pnConsumed)
 {
 	uint8_t *pIeLen = 0;
 	uint32_t nConsumedOnEntry = *pnConsumed;
 	uint32_t nNeeded = 0U;
 	uint32_t status = DOT11F_PARSE_SUCCESS;
-	status = dot11f_get_packed_ie_vendor2_ie(pCtx, pSrc, &nNeeded);
+	status = dot11f_get_packed_ie_vendor_vht_ie(pCtx, pSrc, &nNeeded);
 	if (!DOT11F_SUCCEEDED(status))
 		return status;
 	while (pSrc->present) {
@@ -20450,8 +20453,8 @@ uint32_t dot11f_pack_ie_vendor2_ie(tpAniSirGlobal pCtx,
 				pBuf,
 				nBuf,
 				pnConsumed,
-				FFS_vendor2_ie,
-				IES_vendor2_ie);
+				FFS_vendor_vht_ie,
+				IES_vendor_vht_ie);
 		break;
 	}
 	(void)pCtx;
@@ -20459,7 +20462,7 @@ uint32_t dot11f_pack_ie_vendor2_ie(tpAniSirGlobal pCtx,
 		*pIeLen = *pnConsumed - nConsumedOnEntry - 2;
 	}
 	return status;
-} /* End dot11f_pack_ie_vendor2_ie. */
+} /* End dot11f_pack_ie_vendor_vht_ie. */
 
 uint32_t dot11f_pack_add_ts_request(tpAniSirGlobal pCtx,
 	tDot11fAddTSRequest *pFrm,
@@ -22402,12 +22405,12 @@ static uint32_t pack_core(tpAniSirGlobal pCtx,
 				sizeof(tDot11fIEsec_chan_offset_ele) * i),
 				pBufRemaining, nBufRemaining, &len);
 			break;
-			case SigIevendor2_ie:
+			case SigIevendor_vht_ie:
 			status |=
-				dot11f_pack_ie_vendor2_ie(
-				pCtx, (tDot11fIEvendor2_ie *)
+				dot11f_pack_ie_vendor_vht_ie(
+				pCtx, (tDot11fIEvendor_vht_ie *)
 				(pSrc + pIe->offset +
-				sizeof(tDot11fIEvendor2_ie) * i),
+				sizeof(tDot11fIEvendor_vht_ie) * i),
 				pBufRemaining, nBufRemaining, &len);
 			break;
 			default:

+ 61 - 44
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -2561,19 +2561,19 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
 	pProbeResp->Vendor1IEPresent = pr->Vendor1IE.present;
 	pProbeResp->Vendor3IEPresent = pr->Vendor3IE.present;
 
-	pProbeResp->vendor2_ie.present = pr->vendor2_ie.present;
-	if (pr->vendor2_ie.present) {
-		pProbeResp->vendor2_ie.type = pr->vendor2_ie.type;
-		pProbeResp->vendor2_ie.sub_type = pr->vendor2_ie.sub_type;
-	}
-	if (pr->vendor2_ie.VHTCaps.present) {
-		qdf_mem_copy(&pProbeResp->vendor2_ie.VHTCaps,
-				&pr->vendor2_ie.VHTCaps,
+	pProbeResp->vendor_vht_ie.present = pr->vendor_vht_ie.present;
+	if (pr->vendor_vht_ie.present) {
+		pProbeResp->vendor_vht_ie.type = pr->vendor_vht_ie.type;
+		pProbeResp->vendor_vht_ie.sub_type = pr->vendor_vht_ie.sub_type;
+	}
+	if (pr->vendor_vht_ie.VHTCaps.present) {
+		qdf_mem_copy(&pProbeResp->vendor_vht_ie.VHTCaps,
+				&pr->vendor_vht_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 	}
-	if (pr->vendor2_ie.VHTOperation.present) {
-		qdf_mem_copy(&pProbeResp->vendor2_ie.VHTOperation,
-				&pr->vendor2_ie.VHTOperation,
+	if (pr->vendor_vht_ie.VHTOperation.present) {
+		qdf_mem_copy(&pProbeResp->vendor_vht_ie.VHTOperation,
+				&pr->vendor_vht_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}
 	/* Update HS 2.0 Information Element */
@@ -2798,6 +2798,22 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac,
 			ext_cap->timing_meas, ext_cap->fine_time_meas_initiator,
 			ext_cap->fine_time_meas_responder);
 	}
+
+	pAssocReq->vendor_vht_ie.present = ar->vendor_vht_ie.present;
+	if (ar->vendor_vht_ie.present) {
+		pAssocReq->vendor_vht_ie.type = ar->vendor_vht_ie.type;
+		pAssocReq->vendor_vht_ie.sub_type = ar->vendor_vht_ie.sub_type;
+
+		if (ar->vendor_vht_ie.VHTCaps.present) {
+			qdf_mem_copy(&pAssocReq->vendor_vht_ie.VHTCaps,
+				     &ar->vendor_vht_ie.VHTCaps,
+				     sizeof(tDot11fIEVHTCaps));
+			lim_log(pMac, LOG1,
+				FL("Received Assoc Request with Vendor specific VHT Cap"));
+			lim_log_vht_cap(pMac, &pAssocReq->VHTCaps);
+		}
+	}
+
 	qdf_mem_free(ar);
 	return eSIR_SUCCESS;
 
@@ -2998,27 +3014,27 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac,
 		lim_log_qos_map_set(pMac, &pAssocRsp->QosMapSet);
 	}
 
-	pAssocRsp->vendor2_ie.present = ar.vendor2_ie.present;
-	if (ar.vendor2_ie.present) {
-		pAssocRsp->vendor2_ie.type = ar.vendor2_ie.type;
-		pAssocRsp->vendor2_ie.sub_type = ar.vendor2_ie.sub_type;
+	pAssocRsp->vendor_vht_ie.present = ar.vendor_vht_ie.present;
+	if (ar.vendor_vht_ie.present) {
+		pAssocRsp->vendor_vht_ie.type = ar.vendor_vht_ie.type;
+		pAssocRsp->vendor_vht_ie.sub_type = ar.vendor_vht_ie.sub_type;
 	}
 	if (ar.OBSSScanParameters.present) {
 		qdf_mem_copy(&pAssocRsp->obss_scanparams,
 			&ar.OBSSScanParameters,
 			sizeof(struct sDot11fIEOBSSScanParameters));
 	}
-	if (ar.vendor2_ie.VHTCaps.present) {
-		qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTCaps,
-				&ar.vendor2_ie.VHTCaps,
+	if (ar.vendor_vht_ie.VHTCaps.present) {
+		qdf_mem_copy(&pAssocRsp->vendor_vht_ie.VHTCaps,
+				&ar.vendor_vht_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 		lim_log(pMac, LOG1,
 		FL("Received Assoc Response with Vendor specific VHT Cap"));
 		lim_log_vht_cap(pMac, &pAssocRsp->VHTCaps);
 	}
-	if (ar.vendor2_ie.VHTOperation.present) {
-		qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTOperation,
-				&ar.vendor2_ie.VHTOperation,
+	if (ar.vendor_vht_ie.VHTOperation.present) {
+		qdf_mem_copy(&pAssocRsp->vendor_vht_ie.VHTOperation,
+				&ar.vendor_vht_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 		lim_log(pMac, LOG1,
 		FL("Received Assoc Response with Vendor specific VHT Oper"));
@@ -3733,22 +3749,23 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
 
 	pBeaconStruct->Vendor1IEPresent = pBies->Vendor1IE.present;
 	pBeaconStruct->Vendor3IEPresent = pBies->Vendor3IE.present;
-	pBeaconStruct->vendor2_ie.present = pBies->vendor2_ie.present;
-	if (pBies->vendor2_ie.present) {
-		pBeaconStruct->vendor2_ie.type = pBies->vendor2_ie.type;
-		pBeaconStruct->vendor2_ie.sub_type = pBies->vendor2_ie.sub_type;
+	pBeaconStruct->vendor_vht_ie.present = pBies->vendor_vht_ie.present;
+	if (pBies->vendor_vht_ie.present) {
+		pBeaconStruct->vendor_vht_ie.type = pBies->vendor_vht_ie.type;
+		pBeaconStruct->vendor_vht_ie.sub_type =
+						pBies->vendor_vht_ie.sub_type;
 	}
 
-	if (pBies->vendor2_ie.VHTCaps.present) {
-		pBeaconStruct->vendor2_ie.VHTCaps.present = 1;
-		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps,
-				&pBies->vendor2_ie.VHTCaps,
+	if (pBies->vendor_vht_ie.VHTCaps.present) {
+		pBeaconStruct->vendor_vht_ie.VHTCaps.present = 1;
+		qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTCaps,
+				&pBies->vendor_vht_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 	}
-	if (pBies->vendor2_ie.VHTOperation.present) {
-		pBeaconStruct->vendor2_ie.VHTOperation.present = 1;
-		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation,
-				&pBies->vendor2_ie.VHTOperation,
+	if (pBies->vendor_vht_ie.VHTOperation.present) {
+		pBeaconStruct->vendor_vht_ie.VHTOperation.present = 1;
+		qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTOperation,
+				&pBies->vendor_vht_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}
 	if (pBies->ExtCap.present) {
@@ -4090,24 +4107,24 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
 	pBeaconStruct->Vendor1IEPresent = pBeacon->Vendor1IE.present;
 	pBeaconStruct->Vendor3IEPresent = pBeacon->Vendor3IE.present;
 
-	pBeaconStruct->vendor2_ie.present = pBeacon->vendor2_ie.present;
-	if (pBeacon->vendor2_ie.present) {
-		pBeaconStruct->vendor2_ie.type = pBeacon->vendor2_ie.type;
-		pBeaconStruct->vendor2_ie.sub_type =
-			pBeacon->vendor2_ie.sub_type;
+	pBeaconStruct->vendor_vht_ie.present = pBeacon->vendor_vht_ie.present;
+	if (pBeacon->vendor_vht_ie.present) {
+		pBeaconStruct->vendor_vht_ie.type = pBeacon->vendor_vht_ie.type;
+		pBeaconStruct->vendor_vht_ie.sub_type =
+			pBeacon->vendor_vht_ie.sub_type;
 	}
-	if (pBeacon->vendor2_ie.present) {
+	if (pBeacon->vendor_vht_ie.present) {
 		PELOG1(lim_log(pMac, LOG1,
 		FL("Vendor Specific VHT caps present in Beacon Frame!"));
 		      )
 	}
-	if (pBeacon->vendor2_ie.VHTCaps.present) {
-		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps,
-				&pBeacon->vendor2_ie.VHTCaps,
+	if (pBeacon->vendor_vht_ie.VHTCaps.present) {
+		qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTCaps,
+				&pBeacon->vendor_vht_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 	}
-	if (pBeacon->vendor2_ie.VHTOperation.present) {
-		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation,
+	if (pBeacon->vendor_vht_ie.VHTOperation.present) {
+		qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTOperation,
 				&pBeacon->VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}

+ 1 - 0
core/sme/inc/csr_api.h

@@ -1216,6 +1216,7 @@ typedef struct tagCsrConfigParam {
 	uint8_t enable_txbf_sap_mode;
 	uint8_t enable2x2;
 	bool enableVhtFor24GHz;
+	bool vendor_vht_sap;
 	uint8_t enableMuBformee;
 	uint8_t enableVhtpAid;
 	uint8_t enableVhtGid;

+ 1 - 0
core/sme/inc/csr_internal.h

@@ -663,6 +663,7 @@ typedef struct tagCsrConfig {
 	uint32_t edca_bk_aifs;
 	uint32_t edca_be_aifs;
 	bool enable_fatal_event;
+	bool vendor_vht_sap;
 	enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
 	enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
 	struct csr_sta_roam_policy_params sta_roam_policy;

+ 11 - 4
core/sme/src/csr/csr_api_roam.c

@@ -2427,6 +2427,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
 			pParam->isRoamOffloadEnabled;
 #endif
 		pMac->roam.configParam.obssEnabled = pParam->obssEnabled;
+		pMac->roam.configParam.vendor_vht_sap =
+			pParam->vendor_vht_sap;
 		pMac->roam.configParam.conc_custom_rule1 =
 			pParam->conc_custom_rule1;
 		pMac->roam.configParam.conc_custom_rule2 =
@@ -2653,8 +2655,10 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 	pParam->enable_dot11p = pMac->enable_dot11p;
 	csr_set_channels(pMac, pParam);
 	pParam->obssEnabled = cfg_params->obssEnabled;
+	pParam->vendor_vht_sap =
+		pMac->roam.configParam.vendor_vht_sap;
 	pParam->roam_dense_rssi_thresh_offset =
-			cfg_params->roam_params.dense_rssi_thresh_offset;
+		cfg_params->roam_params.dense_rssi_thresh_offset;
 	pParam->roam_dense_min_aps =
 			cfg_params->roam_params.dense_min_aps_cnt;
 	pParam->roam_dense_traffic_thresh =
@@ -14282,10 +14286,11 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 					pIes->VHTCaps.numSoundingDim)
 				txBFCsnValue = QDF_MIN(txBFCsnValue,
 						pIes->VHTCaps.numSoundingDim);
-			else if (IS_BSS_VHT_CAPABLE(pIes->vendor2_ie.VHTCaps)
-				&& pIes->vendor2_ie.VHTCaps.numSoundingDim)
+			else if (IS_BSS_VHT_CAPABLE(pIes->vendor_vht_ie.VHTCaps)
+				&& pIes->vendor_vht_ie.VHTCaps.numSoundingDim)
 				txBFCsnValue = QDF_MIN(txBFCsnValue,
-					pIes->vendor2_ie.VHTCaps.numSoundingDim);
+					pIes->vendor_vht_ie.
+					VHTCaps.numSoundingDim);
 		}
 		csr_join_req->vht_config.csnof_beamformer_antSup = txBFCsnValue;
 
@@ -15074,6 +15079,8 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId
 		     sizeof(pParam->addIeParams));
 	pMsg->obssEnabled = pMac->roam.configParam.obssEnabled;
 	pMsg->sap_dot11mc = pParam->sap_dot11mc;
+	pMsg->vendor_vht_sap =
+			pMac->roam.configParam.vendor_vht_sap;
 
 	return cds_send_mb_message_to_mac(pMsg);
 }

+ 1 - 1
core/sme/src/csr/csr_util.c

@@ -1467,7 +1467,7 @@ QDF_STATUS csr_get_phy_mode_from_bss(tpAniSirGlobal pMac,
 		if (pIes->HTCaps.present) {
 			phyMode = eCSR_DOT11_MODE_11n;
 			if (IS_BSS_VHT_CAPABLE(pIes->VHTCaps) ||
-				IS_BSS_VHT_CAPABLE(pIes->vendor2_ie.VHTCaps))
+				IS_BSS_VHT_CAPABLE(pIes->vendor_vht_ie.VHTCaps))
 				phyMode = eCSR_DOT11_MODE_11ac;
 		}
 		*pPhyMode = phyMode;