Bug fix WifiChannelUtilization and WifiDataStall.
It is found that sometimes cca_busy_time is much larger than on_time in
link layer stats report. This results in incorrect channel utilization
calculation. In addition, WifiChannelUtilization cache is not cleaned
properly during Wifi enable/disable toggle.
Three SW changes to mitigate the issue:
1) increase cache size and WifiDataStall cache update time interval
2) add the upper bound check in channelUtilization ratio calculation. If
it is more than 1, return invalid value - In this case, default channel
utilization will be used in the throughput calculation.
3) clean WifiChannelUtilization cache and WifiDataStall internal
variables during Wifi enable/disable toggle
Test: atest com.android.server.wifi
Bug: 150801577
Change-Id: I759a9a7efaf7280ada2ead67fce3adcefa20c149
5 files changed