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

Commit 84e66b87 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:...

Merge "Fix the incorrect total length for the configure data path command" am: f58beb85 am: 3b4159f5 am: 9264e92b am: 6fea1047

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

Change-Id: Ic39026cdc6a320c6279de78364ecac241f48ea52
parents 90f191f1 6fea1047
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());