Преглед на файлове

qcacld-3.0: Add EHT OMI control field support

Add EHT OMI control field support with BW, RX NSS, and TX
NSTS extension subfields. These fields are combined with
the corresponding HE OMI control subfields to support the
transmission and reception of PPDUs for bandwidths greater
than 80 MHz.

Change-Id: I09603b3b7dcd7bc84fe2075c9ec48b0b6da3b265
CRs-Fixed: 3469763
Gururaj Pandurangi преди 2 години
родител
ревизия
ce6aedc04b
променени са 2 файла, в които са добавени 47 реда и са изтрити 31 реда
  1. 22 15
      core/sme/inc/sme_api.h
  2. 25 16
      core/sme/src/common/sme_api.c

+ 22 - 15
core/sme/inc/sme_api.h

@@ -3115,6 +3115,23 @@ int sme_update_eht_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id,
 }
 #endif
 
+struct omi_ctrl_tx {
+	uint32_t omi_in_vht:1;
+	uint32_t omi_in_he:1;
+	uint32_t a_ctrl_id:4;
+	uint32_t rx_nss:3;
+	uint32_t ch_bw:2;
+	uint32_t ul_mu_dis:1;
+	uint32_t tx_nsts:3;
+	uint32_t er_su_dis:1;
+	uint32_t dl_mu_mimo_resound:1;
+	uint32_t ul_mu_data_dis:1;
+	uint32_t eht_rx_nss_ext:1;
+	uint32_t eht_ch_bw_ext:1;
+	uint32_t eht_tx_nss_ext:1;
+	uint32_t reserved:11;
+};
+
 #ifdef WLAN_FEATURE_11AX
 /**
  * sme_update_tgt_he_cap() - sets the HE caps to pmac
@@ -3213,19 +3230,6 @@ int sme_update_he_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id,
 			       uint8_t cfg_val);
 
 #define A_CTRL_ID_OMI 0x1
-struct omi_ctrl_tx {
-	uint32_t omi_in_vht:1;
-	uint32_t omi_in_he:1;
-	uint32_t a_ctrl_id:4;
-	uint32_t rx_nss:3;
-	uint32_t ch_bw:2;
-	uint32_t ul_mu_dis:1;
-	uint32_t tx_nsts:3;
-	uint32_t er_su_dis:1;
-	uint32_t dl_mu_mimo_resound:1;
-	uint32_t ul_mu_data_dis:1;
-	uint32_t reserved:14;
-};
 
 void sme_reset_he_om_ctrl(mac_handle_t mac_handle);
 
@@ -3244,10 +3248,12 @@ int sme_config_action_tx_in_tb_ppdu(mac_handle_t mac_handle, uint8_t session_id,
  * sme_send_he_om_ctrl_update() - Send HE OM ctrl Tx cmd to FW
  * @mac_handle: Pointer to mac handle
  * @session_id: SME session id
+ * @omi_data: OMI control data
  *
  * Return: 0 on success else err code
  */
-int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id);
+int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id,
+			       struct omi_ctrl_tx *omi_data);
 
 /**
  * sme_set_he_om_ctrl_param() - Update HE OM control params for OMI Tx
@@ -3443,7 +3449,8 @@ static inline int sme_update_he_htc_he_supp(mac_handle_t mac_handle,
 }
 
 static inline int
-sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id)
+sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id,
+			   struct omi_ctrl_tx *omi_data)
 {
 	return 0;
 }

+ 25 - 16
core/sme/src/common/sme_api.c

@@ -10983,11 +10983,11 @@ sme_validate_session_for_cap_update(struct mac_context *mac_ctx,
 	return QDF_STATUS_SUCCESS;
 }
 
-int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id)
+int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id,
+			       struct omi_ctrl_tx *omi_data)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
-	struct omi_ctrl_tx omi_data = {0};
 	void *wma_handle;
 	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
 	uint32_t param_val = 0;
@@ -11009,32 +11009,41 @@ int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id)
 					   &op_chan_freq, &freq_seg_0,
 					   &ch_width);
 
-	omi_data.a_ctrl_id = A_CTRL_ID_OMI;
+	if (!omi_data) {
+		sme_err("OMI data is NULL");
+		return -EIO;
+	}
+
+	omi_data->a_ctrl_id = A_CTRL_ID_OMI;
 
 	if (mac_ctx->he_om_ctrl_cfg_nss_set)
-		omi_data.rx_nss = mac_ctx->he_om_ctrl_cfg_nss;
+		omi_data->rx_nss = mac_ctx->he_om_ctrl_cfg_nss;
 	else
-		omi_data.rx_nss = session->nss - 1;
+		omi_data->rx_nss = session->nss - 1;
 
 	if (mac_ctx->he_om_ctrl_cfg_tx_nsts_set)
-		omi_data.tx_nsts = mac_ctx->he_om_ctrl_cfg_tx_nsts;
+		omi_data->tx_nsts = mac_ctx->he_om_ctrl_cfg_tx_nsts;
 	else
-		omi_data.tx_nsts = session->nss - 1;
+		omi_data->tx_nsts = session->nss - 1;
 
 	if (mac_ctx->he_om_ctrl_cfg_bw_set)
-		omi_data.ch_bw = mac_ctx->he_om_ctrl_cfg_bw;
+		omi_data->ch_bw = mac_ctx->he_om_ctrl_cfg_bw;
 	else
-		omi_data.ch_bw = ch_width;
+		omi_data->ch_bw = ch_width;
 
-	omi_data.ul_mu_dis = mac_ctx->he_om_ctrl_cfg_ul_mu_dis;
-	omi_data.ul_mu_data_dis = mac_ctx->he_om_ctrl_ul_mu_data_dis;
-	omi_data.omi_in_vht = 0x1;
-	omi_data.omi_in_he = 0x1;
+	omi_data->ul_mu_dis = mac_ctx->he_om_ctrl_cfg_ul_mu_dis;
+	omi_data->ul_mu_data_dis = mac_ctx->he_om_ctrl_ul_mu_data_dis;
+	omi_data->omi_in_vht = 0x1;
+	omi_data->omi_in_he = 0x1;
 
 	sme_debug("OMI: BW %d TxNSTS %d RxNSS %d ULMU %d, OMI_VHT %d, OMI_HE %d",
-		  omi_data.ch_bw, omi_data.tx_nsts, omi_data.rx_nss,
-		  omi_data.ul_mu_dis, omi_data.omi_in_vht, omi_data.omi_in_he);
-	qdf_mem_copy(&param_val, &omi_data, sizeof(omi_data));
+		  omi_data->ch_bw, omi_data->tx_nsts, omi_data->rx_nss,
+		  omi_data->ul_mu_dis, omi_data->omi_in_vht,
+		  omi_data->omi_in_he);
+	sme_debug("EHT OMI: BW %d rx nss %d tx nss %d", omi_data->eht_ch_bw_ext,
+		  omi_data->eht_rx_nss_ext, omi_data->eht_tx_nss_ext);
+
+	qdf_mem_copy(&param_val, omi_data, sizeof(omi_data));
 	wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, session_id,
 				    &connected_bssid);
 	sme_debug("param val %08X, bssid:"QDF_MAC_ADDR_FMT, param_val,