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:
@@ -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,
|
return soc->ops->l_flowctl_ops->register_tx_flow_control(soc,
|
||||||
flowcontrol);
|
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
|
#else
|
||||||
static inline int
|
static inline int
|
||||||
cdp_hl_fc_register(ol_txrx_soc_handle soc, tx_pause_callback flowcontrol)
|
cdp_hl_fc_register(ol_txrx_soc_handle soc, tx_pause_callback flowcontrol)
|
||||||
{
|
{
|
||||||
return 0;
|
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 */
|
#endif /* QCA_HL_NETDEV_FLOW_CONTROL */
|
||||||
|
|
||||||
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
|
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
|
||||||
|
@@ -900,6 +900,9 @@ struct cdp_lflowctl_ops {
|
|||||||
#ifdef QCA_HL_NETDEV_FLOW_CONTROL
|
#ifdef QCA_HL_NETDEV_FLOW_CONTROL
|
||||||
int (*register_tx_flow_control)(struct cdp_soc_t *soc,
|
int (*register_tx_flow_control)(struct cdp_soc_t *soc,
|
||||||
tx_pause_callback flowcontrol);
|
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
|
#else
|
||||||
int (*register_tx_flow_control)(uint8_t vdev_id,
|
int (*register_tx_flow_control)(uint8_t vdev_id,
|
||||||
ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
|
ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
|
||||||
|
Reference in New Issue
Block a user