sm:: avoid HCI_EVENT_IS_COMMAND_COMPLETE macro

This commit is contained in:
Matthias Ringwald 2022-05-09 21:15:49 +02:00
parent f8c25d5489
commit f78112560a

View File

@ -3942,7 +3942,7 @@ static void sm_event_packet_handler (uint8_t packet_type, uint16_t channel, uint
break;
case HCI_EVENT_COMMAND_COMPLETE:
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_bd_addr)) {
if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_BD_ADDR) {
// set local addr for le device db
reverse_bd_addr(&packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE + 1], addr);
le_device_db_set_local_bd_addr(addr);