Prechádzať zdrojové kódy

qcacld-3.0: Sessionize VHT Capability

Sessionize VHT Capability by updating the session
entry at join request or start bss and read the same
capablities at LIM instead of reading from global VHT
CFG items .

Change-Id: Idef009d4c76cfc6939359dc09379fc1f0d820589
CRs-Fixed: 1029145
Sandeep Puligilla 9 rokov pred
rodič
commit
9891743c1e

+ 7 - 4
core/hdd/src/wlan_hdd_cfg.c

@@ -7270,7 +7270,7 @@ QDF_STATUS hdd_update_nss(hdd_context_t *hdd_ctx, uint8_t nss)
 	tSirMacHTCapabilityInfo *ht_cap_info;
 	uint8_t mcs_set[SIZE_OF_SUPPORTED_MCS_SET] = {0};
 	uint8_t mcs_set_temp[SIZE_OF_SUPPORTED_MCS_SET];
-	uint32_t val;
+	uint32_t val, val32;
 	uint16_t val16;
 	uint8_t enable2x2;
 
@@ -7324,10 +7324,13 @@ QDF_STATUS hdd_update_nss(hdd_context_t *hdd_ctx, uint8_t nss)
 	sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_HT_CAP_INFO, &temp);
 	val16 = (uint16_t)temp;
 	ht_cap_info = (tSirMacHTCapabilityInfo *)&val16;
