qcacmn: refine the APIs for reap timer of monitor status ring

Since more than one components depend on reap timer of
monitor status ring, add bitmap to record the trigger
sources of the timer and refine the APIs/calling functions
accordingly.

With this change:
When a new start request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit set, and start timer
if any bit has been set in the bitmap; while for the
other sources, set the bit and start timer if the bitmap
is empty before that.

When a new stop request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit clear, and stop timer
if any bit has been set in the bitmap; while for the
other sources, clear the bit and stop timer if the bitmap
is empty after that.

Change-Id: Idaa7837c4b93b247ff2236aa5072d309fa9548c2
CRs-Fixed: 3190347
This commit is contained in:
Yu Wang
2022-05-17 18:07:53 +08:00
committed by Madan Koyyalamudi
부모 c8fafae5ee
커밋 a9461beb20
10개의 변경된 파일239개의 추가작업 그리고 211개의 파일을 삭제

파일 보기

@@ -2835,24 +2835,25 @@ void cdp_set_rtpm_tput_policy_requirement(ol_txrx_soc_handle soc,
* @pdev_id: id of objmgr pdev
* @enable: enable/disable reap timer of monitor status ring
*
* Return: none
* Return: true if timer start/stop is performed, false otherwise.
*/
static inline void
cdp_enable_mon_reap_timer(ol_txrx_soc_handle soc, uint8_t pdev_id,
static inline bool
cdp_enable_mon_reap_timer(ol_txrx_soc_handle soc,
enum cdp_mon_reap_source source,
bool enable)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"%s invalid instance", __func__);
QDF_BUG(0);
return;
return false;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_enable_mon_reap_timer)
return;
return false;
return soc->ops->mon_ops->txrx_enable_mon_reap_timer(soc, pdev_id,
return soc->ops->mon_ops->txrx_enable_mon_reap_timer(soc, source,
enable);
}
#endif /* _CDP_TXRX_CMN_H_ */