diff options
author | Mingguang Xu <mingguangxu@google.com> | 2019-09-19 00:29:40 -0700 |
---|---|---|
committer | Mingguang Xu <mingguangxu@google.com> | 2019-09-19 07:41:08 +0000 |
commit | ec1e58cd439ae645ff4e5bf55f7961e359bf0e4c (patch) | |
tree | bb8e4395080f3ccc257bf62aaec1e4881dc6cf9c /service/java/com/android/server/wifi/DeviceConfigFacade.java | |
parent | c9d68061749a93378f575199798f676a2b5c37a8 (diff) | |
download | android_frameworks_opt_net_wifi-ec1e58cd439ae645ff4e5bf55f7961e359bf0e4c.tar.gz android_frameworks_opt_net_wifi-ec1e58cd439ae645ff4e5bf55f7961e359bf0e4c.tar.bz2 android_frameworks_opt_net_wifi-ec1e58cd439ae645ff4e5bf55f7961e359bf0e4c.zip |
Wifi usability: Change the unit of the threshold for tx/rx throughput from Mbps to Kbps
Data stall event can be triggered if the tx/rx tput is consecutively below a threshold over multiple RSSI polls. Changing the unit of the threshold from Mbps to Kbps allows us to configure a value below 1Mbps, e.g., 400Kbps.
Bug: 141027476
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If0ca391b248c4248da8d2fee37c82d74fdb25ed2
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Merged-In: I76d6338cd2d482d198fde1e5a2d1a0540c087ca6
Diffstat (limited to 'service/java/com/android/server/wifi/DeviceConfigFacade.java')
-rw-r--r-- | service/java/com/android/server/wifi/DeviceConfigFacade.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/service/java/com/android/server/wifi/DeviceConfigFacade.java b/service/java/com/android/server/wifi/DeviceConfigFacade.java index a9889f424..947261b8a 100644 --- a/service/java/com/android/server/wifi/DeviceConfigFacade.java +++ b/service/java/com/android/server/wifi/DeviceConfigFacade.java @@ -31,10 +31,10 @@ public class DeviceConfigFacade { // Default duration for evaluating Wifi condition to trigger a data stall // measured in milliseconds public static final int DEFAULT_DATA_STALL_DURATION_MS = 1500; - // Default threshold of Tx throughput below which to trigger a data stall measured in Mbps - public static final int DEFAULT_DATA_STALL_TX_TPUT_THR_MBPS = 2; - // Default threshold of Rx throughput below which to trigger a data stall measured in Mbps - public static final int DEFAULT_DATA_STALL_RX_TPUT_THR_MBPS = 2; + // Default threshold of Tx throughput below which to trigger a data stall measured in Kbps + public static final int DEFAULT_DATA_STALL_TX_TPUT_THR_KBPS = 2000; + // Default threshold of Rx throughput below which to trigger a data stall measured in Kbps + public static final int DEFAULT_DATA_STALL_RX_TPUT_THR_KBPS = 2000; // Default threshold of Tx packet error rate above which to trigger a data stall in percentage public static final int DEFAULT_DATA_STALL_TX_PER_THR = 90; // Default threshold of CCA level above which to trigger a data stall in percentage @@ -77,17 +77,17 @@ public class DeviceConfigFacade { /** * Gets the threshold of Tx throughput below which to trigger a data stall. */ - public int getDataStallTxTputThrMbps() { - return DeviceConfig.getInt(NAMESPACE, "data_stall_tx_tput_thr_mbps", - DEFAULT_DATA_STALL_TX_TPUT_THR_MBPS); + public int getDataStallTxTputThrKbps() { + return DeviceConfig.getInt(NAMESPACE, "data_stall_tx_tput_thr_kbps", + DEFAULT_DATA_STALL_TX_TPUT_THR_KBPS); } /** * Gets the threshold of Rx throughput below which to trigger a data stall. */ - public int getDataStallRxTputThrMbps() { - return DeviceConfig.getInt(NAMESPACE, "data_stall_rx_tput_thr_mbps", - DEFAULT_DATA_STALL_RX_TPUT_THR_MBPS); + public int getDataStallRxTputThrKbps() { + return DeviceConfig.getInt(NAMESPACE, "data_stall_rx_tput_thr_kbps", + DEFAULT_DATA_STALL_RX_TPUT_THR_KBPS); } /** |