qcacmn: Rate limit logs based on elapsed time

QDF_TRACE_RATE_LIMITED() currently rate limits by only printing every
rate'th call to the function from the same location. Instead, prevent
logging messages more than some constant 'k' times per second. This
means any subsequent calls to the API from the same location within 1/k
seconds will be dropped.

Change-Id: I31a3f48f68fb6bc67f59f3157a635345943d3331
CRs-Fixed: 2205794
This commit is contained in:
Dustin Brown
2018-03-13 17:02:05 -07:00
committed by nshrivas
parent 88de1dba44
commit 9a94c9a29d
4 changed files with 31 additions and 17 deletions

View File

@@ -52,8 +52,6 @@ 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