diff options
author | Deepthi Gowri <deepthi@codeaurora.org> | 2013-03-06 16:22:46 +0530 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2013-05-09 00:15:33 +0000 |
commit | 975b788dab020335e81fd7a9da09c8889a0bd1b1 (patch) | |
tree | 2663a04e5db8c524ab85797b1d712d6a3776c739 | |
parent | cd1de3940d9c389b6e69a7040c67d3abb8458ad2 (diff) | |
download | frameworks_base-975b788dab020335e81fd7a9da09c8889a0bd1b1.zip frameworks_base-975b788dab020335e81fd7a9da09c8889a0bd1b1.tar.gz frameworks_base-975b788dab020335e81fd7a9da09c8889a0bd1b1.tar.bz2 |
frameworks/base:Fix for P2P GO beaconing when 4-way Handshake fails.
Fix for P2P GO beaconing when 4-way Handshake fails by setting
p2p_group_idle timeout of 10 sec when group is started as a GO
and clear it when AP_STA_CONNECTED event is received.
Change-Id: I40189efc31eeb55e01a95a2a8e9c1a95d929952d
bug: 8871100
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
-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 532148e..3325b2b 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1312,6 +1312,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); @@ -1507,6 +1512,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 (mSavedProvDiscDevice != null && deviceAddress.equals(mSavedProvDiscDevice.deviceAddress)) { |