-	if (!(hdd_ctx->ht_tx_stbc_supported && hdd_config->enable2x2))
+	if (!(hdd_ctx->ht_tx_stbc_supported && hdd_config->enable2x2)) {
 		ht_cap_info->txSTBC = 0;
-	else
-		ht_cap_info->txSTBC = hdd_config->enableTxSTBC;
+	} else {
+		sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_TXSTBC, &val32);
+		hddLog(LOG1, FL("STBC %d"), val32);
+		ht_cap_info->txSTBC = val32;
+	}
 	temp = val16;
 	if (sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_HT_CAP_INFO,
 			    temp) == QDF_STATUS_E_FAILURE) {

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

@@ -561,6 +561,52 @@ typedef struct sSirHtConfig {
 	uint32_t unused:27;
 } qdf_packed tSirHTConfig, *tpSirHTConfig;
 
+/**
+ * struct sir_vht_config - VHT capabilites
+ * @max_mpdu_len: MPDU length
+ * @supported_channel_widthset: channel width set
+ * @ldpc_coding: LDPC coding capability
+ * @shortgi80: short GI 80 support
+ * @shortgi160and80plus80: short Gi 160 & 80+80 support
+ * @tx_stbc; Tx STBC cap
+ * @tx_stbc: Rx STBC cap
+ * @su_beam_former: SU beam former cap
+ * @su_beam_formee: SU beam formee cap
+ * @csnof_beamformer_antSup: Antenna support for beamforming
+ * @num_soundingdim: Sound dimensions
+ * @mu_beam_former: MU beam former cap
+ * @mu_beam_formee: MU beam formee cap
+ * @vht_txops: TXOP power save
+ * @htc_vhtcap: HTC VHT capability
+ * @max_ampdu_lenexp: AMPDU length
+ * @vht_link_adapt: VHT link adapatation capable
+ * @rx_antpattern: Rx Antenna pattern
+ * @tx_antpattern: Tx Antenna pattern
+ */
+struct sir_vht_config {
+	uint32_t           max_mpdu_len:2;
+	uint32_t supported_channel_widthset:2;
+	uint32_t        ldpc_coding:1;
+	uint32_t         shortgi80:1;
+	uint32_t shortgi160and80plus80:1;
+	uint32_t               tx_stbc:1;
+	uint32_t               rx_stbc:3;
+	uint32_t      su_beam_former:1;
+	uint32_t      su_beam_formee:1;
+	uint32_t csnof_beamformer_antSup:3;
+	uint32_t       num_soundingdim:3;
+	uint32_t      mu_beam_former:1;
+	uint32_t      mu_beam_formee:1;
+	uint32_t            vht_txops:1;
+	uint32_t            htc_vhtcap:1;
+	uint32_t       max_ampdu_lenexp:3;
+	uint32_t        vht_link_adapt:2;
+	uint32_t         rx_antpattern:1;
+	uint32_t         tx_antpattern:1;
+	uint32_t            unused:2;
+};
+
+
 typedef struct sSirAddIeParams {
 	uint16_t probeRespDataLen;
 	uint8_t *probeRespData_buff;
@@ -632,6 +678,7 @@ typedef struct sSirSmeStartBssReq {
 	tSirMacRateSet operationalRateSet;      /* Has 11a or 11b rates */
 	tSirMacRateSet extendedRateSet; /* Has 11g rates */
 	tSirHTConfig htConfig;
+	struct sir_vht_config vht_config;
 
 #ifdef WLAN_FEATURE_11W
 	bool pmfCapable;
@@ -1092,6 +1139,7 @@ typedef struct sSirSmeJoinReq {
 
 	uint8_t txLdpcIniFeatureEnabled;
 	tSirHTConfig htConfig;
+	struct sir_vht_config vht_config;
 	uint8_t txBFIniFeatureEnabled;
 	uint8_t txBFCsnValue;
 	uint8_t txMuBformee;

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

@@ -361,7 +361,7 @@ typedef struct sPESession       /* Added to Support BT-AMP */
 	uint8_t isCoalesingInIBSSAllowed;
 
 	tSirHTConfig htConfig;
-
+	struct sir_vht_config vht_config;
 	/*
 	 * Place holder for StartBssReq message
 	 * received by SME state machine

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

@@ -754,6 +754,10 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 			     &(sme_start_bss_req->htConfig),
 			     sizeof(session->htConfig));
 
+		qdf_mem_copy(&(session->vht_config),
+			     &(sme_start_bss_req->vht_config),
+			     sizeof(session->vht_config));
+
 		sir_copy_mac_addr(session->selfMacAddr,
 				  sme_start_bss_req->self_macaddr.bytes);
 
@@ -1702,6 +1706,10 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 		qdf_mem_copy(&(session->htConfig), &(sme_join_req->htConfig),
 			sizeof(session->htConfig));
 
+		qdf_mem_copy(&(session->vht_config),
+			&(sme_join_req->vht_config),
+			sizeof(session->vht_config));
+
 		/* Copying of bssId is already done, while creating session */
 		sir_copy_mac_addr(session->selfMacAddr,
 			sme_join_req->selfMacAddr);

+ 63 - 51
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -960,46 +960,27 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
 	/* With VHT it suffices if we just examine HT */
 	if (psessionEntry) {
 		if (psessionEntry->htConfig.ht_rx_ldpc)
-			CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_LDPC_CODING_CAP,
-				    nCfgValue);
-
-		pDot11f->ldpcCodingCap = (nCfgValue & 0x0001);
+			pDot11f->ldpcCodingCap =
+				psessionEntry->vht_config.ldpc_coding;
 		if (psessionEntry->ch_width < CH_WIDTH_80MHZ) {
 			 pDot11f->shortGI80MHz = 0;
 		} else {
-			nCfgValue = 0;
-			if (psessionEntry->htConfig.ht_sgi20)
-				CFG_GET_INT(nStatus, pMac,
-					    WNI_CFG_VHT_SHORT_GI_80MHZ,
-					    nCfgValue);
-			pDot11f->shortGI80MHz = (nCfgValue & 0x0001);
+			pDot11f->shortGI80MHz =
+				psessionEntry->vht_config.shortgi80;
 		}
 
 		if (psessionEntry->ch_width < CH_WIDTH_160MHZ) {
 			pDot11f->shortGI160and80plus80MHz = 0;
 		} else {
-			nCfgValue = 0;
-			if (psessionEntry->htConfig.ht_sgi20)
-				CFG_GET_INT(nStatus, pMac,
-				WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
-				nCfgValue);
 			pDot11f->shortGI160and80plus80MHz =
-				(nCfgValue & 0x0001);
+				psessionEntry->vht_config.shortgi160and80plus80;
 		}
 
-		nCfgValue = 0;
 		if (psessionEntry->htConfig.ht_tx_stbc)
-			CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TXSTBC,
-				    nCfgValue);
-
-		pDot11f->txSTBC = (nCfgValue & 0x0001);
+			pDot11f->txSTBC = psessionEntry->vht_config.tx_stbc;
 
-		nCfgValue = 0;
 		if (psessionEntry->htConfig.ht_rx_stbc)
-			CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_RXSTBC,
-				    nCfgValue);
-
-		pDot11f->rxSTBC = (nCfgValue & 0x0007);
+			pDot11f->rxSTBC = psessionEntry->vht_config.rx_stbc;
 
 		pDot11f->suBeamformeeCap = psessionEntry->txBFIniFeatureEnabled;
 		if (psessionEntry->txBFIniFeatureEnabled) {
@@ -1013,6 +994,23 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
 			pDot11f->muBeamformeeCap = 0;
 		}
 		pDot11f->suBeamFormerCap = psessionEntry->enable_su_tx_bformer;
+
+		pDot11f->vhtTXOPPS = psessionEntry->vht_config.vht_txops;
+
+		pDot11f->numSoundingDim =
+				psessionEntry->vht_config.num_soundingdim;
+
+		pDot11f->htcVHTCap = psessionEntry->vht_config.htc_vhtcap;
+
+		pDot11f->rxAntPattern = psessionEntry->vht_config.rx_antpattern;
+
+		pDot11f->txAntPattern = psessionEntry->vht_config.tx_antpattern;
+
+		pDot11f->maxAMPDULenExp =
+				psessionEntry->vht_config.max_ampdu_lenexp;
+
+		pDot11f->vhtLinkAdaptCap =
+				psessionEntry->vht_config.vht_link_adapt;
 	} else {
 		CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_LDPC_CODING_CAP,
 			    nCfgValue);
@@ -1050,40 +1048,54 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
 				WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
 				nCfgValue);
 		pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007);
