瀏覽代碼

qcacmn: Add CDP API to set ptp rx opt

Add CDP API to set ptp rx opt. This rx opt is
needed for determining whether to time stamp
the received MSDUs or not.

Change-Id: Ia7cfbe838ff62ef0775164f542a160bf93e44a74
CRs-Fixed: 2095956
Yu Wang 8 年之前
父節點
當前提交
a3f76c5ae5
共有 2 個文件被更改,包括 26 次插入0 次删除
  1. 25 0
      dp/inc/cdp_txrx_cfg.h
  2. 1 0
      dp/inc/cdp_txrx_ops.h

+ 25 - 0
dp/inc/cdp_txrx_cfg.h

@@ -259,4 +259,29 @@ static inline void cdp_cfg_get_max_peer_id(ol_txrx_soc_handle soc,
 		struct cdp_cfg *cfg_pdev)
 {
 }
+
+/**
+ * cdp_cfg_set_ptp_rx_opt_enabled() - enable/disable ptp rx timestamping
+ * @soc - data path soc handle
+ * @pdev - data path device instance
+ * @val - enable or disable packet log
+ *
+ * ptp rx timestamping enable or disable
+ *
+ * return NONE
+ */
+static inline void
+cdp_cfg_set_ptp_rx_opt_enabled(ol_txrx_soc_handle soc,
+			       struct cdp_cfg *cfg_pdev, uint8_t val)
+{
+	if (!soc || !soc->ops || !soc->ops->cfg_ops) {
+		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
+			  "%s invalid instance", __func__);
+		return;
+	}
+
+	if (soc->ops->cfg_ops->set_ptp_rx_opt_enabled)
+		return soc->ops->cfg_ops->set_ptp_rx_opt_enabled(cfg_pdev,
+								 val);
+}
 #endif /* _CDP_TXRX_CFG_H_ */

+ 1 - 0
dp/inc/cdp_txrx_ops.h

@@ -723,6 +723,7 @@ struct cdp_cfg_ops {
 	void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev,
 		void *param);
 	void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val);
+	void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val);
 };
 
 /**