hci: track outgoing le extended connections

This commit is contained in:
Matthias Ringwald 2022-11-23 18:15:50 +01:00
parent 6f34e9d6d3
commit 8f7da641f0

View File

@ -7185,9 +7185,30 @@ uint8_t hci_send_cmd_packet(uint8_t *packet, int size){
break;
}
// track outgoing connection
hci_stack->outgoing_addr_type = (bd_addr_type_t) packet[8]; // peer addres type
hci_stack->outgoing_addr_type = (bd_addr_type_t) packet[8]; // peer address type
reverse_bd_addr( &packet[9], hci_stack->outgoing_addr); // peer address
break;
#ifdef ENABLE_LE_EXTENDED_ADVERTISING
case HCI_OPCODE_HCI_LE_EXTENDED_CREATE_CONNECTION:
// white list used?
initiator_filter_policy = packet[3];
switch (initiator_filter_policy) {
case 0:
// whitelist not used
hci_stack->le_connecting_state = LE_CONNECTING_DIRECT;
break;
case 1:
hci_stack->le_connecting_state = LE_CONNECTING_WHITELIST;
break;
default:
log_error("Invalid initiator_filter_policy in LE Create Connection %u", initiator_filter_policy);
break;
}
// track outgoing connection
hci_stack->outgoing_addr_type = (bd_addr_type_t) packet[5]; // peer address type
reverse_bd_addr( &packet[6], hci_stack->outgoing_addr); // peer address
break;
#endif
case HCI_OPCODE_HCI_LE_CREATE_CONNECTION_CANCEL:
hci_stack->le_connecting_state = LE_CONNECTING_CANCEL;
break;