From fcb5a972cf603ebe69b9d774fbe34d9946e2ae37 Mon Sep 17 00:00:00 2001 From: Tanya Singh Date: Fri, 18 Apr 2025 13:46:14 +0800 Subject: [PATCH] rrmd: Update Channel Utilization Calculation in RRM - avoid calculated Channel Utilization value to be 'infinity' from cycle_count_delta being '0' Fixes: WIFI-14536 Signed-off-by: Tanya Singh --- feeds/ucentral/rrmd/files/usr/share/rrmd/policy_chanutil.uc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feeds/ucentral/rrmd/files/usr/share/rrmd/policy_chanutil.uc b/feeds/ucentral/rrmd/files/usr/share/rrmd/policy_chanutil.uc index f3dba8070..3dd0e5d7f 100644 --- a/feeds/ucentral/rrmd/files/usr/share/rrmd/policy_chanutil.uc +++ b/feeds/ucentral/rrmd/files/usr/share/rrmd/policy_chanutil.uc @@ -290,6 +290,7 @@ function fixed_channel_config(iface, iface_num, fixed_channel_f, auto_channel_f, function get_chan_util(radio_band, sleep_time) { let pdev_stats = {}; let chan_util = 0; + let total_usage = 0; let prev_values = { txFrameCount: null, @@ -348,7 +349,8 @@ function get_chan_util(radio_band, sleep_time) { if (ignore != 1) { let cycle_count_delta = curr_values.cycleCount - prev_values.cycleCount; let rx_clear_delta = curr_values.rxClearCount - prev_values.rxClearCount; - let total_usage = (rx_clear_delta * 100) / cycle_count_delta; + if (cycle_count_delta && cycle_count_delta > 0) + total_usage = (rx_clear_delta * 100) / cycle_count_delta; chan_util = total_usage; }