summaryrefslogtreecommitdiff
path: root/hif
diff options
context:
space:
mode:
authorwadesong <wadesong@codeaurora.org>2017-11-13 11:53:19 +0800
committersnandini <snandini@codeaurora.org>2017-12-04 23:38:59 -0800
commit41f857eb31919d6779bd97218710dfa02fcd4214 (patch)
tree4b425e6639549b64d0103feb06029019a1c89e98 /hif
parentb9ec57ef6593c3622edada9c3cc66fd1e7d681a8 (diff)
downloadqca-wfi-host-cmn-41f857eb31919d6779bd97218710dfa02fcd4214.tar.gz
qcacmn: Debug print rate limiting
Implement driver debug print rate limiting in HIF SDIO RX path and QDF nbuf allocation path to avoid driver inactivity watch dog time out when the platform is facing great memory pressure. Change-Id: Ifa4fe3e7027150fd1469df58049776fca8aa6f2f CRs-Fixed: 2148314
Diffstat (limited to 'hif')
-rw-r--r--hif/inc/hif.h2
-rw-r--r--hif/src/sdio/hif_sdio_dev.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/hif/inc/hif.h b/hif/inc/hif.h
index 24192e345..bd211b202 100644
--- a/hif/inc/hif.h
+++ b/hif/inc/hif.h
@@ -52,6 +52,8 @@ extern "C" {
typedef void __iomem *A_target_id_t;
typedef void *hif_handle_t;
+#define HIF_DBG_PRINT_RATE 1000
+
#define HIF_TYPE_AR6002 2
#define HIF_TYPE_AR6003 3
#define HIF_TYPE_AR6004 5
diff --git a/hif/src/sdio/hif_sdio_dev.c b/hif/src/sdio/hif_sdio_dev.c
index 0bad5cdc7..a85a48a92 100644
--- a/hif/src/sdio/hif_sdio_dev.c
+++ b/hif/src/sdio/hif_sdio_dev.c
@@ -190,8 +190,10 @@ HTC_PACKET *hif_dev_alloc_rx_buffer(struct hif_sdio_device *pdev)
headsize = sizeof(HTC_PACKET);
netbuf = qdf_nbuf_alloc(NULL, bufsize + headsize, 0, 4, false);
if (netbuf == NULL) {
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
- ("(%s)Allocate netbuf failed\n", __func__));
+ QDF_TRACE_RATE_LIMITED(HIF_DBG_PRINT_RATE, QDF_MODULE_ID_HIF,
+ QDF_TRACE_LEVEL_ERROR,
+ "(%s)Allocate netbuf failed\n",
+ __func__);
return NULL;
}
packet = (HTC_PACKET *) qdf_nbuf_data(netbuf);