From ce6fc8d7a49d1b246e37c4e87fd5e715e408bca2 Mon Sep 17 00:00:00 2001 From: Irfan Sheriff Date: Fri, 28 Sep 2012 16:49:50 -0700 Subject: [PATCH] Revert setting GO idle time out GO idle time out causes issues with multi-channel capable client which can take longer to connect. Use the supplicant default detection when acting as a GO. Bug: 7254008 Change-Id: I6c40081cfa83ca0ddbb764640a48c92d69e609fd --- wifi/java/android/net/wifi/p2p/WifiP2pService.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index 2e6aa8817c817..ef57e638120f4 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1231,10 +1231,17 @@ public class WifiP2pService extends IWifiP2pManager.Stub { mGroup.getNetworkName())); } - mWifiNative.setP2pGroupIdle(mGroup.getInterface(), GROUP_IDLE_TIME_S); if (mGroup.isGroupOwner()) { + /* Setting an idle time out on GO causes issues with certain scenarios + * on clients where it can be off-channel for longer and with the power + * save modes used. + * + * TODO: Verify multi-channel scenarios and supplicant behavior are + * better before adding a time out in future + */ startDhcpServer(mGroup.getInterface()); } else { + mWifiNative.setP2pGroupIdle(mGroup.getInterface(), GROUP_IDLE_TIME_S); mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine(mContext, P2pStateMachine.this, mGroup.getInterface()); mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP);