From 1b00ecb608ebbbbe3a2a67a5bfffb1b4f1962dca Mon Sep 17 00:00:00 2001 From: Jiachao Wu Date: Wed, 5 Jul 2017 19:13:41 +0800 Subject: [PATCH] qcacld-3.0: kernel printing warning logs Kernel print warning message: Division by zero in kernel When gBusBandwidthComputeInterval > 1000, thresh_time_limit will be set to 0. Change-Id: Ibb1f87815e194cd74886d3731f6d6a0fee6a6732 CRs-Fixed: 2070938 --- core/hdd/src/wlan_hdd_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 317fa30fe75b..14343d11dbbd 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9822,9 +9822,12 @@ void hdd_dp_trace_init(struct hdd_config *config) /* calculating, num bw timer intervals in a second (1000ms) */ bw_compute_interval = GET_BW_COMPUTE_INTV(config); - if (bw_compute_interval) + if (bw_compute_interval <= 1000 && bw_compute_interval > 0) thresh_time_limit = 1000 / bw_compute_interval; - else + else if (bw_compute_interval > 1000) { + hdd_err("busBandwidthComputeInterval > 1000, using 1000"); + thresh_time_limit = 1; + } else hdd_err("busBandwidthComputeInterval is 0, using defaults"); switch (num_entries) {