Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 975b788d authored by Deepthi Gowri's avatar Deepthi Gowri Committed by Robert Greenwalt
Browse files

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: default avatarDeepthi Gowri <deepthi@codeaurora.org>
parent cd1de394
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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)) {