summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-06-10 14:05:23 -0700
committerIrfan Sheriff <isheriff@google.com>2010-06-10 16:34:16 -0700
commit60d0d22c75ef49d151290592652b92f3e199679b (patch)
tree060474d3770c70c8cd644c5d304317ddcf1e578c /wifi
parenta2c6d5bf308181c019ade0aac6d25fe33dc3d76c (diff)
downloadframeworks_base-60d0d22c75ef49d151290592652b92f3e199679b.zip
frameworks_base-60d0d22c75ef49d151290592652b92f3e199679b.tar.gz
frameworks_base-60d0d22c75ef49d151290592652b92f3e199679b.tar.bz2
Remove indefinite DHCP retries
Replace indefinite DHCP retries with a sufficiently large retry count Bug: 2761057 Change-Id: I4570b74476aa78c71c73e06c2aafac33d924e867
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiStateTracker.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 978d821..3813015 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -156,7 +156,7 @@ public class WifiStateTracker extends NetworkStateTracker {
* See {@link Settings.Secure#WIFI_MAX_DHCP_RETRY_COUNT}. This is the default
* value if a Settings value is not present.
*/
- private static final int DEFAULT_MAX_DHCP_RETRIES = 2;
+ private static final int DEFAULT_MAX_DHCP_RETRIES = 9;
private static final int DRIVER_POWER_MODE_AUTO = 0;
private static final int DRIVER_POWER_MODE_ACTIVE = 1;
@@ -1100,16 +1100,15 @@ public class WifiStateTracker extends NetworkStateTracker {
String BSSID = (msg.obj != null) ? msg.obj.toString() : null;
/**
* If we've exceeded the maximum number of retries for reconnecting
- * to a given network, blacklist the BSSID to allow a connection attempt on
- * an alternate BSSID if available
+ * to a given network, disable the network
*/
if (mWifiInfo.getSupplicantState() != SupplicantState.UNINITIALIZED) {
if (++mReconnectCount > getMaxDhcpRetries()) {
if (LOCAL_LOGD) {
Log.d(TAG, "Failed reconnect count: " +
- mReconnectCount + " Blacklisting " + BSSID);
+ mReconnectCount + " Disabling " + BSSID);
}
- addToBlacklist(BSSID);
+ mWM.disableNetwork(mLastNetworkId);
}
reconnectCommand();
}