diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-08-05 20:40:45 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2011-08-10 15:49:25 -0700 |
commit | 7244c977ecbc1f73e4cfd9d824fc2b68aa886139 (patch) | |
tree | fb3a0e47b9e8a807321a625108fa74ebc20bfdfc /wifi/java/android/net | |
parent | 260e9105d7fc7b11c26a6843658df89b98d65971 (diff) | |
download | frameworks_base-7244c977ecbc1f73e4cfd9d824fc2b68aa886139.zip frameworks_base-7244c977ecbc1f73e4cfd9d824fc2b68aa886139.tar.gz frameworks_base-7244c977ecbc1f73e4cfd9d824fc2b68aa886139.tar.bz2 |
Ensure interface down before wpa_supplicant start
Now that the driver is built into the kernel, a runtime crash
followed by a driver unload and reload does not reset the interface.
Ensure interface is down before bringing up supplicant
Bug: 5032635
Change-Id: Ib8f3d47617e587139a8a91a82146ee3a2f329700
Diffstat (limited to 'wifi/java/android/net')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 8be5363..c6f7da2 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -1911,6 +1911,17 @@ public class WifiStateMachine extends StateMachine { transitionTo(mDriverUnloadingState); break; case CMD_START_SUPPLICANT: + //A runtime crash can leave the interface up and + //this affects connectivity when supplicant starts up. + //Ensure interface is down before a supplicant start. + try { + mNwService.setInterfaceDown(mInterfaceName); + } catch (RemoteException re) { + if (DBG) Log.w(TAG, "Unable to bring down wlan interface: " + re); + } catch (IllegalStateException ie) { + if (DBG) Log.w(TAG, "Unable to bring down wlan interface: " + ie); + } + if(WifiNative.startSupplicant()) { Log.d(TAG, "Supplicant start successful"); mWifiMonitor.startMonitoring(); |