Explorar o código

qcacmn: Add mlo mcast vdev flag for vdev start

For MLO, we need to designate one of the link vdev
as mlo vdev, on which FW will accept the multicast
frames and for the other link will drop the mcast frames.

So as part of vdev start, we indicate the mlo mcast
vdev in the first vdev of the mlo.

Change-Id: Ic962a6e1fead4a3cab7c622583392ecf373f4783
CRs-Fixed: 3080525
Vivek %!s(int64=3) %!d(string=hai) anos
pai
achega
b33bf95ae5

+ 23 - 0
umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h

@@ -163,6 +163,8 @@
 #define WLAN_VDEV_FEXT2_MLO                 0x00000001
 	/* STA VDEV is link type */
 #define WLAN_VDEV_FEXT2_MLO_STA_LINK        0x00000002
+	/* VDEV is MLO mcast primary*/
+#define WLAN_VDEV_FEXT2_MLO_MCAST           0x00000004
 
 /* VDEV OP flags  */
   /* if the vap destroyed by user */
@@ -1392,6 +1394,27 @@ bool wlan_vdev_mlme_is_mlo_vdev(struct wlan_objmgr_vdev *vdev)
 	return wlan_vdev_mlme_feat_ext2_cap_get(vdev, WLAN_VDEV_FEXT2_MLO);
 }
 
+#ifdef WLAN_MLO_MCAST
+/**
+ * wlan_vdev_mlme_is_mlo_mcast_vdev() - whether it is mlo mcast vdev or not
+ * @vdev: VDEV object
+ *
+ * Return: True if it is mlo mcast vdev, otherwise false.
+ */
+static inline
+bool wlan_vdev_mlme_is_mlo_mcast_vdev(struct wlan_objmgr_vdev *vdev)
+{
+	return wlan_vdev_mlme_feat_ext2_cap_get(vdev,
+						WLAN_VDEV_FEXT2_MLO_MCAST);
+}
+#else
+static inline
+bool wlan_vdev_mlme_is_mlo_mcast_vdev(struct wlan_objmgr_vdev *vdev)
+{
+	return false;
+}
+#endif
+
 /**
  * wlan_vdev_mlme_is_mlo_vdev() - whether it is mlo sta link vdev or not
  * @vdev: VDEV object

+ 13 - 0
umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

@@ -150,6 +150,17 @@ vdev_mgr_set_cur_chan_punc_pattern(struct wlan_channel *des_chan,
 #endif
 
 #ifdef WLAN_FEATURE_11BE_MLO
+#ifdef WLAN_MLO_MCAST
+static inline void
+vdev_mgr_start_param_update_mlo_mcast(struct wlan_objmgr_vdev *vdev,
+				      struct vdev_start_params *param)
+{
+	if (wlan_vdev_mlme_is_mlo_mcast_vdev(vdev))
+		param->mlo_flags.mlo_macst_vdev = 1;
+}
+#else
+#define vdev_mgr_start_param_update_mlo_mcast(vdev, param)
+#endif
 static void
 vdev_mgr_start_param_update_mlo(struct vdev_mlme_obj *mlme_obj,
 				struct vdev_start_params *param)
@@ -169,6 +180,8 @@ vdev_mgr_start_param_update_mlo(struct vdev_mlme_obj *mlme_obj,
 
 	if (!wlan_vdev_mlme_is_mlo_link_vdev(vdev))
 		param->mlo_flags.mlo_assoc_link = 1;
+
+	vdev_mgr_start_param_update_mlo_mcast(vdev, param);
 }
 #else
 static void

+ 3 - 1
umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_tx_defs.h

@@ -512,11 +512,13 @@ struct vdev_scan_nac_rssi_params {
  * @mlo_enabled: indicate is MLO enabled
  * @mlo_assoc_link: indicate is the link used to initialize
  *                  the association of mlo connection
+ * @mlo_mcast_vdev: MLO cast vdev
  */
 struct mlo_vdev_start_flags {
 	uint32_t mlo_enabled:1,
 		 mlo_assoc_link:1,
-		 rsvd:30;
+		 mlo_mcast_vdev:1,
+		 rsvd:29;
 };
 
 /**

+ 13 - 0
wmi/src/wmi_unified_11be_tlv.c

@@ -62,6 +62,17 @@ size_t vdev_start_mlo_params_size(struct vdev_start_params *req)
 	return vdev_start_mlo_size;
 }
 
+#ifdef WLAN_MCAST_MLO
+static bool vdev_start_add_mlo_mcast_params(uint32_t mlo_flags,
+					    struct vdev_start_params *req)
+{
+	WMI_MLO_FLAGS_SET_MCAST_VDEV(mlo_flags,
+				     req->mlo_flags.mlo_mcast_vdev);
+}
+#else
+#define vdev_start_add_mlo_mcast_params(mlo_flags, req)
+#endif
+
 uint8_t *vdev_start_add_mlo_params(uint8_t *buf_ptr,
 				   struct vdev_start_params *req)
 {
@@ -82,6 +93,8 @@ uint8_t *vdev_start_add_mlo_params(uint8_t *buf_ptr,
 	WMI_MLO_FLAGS_SET_ASSOC_LINK(mlo_params->mlo_flags.mlo_flags,
 				     req->mlo_flags.mlo_assoc_link);
 
+	vdev_start_add_mlo_mcast_params(mlo_params->mlo_flags.mlo_flags, req);
+
 	return buf_ptr + sizeof(wmi_vdev_start_mlo_params);
 }