diff --git a/dp/inc/cdp_txrx_flow_ctrl_legacy.h b/dp/inc/cdp_txrx_flow_ctrl_legacy.h index 70b7d2f254..f1c6fbfef5 100644 --- a/dp/inc/cdp_txrx_flow_ctrl_legacy.h +++ b/dp/inc/cdp_txrx_flow_ctrl_legacy.h @@ -52,12 +52,46 @@ cdp_hl_fc_register(ol_txrx_soc_handle soc, tx_pause_callback flowcontrol) return soc->ops->l_flowctl_ops->register_tx_flow_control(soc, flowcontrol); } + +static inline int cdp_hl_fc_set_td_limit(ol_txrx_soc_handle soc, + u8 vdev_id, u8 chan) +{ + if (!soc->ops->l_flowctl_ops->set_vdev_tx_desc_limit) + return 0; + + return soc->ops->l_flowctl_ops->set_vdev_tx_desc_limit(vdev_id, chan); +} + +static inline int cdp_hl_fc_set_os_queue_status(ol_txrx_soc_handle soc, + u8 vdev_id, + enum netif_action_type action) +{ + if (!soc->ops->l_flowctl_ops->set_vdev_os_queue_status) + return -EINVAL; + + return soc->ops->l_flowctl_ops->set_vdev_os_queue_status(vdev_id, + action); +} #else static inline int cdp_hl_fc_register(ol_txrx_soc_handle soc, tx_pause_callback flowcontrol) { return 0; } + +static inline int cdp_hl_fc_set_td_limit(ol_txrx_soc_handle soc, + u8 vdev_id, u8 chan) +{ + return 0; +} + +static inline int cdp_hl_fc_set_os_queue_status(ol_txrx_soc_handle soc, + u8 vdev_id, + enum netif_action_type action) +{ + return 0; +} + #endif /* QCA_HL_NETDEV_FLOW_CONTROL */ #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index b845a2cb81..8dfaf6a987 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -900,6 +900,9 @@ struct cdp_lflowctl_ops { #ifdef QCA_HL_NETDEV_FLOW_CONTROL int (*register_tx_flow_control)(struct cdp_soc_t *soc, tx_pause_callback flowcontrol); + int (*set_vdev_tx_desc_limit)(u8 vdev_id, u8 chan); + int (*set_vdev_os_queue_status)(u8 vdev_id, + enum netif_action_type action); #else int (*register_tx_flow_control)(uint8_t vdev_id, ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,