mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Add cdp api for dp tx desc availability
Add cdp api to check if tx desc pool available descriptor threshold has reached. Change-Id: I12cc38b56a68ca7ee8f4560677fcdabccb38928b CRs-Fixed: 2369244
This commit is contained in:
parent
ef6f38c913
commit
f48210cb66
5 changed files with 13 additions and 12 deletions
|
|
@ -710,13 +710,12 @@ static enum wlan_ipa_forward_type wlan_ipa_intrabss_forward(
|
|||
{
|
||||
int ret = WLAN_IPA_FORWARD_PKT_NONE;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if ((desc & FW_RX_DESC_FORWARD_M)) {
|
||||
if (!ol_txrx_fwd_desc_thresh_check(
|
||||
(struct ol_txrx_vdev_t *)cdp_get_vdev_from_vdev_id(soc,
|
||||
(struct cdp_pdev *)pdev,
|
||||
iface_ctx->session_id))) {
|
||||
void *vdev = cdp_get_vdev_from_vdev_id(soc, pdev,
|
||||
iface_ctx->session_id);
|
||||
if (cdp_tx_desc_thresh_reached(soc, vdev)) {
|
||||
/* Drop the packet*/
|
||||
ipa_ctx->stats.num_tx_fwd_err++;
|
||||
dev_kfree_skb_any(skb);
|
||||
|
|
|
|||
|
|
@ -190,7 +190,8 @@ ol_rx_fwd_check(struct ol_txrx_vdev_t *vdev,
|
|||
QDF_NBUF_TX_EXT_TID_INVALID);
|
||||
}
|
||||
|
||||
if (!ol_txrx_fwd_desc_thresh_check(vdev)) {
|
||||
if (!ol_txrx_fwd_desc_thresh_check(
|
||||
(struct cdp_vdev *)vdev)) {
|
||||
/* Drop the packet*/
|
||||
htt_rx_msdu_desc_free(pdev->htt_pdev, msdu);
|
||||
TXRX_STATS_MSDU_LIST_INCR(
|
||||
|
|
|
|||
|
|
@ -5556,6 +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,
|
||||
#endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ QDF_STATUS ol_txrx_register_pause_cb(struct cdp_soc_t *soc,
|
|||
* Return: true ; forward the packet, i.e., below threshold
|
||||
* false; not enough descriptors, drop the packet
|
||||
*/
|
||||
bool ol_txrx_fwd_desc_thresh_check(struct ol_txrx_vdev_t *vdev);
|
||||
bool ol_txrx_fwd_desc_thresh_check(struct cdp_vdev *vdev);
|
||||
#else
|
||||
/**
|
||||
* ol_tx_get_total_free_desc() - get total free descriptors
|
||||
|
|
@ -329,7 +329,7 @@ uint32_t ol_tx_get_total_free_desc(struct ol_txrx_pdev_t *pdev)
|
|||
}
|
||||
|
||||
static inline
|
||||
bool ol_txrx_fwd_desc_thresh_check(struct ol_txrx_vdev_t *vdev)
|
||||
bool ol_txrx_fwd_desc_thresh_check(struct cdp_vdev *vdev)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,16 +83,16 @@ ol_tx_deregister_global_mgmt_pool(struct ol_txrx_pdev_t *pdev)
|
|||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
ol_txrx_fwd_desc_thresh_check(struct ol_txrx_vdev_t *vdev)
|
||||
bool ol_txrx_fwd_desc_thresh_check(struct cdp_vdev *vdev)
|
||||
{
|
||||
struct ol_txrx_vdev_t *txrx_vdev = (struct ol_txrx_vdev_t *)vdev;
|
||||
struct ol_tx_flow_pool_t *pool;
|
||||
bool enough_desc_flag;
|
||||
|
||||
if (!vdev)
|
||||
if (!txrx_vdev)
|
||||
return false;
|
||||
|
||||
pool = vdev->pool;
|
||||
pool = txrx_vdev->pool;
|
||||
|
||||
if (!pool)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue