summaryrefslogtreecommitdiffstats
path: root/wifi/java/android/net/wifi/p2p
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-05-10 15:26:30 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2013-05-10 17:03:26 -0700
commitc77e2d74eef530c873cb5d9d37f5301326015b6e (patch)
tree97929d91610373a91f83de6d1138d55f91bcca4f /wifi/java/android/net/wifi/p2p
parent9766caedf0657615f739d4e441ab9f2fa71aa709 (diff)
downloadframeworks_base-c77e2d74eef530c873cb5d9d37f5301326015b6e.zip
frameworks_base-c77e2d74eef530c873cb5d9d37f5301326015b6e.tar.gz
frameworks_base-c77e2d74eef530c873cb5d9d37f5301326015b6e.tar.bz2
Fix for P2P GO beaconing when 4way Handshake fails
bug:8871100 Change-Id: I01276f13bfdd4bc23771414935d2a370223bf4fa
Diffstat (limited to 'wifi/java/android/net/wifi/p2p')
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pService.java7
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 447ddb0..0f7c84f 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));