qcacmn: Add support to get free descriptor pool size
Add a function in cdp to get free descriptor pool size. CRs-Fixed: 2984773 Change-Id: Iac5aca801255e5ba5460ea09c88fc4573c1a7055
This commit is contained in:

committed by
Madan Koyyalamudi

parent
7438cab313
commit
71d4ce6cb0
@@ -2652,4 +2652,24 @@ cdp_drain_txrx(ol_txrx_soc_handle soc)
|
|||||||
|
|
||||||
return soc->ops->cmn_drv_ops->txrx_drain(soc);
|
return soc->ops->cmn_drv_ops->txrx_drain(soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cdp_get_free_desc_poolsize() - get free desc pool size
|
||||||
|
* @soc: opaque soc handle
|
||||||
|
*/
|
||||||
|
static inline int
|
||||||
|
cdp_get_free_desc_poolsize(ol_txrx_soc_handle soc)
|
||||||
|
{
|
||||||
|
if (!soc || !soc->ops) {
|
||||||
|
dp_cdp_debug("Invalid Instance");
|
||||||
|
QDF_BUG(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!soc->ops->cmn_drv_ops ||
|
||||||
|
!soc->ops->cmn_drv_ops->get_free_desc_poolsize)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ops->cmn_drv_ops->get_free_desc_poolsize(soc);
|
||||||
|
}
|
||||||
#endif /* _CDP_TXRX_CMN_H_ */
|
#endif /* _CDP_TXRX_CMN_H_ */
|
||||||
|
@@ -579,6 +579,7 @@ struct cdp_cmn_ops {
|
|||||||
ol_osif_peer_handle osif_peer);
|
ol_osif_peer_handle osif_peer);
|
||||||
#endif /* QCA_SUPPORT_WDS_EXTENDED */
|
#endif /* QCA_SUPPORT_WDS_EXTENDED */
|
||||||
void (*txrx_drain)(ol_txrx_soc_handle soc);
|
void (*txrx_drain)(ol_txrx_soc_handle soc);
|
||||||
|
int (*get_free_desc_poolsize)(struct cdp_soc_t *soc);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cdp_ctrl_ops {
|
struct cdp_ctrl_ops {
|
||||||
|
Reference in New Issue
Block a user