diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index 566f189b8eae..b7a8ced03dc7 100644 --- a/core/dp/htt/htt.c +++ b/core/dp/htt/htt.c @@ -859,6 +859,11 @@ void htt_log_rx_ring_info(htt_pdev_handle pdev) qdf_atomic_read(&pdev->rx_ring.refill_debt)); } +void htt_rx_refill_failure(htt_pdev_handle pdev) +{ + QDF_BUG(qdf_atomic_read(&pdev->rx_ring.refill_debt)); +} + #if HTT_DEBUG_LEVEL > 5 void htt_display(htt_pdev_handle pdev, int indent) { diff --git a/core/dp/ol/inc/ol_htt_api.h b/core/dp/ol/inc/ol_htt_api.h index 73038c116331..8c5a419acbd7 100644 --- a/core/dp/ol/inc/ol_htt_api.h +++ b/core/dp/ol/inc/ol_htt_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2014-2019-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -192,6 +192,14 @@ void htt_t2h_stats_print(uint8_t *stats_data, int concise); */ void htt_log_rx_ring_info(htt_pdev_handle pdev); +/** + * htt_rx_refill_failure() - During refill failure check if debt is zero + * @pdev: handle to the HTT instance + * + * Return: None + */ +void htt_rx_refill_failure(htt_pdev_handle pdev); + #ifndef HTT_DEBUG_LEVEL #if defined(DEBUG) #define HTT_DEBUG_LEVEL 10 diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 1d52eecc3153..f6d83cf19e2c 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -5582,8 +5582,10 @@ static void ol_txrx_post_data_stall_event( data_stall_info.recovery_type = recovery_type; if (data_stall_info.data_stall_type == - DATA_STALL_LOG_FW_RX_REFILL_FAILED) + DATA_STALL_LOG_FW_RX_REFILL_FAILED) { htt_log_rx_ring_info(pdev->htt_pdev); + htt_rx_refill_failure(pdev->htt_pdev); + } pdev->data_stall_detect_callback(&data_stall_info); }