Browse Source

qcacmn: Set size of wmi_bcn_tmpl_ml_params tlv as zero

TLV wmi_bcn_tmpl_ml_params was used to send the CSA/Quiet related
information to FW for the partner links. This TLV is deprecated now as FW
internally derives this information for the partner vdevs. Hence, set the
size of this TLV as  0.

Change-Id: Ibd783f5eed93872a6953dc2231b019f27a41109d
CRs-Fixed: 3157298
Shashikala Prabhu 3 năm trước cách đây
mục cha
commit
09d9e4ed79
3 tập tin đã thay đổi với 22 bổ sung45 xóa
  1. 13 0
      wmi/inc/wmi_unified_11be_tlv.h
  2. 7 43
      wmi/src/wmi_unified_11be_tlv.c
  3. 2 2
      wmi/src/wmi_unified_tlv.c

+ 13 - 0
wmi/inc/wmi_unified_11be_tlv.h

@@ -59,6 +59,14 @@ uint8_t *vdev_start_add_mlo_params(uint8_t *buf_ptr,
  */
 uint8_t *vdev_start_add_ml_partner_links(uint8_t *buf_ptr,
 					 struct vdev_start_params *req);
+/**
+ * bcn_tmpl_mlo_param_size() - Get ML param size in beacon template
+ * @param: Pointer to beacon template param
+ *
+ * Return: size of ML params in beacon template
+ */
+size_t bcn_tmpl_mlo_param_size(struct beacon_tmpl_params *param);
+
 /**
  * bcn_tmpl_add_ml_partner_links - Add MLO partner links in beacon template
  *                                 command
@@ -146,6 +154,11 @@ static uint8_t *vdev_start_add_ml_partner_links(uint8_t *buf_ptr,
 	return buf_ptr + WMI_TLV_HDR_SIZE;
 }
 
+static size_t bcn_tmpl_mlo_param_size(struct beacon_tmpl_params *param)
+{
+	return WMI_TLV_HDR_SIZE;
+}
+
 static uint8_t *bcn_tmpl_add_ml_partner_links(uint8_t *buf_ptr,
 					      struct beacon_tmpl_params *param)
 {

+ 7 - 43
wmi/src/wmi_unified_11be_tlv.c

@@ -139,52 +139,16 @@ uint8_t *vdev_start_add_ml_partner_links(uint8_t *buf_ptr,
 		 sizeof(wmi_partner_link_params));
 }
 
+size_t bcn_tmpl_mlo_param_size(struct beacon_tmpl_params *param)
+{
+	return WMI_TLV_HDR_SIZE;
+}
+
 uint8_t *bcn_tmpl_add_ml_partner_links(uint8_t *buf_ptr,
 				       struct beacon_tmpl_params *param)
 {
-	wmi_bcn_tmpl_ml_params *ml_partner_link;
-	struct mlo_bcn_templ_partner_links *ml_bcn_tmpl;
-	uint8_t i;
-
-	if (param->mlo_partner.num_links > WLAN_UMAC_MLO_MAX_VDEVS) {
-		wmi_err("mlo_partner.num_link(%d) are greater than supported partner links(%d)",
-			param->mlo_partner.num_links, WLAN_UMAC_MLO_MAX_VDEVS);
-		return buf_ptr;
-	}
-
-	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
-		       (param->mlo_partner.num_links *
-			sizeof(wmi_bcn_tmpl_ml_params)));
-	buf_ptr += sizeof(uint32_t);
-
-	ml_bcn_tmpl = &param->mlo_partner;
-	ml_partner_link = (wmi_bcn_tmpl_ml_params *)buf_ptr;
-	for (i = 0; i < ml_bcn_tmpl->num_links; i++) {
-		WMITLV_SET_HDR(&ml_partner_link->tlv_header,
-			       WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_params,
-			       WMITLV_GET_STRUCT_TLVLEN(wmi_bcn_tmpl_ml_params)
-			       );
-		ml_partner_link->vdev_id = ml_bcn_tmpl->partner_info[i].vdev_id;
-		ml_partner_link->hw_link_id =
-			ml_bcn_tmpl->partner_info[i].hw_link_id;
-		ml_partner_link->beacon_interval =
-			ml_bcn_tmpl->partner_info[i].beacon_interval;
-		ml_partner_link->csa_switch_count_offset =
-			ml_bcn_tmpl->partner_info[i].csa_switch_count_offset;
-		ml_partner_link->ext_csa_switch_count_offset =
-			ml_bcn_tmpl->partner_info[i].ext_csa_switch_count_offset;
-		ml_partner_link->per_sta_profile_offset =
-			ml_bcn_tmpl->partner_info[i].per_sta_profile_offset;
-		ml_partner_link->quiet_ie_offset =
-			ml_bcn_tmpl->partner_info[i].quiet_ie_offset;
-		ml_partner_link->is_other_ie_present =
-			ml_bcn_tmpl->partner_info[i].is_other_ie_present;
-		ml_partner_link++;
-	}
-
-	return buf_ptr +
-		(param->mlo_partner.num_links *
-		 sizeof(wmi_bcn_tmpl_ml_params));
+	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, 0);
+	return buf_ptr + WMI_TLV_HDR_SIZE;
 }
 
 size_t peer_create_mlo_params_size(struct peer_create_params *req)

+ 2 - 2
wmi/src/wmi_unified_tlv.c

@@ -2621,7 +2621,7 @@ static QDF_STATUS send_beacon_tmpl_send_cmd_tlv(wmi_unified_t wmi_handle,
 
 	wmi_buf_len = sizeof(wmi_bcn_tmpl_cmd_fixed_param) +
 		      sizeof(wmi_bcn_prb_info) + WMI_TLV_HDR_SIZE +
-		      param->tmpl_len_aligned;
+		      param->tmpl_len_aligned + bcn_tmpl_mlo_param_size(param);
 	wmi_buf = wmi_buf_alloc(wmi_handle, wmi_buf_len);
 	if (!wmi_buf)
 		return QDF_STATUS_E_NOMEM;
@@ -2665,7 +2665,7 @@ static QDF_STATUS send_beacon_tmpl_send_cmd_tlv(wmi_unified_t wmi_handle,
 	WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(buf_ptr, param->frm,
 					param->tmpl_len);
 
-	buf_ptr += param->tmpl_len;
+	buf_ptr += roundup(param->tmpl_len, sizeof(uint32_t));
 	buf_ptr = bcn_tmpl_add_ml_partner_links(buf_ptr, param);
 
 	wmi_mtrace(WMI_BCN_TMPL_CMDID, cmd->vdev_id, 0);