qcacmn: Add new members to 'struct cdp_lflowctl_ops' for HL flow control

Add new function pointers type to 'struct cdp_lflowctl_ops' to set tx
desc limit and update OS queue status.
Also add cdp_hl_fc_set_os_queue_status()

Change-Id: I18dab34c31a5d8f459179358e16ef124a13f5742
CRs-fixed: 2236466
This commit is contained in:
Ajit Pal Singh
2018-04-25 16:59:19 +05:30
committed by nshrivas
parent d1543e09d1
commit 506c4d60f5
2 changed files with 37 additions and 0 deletions

View File

@@ -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