diff options
| author | 2013-05-10 15:26:30 -0700 | |
|---|---|---|
| committer | 2013-05-10 17:03:26 -0700 | |
| commit | c77e2d74eef530c873cb5d9d37f5301326015b6e (patch) | |
| tree | 97929d91610373a91f83de6d1138d55f91bcca4f | |
| parent | 9766caedf0657615f739d4e441ab9f2fa71aa709 (diff) | |
Fix for P2P GO beaconing when 4way Handshake fails
bug:8871100
Change-Id: I01276f13bfdd4bc23771414935d2a370223bf4fa
| -rw-r--r-- | wifi/java/android/net/wifi/p2p/WifiP2pService.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index 447ddb040164..0f7c84fd6e90 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1351,6 +1351,11 @@ public class WifiP2pService extends IWifiP2pManager.Stub { * TODO: Verify multi-channel scenarios and supplicant behavior are * better before adding a time out in future */ + //Set group idle timeout of 10 sec, to avoid GO beaconing incase of any + //failure during 4-way Handshake. + if (!mAutonomousGroup) { + mWifiNative.setP2pGroupIdle(mGroup.getInterface(), GROUP_IDLE_TIME_S); + } startDhcpServer(mGroup.getInterface()); } else { mWifiNative.setP2pGroupIdle(mGroup.getInterface(), GROUP_IDLE_TIME_S); @@ -1552,6 +1557,8 @@ public class WifiP2pService extends IWifiP2pManager.Stub { case WifiMonitor.AP_STA_CONNECTED_EVENT: WifiP2pDevice device = (WifiP2pDevice) message.obj; String deviceAddress = device.deviceAddress; + // Clear timeout that was set when group was started. + mWifiNative.setP2pGroupIdle(mGroup.getInterface(), 0); if (deviceAddress != null) { if (mPeers.get(deviceAddress) != null) { mGroup.addClient(mPeers.get(deviceAddress)); |