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

Commit f58beb85 authored by Alice Kuo's avatar Alice Kuo Committed by Gerrit Code Review
Browse files

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

parents c9574a98 ae23cabb
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());