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

Commit 3b4159f5 authored by Alice Kuo's avatar Alice Kuo Committed by Automerger Merge Worker
Browse files

Merge "Fix the incorrect total length for the configure data path command" am: f58beb85

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1976946

Change-Id: I1cfd2fba8889ee94bd8da9ad8c84100bf3e35a7f
parents 56b1af5f f58beb85
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -421,6 +421,8 @@ void bte_main_hci_send(BT_HDR* p_msg, uint16_t event);
#define HCI_WRITE_IAC_LAP_LAP_OFF 1
/* Write Current IAC LAP */

#define HCIC_PARAM_SIZE_CONFIGURE_DATA_PATH 3

/*******************************************************************************
 * BLE Commands
 *      Note: "local_controller_id" is for transport, not counted in HCI
@@ -1880,11 +1882,11 @@ void btsnd_hcic_configure_data_path(uint8_t data_path_direction,
  BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
  uint8_t* pp = (uint8_t*)(p + 1);
  uint8_t size = static_cast<uint8_t>(vendor_config.size());
  p->len = HCIC_PREAMBLE_SIZE + 3 + size;
  p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_CONFIGURE_DATA_PATH + size;
  p->offset = 0;

  UINT16_TO_STREAM(pp, HCI_CONFIGURE_DATA_PATH);
  UINT8_TO_STREAM(pp, p->len);
  UINT8_TO_STREAM(pp, HCIC_PARAM_SIZE_CONFIGURE_DATA_PATH + size);
  UINT8_TO_STREAM(pp, data_path_direction);
  UINT8_TO_STREAM(pp, data_path_id);
  UINT8_TO_STREAM(pp, vendor_config.size());