瀏覽代碼

qcacmn: CDP API's to support MLO Dev context

Add support of CDP API's to create, attach,
detach and destroy MLO device context
structure in Datapath

Change-Id: I0c2019b70f12639de949ebe5bec44f1f202cff6b
CRs-Fixed: 3566879
Kenvish Butani 1 年之前
父節點
當前提交
6939ceceb0
共有 2 個文件被更改,包括 155 次插入0 次删除
  1. 130 0
      dp/inc/cdp_txrx_cmn.h
  2. 25 0
      dp/inc/cdp_txrx_ops.h

+ 130 - 0
dp/inc/cdp_txrx_cmn.h

@@ -3213,4 +3213,134 @@ static inline uint64_t cdp_get_fst_cem_base(ol_txrx_soc_handle soc,
 
 	return soc->ops->cmn_drv_ops->get_fst_cmem_base(soc, size);
 }
+
+#if defined(WLAN_FEATURE_11BE_MLO)
+/*
+ * cdp_mlo_dev_ctxt_create - DP MLO Device context create
+ * @soc: soc handle
+ * @mld_mac_addr: MLD MAC Address
+ *
+ * return: QDF_STATUS
+ */
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_create(ol_txrx_soc_handle soc,
+				   uint8_t *mld_mac_addr)
+{
+	if (!soc || !soc->ops) {
+		QDF_BUG(0);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (!soc->ops->cmn_mlo_ops ||
+	    !soc->ops->cmn_mlo_ops->mlo_dev_ctxt_create)
+		return QDF_STATUS_E_FAILURE;
+
+	return soc->ops->cmn_mlo_ops->mlo_dev_ctxt_create(soc, mld_mac_addr);
+}
+
+/*
+ * cdp_mlo_dev_ctxt_destroy - DP MLO Device context destroy
+ * @soc: soc handle
+ * @mld_mac_addr: MLD MAC Address
+ *
+ * return: QDF_STATUS
+ */
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_destroy(ol_txrx_soc_handle soc,
+				    uint8_t *mld_mac_addr)
+{
+	if (!soc || !soc->ops) {
+		QDF_BUG(0);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (!soc->ops->cmn_mlo_ops ||
+	    !soc->ops->cmn_mlo_ops->mlo_dev_ctxt_destroy)
+		return QDF_STATUS_E_FAILURE;
+
+	return soc->ops->cmn_mlo_ops->mlo_dev_ctxt_destroy(soc, mld_mac_addr);
+}
+
+/*
+ * cdp_mlo_dev_ctxt_attach - DP MLO Device context attach vdev
+ * @soc: soc handle
+ * @vdev_id: vdev id
+ * @mld_mac_addr: MLD MAC Address
+ *
+ * return: QDF_STATUS
+ */
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_attach(ol_txrx_soc_handle soc,
+				   uint8_t vdev_id,
+				   uint8_t *mld_mac_addr)
+{
+	if (!soc || !soc->ops) {
+		QDF_BUG(0);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (!soc->ops->cmn_mlo_ops ||
+	    !soc->ops->cmn_mlo_ops->mlo_dev_ctxt_attach)
+		return QDF_STATUS_E_FAILURE;
+
+	return soc->ops->cmn_mlo_ops->mlo_dev_ctxt_attach(soc, vdev_id,
+							  mld_mac_addr);
+}
+
+/*
+ * cdp_mlo_dev_ctxt_detach - DP MLO Device context detach vdev
+ * @soc: soc handle
+ * @vdev_id: vdev id
+ * @mld_mac_addr: MLD MAC Address
+ *
+ * return: QDF_STATUS
+ */
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_detach(ol_txrx_soc_handle soc,
+				   uint8_t vdev_id,
+				   uint8_t *mld_mac_addr)
+{
+	if (!soc || !soc->ops) {
+		QDF_BUG(0);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (!soc->ops->cmn_mlo_ops ||
+	    !soc->ops->cmn_mlo_ops->mlo_dev_ctxt_detach)
+		return QDF_STATUS_E_FAILURE;
+
+	return soc->ops->cmn_mlo_ops->mlo_dev_ctxt_detach(soc, vdev_id,
+							  mld_mac_addr);
+}
+#else
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_create(ol_txrx_soc_handle soc,
+				   uint8_t *mld_mac_addr)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_destroy(ol_txrx_soc_handle soc,
+				    uint8_t *mld_mac_addr)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_attach(ol_txrx_soc_handle soc,
+				   uint8_t vdev_id,
+				   uint8_t *mld_mac_addr)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline
+QDF_STATUS cdp_mlo_dev_ctxt_detach(ol_txrx_soc_handle soc,
+				   uint8_t vdev_id,
+				   uint8_t *mld_mac_addr)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif /* WLAN_FEATURE_11BE_MLO */
 #endif /* _CDP_TXRX_CMN_H_ */

+ 25 - 0
dp/inc/cdp_txrx_ops.h

@@ -185,6 +185,28 @@ struct cdp_mlo_ops {
 };
 #endif
 
+#if defined(WLAN_FEATURE_11BE_MLO)
+/**
+ * struct cdp_cmn_mlo_ops - CDP common MLO ops
+ * @mlo_dev_ctxt_create: MLO device context create
+ * @mlo_dev_ctxt_attach: MLO device context attach
+ * @mlo_dev_ctxt_detach: MLO device context detach
+ * @mlo_dev_ctxt_destroy: MLO device context destroy
+ */
+struct cdp_cmn_mlo_ops {
+	QDF_STATUS (*mlo_dev_ctxt_create)(struct cdp_soc_t *soc,
+					  uint8_t *mld_mac_addr);
+	QDF_STATUS (*mlo_dev_ctxt_attach)(struct cdp_soc_t *soc,
+					  uint8_t vdev_id,
+					  uint8_t *mld_mac_addr);
+	QDF_STATUS (*mlo_dev_ctxt_detach)(struct cdp_soc_t *soc,
+					  uint8_t vdev_id,
+					  uint8_t *mld_mac_addr);
+	QDF_STATUS (*mlo_dev_ctxt_destroy)(struct cdp_soc_t *soc,
+					   uint8_t *mld_mac_addr);
+};
+#endif
+
 /******************************************************************************
  *
  * Control Interface (A Interface)
@@ -2544,6 +2566,9 @@ struct cdp_ops {
 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
 	struct cdp_mlo_ops  *mlo_ops;
 #endif
+#if defined(WLAN_FEATURE_11BE_MLO)
+	struct cdp_cmn_mlo_ops  *cmn_mlo_ops;
+#endif
 #ifdef CONFIG_SAWF_DEF_QUEUES
 	struct cdp_sawf_ops  *sawf_ops;
 #endif