mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/btdm_fix_no_adv_packet' into 'master'
component/bt: fix no adv packets See merge request idf/esp-idf!2647
This commit is contained in:
commit
1124e073d7
@ -1948,14 +1948,6 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len, BOOLEAN enhanced)
|
||||
handle = HCID_GET_HANDLE (handle);
|
||||
|
||||
btm_ble_connected(bda, handle, HCI_ENCRYPT_MODE_DISABLED, role, bda_type, match);
|
||||
if(role == HCI_ROLE_SLAVE) {
|
||||
//clear p_cb->state, controller will stop adv when ble connected.
|
||||
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
|
||||
if(p_cb) {
|
||||
p_cb->adv_mode = BTM_BLE_ADV_DISABLE;
|
||||
p_cb->state = BTM_BLE_STOP_ADV;
|
||||
}
|
||||
}
|
||||
l2cble_conn_comp (handle, role, bda, bda_type, conn_interval,
|
||||
conn_latency, conn_timeout);
|
||||
|
||||
|
@ -261,6 +261,15 @@ void l2cble_notify_le_connection (BD_ADDR bda)
|
||||
tACL_CONN *p_acl = btm_bda_to_acl(bda, BT_TRANSPORT_LE) ;
|
||||
|
||||
if (p_lcb != NULL && p_acl != NULL && p_lcb->link_state != LST_CONNECTED) {
|
||||
|
||||
if(p_acl->link_role == HCI_ROLE_SLAVE) {
|
||||
//clear p_cb->state, controller will stop adv when ble connected.
|
||||
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
|
||||
if(p_cb) {
|
||||
p_cb->adv_mode = BTM_BLE_ADV_DISABLE;
|
||||
p_cb->state = BTM_BLE_STOP_ADV;
|
||||
}
|
||||
}
|
||||
/* update link status */
|
||||
btm_establish_continue(p_acl);
|
||||
/* update l2cap link status and send callback */
|
||||
|
Loading…
Reference in New Issue
Block a user