Преглед на файлове

qcacmn: Optimize congestion score calculation

In current code logic, in case of channel utilization value less
than 3, the congestion value treated as “not present” and give
it a medium score. This will cause a very clean channel get a medium
score.

To fix the issue, need calculated congestion score from 1-100 and
not 0-100.

Change-Id: I6abb257e8298e4db3104fdc20351bbadaa7c2ec5
CRs-Fixed: 2812978
gaolez преди 4 години
родител
ревизия
1d0d4cbe6b
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

+ 2 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

@@ -422,6 +422,8 @@ static int32_t cm_get_congestion_pct(struct scan_cache_entry *entry)
 		 * 0-255 range
 		 */
 		congestion = qdf_do_div(ap_load, CM_MAX_AP_LOAD);
+		if (!congestion)
+			congestion = 1;
 	}
 
 	return congestion;