Ver Fonte

qcacmn: Add api to set ctrl pdev to dp pdev handle

Add cdp api to set UMAC ctrl pdev to dp pdev handle.

Change-Id: I12a1b6e04bce0b72257c87435d027d66d9156ca7
CRs-fixed: 2273029
Sravan Kumar Kairam há 6 anos atrás
pai
commit
5a6f590ed0
3 ficheiros alterados com 38 adições e 0 exclusões
  1. 19 0
      dp/inc/cdp_txrx_cmn.h
  2. 3 0
      dp/inc/cdp_txrx_ops.h
  3. 16 0
      dp/wifi3.0/dp_main.c

+ 19 - 0
dp/inc/cdp_txrx_cmn.h

@@ -1581,6 +1581,25 @@ cdp_peer_map_attach(ol_txrx_soc_handle soc, uint32_t max_peers)
 		soc->ops->cmn_drv_ops->txrx_peer_map_attach(soc, max_peers);
 }
 
+/**
+
+ * cdp_pdev_set_ctrl_pdev() - set UMAC ctrl pdev to dp pdev
+ * @soc: opaque soc handle
+ * @pdev: opaque dp pdev handle
+ * @ctrl_pdev: opaque ctrl pdev handle
+ *
+ * Return: void
+ */
+static inline void
+cdp_pdev_set_ctrl_pdev(ol_txrx_soc_handle soc, struct cdp_pdev *dp_pdev,
+		       struct cdp_ctrl_objmgr_pdev *ctrl_pdev)
+{
+	if (soc && soc->ops && soc->ops->cmn_drv_ops &&
+	    soc->ops->cmn_drv_ops->txrx_pdev_set_ctrl_pdev)
+		soc->ops->cmn_drv_ops->txrx_pdev_set_ctrl_pdev(dp_pdev,
+							       ctrl_pdev);
+}
+
 #ifdef RECEIVE_OFFLOAD
 /**
  * cdp_register_rx_offld_flush_cb() - register LRO/GRO flush cb function pointer

+ 3 - 0
dp/inc/cdp_txrx_ops.h

@@ -309,6 +309,9 @@ struct cdp_cmn_ops {
 	QDF_STATUS (*txrx_peer_map_attach)(ol_txrx_soc_handle soc,
 			uint32_t num_peers);
 
+	void (*txrx_pdev_set_ctrl_pdev)(struct cdp_pdev *pdev_hdl,
+					struct cdp_ctrl_objmgr_pdev *ctrl_pdev);
+
 	ol_txrx_tx_fp tx_send;
 };
 

+ 16 - 0
dp/wifi3.0/dp_main.c

@@ -7012,6 +7012,21 @@ static QDF_STATUS dp_peer_map_attach_wifi3(struct cdp_soc_t  *soc_hdl,
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * dp_pdev_set_ctrl_pdev() - set ctrl pdev handle in dp pdev
+ * @dp_pdev: dp pdev handle
+ * @ctrl_pdev: UMAC ctrl pdev handle
+ *
+ * Return: void
+ */
+static void dp_pdev_set_ctrl_pdev(struct cdp_pdev *dp_pdev,
+				  struct cdp_ctrl_objmgr_pdev *ctrl_pdev)
+{
+	struct dp_pdev *pdev = (struct dp_pdev *)dp_pdev;
+
+	pdev->ctrl_pdev = ctrl_pdev;
+}
+
 static struct cdp_cmn_ops dp_ops_cmn = {
 	.txrx_soc_attach_target = dp_soc_attach_target_wifi3,
 	.txrx_vdev_attach = dp_vdev_attach_wifi3,
@@ -7077,6 +7092,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
 	.txrx_peer_reset_ast_table = dp_wds_reset_ast_table_wifi3,
 	.txrx_peer_flush_ast_table = dp_wds_flush_ast_table_wifi3,
 	.txrx_peer_map_attach = dp_peer_map_attach_wifi3,
+	.txrx_pdev_set_ctrl_pdev = dp_pdev_set_ctrl_pdev,
 };
 
 static struct cdp_ctrl_ops dp_ops_ctrl = {