mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacmn: Optimize congestion calculation logic
In current code logic, in case of channel utilization value is 0, 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: Iff030cf4a682d6e585d6f812a522cb8b6683cc44 CRs-Fixed: 2812978
This commit is contained in:
parent
963a3c1d67
commit
b07b656387
1 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -415,7 +415,9 @@ static int32_t cm_get_congestion_pct(struct scan_cache_entry *entry)
|
|||
*/
|
||||
congestion = CM_MAX_CHANNEL_UTILIZATION -
|
||||
est_air_time_percentage;
|
||||
} else if (entry->qbss_chan_load) {
|
||||
if (!congestion)
|
||||
congestion = 1;
|
||||
} else if (util_scan_entry_qbssload(entry)) {
|
||||
ap_load = (entry->qbss_chan_load * CM_MAX_PCT_SCORE);
|
||||
/*
|
||||
* Calculate ap_load in % from qbss channel load from
|
||||
|
|
|
|||
Loading…
Reference in a new issue