diff options
author | Naveen Rawat <naveenrawat@codeaurora.org> | 2017-05-22 10:37:52 -0700 |
---|---|---|
committer | Naveen Rawat <naveenrawat@codeaurora.org> | 2017-05-24 11:46:49 -0700 |
commit | 694083b308f4b0b42d7b59a907cfed3902ee0f55 (patch) | |
tree | 2467a313bbf820fcd3e74fdedd079957f8d5d046 /core/wma/src/wma_mgmt.c | |
parent | 6a3dc8f874291914370e0cfdcb9781941f1cb5a9 (diff) | |
download | qcacld-694083b308f4b0b42d7b59a907cfed3902ee0f55.tar.gz |
qcacld-3.0: Reduce logging level of dropped packets
Function wma_mgmt_rx_process will drop packets when recovery is in
progress and when load/unload is in progress. During these events
if host receieves a lot of packets it might lead to WD bite. To fix
this reduce log level of "Recovery in progress" and "Load/Unload in
progress" in this function.
Change-Id: Ic926e23fe14dd3f670dd9269519866095d51539a
CRs-Fixed: 2049811
Diffstat (limited to 'core/wma/src/wma_mgmt.c')
-rw-r--r-- | core/wma/src/wma_mgmt.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 126a3cadd9..7a4a40289a 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -3278,6 +3278,7 @@ end: return should_drop; } +#define RATE_LIMIT 16 /** * wma_mgmt_rx_process() - process management rx frame. * @handle: wma handle @@ -3300,6 +3301,9 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, struct wma_txrx_node *iface = NULL; int status; tp_wma_packetdump_cb packetdump_cb; + static uint8_t limit_prints_invalid_len = RATE_LIMIT - 1; + static uint8_t limit_prints_load_unload = RATE_LIMIT - 1; + static uint8_t limit_prints_recovery = RATE_LIMIT - 1; if (!wma_handle) { WMA_LOGE("%s: Failed to get WMA context", __func__); @@ -3319,17 +3323,29 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, } if (hdr->buf_len < sizeof(struct ieee80211_frame)) { - WMA_LOGE("Invalid rx mgmt packet"); + limit_prints_invalid_len++; + if (limit_prints_invalid_len == RATE_LIMIT) { + WMA_LOGD("Invalid rx mgmt packet"); + limit_prints_invalid_len = 0; + } return -EINVAL; } if (cds_is_load_or_unload_in_progress()) { - WMA_LOGW(FL("Load/Unload in progress")); + limit_prints_load_unload++; + if (limit_prints_load_unload == RATE_LIMIT) { + WMA_LOGD(FL("Load/Unload in progress")); + limit_prints_load_unload = 0; + } return -EINVAL; } if (cds_is_driver_recovering()) { - WMA_LOGW(FL("Recovery in progress")); + limit_prints_recovery++; + if (limit_prints_recovery == RATE_LIMIT) { + WMA_LOGD(FL("Recovery in progress")); + limit_prints_recovery = 0; + } return -EINVAL; } |