Skip to content

Commit d8e0831

Browse files
isheriffAndroid (Google) Code Review
authored andcommitted
Merge "Recover immediately from driver hang" into jb-dev
2 parents a5ab608 + b678320 commit d8e0831

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wifi/java/android/net/wifi/WifiStateMachine.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,15 +2814,15 @@ public boolean processMessage(Message message) {
28142814
break;
28152815
case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT:
28162816
SupplicantState state = handleSupplicantStateChange(message);
2817-
// Due to a WEXT bug, during the time of driver start/stop
2818-
// we can go into a driver stopped state in an unexpected way.
2819-
// The sequence eventually puts interface
2820-
// up and we should be back to a connected state
2817+
// A driver/firmware hang can now put the interface in a down state.
2818+
// We detect the interface going down and recover from it
28212819
if (!SupplicantState.isDriverActive(state)) {
28222820
if (mNetworkInfo.getState() != NetworkInfo.State.DISCONNECTED) {
28232821
handleNetworkDisconnect();
28242822
}
2823+
log("Detected an interface down, restart driver");
28252824
transitionTo(mDriverStoppedState);
2825+
sendMessage(CMD_START_DRIVER);
28262826
break;
28272827
}
28282828

0 commit comments

Comments
 (0)