btsnd_hcic_switch_role(remote_bd_addr, new_role);
p->switch_role_state = BTM_ACL_SWKEY_STATE_IN_PROGRESS;
-#if (BTM_DISC_DURING_RS == TRUE)
if (p_dev_rec) p_dev_rec->rs_disc_pending = BTM_SEC_RS_PENDING;
-#endif
}
}
}
btsnd_hcic_switch_role(p->remote_addr, (uint8_t)!p->link_role);
-#if (BTM_DISC_DURING_RS == TRUE)
p_dev_rec = btm_find_dev(p->remote_addr);
if (p_dev_rec != NULL) p_dev_rec->rs_disc_pending = BTM_SEC_RS_PENDING;
-#endif
}
/* Finished enabling Encryption after role switch */
"%s: Role Switch Event: new_role 0x%02x, HCI Status 0x%02x, rs_st:%d",
__func__, new_role, hci_status, p->switch_role_state);
-#if (BTM_DISC_DURING_RS == TRUE)
/* If a disconnect is pending, issue it now that role switch has completed
*/
p_dev_rec = btm_find_dev(p->remote_addr);
PTR_TO_UINT(p_dev_rec), p_dev_rec->rs_disc_pending);
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
}
-#endif
}
}
__func__, bd_addr.ToString().c_str(), p_switch_role->role,
p_switch_role->hci_status, p_acl->switch_role_state);
-#if (BTM_DISC_DURING_RS == TRUE)
/* If a disconnect is pending, issue it now that role switch has completed */
tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
if (p_dev_rec != nullptr) {
bd_addr.ToString().c_str(), p_dev_rec->rs_disc_pending);
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
}
-#endif
}
/*******************************************************************************
tBTM_STATUS status = BTM_SUCCESS;
BTM_TRACE_DEBUG("btm_remove_acl");
-#if (BTM_DISC_DURING_RS == TRUE)
tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
/* Role Switch is pending, postpone until completed */
if (p_dev_rec && (p_dev_rec->rs_disc_pending == BTM_SEC_RS_PENDING)) {
p_dev_rec->rs_disc_pending = BTM_SEC_DISC_PENDING;
} else /* otherwise can disconnect right away */
-#endif
{
if (hci_handle != HCI_INVALID_HANDLE && p_dev_rec &&
p_dev_rec->sec_state != BTM_SEC_STATE_DISCONNECTING) {
{
if (p->switch_role_state == BTM_ACL_SWKEY_STATE_MODE_CHANGE) {
p->switch_role_state = BTM_ACL_SWKEY_STATE_IN_PROGRESS;
-#if (BTM_DISC_DURING_RS == TRUE)
if (p_dev_rec) p_dev_rec->rs_disc_pending = BTM_SEC_RS_PENDING;
-#endif
btsnd_hcic_switch_role(p->remote_addr, (uint8_t)!p->link_role);
}
}
btm_sec_change_pairing_state(BTM_PAIR_STATE_IDLE);
}
}
-#if (BTM_DISC_DURING_RS == TRUE)
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
-#endif
return;
} else {
l2cu_update_lcb_4_bonding(p_dev_rec->bd_addr, true);
p_dev_rec->device_type |= BT_DEVICE_TYPE_BREDR;
-#if (BTM_DISC_DURING_RS == TRUE)
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
-#endif
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
-#if (BTM_DISC_DURING_RS == TRUE)
LOG_INFO("%s clearing pending flag handle:%d reason:%d", __func__, handle,
reason);
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
-#endif
/* clear unused flags */
p_dev_rec->sm4 &= BTM_SM4_TRUE;