From 636c07d9a9a6e48197706bd9724e5d5db4e2fe9d Mon Sep 17 00:00:00 2001 From: Rebecca Silberstein Date: Thu, 21 Apr 2016 15:50:34 -0700 Subject: [PATCH] Tethering: interface updates can be handled again When reloading wifi firmware, unsolicited responses from netd were processed after softap had started and caused wifi tethering to be torn down. The NetworkManagementServer.wifiFirmwareReload call has been changed to not only block for the command to finish, but also until all unsolicited messages (interface updates) have been handled. We should now be able to handle interface updates in tethering without suffering from the softap bringup/interface down notification race condition. BUG: 27857665 Change-Id: Ie57cb8f760781b3227df575b577b33667070d63e --- .../core/java/com/android/server/connectivity/Tethering.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java index 79b5978998c4c..c2022d5008d8f 100644 --- a/services/core/java/com/android/server/connectivity/Tethering.java +++ b/services/core/java/com/android/server/connectivity/Tethering.java @@ -273,9 +273,6 @@ public class Tethering extends BaseNetworkObserver { // ignore usb0 down after enabling RNDIS // we will handle disconnect in interfaceRemoved instead if (VDBG) Log.d(TAG, "ignore interface down for " + iface); - } else if (isWifi(iface)) { - // handle disconnect in interfaceRemoved - if (VDBG) Log.d(TAG, "ignore interface down for " + iface); } else if (sm != null) { sm.sendMessage(TetherInterfaceSM.CMD_INTERFACE_DOWN); mIfaces.remove(iface);