Skip to content

Commit dbdd8ee

Browse files
committed
Merge branch 'bugfix/a2dp_can_not_connect_after_ble_connected' into 'master'
bugfix/fix the issue that bt can not connect after ble connected Closes IDFGH-4754 and AUD-4085 See merge request espressif/esp-idf!18542
2 parents 583c836 + da44fc9 commit dbdd8ee

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

components/bt/host/bluedroid/stack/btm/btm_acl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,6 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, UINT8 bdn[BTM_MAX_REM_BD_NAME_L
347347
btm_establish_continue (p);
348348
return;
349349
}
350-
} else {
351-
/* If remote features indicated secure connection (SC) mode, check the remote feautres again*/
352-
/* this is to prevent from BIAS attack where attacker can downgrade SC mode*/
353-
btm_read_remote_features (p->hci_handle);
354350
}
355351
}
356352

components/bt/host/bluedroid/stack/btm/btm_sec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4024,7 +4024,9 @@ void btm_sec_auth_complete (UINT16 handle, UINT8 status)
40244024
return;
40254025
}
40264026

4027-
p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED;
4027+
if (!(p_dev_rec->sm4 & BTM_SM4_UPGRADE)) {
4028+
p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED;
4029+
}
40284030

40294031
if (p_dev_rec->pin_code_length >= 16 ||
40304032
p_dev_rec->link_key_type == BTM_LKEY_TYPE_AUTH_COMB ||

components/bt/host/bluedroid/stack/l2cap/l2c_link.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ BOOLEAN l2c_link_hci_conn_req (BD_ADDR bd_addr)
8787

8888
if (p_lcb_cur->in_use) {
8989
no_links = FALSE;
90-
p_lcb->link_role = HCI_ROLE_MASTER;
90+
// p_lcb->link_role = HCI_ROLE_MASTER;
91+
p_lcb->link_role = HCI_ROLE_SLAVE;
9192
break;
9293
}
9394
}

0 commit comments

Comments
 (0)