Prechádzať zdrojové kódy

qcacld-3.0: Add Tx beamformee NSTS configuration support

Add wifi test configuration support for Tx beamformee NSTS

Change-Id: Ia338e276376f68e2caa6b717db7c51e3d3308266
CRs-Fixed: 2261728
Kiran Kumar Lokere 6 rokov pred
rodič
commit
f3044852b7

+ 22 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -6338,6 +6338,8 @@ wlan_hdd_wifi_test_config_policy[
 			.type = NLA_U8},
 		[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_ENABLE_TX_BEAMFORMEE] = {
 			.type = NLA_U8},
+		[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_TX_BEAMFORMEE_NSTS] = {
+			.type = NLA_U8},
 };
 
 /**
@@ -7574,6 +7576,26 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
 
 	}
 
+	if (tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_TX_BEAMFORMEE_NSTS]) {
+		cfg_val = nla_get_u8(tb[
+			QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_TX_BEAMFORMEE_NSTS]);
+		if (cfg_val > hdd_ctx->config->txBFCsnValue) {
+			hdd_err("NSTS %d not supported, supp_val %d", cfg_val,
+				hdd_ctx->config->txBFCsnValue);
+			ret_val = -ENOTSUPP;
+			goto send_err;
+		}
+		hdd_debug("Set Tx beamformee NSTS to %d", cfg_val);
+		ret_val = sme_update_tx_bfee_nsts(hdd_ctx->mac_handle,
+						  adapter->session_id,
+						  cfg_val,
+						  hdd_ctx->config->txBFCsnValue
+						  );
+		if (ret_val)
+			sme_err("Failed to set Tx beamformee cap");
+
+	}
+
 	if (update_sme_cfg)
 		sme_update_config(mac_handle, sme_config);
 

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

@@ -922,6 +922,7 @@ typedef struct sAniSirGlobal {
 	bool is_usr_cfg_amsdu_enabled;
 	uint8_t no_ack_policy_cfg[MAX_NUM_AC];
 	uint32_t he_sgi_ltf_cfg_bit_mask;
+	uint8_t usr_cfg_tx_bfee_nsts;
 	struct mgmt_beacon_probe_filter bcn_filter;
 #ifdef WLAN_FEATURE_11AX
 	tDot11fIEhe_cap he_cap_2g;

+ 28 - 0
core/sme/inc/sme_api.h

@@ -1158,6 +1158,18 @@ QDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
 int sme_update_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
 		uint8_t cfg_val);
 
+/**
+ * sme_update_tx_bfee_nsts() - sets the Tx Bfee nsts
+ * @hal: MAC handle
+ * @session_id: SME session id
+ * @usr_cfg_val: user config value
+ * @nsts_val: Tx Bfee nsts config value
+ *
+ * Return: 0 on success else err code
+ */
+int sme_update_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
+			    uint8_t usr_cfg_val, uint8_t nsts_val);
+
 void wlan_sap_enable_phy_error_logs(tHalHandle hal, uint32_t enable_log);
 #ifdef WLAN_FEATURE_DSRC
 void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p);
@@ -2311,6 +2323,17 @@ void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id,
  */
 int sme_update_he_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
 		uint8_t cfg_val);
+
+/**
+ * sme_update_he_tx_bfee_nsts() - sets the HE Tx Bfee NSTS
+ * @hal: MAC handle
+ * @session_id: SME session id
+ * @cfg_val: Tx Bfee NSTS value
+ *
+ * Return: 0 on success else err code
+ */
+int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
+			       uint8_t cfg_val);
 /**
  * sme_update_he_mcs() - sets the HE MCS based on user request
  * @hal: Pointer to HAL
@@ -2402,6 +2425,11 @@ static inline int sme_update_he_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
 {
 	return 0;
 }
+static inline int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
+					     uint8_t cfg_val)
+{
+	return 0;
+}
 #endif
 
 /**

+ 30 - 0
core/sme/src/common/sme_api.c

@@ -12787,6 +12787,29 @@ int sme_update_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
 
 	return sme_update_he_tx_bfee_supp(hal, session_id, cfg_val);
 }
+
+int sme_update_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
+			    uint8_t usr_cfg_val, uint8_t nsts_val)
+{
+	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	uint8_t nsts_set_val;
+
+	mac_ctx->usr_cfg_tx_bfee_nsts = usr_cfg_val;
+	if (usr_cfg_val)
+		nsts_set_val = usr_cfg_val;
+	else
+		nsts_set_val = nsts_val;
+	status = sme_cfg_set_int(hal,
+				 WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
+				 nsts_set_val);
+	if (status != QDF_STATUS_SUCCESS) {
+		sme_err("Failed to set SU BFEE NSTS CFG");
+		return -EFAULT;
+	}
+
+	return sme_update_he_tx_bfee_nsts(hal, session_id, nsts_set_val);
+}
 #ifdef WLAN_FEATURE_11AX
 void sme_update_tgt_he_cap(mac_handle_t mac_handle, struct wma_tgt_cfg *cfg)
 {
@@ -12916,6 +12939,13 @@ int sme_update_he_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
 				 cfg_val);
 }
 
+int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
+			       uint8_t cfg_val)
+{
+	return sme_update_he_cap(hal, session_id, WNI_CFG_HE_BFEE_STS_LT80,
+				 cfg_val);
+}
+
 int sme_update_he_tx_stbc_cap(tHalHandle hal, uint8_t session_id, int value)
 {
 	int ret;

+ 5 - 3
core/sme/src/csr/csr_api_roam.c

@@ -15836,9 +15836,11 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 		if (IS_DOT11_MODE_HE(csr_join_req->dot11mode)) {
 			csr_join_req_copy_he_cap(csr_join_req, pSession);
 			/* change the HE caps like sts per band */
-			CSR_REVISE_REQ_HE_CAP_PER_BAND(csr_join_req, pMac,
-						       pBssDescription->
-						       channelId);
+			if (!pMac->usr_cfg_tx_bfee_nsts)
+				CSR_REVISE_REQ_HE_CAP_PER_BAND(csr_join_req,
+							       pMac,
+							       pBssDescription->
+							       channelId);
 		}
 
 		if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP,