Skip to content

Commit

Permalink
shared/btsnoop: Add proper identifiers for ISO packets
Browse files Browse the repository at this point in the history
This adds ISO packets identifiers so they are properly stored on files.
  • Loading branch information
Vudentz committed Mar 22, 2024
1 parent 97fa252 commit 9250929
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/shared/btsnoop.c
Expand Up @@ -305,6 +305,9 @@ static uint32_t get_flags_from_opcode(uint16_t opcode)
case BTSNOOP_OPCODE_SCO_TX_PKT:
case BTSNOOP_OPCODE_SCO_RX_PKT:
break;
case BTSNOOP_OPCODE_ISO_TX_PKT:
case BTSNOOP_OPCODE_ISO_RX_PKT:
break;
case BTSNOOP_OPCODE_OPEN_INDEX:
case BTSNOOP_OPCODE_CLOSE_INDEX:
break;
Expand Down Expand Up @@ -428,6 +431,14 @@ static bool pklg_read_hci(struct btsnoop *btsnoop, struct timeval *tv,
*index = 0x0000;
*opcode = BTSNOOP_OPCODE_SCO_RX_PKT;
break;
case 0x12:
*index = 0x0000;
*opcode = BTSNOOP_OPCODE_ISO_TX_PKT;
break;
case 0x13:
*index = 0x0000;
*opcode = BTSNOOP_OPCODE_ISO_RX_PKT;
break;
case 0x0b:
*index = 0x0000;
*opcode = BTSNOOP_OPCODE_VENDOR_DIAG;
Expand Down Expand Up @@ -470,6 +481,11 @@ static uint16_t get_opcode_from_flags(uint8_t type, uint32_t flags)
return BTSNOOP_OPCODE_SCO_TX_PKT;
case 0x04:
return BTSNOOP_OPCODE_EVENT_PKT;
case 0x05:
if (flags & 0x01)
return BTSNOOP_OPCODE_ISO_RX_PKT;
else
return BTSNOOP_OPCODE_ISO_TX_PKT;
case 0xff:
if (flags & 0x02) {
if (flags & 0x01)
Expand Down

0 comments on commit 9250929

Please sign in to comment.