summaryrefslogtreecommitdiff
path: root/com/android/server/wifi
diff options
context:
space:
mode:
Diffstat (limited to 'com/android/server/wifi')
-rw-r--r--com/android/server/wifi/SelfRecovery.java2
-rw-r--r--com/android/server/wifi/WifiNative.java9
-rw-r--r--com/android/server/wifi/WifiStateMachine.java5
-rw-r--r--com/android/server/wifi/WifiStateMachinePrime.java3
-rw-r--r--com/android/server/wifi/WificondControl.java9
-rw-r--r--com/android/server/wifi/scanner/WificondScannerImpl.java16
-rw-r--r--com/android/server/wifi/util/InformationElementUtil.java4
7 files changed, 19 insertions, 29 deletions
diff --git a/com/android/server/wifi/SelfRecovery.java b/com/android/server/wifi/SelfRecovery.java
index e39e0d5b..21a3e0ac 100644
--- a/com/android/server/wifi/SelfRecovery.java
+++ b/com/android/server/wifi/SelfRecovery.java
@@ -72,7 +72,7 @@ public class SelfRecovery {
Log.e(TAG, "Invalid trigger reason. Ignoring...");
return;
}
- Log.e(TAG, "Triggering recovery for reason: " + REASON_STRINGS[reason]);
+ Log.wtf(TAG, "Triggering recovery for reason: " + REASON_STRINGS[reason]);
if (reason == REASON_WIFICOND_CRASH || reason == REASON_HAL_CRASH) {
trimPastRestartTimes();
// Ensure there haven't been too many restarts within MAX_RESTARTS_TIME_WINDOW
diff --git a/com/android/server/wifi/WifiNative.java b/com/android/server/wifi/WifiNative.java
index 35dec2e7..0b1719db 100644
--- a/com/android/server/wifi/WifiNative.java
+++ b/com/android/server/wifi/WifiNative.java
@@ -16,7 +16,6 @@
package com.android.server.wifi;
-import android.annotation.NonNull;
import android.annotation.Nullable;
import android.net.apf.ApfCapabilities;
import android.net.wifi.IApInterface;
@@ -110,12 +109,12 @@ public class WifiNative {
* @return Pair of <Integer, IClientInterface> to indicate the status and the associated wificond
* client interface binder handler (will be null on failure).
*/
- public Pair<Integer, IClientInterface> setupForClientMode(@NonNull String ifaceName) {
+ public Pair<Integer, IClientInterface> setupForClientMode() {
if (!startHalIfNecessary(true)) {
Log.e(mTAG, "Failed to start HAL for client mode");
return Pair.create(SETUP_FAILURE_HAL, null);
}
- IClientInterface iClientInterface = mWificondControl.setupDriverForClientMode(ifaceName);
+ IClientInterface iClientInterface = mWificondControl.setupDriverForClientMode();
if (iClientInterface == null) {
return Pair.create(SETUP_FAILURE_WIFICOND, null);
}
@@ -131,12 +130,12 @@ public class WifiNative {
* @return Pair of <Integer, IApInterface> to indicate the status and the associated wificond
* AP interface binder handler (will be null on failure).
*/
- public Pair<Integer, IApInterface> setupForSoftApMode(@NonNull String ifaceName) {
+ public Pair<Integer, IApInterface> setupForSoftApMode() {
if (!startHalIfNecessary(false)) {
Log.e(mTAG, "Failed to start HAL for AP mode");
return Pair.create(SETUP_FAILURE_HAL, null);
}
- IApInterface iApInterface = mWificondControl.setupDriverForSoftApMode(ifaceName);
+ IApInterface iApInterface = mWificondControl.setupDriverForSoftApMode();
if (iApInterface == null) {
return Pair.create(SETUP_FAILURE_WIFICOND, null);
}
diff --git a/com/android/server/wifi/WifiStateMachine.java b/com/android/server/wifi/WifiStateMachine.java
index 0c2cc32f..1f6cada7 100644
--- a/com/android/server/wifi/WifiStateMachine.java
+++ b/com/android/server/wifi/WifiStateMachine.java
@@ -4165,7 +4165,7 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss
switch (message.what) {
case CMD_START_SUPPLICANT:
Pair<Integer, IClientInterface> statusAndInterface =
- mWifiNative.setupForClientMode(mInterfaceName);
+ mWifiNative.setupForClientMode();
if (statusAndInterface.first == WifiNative.SETUP_SUCCESS) {
mClientInterface = statusAndInterface.second;
} else {
@@ -6954,8 +6954,7 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss
mMode = config.getTargetMode();
IApInterface apInterface = null;
- Pair<Integer, IApInterface> statusAndInterface =
- mWifiNative.setupForSoftApMode(mInterfaceName);
+ Pair<Integer, IApInterface> statusAndInterface = mWifiNative.setupForSoftApMode();
if (statusAndInterface.first == WifiNative.SETUP_SUCCESS) {
apInterface = statusAndInterface.second;
} else {
diff --git a/com/android/server/wifi/WifiStateMachinePrime.java b/com/android/server/wifi/WifiStateMachinePrime.java
index cd1948f1..20068849 100644
--- a/com/android/server/wifi/WifiStateMachinePrime.java
+++ b/com/android/server/wifi/WifiStateMachinePrime.java
@@ -290,8 +290,7 @@ public class WifiStateMachinePrime {
}
try {
- mApInterface = mWificond.createApInterface(
- mWifiInjector.getWifiNative().getInterfaceName());
+ mApInterface = mWificond.createApInterface();
} catch (RemoteException e1) { }
if (mApInterface == null) {
diff --git a/com/android/server/wifi/WificondControl.java b/com/android/server/wifi/WificondControl.java
index df4e785b..b6104a8c 100644
--- a/com/android/server/wifi/WificondControl.java
+++ b/com/android/server/wifi/WificondControl.java
@@ -16,7 +16,6 @@
package com.android.server.wifi;
-import android.annotation.NonNull;
import android.net.wifi.IApInterface;
import android.net.wifi.IClientInterface;
import android.net.wifi.IPnoScanEvent;
@@ -134,7 +133,7 @@ public class WificondControl {
* @return An IClientInterface as wificond client interface binder handler.
* Returns null on failure.
*/
- public IClientInterface setupDriverForClientMode(@NonNull String ifaceName) {
+ public IClientInterface setupDriverForClientMode() {
Log.d(TAG, "Setting up driver for client mode");
mWificond = mWifiInjector.makeWificond();
if (mWificond == null) {
@@ -144,7 +143,7 @@ public class WificondControl {
IClientInterface clientInterface = null;
try {
- clientInterface = mWificond.createClientInterface(ifaceName);
+ clientInterface = mWificond.createClientInterface();
} catch (RemoteException e1) {
Log.e(TAG, "Failed to get IClientInterface due to remote exception");
return null;
@@ -182,7 +181,7 @@ public class WificondControl {
* @return An IApInterface as wificond Ap interface binder handler.
* Returns null on failure.
*/
- public IApInterface setupDriverForSoftApMode(@NonNull String ifaceName) {
+ public IApInterface setupDriverForSoftApMode() {
Log.d(TAG, "Setting up driver for soft ap mode");
mWificond = mWifiInjector.makeWificond();
if (mWificond == null) {
@@ -192,7 +191,7 @@ public class WificondControl {
IApInterface apInterface = null;
try {
- apInterface = mWificond.createApInterface(ifaceName);
+ apInterface = mWificond.createApInterface();
} catch (RemoteException e1) {
Log.e(TAG, "Failed to get IApInterface due to remote exception");
return null;
diff --git a/com/android/server/wifi/scanner/WificondScannerImpl.java b/com/android/server/wifi/scanner/WificondScannerImpl.java
index 10fc8e3e..fb878e67 100644
--- a/com/android/server/wifi/scanner/WificondScannerImpl.java
+++ b/com/android/server/wifi/scanner/WificondScannerImpl.java
@@ -167,12 +167,12 @@ public class WificondScannerImpl extends WifiScannerImpl implements Handler.Call
+ ",eventHandler=" + eventHandler);
return false;
}
+ if (mPendingSingleScanSettings != null
+ || (mLastScanSettings != null && mLastScanSettings.singleScanActive)) {
+ Log.w(TAG, "A single scan is already running");
+ return false;
+ }
synchronized (mSettingsLock) {
- if (mPendingSingleScanSettings != null
- || (mLastScanSettings != null && mLastScanSettings.singleScanActive)) {
- Log.w(TAG, "A single scan is already running");
- return false;
- }
mPendingSingleScanSettings = settings;
mPendingSingleScanEventHandler = eventHandler;
processPendingScans();
@@ -518,10 +518,8 @@ public class WificondScannerImpl extends WifiScannerImpl implements Handler.Call
}
private boolean isHwPnoScanRequired() {
- synchronized (mSettingsLock) {
- if (mPnoSettings == null) return false;
- return isHwPnoScanRequired(mPnoSettings.isConnected);
- }
+ if (mPnoSettings == null) return false;
+ return isHwPnoScanRequired(mPnoSettings.isConnected);
}
@Override
diff --git a/com/android/server/wifi/util/InformationElementUtil.java b/com/android/server/wifi/util/InformationElementUtil.java
index 14912b5f..c8f9ca34 100644
--- a/com/android/server/wifi/util/InformationElementUtil.java
+++ b/com/android/server/wifi/util/InformationElementUtil.java
@@ -247,10 +247,6 @@ public class InformationElementUtil {
"Bad Interworking element length: " + ie.bytes.length);
}
- if (ie.bytes.length == 3 || ie.bytes.length == 9) {
- int venueInfo = (int) ByteBufferReader.readInteger(data, ByteOrder.BIG_ENDIAN, 2);
- }
-
if (ie.bytes.length == 7 || ie.bytes.length == 9) {
hessid = ByteBufferReader.readInteger(data, ByteOrder.BIG_ENDIAN, 6);
}