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

Commit ba4aa762 authored by Deepthi Gowri's avatar Deepthi Gowri Committed by Steve Kondik
Browse files

P2P: Do not restart SAP/P2P Go if its operating in 5G.

In case of LTE Coex since RIL always passes 2.4G channels,
if the SAP or P2P Go are operating on 5G channels when LTE
is camped, no need to restart SAP or P2P GO.

Change-Id: I5b0b5452a94bcbc0beeb44b25c34daf9e17ee482
CRs-Fixed: 531439
parent 74469274
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -745,6 +745,9 @@ public class WifiStateMachine extends StateMachine {
                         if (currentChannel >= 0 &&
                            (currentChannel < startSafeChannel ||
                             currentChannel > endSafeChannel)) {
                             //currently RIL passes only 2.4G channels so if the current operating
                             // channel is 5G channel, do not restart SAP.
                             if (currentChannel >= 1 &&  currentChannel <=14) {
                                 Log.e(TAG, "Operating on restricted channel! Restart SAP");
                                 restartSoftApIfOn();
                             }
@@ -752,6 +755,7 @@ public class WifiStateMachine extends StateMachine {
                     }
                 }
              }
           }
    };

    /*********************************************************
+8 −4
Original line number Diff line number Diff line
@@ -354,6 +354,9 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
                         if (currentChannel >= 0 &&
                              (currentChannel < startSafeChannel ||
                               currentChannel > endSafeChannel)) {
                               //currently RIL passes only 2.4G channels so if the current operating
                               //channel is 5G channel, do not restart P2P GO.
                               if (currentChannel >= 1 && currentChannel <=14) {
                                  Slog.d(TAG, "P2P GO is operating on unsafe channel! Terminate!");
                                  mP2pStateMachine.mWifiNative.p2pGroupRemove(
                                             mP2pStateMachine.mGroup.getInterface());
@@ -361,6 +364,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
                                      mP2pStateMachine.mWifiNative.p2pGroupAddOnSpecifiedFreq(
                                                       channelToFrequency(startSafeChannel));
                               }
                          }

                     }
                 }