Further bug fix of WifiChannelUtilization.
The absolute values of ccaBusyTime and onTime of link layer stats are
sometimes incorrect (for example, ccaBusyTime is much larger than
onTime) although the delta between two reports seem still correct.
To mitigate the issue,
1) avoid using their absolute value as much as possible. If
channelStatsMap cache is empty for current frequency, refresh the
cache even if device is stationary or cache was updated recently.
2) If estimated utilization ratio is very close to 1, assume it is
due to invalid HW report and return BssLoad.INVALID.
Test: manual
Test: atest com.android.server.wifi
Bug: 150801577
Change-Id: I4700d0d7bf1e57ca7d503e2da290a3320bd9f3f7
3 files changed