Prechádzať zdrojové kódy

qcacld-3.0: Add support to configure HE SU PPDU Tx

Add support to configure HE single user PPDU transmission.

Change-Id: I6bb2ead049f64c2ff2d28039f1658d66c4878f5f
CRs-Fixed: 2345247
Kiran Kumar Lokere 6 rokov pred
rodič
commit
efdbd0b267

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

@@ -5171,6 +5171,8 @@ wlan_hdd_wifi_test_config_policy[
 			.type = NLA_U8},
 		[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_CLEAR_HE_OM_CTRL_CONFIG] = {
 			.type = NLA_FLAG},
+		[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_TX_SUPPDU] = {
+			.type = NLA_U8},
 };
 
 /**
@@ -6537,6 +6539,16 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
 	if (tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_CLEAR_HE_OM_CTRL_CONFIG])
 		sme_reset_he_om_ctrl(hdd_ctx->mac_handle);
 
+	cmd_id = QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_TX_SUPPDU;
+	if (tb[cmd_id]) {
+		cfg_val = nla_get_u8(tb[cmd_id]);
+		hdd_debug("Configure Tx SU PPDU enable %d", cfg_val);
+		if (cfg_val)
+			sme_config_su_ppdu_queue(adapter->session_id, true);
+		else
+			sme_config_su_ppdu_queue(adapter->session_id, false);
+	}
+
 	if (update_sme_cfg)
 		sme_update_config(mac_handle, sme_config);
 

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

@@ -2580,6 +2580,15 @@ int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
  */
 void sme_set_he_tx_bf_cbf_rates(uint8_t session_id);
 
+/**
+ * sme_config_su_ppdu_queue() - Configures SU PPDU queue enable/disable in FW
+ * @session_id: SME session id
+ * @enable: Enable/Disable config
+ *
+ * Return: None
+ */
+void sme_config_su_ppdu_queue(uint8_t session_id, bool enable);
+
 /**
  * sme_update_he_mcs() - sets the HE MCS based on user request
  * @hal: Pointer to HAL
@@ -2791,6 +2800,10 @@ static inline int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_i
 static inline void sme_set_he_tx_bf_cbf_rates(uint8_t session_id)
 {
 }
+
+static inline void sme_config_su_ppdu_queue(uint8_t session_id, bool enable)
+{
+}
 #endif
 
 /**

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

@@ -12907,6 +12907,25 @@ void sme_set_he_tx_bf_cbf_rates(uint8_t session_id)
 		sme_err("send_unit_test_cmd returned %d", status);
 }
 
+void sme_config_su_ppdu_queue(uint8_t session_id, bool enable)
+{
+	uint32_t su_ppdu_enable[] = {69, 1, 1, 1};
+	uint32_t su_ppdu_disable[] = {69, 1, 1, 0};
+	QDF_STATUS status;
+
+	if (enable) {
+		sme_debug("Send Tx SU PPDU queue ENABLE cmd to FW");
+		status = wma_form_unit_test_cmd_and_send(session_id, 0x48, 4,
+							 su_ppdu_enable);
+	} else {
+		sme_debug("Send Tx SU PPDU queue DISABLE cmd to FW");
+		status = wma_form_unit_test_cmd_and_send(session_id, 0x48, 4,
+							 su_ppdu_disable);
+	}
+	if (QDF_STATUS_SUCCESS != status)
+		sme_err("send_unit_test_cmd returned %d", status);
+}
+
 int sme_update_he_tx_stbc_cap(tHalHandle hal, uint8_t session_id, int value)
 {
 	int ret;