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

Commit dff0bbf1 authored by Chris Manton's avatar Chris Manton
Browse files

Rename btm_dev_support_switch

=>btm_dev_support_role_switch

Streamline stack/btm/btm_dev::btm_dev_support_switch

Bug: 162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I529006c587b67c6545656febc5a5f2b1daabe186
parent 4ecdfda6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const RawAddress& bd_addr) {

/*******************************************************************************
 *
 * Function         btm_dev_support_switch
 * Function         btm_dev_support_role_switch
 *
 * Description      This function is called by the L2CAP to check if remote
 *                  device supports role switch
@@ -278,7 +278,7 @@ tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const RawAddress& bd_addr) {
 *                  for the link.
 *
 ******************************************************************************/
bool btm_dev_support_switch(const RawAddress& bd_addr) {
bool btm_dev_support_role_switch(const RawAddress& bd_addr) {
  if (BTM_IsScoActiveByBdaddr(bd_addr)) {
    BTM_TRACE_DEBUG("%s Role switch is not allowed if a SCO is up", __func__);
    return false;
+2 −2
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const RawAddress& bd_addr);

/*******************************************************************************
 *
 * Function         btm_dev_support_switch
 * Function         btm_dev_support_role_switch
 *
 * Description      This function is called by the L2CAP to check if remote
 *                  device supports role switch
@@ -113,7 +113,7 @@ tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const RawAddress& bd_addr);
 * Returns          true if device is known and role switch is supported
 *
 ******************************************************************************/
bool btm_dev_support_switch(const RawAddress& bd_addr);
bool btm_dev_support_role_switch(const RawAddress& bd_addr);

/*******************************************************************************
 *
+2 −2
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ void l2c_link_hci_conn_req(const RawAddress& bd_addr) {
    }

    if (no_links) {
      if (!btm_dev_support_switch(bd_addr))
      if (!btm_dev_support_role_switch(bd_addr))
        p_lcb->link_role = HCI_ROLE_SLAVE;
      else
        p_lcb->link_role = HCI_ROLE_MASTER;
@@ -99,7 +99,7 @@ void l2c_link_hci_conn_req(const RawAddress& bd_addr) {
   */
  if ((p_lcb->link_state == LST_CONNECTING) ||
      (p_lcb->link_state == LST_CONNECT_HOLDING)) {
    if (!btm_dev_support_switch(bd_addr))
    if (!btm_dev_support_role_switch(bd_addr))
      p_lcb->link_role = HCI_ROLE_SLAVE;
    else
      p_lcb->link_role = HCI_ROLE_MASTER;