summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorNalla Kartheek <karthe@codeaurora.org>2016-02-03 14:13:15 +0530
committerSteve Kondik <steve@cyngn.com>2016-06-24 11:28:49 -1000
commitc17a63eddba6d339cccddb65416a209e889c148c (patch)
treebfe5aa71ce73d039122a6573cd0508ad50ea0f22 /service
parentf995ef76eddb30e5c12a902453c229688d0b78a5 (diff)
downloadframeworks_opt_net_wifi-c17a63eddba6d339cccddb65416a209e889c148c.tar.gz
frameworks_opt_net_wifi-c17a63eddba6d339cccddb65416a209e889c148c.tar.bz2
frameworks_opt_net_wifi-c17a63eddba6d339cccddb65416a209e889c148c.zip
Wifi: Unblacklist the BSSIDs, if driver roams to the same again.
Auto join black list the connected BSSIDs, if driver roams away from it. This shall result in the respective BSSID getting blacklisted for the next strategy. Enhance this logic by un blacklisting such BSSID's if the driver has roamed again. This goes with our logic that - driver roaming to such BSSID again should indicate to the framework that the BSSID is the best in the network. Change-Id: I24bf6caeb9a9277db577d0870e6961609ebf7677 CRs-Fixed: 968421
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigStore.java18
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java1
2 files changed, 19 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index b8701b7..61f31f3 100644
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -1156,6 +1156,24 @@ public class WifiConfigStore extends IpConfigStore {
}
}
+ void unblackListDriverRoamedBSSID(String bssid) {
+ for (WifiConfiguration config : mConfiguredNetworks.values()) {
+ ScanDetailCache cache = getScanDetailCache(config);
+ if (cache != null) {
+ ScanResult result = cache.get(bssid);
+ if (result != null) {
+ if (result.autoJoinStatus == (ScanResult.AUTO_ROAM_DISABLED + 1)) {
+ if (DBG) {
+ Log.d(TAG,"unblacklisted driver roamed BSSID = "+result.BSSID);
+ }
+ result.setAutoJoinStatus(ScanResult.ENABLED);
+ }
+ }
+ }
+ }
+ }
+
+
void noteRoamingFailure(WifiConfiguration config, int reason) {
if (config == null) return;
config.lastRoamingFailure = System.currentTimeMillis();
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 20a549d..58e7841 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -9411,6 +9411,7 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno
if (toBSSID != null && !toBSSID.equals(mWifiInfo.getBSSID())) {
mWifiConfigStore.driverRoamedFrom(mWifiInfo);
}
+ mWifiConfigStore.unblackListDriverRoamedBSSID(toBSSID);
return NOT_HANDLED;
case WifiMonitor.NETWORK_DISCONNECTION_EVENT:
long lastRoam = 0;