diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index fe0977041f12..a404c17659da 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -5556,7 +5556,7 @@ static struct cdp_flowctl_ops ol_ops_flowctl = { .register_pause_cb = ol_txrx_register_pause_cb, .set_desc_global_pool_size = ol_tx_set_desc_global_pool_size, .dump_flow_pool_info = ol_tx_dump_flow_pool_info, - .tx_desc_thresh_reached = ol_txrx_fwd_desc_thresh_check, + .tx_desc_thresh_reached = ol_tx_desc_thresh_reached, #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */ }; diff --git a/core/dp/txrx/ol_txrx.h b/core/dp/txrx/ol_txrx.h index df2c21fe3dac..ed04aacc5dc5 100644 --- a/core/dp/txrx/ol_txrx.h +++ b/core/dp/txrx/ol_txrx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -315,6 +315,18 @@ QDF_STATUS ol_txrx_register_pause_cb(struct cdp_soc_t *soc, * false; not enough descriptors, drop the packet */ bool ol_txrx_fwd_desc_thresh_check(struct cdp_vdev *vdev); + +/** + * ol_tx_desc_thresh_reached() - is tx desc threshold reached + * @vdev: vdev handle + * + * Return: true if tx desc available reached threshold or false otherwise + */ +static inline bool ol_tx_desc_thresh_reached(struct cdp_vdev *vdev) +{ + return !(ol_txrx_fwd_desc_thresh_check(vdev)); +} + #else /** * ol_tx_get_total_free_desc() - get total free descriptors