summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-05-10 16:16:30 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-10 16:16:30 -0700
commit1483631c2f1fdacafd5b1c5c8c73721e21e2174b (patch)
tree2365f8809cd10269293d9ecae55f8dade41f4115 /wifi
parent9926960d13cc98aa5f02b652fc3f132166d08895 (diff)
parenta62fbd31b38d95817ebd65118e4c7ef2d82bc2ee (diff)
downloadframeworks_base-1483631c2f1fdacafd5b1c5c8c73721e21e2174b.zip
frameworks_base-1483631c2f1fdacafd5b1c5c8c73721e21e2174b.tar.gz
frameworks_base-1483631c2f1fdacafd5b1c5c8c73721e21e2174b.tar.bz2
am a62fbd31: am 408ad99d: Merge "frameworks/base:Fix for P2P GO beaconing when 4-way Handshake fails."
* commit 'a62fbd31b38d95817ebd65118e4c7ef2d82bc2ee': frameworks/base:Fix for P2P GO beaconing when 4-way Handshake fails.
Diffstat (limited to 'wifi')
-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));