From a3f76c5ae5d84921ff39bc6daa612e721a229cdb Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Thu, 10 Aug 2017 16:58:13 +0800 Subject: [PATCH] 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 --- dp/inc/cdp_txrx_cfg.h | 25 +++++++++++++++++++++++++ dp/inc/cdp_txrx_ops.h | 1 + 2 files changed, 26 insertions(+) diff --git a/dp/inc/cdp_txrx_cfg.h b/dp/inc/cdp_txrx_cfg.h index 3e10f027c511..854a79e8654b 100644 --- a/dp/inc/cdp_txrx_cfg.h +++ b/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_ */ diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index edcdca0d8456..6d3ac355afcc 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/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); }; /**