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

Commit d6c80f29 authored by Zach Johnson's avatar Zach Johnson
Browse files

L2CAP_DESIRED_LINK_ROLE is always "master"

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idc66ef1c71ab97fccc9557d6dc670bbe23d30c3f
parent 51762924
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2922,11 +2922,11 @@ static void bta_dm_adjust_roles(bool delay_role_switch) {
    }

    if (!set_master_role) {
      L2CA_SetDesireRole(L2CAP_DESIRED_LINK_ROLE);
      L2CA_SetDesireRole(HCI_ROLE_MASTER);
    }

  } else {
    L2CA_SetDesireRole(L2CAP_DESIRED_LINK_ROLE);
    L2CA_SetDesireRole(HCI_ROLE_MASTER);
  }
}

+0 −5
Original line number Diff line number Diff line
@@ -522,11 +522,6 @@
#define L2CAP_WAKE_PARKED_LINK TRUE
#endif

/* Whether link wants to be the master or the slave. */
#ifndef L2CAP_DESIRED_LINK_ROLE
#define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_MASTER
#endif

/* Minimum number of ACL credit for high priority link */
#ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
#define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
+1 −5
Original line number Diff line number Diff line
@@ -872,11 +872,7 @@ void l2c_init(void) {
  l2cb.p_free_ccb_first = &l2cb.ccb_pool[0];
  l2cb.p_free_ccb_last = &l2cb.ccb_pool[MAX_L2CAP_CHANNELS - 1];

#ifdef L2CAP_DESIRED_LINK_ROLE
  l2cb.desire_role = L2CAP_DESIRED_LINK_ROLE;
#else
  l2cb.desire_role = HCI_ROLE_SLAVE;
#endif
  l2cb.desire_role = HCI_ROLE_MASTER;

  /* Set the default idle timeout */
  l2cb.idle_timeout = L2CAP_LINK_INACTIVITY_TOUT;