qcacmn: Add API to get TX pending in WoW state
This change is used to provide an API for PMO module to check whether there are pending TX frames before HOST sends wake up indication to FW. PMO module uses this to indicate FW whehter to discard HWDTIM. Change-Id: Icc3271e87e376e3313fddc5f4f99e39daeaf6af7 CRs-Fixed: 3046947
This commit is contained in:

committed by
Madan Koyyalamudi

szülő
ce387c8fd3
commit
112813c1b7
@@ -2700,4 +2700,19 @@ cdp_set_pkt_capture_mode(ol_txrx_soc_handle soc, bool val)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cdp_rx_get_pending() - Get number of pending frames of RX threads
|
||||||
|
* @soc: opaque soc handle
|
||||||
|
* Return: number of pending frames
|
||||||
|
*/
|
||||||
|
static inline uint32_t
|
||||||
|
cdp_get_tx_inqueue(ol_txrx_soc_handle soc)
|
||||||
|
{
|
||||||
|
if (!soc || !soc->ol_ops ||
|
||||||
|
!soc->ol_ops->dp_get_tx_inqueue)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return soc->ol_ops->dp_get_tx_inqueue(soc);
|
||||||
|
}
|
||||||
#endif /* _CDP_TXRX_CMN_H_ */
|
#endif /* _CDP_TXRX_CMN_H_ */
|
||||||
|
@@ -1232,6 +1232,7 @@ struct ol_if_ops {
|
|||||||
uint32_t service_interval_ul, uint32_t burst_size_ul,
|
uint32_t service_interval_ul, uint32_t burst_size_ul,
|
||||||
uint8_t add_or_sub, uint8_t ac);
|
uint8_t add_or_sub, uint8_t ac);
|
||||||
#endif
|
#endif
|
||||||
|
uint32_t (*dp_get_tx_inqueue)(ol_txrx_soc_handle soc);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DP_PEER_EXTENDED_API
|
#ifdef DP_PEER_EXTENDED_API
|
||||||
|
@@ -11218,6 +11218,7 @@ void dp_flush_ring_hptp(struct dp_soc *soc, hal_ring_handle_t hal_srng)
|
|||||||
hal_srng_access_end(soc->hal_soc, hal_srng);
|
hal_srng_access_end(soc->hal_soc, hal_srng);
|
||||||
|
|
||||||
hal_srng_set_flush_last_ts(hal_srng);
|
hal_srng_set_flush_last_ts(hal_srng);
|
||||||
|
qdf_atomic_set(&soc->tx_pending_rtpm, 0);
|
||||||
dp_debug("flushed");
|
dp_debug("flushed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1458,6 +1458,7 @@ dp_tx_ring_access_end_wrapper(struct dp_soc *soc,
|
|||||||
} else {
|
} else {
|
||||||
dp_tx_hal_ring_access_end_reap(soc, hal_ring_hdl);
|
dp_tx_hal_ring_access_end_reap(soc, hal_ring_hdl);
|
||||||
hal_srng_set_event(hal_ring_hdl, HAL_SRNG_FLUSH_EVENT);
|
hal_srng_set_event(hal_ring_hdl, HAL_SRNG_FLUSH_EVENT);
|
||||||
|
qdf_atomic_inc(&soc->tx_pending_rtpm);
|
||||||
hal_srng_inc_flush_cnt(hal_ring_hdl);
|
hal_srng_inc_flush_cnt(hal_ring_hdl);
|
||||||
}
|
}
|
||||||
dp_runtime_put(soc);
|
dp_runtime_put(soc);
|
||||||
@@ -1466,6 +1467,7 @@ dp_tx_ring_access_end_wrapper(struct dp_soc *soc,
|
|||||||
dp_runtime_get(soc);
|
dp_runtime_get(soc);
|
||||||
dp_tx_hal_ring_access_end_reap(soc, hal_ring_hdl);
|
dp_tx_hal_ring_access_end_reap(soc, hal_ring_hdl);
|
||||||
hal_srng_set_event(hal_ring_hdl, HAL_SRNG_FLUSH_EVENT);
|
hal_srng_set_event(hal_ring_hdl, HAL_SRNG_FLUSH_EVENT);
|
||||||
|
qdf_atomic_inc(&soc->tx_pending_rtpm);
|
||||||
hal_srng_inc_flush_cnt(hal_ring_hdl);
|
hal_srng_inc_flush_cnt(hal_ring_hdl);
|
||||||
dp_runtime_put(soc);
|
dp_runtime_put(soc);
|
||||||
}
|
}
|
||||||
|
@@ -2126,6 +2126,9 @@ struct dp_soc {
|
|||||||
#ifdef FEATURE_RUNTIME_PM
|
#ifdef FEATURE_RUNTIME_PM
|
||||||
/* Dp runtime refcount */
|
/* Dp runtime refcount */
|
||||||
qdf_atomic_t dp_runtime_refcount;
|
qdf_atomic_t dp_runtime_refcount;
|
||||||
|
|
||||||
|
/* Dp tx pending count in RTPM */
|
||||||
|
qdf_atomic_t tx_pending_rtpm;
|
||||||
#endif
|
#endif
|
||||||
/* Invalid buffer that allocated for RX buffer */
|
/* Invalid buffer that allocated for RX buffer */
|
||||||
qdf_nbuf_queue_t invalid_buf_queue;
|
qdf_nbuf_queue_t invalid_buf_queue;
|
||||||
|
Reference in New Issue
Block a user