qcacmn: Check pending TX packets before runtime suspend

If there are pending TX packets, abort runtime suspend.

Change-Id: I3680142c3c35ddb946b32040adfcee6bdcad710c
CRs-fixed: 2302214
This commit is contained in:
Yue Ma 2018-08-27 12:35:21 -07:00 • committed by nshrivas
commit af4272dbab

View file

@ -7774,8 +7774,12 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_pdev *opaque_pdev)
struct dp_pdev *pdev = (struct dp_pdev *)opaque_pdev;
struct dp_soc *soc = pdev->soc;
/* Call DP TX flow control API to check if there is any
pending packets */
/* Abort if there are any pending TX packets */
if (dp_get_tx_pending(opaque_pdev) > 0) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
FL("Abort suspend due to pending TX packets"));
return QDF_STATUS_E_AGAIN;
}
if (soc->intr_mode == DP_INTR_POLL)
qdf_timer_stop(&soc->int_timer);