[Replicant] [PATCH] AP mode (WiFi tethering) now works with external WiFi dongle
belgin
belginstirbu at hotmail.com
Wed Nov 25 16:52:40 UTC 2020
Signed-off-by: belgin <belginstirbu at hotmail.com>
---
service/java/com/android/server/wifi/WifiStateMachine.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 6d9c0d0..738f148 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -6128,6 +6128,14 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno
case CMD_START_AP:
if (mWifiNative.loadDriver() == false) {
loge("Failed to load driver for softap");
+
+ if (DBG) log("trying to load external wifi dongle");
+ mP2pSupported = false;
+ mWifiMonitor.killSupplicant(mP2pSupported);
+
+ setWifiApState(WIFI_AP_STATE_ENABLING, 0);
+ mDongleConnected = true;
+ transitionTo(mSoftApStartingState);
} else {
if (enableSoftAp() == true) {
setWifiApState(WIFI_AP_STATE_ENABLING, 0);
--
2.11.0
More information about the Replicant
mailing list