diff options
author | Kai Shi <kaishi@google.com> | 2020-06-30 16:57:42 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-30 16:57:42 +0000 |
commit | 095631dd92e14095d3269124ac277bba8c1a46b9 (patch) | |
tree | 1ff76b3c811bc52e2cb72b158c11636f42c9887b /service | |
parent | 8a8f58c5315d1a31ad4998ff0b762d183dff7697 (diff) | |
parent | 529570fc410b316b4543186019d1b4c61e612637 (diff) |
Merge "Bug fix of Tx PER when packet count is low" into rvc-dev am: de359e61f8 am: 529570fc41
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12035415
Change-Id: I7c2c980d50ffe0ee9541d35e7e7abd12bd622f38
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/DeviceConfigFacade.java | 2 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiDataStall.java | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/DeviceConfigFacade.java b/service/java/com/android/server/wifi/DeviceConfigFacade.java index 0e43a0891..0b707701f 100644 --- a/service/java/com/android/server/wifi/DeviceConfigFacade.java +++ b/service/java/com/android/server/wifi/DeviceConfigFacade.java @@ -66,7 +66,7 @@ public class DeviceConfigFacade { // Denominator part of default threshold of L2 throughput over L3 throughput ratio public static final int DEFAULT_TPUT_SUFFICIENT_RATIO_THR_DEN = 1; // Default threshold of Tx packet per second - public static final int DEFAULT_TX_PACKET_PER_SECOND_THR = 1; + public static final int DEFAULT_TX_PACKET_PER_SECOND_THR = 2; // Default threshold of Rx packet per second public static final int DEFAULT_RX_PACKET_PER_SECOND_THR = 1; // Default high threshold values for various connection/disconnection cases diff --git a/service/java/com/android/server/wifi/WifiDataStall.java b/service/java/com/android/server/wifi/WifiDataStall.java index 7ae577900..ebc184773 100644 --- a/service/java/com/android/server/wifi/WifiDataStall.java +++ b/service/java/com/android/server/wifi/WifiDataStall.java @@ -296,7 +296,8 @@ public class WifiDataStall { } logd(" ccaLevel = " + ccaLevel); - int txPer = updateTxPer(txSuccessDelta, txRetriesDelta, isSameBssidAndFreq); + int txPer = updateTxPer(txSuccessDelta, txRetriesDelta, isSameBssidAndFreq, + isTxTrafficHigh); boolean isTxTputLow = false; boolean isRxTputLow = false; @@ -397,12 +398,13 @@ public class WifiDataStall { return WifiIsUnusableEvent.TYPE_UNKNOWN; } - private int updateTxPer(long txSuccessDelta, long txRetriesDelta, boolean isSameBssidAndFreq) { + private int updateTxPer(long txSuccessDelta, long txRetriesDelta, boolean isSameBssidAndFreq, + boolean isTxTrafficHigh) { if (!isSameBssidAndFreq) { return DEFAULT_TX_PACKET_ERROR_RATE; } long txAttempts = txSuccessDelta + txRetriesDelta; - if (txAttempts <= 0) { + if (txAttempts <= 0 || !isTxTrafficHigh) { return DEFAULT_TX_PACKET_ERROR_RATE; } return (int) (txRetriesDelta * 100 / txAttempts); |