-	}
 
-	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
-		    nCfgValue);
-	pDot11f->numSoundingDim = (nCfgValue & 0x0007);
+		nCfgValue = 0;
+		CFG_GET_INT(nStatus, pMac,
+				WNI_CFG_VHT_TXOP_PS,
+				nCfgValue);
+		pDot11f->vhtTXOPPS = (nCfgValue & 0x0001);
 
-	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_MU_BEAMFORMER_CAP, nCfgValue);
-	pDot11f->muBeamformerCap = (nCfgValue & 0x0001);
+		nCfgValue = 0;
+		CFG_GET_INT(nStatus, pMac,
+				WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
+				nCfgValue);
+		pDot11f->numSoundingDim = (nCfgValue & 0x0007);
 
-	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TXOP_PS, nCfgValue);
-	pDot11f->vhtTXOPPS = (nCfgValue & 0x0001);
+		nCfgValue = 0;
+		CFG_GET_INT(nStatus, pMac,
+				WNI_CFG_VHT_HTC_VHTC_CAP,
+				nCfgValue);
+		pDot11f->htcVHTCap = (nCfgValue & 0x0001);
 
-	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_HTC_VHTC_CAP, nCfgValue);
-	pDot11f->htcVHTCap = (nCfgValue & 0x0001);
+		nCfgValue = 0;
+		CFG_GET_INT(nStatus, pMac,
+				WNI_CFG_VHT_RX_ANT_PATTERN,
+				nCfgValue);
+		pDot11f->rxAntPattern = nCfgValue;
 
-	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, nCfgValue);
-	pDot11f->maxAMPDULenExp = (nCfgValue & 0x0007);
+		nCfgValue = 0;
+		CFG_GET_INT(nStatus, pMac,
+				WNI_CFG_VHT_TX_ANT_PATTERN,
+				nCfgValue);
+		pDot11f->txAntPattern = nCfgValue;
 
-	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_LINK_ADAPTATION_CAP, nCfgValue);
-	pDot11f->vhtLinkAdaptCap = (nCfgValue & 0x0003);
+		nCfgValue = 0;
+		CFG_GET_INT(nStatus, pMac,
+				WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
+				nCfgValue);
+		pDot11f->maxAMPDULenExp = (nCfgValue & 0x0007);
 
-	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_RX_ANT_PATTERN, nCfgValue);
-	pDot11f->rxAntPattern = nCfgValue;
+		nCfgValue = 0;
+		CFG_GET_INT(nStatus, pMac,
+			WNI_CFG_VHT_LINK_ADAPTATION_CAP,
+			nCfgValue);
+		pDot11f->vhtLinkAdaptCap = (nCfgValue & 0x0003);
+
+	}
 
 	nCfgValue = 0;
-	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TX_ANT_PATTERN, nCfgValue);
-	pDot11f->txAntPattern = nCfgValue;
+	CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_MU_BEAMFORMER_CAP, nCfgValue);
+	pDot11f->muBeamformerCap = (nCfgValue & 0x0001);
 
 	pDot11f->reserved1 = 0;
 

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

@@ -977,6 +977,7 @@ typedef struct tagCsrRoamSession {
 #endif
 	uint8_t bRefAssocStartCnt;      /* Tracking assoc start indication */
 	tSirHTConfig htConfig;
+	struct sir_vht_config vht_config;
 #ifdef FEATURE_WLAN_SCAN_PNO
 	bool pnoStarted;
 #endif

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

@@ -14082,9 +14082,14 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 		}
 		qdf_mem_copy(&csr_join_req->htConfig,
 				&pSession->htConfig, sizeof(tSirHTConfig));
