am 9794dc95: am 0829f6b6: Merge "handle bssid blacklist in case of dhcp failures" into lmp-dev
* commit '9794dc9569fd33ea706370ee153446645a7b1474': handle bssid blacklist in case of dhcp failures
This commit is contained in:
@@ -405,6 +405,15 @@
|
||||
<!-- Integer indicating associated full scan max num passive channels -->
|
||||
<integer translatable="false" name="config_wifi_framework_associated_partial_scan_max_num_passive_channels">3</integer>
|
||||
|
||||
<!-- Integer indicating number of association errors leading to blacklisting of the network -->
|
||||
<integer translatable="false" name="config_wifi_framework_max_connection_errors_to_blacklist">4</integer>
|
||||
|
||||
<!-- Integer indicating number of authentication errors leading to blacklisting of the network -->
|
||||
<integer translatable="false" name="config_wifi_framework_max_auth_errors_to_blacklist">4</integer>
|
||||
|
||||
<!-- Integer indicating minimum blacklisting delay of a wofo configuration due to connectin or auth errors -->
|
||||
<integer translatable="false" name="config_wifi_framework_network_black_list_min_time_milli">120000</integer>
|
||||
|
||||
<!-- Boolean indicating associated scan are allowed -->
|
||||
<bool translatable="false" name="config_wifi_framework_enable_associated_autojoin_scan">true</bool>
|
||||
|
||||
|
||||
@@ -331,7 +331,10 @@
|
||||
<java-symbol type="integer" name="config_wifi_framework_associated_partial_scan_tx_packet_threshold" />
|
||||
<java-symbol type="integer" name="config_wifi_framework_associated_partial_scan_rx_packet_threshold" />
|
||||
<java-symbol type="integer" name="config_wifi_framework_network_switch_tx_packet_threshold" />
|
||||
<java-symbol type="integer" name="config_wifi_framework_network_switch_tx_packet_threshold" />
|
||||
<java-symbol type="integer" name="config_wifi_framework_network_switch_rx_packet_threshold" />
|
||||
<java-symbol type="integer" name="config_wifi_framework_max_connection_errors_to_blacklist" />
|
||||
<java-symbol type="integer" name="config_wifi_framework_max_auth_errors_to_blacklist" />
|
||||
<java-symbol type="integer" name="config_wifi_framework_network_black_list_min_time_milli" />
|
||||
<java-symbol type="integer" name="config_bluetooth_max_advertisers" />
|
||||
<java-symbol type="integer" name="config_bluetooth_max_scan_filters" />
|
||||
<java-symbol type="integer" name="config_cursorWindowSize" />
|
||||
|
||||
@@ -106,6 +106,12 @@ public class ScanResult implements Parcelable {
|
||||
*/
|
||||
public int autoJoinStatus;
|
||||
|
||||
/**
|
||||
* num IP configuration failures
|
||||
* @hide
|
||||
*/
|
||||
public int numIpConfigFailures;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Last time we blacklisted the ScanResult
|
||||
@@ -256,6 +262,7 @@ public class ScanResult implements Parcelable {
|
||||
untrusted = source.untrusted;
|
||||
numConnection = source.numConnection;
|
||||
numUsage = source.numUsage;
|
||||
numIpConfigFailures = source.numIpConfigFailures;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,6 +327,7 @@ public class ScanResult implements Parcelable {
|
||||
dest.writeInt(untrusted ? 1 : 0);
|
||||
dest.writeInt(numConnection);
|
||||
dest.writeInt(numUsage);
|
||||
dest.writeInt(numIpConfigFailures);
|
||||
if (informationElements != null) {
|
||||
dest.writeInt(informationElements.length);
|
||||
for (int i = 0; i < informationElements.length; i++) {
|
||||
@@ -355,6 +363,7 @@ public class ScanResult implements Parcelable {
|
||||
sr.untrusted = in.readInt() != 0;
|
||||
sr.numConnection = in.readInt();
|
||||
sr.numUsage = in.readInt();
|
||||
sr.numIpConfigFailures = in.readInt();
|
||||
int n = in.readInt();
|
||||
if (n != 0) {
|
||||
sr.informationElements = new InformationElement[n];
|
||||
|
||||
@@ -202,6 +202,12 @@ public class WifiConfiguration implements Parcelable {
|
||||
*/
|
||||
public int status;
|
||||
|
||||
/**
|
||||
* The configuration needs to be written to networkHistory.txt
|
||||
* @hide
|
||||
*/
|
||||
public boolean dirty;
|
||||
|
||||
/**
|
||||
* The code referring to a reason for disabling the network
|
||||
* Valid when {@link #status} == Status.DISABLED
|
||||
@@ -619,6 +625,18 @@ public class WifiConfiguration implements Parcelable {
|
||||
*/
|
||||
public int numConnectionFailures;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Number of IP config failures
|
||||
*/
|
||||
public int numIpConfigFailures;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Number of Auth failures
|
||||
*/
|
||||
public int numAuthFailures;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Last time we blacklisted the configuration
|
||||
@@ -884,7 +902,10 @@ public class WifiConfiguration implements Parcelable {
|
||||
} else if (status > autoJoinStatus) {
|
||||
blackListTimestamp = System.currentTimeMillis();
|
||||
}
|
||||
autoJoinStatus = status;
|
||||
if (status != autoJoinStatus) {
|
||||
autoJoinStatus = status;
|
||||
dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -893,7 +914,7 @@ public class WifiConfiguration implements Parcelable {
|
||||
if (this.status == WifiConfiguration.Status.CURRENT) {
|
||||
sbuf.append("* ");
|
||||
} else if (this.status == WifiConfiguration.Status.DISABLED) {
|
||||
sbuf.append("- DSBLE: ").append(this.disableReason).append(" ");
|
||||
sbuf.append("- DSBLE");
|
||||
}
|
||||
sbuf.append("ID: ").append(this.networkId).append(" SSID: ").append(this.SSID).
|
||||
append(" BSSID: ").append(this.BSSID).append(" FQDN: ").append(this.FQDN).
|
||||
@@ -902,8 +923,20 @@ public class WifiConfiguration implements Parcelable {
|
||||
if (this.numConnectionFailures > 0) {
|
||||
sbuf.append(" numConnectFailures ").append(this.numConnectionFailures).append("\n");
|
||||
}
|
||||
if (this.numIpConfigFailures > 0) {
|
||||
sbuf.append(" numIpConfigFailures ").append(this.numIpConfigFailures).append("\n");
|
||||
}
|
||||
if (this.numAuthFailures > 0) {
|
||||
sbuf.append(" numAuthFailures ").append(this.numAuthFailures).append("\n");
|
||||
}
|
||||
if (this.autoJoinStatus > 0) {
|
||||
sbuf.append(" autoJoinStatus ").append(this.numConnectionFailures).append("\n");
|
||||
sbuf.append(" autoJoinStatus ").append(this.autoJoinStatus).append("\n");
|
||||
}
|
||||
if (this.disableReason > 0) {
|
||||
sbuf.append(" disableReason ").append(this.disableReason).append("\n");
|
||||
}
|
||||
if (this.numAssociation > 0) {
|
||||
sbuf.append(" numAssociation ").append(this.numAssociation).append("\n");
|
||||
}
|
||||
if (this.didSelfAdd) sbuf.append(" didSelfAdd");
|
||||
if (this.selfAdded) sbuf.append(" selfAdded");
|
||||
@@ -1028,10 +1061,17 @@ public class WifiConfiguration implements Parcelable {
|
||||
}
|
||||
}
|
||||
if (this.scanResultCache != null) {
|
||||
sbuf.append("scan cache: ");
|
||||
sbuf.append("Scan Cache: ");
|
||||
for(ScanResult result : this.scanResultCache.values()) {
|
||||
sbuf.append("{").append(result.BSSID).append(",").append(result.frequency);
|
||||
sbuf.append(",").append(result.level).append(",st=");
|
||||
sbuf.append(",").append(result.level);
|
||||
if (result.autoJoinStatus > 0) {
|
||||
sbuf.append(",st=").append(result.autoJoinStatus);
|
||||
}
|
||||
if (result.numIpConfigFailures > 0) {
|
||||
sbuf.append(",ipfail=");
|
||||
sbuf.append(result.numIpConfigFailures);
|
||||
}
|
||||
sbuf.append(result.autoJoinStatus).append("} ");
|
||||
}
|
||||
sbuf.append('\n');
|
||||
@@ -1356,6 +1396,8 @@ public class WifiConfiguration implements Parcelable {
|
||||
lastDisconnected = source.lastDisconnected;
|
||||
lastConnectionFailure = source.lastConnectionFailure;
|
||||
numConnectionFailures = source.numConnectionFailures;
|
||||
numIpConfigFailures = source.numIpConfigFailures;
|
||||
numAuthFailures = source.numAuthFailures;
|
||||
numScorerOverride = source.numScorerOverride;
|
||||
numScorerOverrideAndSwitchedNetwork = source.numScorerOverrideAndSwitchedNetwork;
|
||||
numAssociation = source.numAssociation;
|
||||
@@ -1370,6 +1412,7 @@ public class WifiConfiguration implements Parcelable {
|
||||
autoJoinUseAggressiveJoinAttemptThreshold
|
||||
= source.autoJoinUseAggressiveJoinAttemptThreshold;
|
||||
autoJoinBailedDueToLowRssi = source.autoJoinBailedDueToLowRssi;
|
||||
dirty = source.dirty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1420,6 +1463,8 @@ public class WifiConfiguration implements Parcelable {
|
||||
dest.writeLong(blackListTimestamp);
|
||||
dest.writeLong(lastConnectionFailure);
|
||||
dest.writeInt(numConnectionFailures);
|
||||
dest.writeInt(numIpConfigFailures);
|
||||
dest.writeInt(numAuthFailures);
|
||||
dest.writeInt(numScorerOverride);
|
||||
dest.writeInt(numScorerOverrideAndSwitchedNetwork);
|
||||
dest.writeInt(numAssociation);
|
||||
@@ -1478,6 +1523,8 @@ public class WifiConfiguration implements Parcelable {
|
||||
config.blackListTimestamp = in.readLong();
|
||||
config.lastConnectionFailure = in.readLong();
|
||||
config.numConnectionFailures = in.readInt();
|
||||
config.numIpConfigFailures = in.readInt();
|
||||
config.numAuthFailures = in.readInt();
|
||||
config.numScorerOverride = in.readInt();
|
||||
config.numScorerOverrideAndSwitchedNetwork = in.readInt();
|
||||
config.numAssociation = in.readInt();
|
||||
|
||||
Reference in New Issue
Block a user