diff --git a/dp/inc/cdp_txrx_flow_ctrl_legacy.h b/dp/inc/cdp_txrx_flow_ctrl_legacy.h index 4672ac6294..d919d501bd 100644 --- a/dp/inc/cdp_txrx_flow_ctrl_legacy.h +++ b/dp/inc/cdp_txrx_flow_ctrl_legacy.h @@ -265,7 +265,7 @@ cdp_fc_vdev_flush(ol_txrx_soc_handle soc, struct cdp_vdev *vdev) */ static inline void cdp_fc_vdev_pause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, - uint32_t reason) + uint32_t reason, uint32_t pause_type) { if (!soc || !soc->ops) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, @@ -278,7 +278,7 @@ cdp_fc_vdev_pause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, !soc->ops->l_flowctl_ops->vdev_pause) return; - soc->ops->l_flowctl_ops->vdev_pause(vdev, reason); + soc->ops->l_flowctl_ops->vdev_pause(vdev, reason, pause_type); } /** @@ -293,7 +293,7 @@ cdp_fc_vdev_pause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, */ static inline void cdp_fc_vdev_unpause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, - uint32_t reason) + uint32_t reason, uint32_t pause_type) { if (!soc || !soc->ops) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, @@ -305,6 +305,6 @@ cdp_fc_vdev_unpause(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, !soc->ops->l_flowctl_ops->vdev_unpause) return; - soc->ops->l_flowctl_ops->vdev_unpause(vdev, reason); + soc->ops->l_flowctl_ops->vdev_unpause(vdev, reason, pause_type); } #endif /* _CDP_TXRX_FC_LEG_H_ */ diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index bfa2839da0..c6a291aa5b 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -1157,6 +1157,8 @@ struct cdp_peer_ops { void (*update_last_real_peer)(struct cdp_pdev *pdev, void *vdev, uint8_t *peer_id, bool restore_last_peer); void (*peer_detach_force_delete)(void *peer); + void (*set_tdls_offchan_enabled)(void *peer, bool val); + void (*set_peer_as_tdls_peer)(void *peer, bool val); }; /** @@ -1281,8 +1283,10 @@ struct cdp_lflowctl_ops { unsigned int high_watermark_offset); int (*ll_set_tx_pause_q_depth)(uint8_t vdev_id, int pause_q_depth); void (*vdev_flush)(struct cdp_vdev *vdev); - void (*vdev_pause)(struct cdp_vdev *vdev, uint32_t reason); - void (*vdev_unpause)(struct cdp_vdev *vdev, uint32_t reason); + void (*vdev_pause)(struct cdp_vdev *vdev, uint32_t reason, + uint32_t pause_type); + void (*vdev_unpause)(struct cdp_vdev *vdev, uint32_t reason, + uint32_t pause_type); }; /** diff --git a/dp/inc/cdp_txrx_peer_ops.h b/dp/inc/cdp_txrx_peer_ops.h index c21ba91367..41d3f609f5 100644 --- a/dp/inc/cdp_txrx_peer_ops.h +++ b/dp/inc/cdp_txrx_peer_ops.h @@ -675,4 +675,49 @@ is_cdp_peer_detach_force_delete_supported(ol_txrx_soc_handle soc) return false; } + +/* + * cdp_peer_set_peer_as_tdls() - To set peer as tdls peer + * @soc: pointer to SOC handle + * @peer: dp peer + * @var: true or false + * + * Return: void + */ +static inline void +cdp_peer_set_peer_as_tdls(ol_txrx_soc_handle soc, void *peer, bool val) +{ + if (!soc || !soc->ops || !soc->ops->peer_ops) { + QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, + "%s invalid instance", __func__); + return; + } + + if (soc->ops->peer_ops->set_peer_as_tdls_peer) + soc->ops->peer_ops->set_peer_as_tdls_peer(peer, val); +} + +/** + * cdp_peer_set_tdls_offchan_enabled() - Set tdls offchan operation as enabled + * @soc - data path soc handle + * @peer - peer instance pointer + * @val - true or false + * + * update tdls_offchan_enabled + * + * Return: none + */ +static inline void +cdp_peer_set_tdls_offchan_enabled(ol_txrx_soc_handle soc, void *peer, bool val) +{ + if (!soc || !soc->ops || !soc->ops->peer_ops) { + QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, + "%s invalid instance", __func__); + return; + } + + if (soc->ops->peer_ops->set_tdls_offchan_enabled) + soc->ops->peer_ops->set_tdls_offchan_enabled(peer, val); +} + #endif /* _CDP_TXRX_PEER_H_ */