Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2e18480 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Jakub Pawlowski
Browse files

btsnoop: Fix ISO handling

Sponsor: jpawlowski@
Tag: #feature
Bug: 150670922
Test: manually verified content of btsnoop log
Change-Id: Ie5cac9c189acf808761ac4213c8eadb497fdb531
parent 5fbd3c70
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -120,6 +120,10 @@ static size_t btsnoop_calculate_packet_length(uint16_t type,
      return len_hci_acl < length ? len_hci_acl : length;
    }

    case BT_EVT_TO_LM_HCI_ISO:
    case BT_EVT_TO_BTU_HCI_ISO:
      return length;

    case BT_EVT_TO_LM_HCI_SCO:
    case BT_EVT_TO_BTU_HCI_SCO:
      // We're not logging SCO packets at this time since they are not currently
+5 −0
Original line number Diff line number Diff line
@@ -57,6 +57,11 @@ void btsnoop_mem_capture(const BT_HDR* packet, uint64_t timestamp_us) {
    case BT_EVT_TO_BTU_HCI_SCO:
      if (packet->len > 2) length = data[2] + 3;
      break;

    case BT_EVT_TO_LM_HCI_ISO:
    case BT_EVT_TO_BTU_HCI_ISO:
      if (packet->len > 3) length = (data[2] | ((data[3] & 0x3f) << 8)) + 4;
      break;
  }

  if (length && data_callback)