summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2017-11-30 20:58:04 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-11-30 20:58:04 -0800
commitf80160f3947c6859ee3fe416981a60cb7f12ba81 (patch)
treeeacb8b73dd04dab2e4e71bdf5469b666dd701185
parent977748dd1043532e9395bbda34babf9e6cd8697d (diff)
parent38f50197446d7d52da929972bc000b48a0e84b62 (diff)
Merge "qcacmn: Debug print rate limiting" into wlan-cmn.driver.lnx.1.0
-rw-r--r--hif/inc/hif.h2
-rw-r--r--hif/src/sdio/hif_sdio_dev.c6
-rw-r--r--qdf/linux/src/qdf_nbuf.c3
3 files changed, 8 insertions, 3 deletions
diff --git a/hif/inc/hif.h b/hif/inc/hif.h
index a62db2bd76f8..a4253d530f4a 100644
--- a/hif/inc/hif.h
+++ b/hif/inc/hif.h
@@ -51,6 +51,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 0bad5cdc7542..a85a48a92a8b 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);
diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c
index f370284e3c5e..587da9b33599 100644
--- a/qdf/linux/src/qdf_nbuf.c
+++ b/qdf/linux/src/qdf_nbuf.c
@@ -305,7 +305,8 @@ struct sk_buff *__qdf_nbuf_alloc(qdf_device_t osdev, size_t size, int reserve,
skb = pld_nbuf_pre_alloc(size);
if (!skb) {
- pr_info("ERROR:NBUF alloc failed\n");
+ pr_err_ratelimited("ERROR:NBUF alloc failed, size = %zu\n",
+ size);
__qdf_nbuf_start_replenish_timer();
return NULL;
}