+		qdf_mem_copy(&csr_join_req->vht_config, &pSession->vht_config,
+				sizeof(pSession->vht_config));
+		sms_log(pMac, LOG2,
+			FL("ht capability 0x%x VHT capability 0x%x"),
+			(unsigned int)(*(uint32_t *) &csr_join_req->htConfig),
+			(unsigned int)(*(uint32_t *) &csr_join_req->vht_config));
 		csr_join_req->txBFIniFeatureEnabled =
 				(uint8_t) pMac->roam.configParam.txBFEnable;
-
 		if (pMac->roam.configParam.txBFEnable) {
 			txBFCsnValue =
 				(uint8_t)pMac->roam.configParam.txBFCsnValue;
@@ -14847,9 +14852,15 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId
 	qdf_mem_copy(&pMsg->extendedRateSet,
 		     &pParam->extendedRateSet,
 		     sizeof(tSirMacRateSet));
+	qdf_mem_copy(&pMsg->vht_config,
+		     &pSession->vht_config,
+		     sizeof(pSession->vht_config));
 	qdf_mem_copy(&pMsg->htConfig,
 		     &pSession->htConfig,
 		     sizeof(tSirHTConfig));
+	sms_log(pMac, LOG2, FL("ht capability 0x%x VHT capability 0x%x"),
+			 (uint32_t)(*(uint32_t *) &pMsg->htConfig),
+			 (uint32_t)(*(uint32_t *) &pMsg->vht_config));
 	qdf_mem_copy(&pMsg->addIeParams,
 		     &pParam->addIeParams,
 		     sizeof(pParam->addIeParams));
@@ -15122,6 +15133,7 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal pMac,
 		uint16_t nCfgValue16;
 		tSirMacHTCapabilityInfo htCapInfo;
 	} uHTCapabilityInfo;
+	uint32_t nCfgValue = 0;
 	tCsrRoamSession *pSession;
 	*pbSessionId = CSR_SESSION_ID_INVALID;
 
@@ -15193,9 +15205,103 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal pMac,
 				uHTCapabilityInfo.htCapInfo.shortGI20MHz;
 			pSession->htConfig.ht_sgi40 =
 				uHTCapabilityInfo.htCapInfo.shortGI40MHz;
-			status =
-				csr_issue_add_sta_for_session_req(pMac, i, pSelfMacAddr,
-								  type, subType);
+
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_MAX_MPDU_LENGTH,
+					 &nCfgValue);
+			pSession->vht_config.max_mpdu_len = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac,
+					 WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
+					 &nCfgValue);
+			pSession->vht_config.supported_channel_widthset =
+								nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_LDPC_CODING_CAP,
+					 &nCfgValue);
+			pSession->vht_config.ldpc_coding = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_SHORT_GI_80MHZ,
+					 &nCfgValue);
+			pSession->vht_config.shortgi80 = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac,
+				WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
+				&nCfgValue);
+			pSession->vht_config.shortgi160and80plus80 = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_TXSTBC, &nCfgValue);
+			pSession->vht_config.tx_stbc = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_RXSTBC, &nCfgValue);
+			pSession->vht_config.rx_stbc = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMER_CAP,
+						&nCfgValue);
+			pSession->vht_config.su_beam_former = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
+						&nCfgValue);
+			pSession->vht_config.su_beam_formee = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac,
+				WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
+				&nCfgValue);
+			pSession->vht_config.csnof_beamformer_antSup =
+								nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac,
+					WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
+					&nCfgValue);
+			pSession->vht_config.num_soundingdim = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_MU_BEAMFORMER_CAP,
+						&nCfgValue);
+			pSession->vht_config.mu_beam_former = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
+						&nCfgValue);
+			pSession->vht_config.mu_beam_formee = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_TXOP_PS,
+					 &nCfgValue);
+			pSession->vht_config.vht_txops = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_HTC_VHTC_CAP,
+					 &nCfgValue);
+			pSession->vht_config.htc_vhtcap = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_RX_ANT_PATTERN,
+					 &nCfgValue);
+			pSession->vht_config.rx_antpattern = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_TX_ANT_PATTERN,
+					 &nCfgValue);
+			pSession->vht_config.tx_antpattern = nCfgValue;
+
+			nCfgValue = 0;
+			wlan_cfg_get_int(pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
+					 &nCfgValue);
+			pSession->vht_config.max_ampdu_lenexp = nCfgValue;
+
+			status = csr_issue_add_sta_for_session_req(pMac, i,
+								pSelfMacAddr,
+								type, subType);
 			break;
 		}
 	}