mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-28 17:12:22 +00:00
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 <tanya_singh@accton.com>
This commit is contained in:
committed by
John Crispin
parent
082d04025c
commit
fcb5a972cf
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user