This patch fixes bad HCI command being send instead of Read Encryption
Key Size.
Bug:
124301137
Test: pair and connect with Bluetooth headset
Change-Id: If325ef2771ca1546ae58df7c684f66ae537b8573
(cherry picked from commit
a3cc7575f9ce644a3dfceee61ab7b4b206a3982e)
BT_HDR *p = (BT_HDR *)osi_malloc(HCI_CMD_BUF_SIZE);
UINT8 *pp = (UINT8 *)(p + 1);
- p->len = HCIC_PREAMBLE_SIZE + 2;
+ p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_CMD_HANDLE;
p->offset = 0;
+ UINT16_TO_STREAM (pp, HCI_READ_ENCR_KEY_SIZE);
+ UINT8_TO_STREAM (pp, HCIC_PARAM_SIZE_CMD_HANDLE);
+
UINT16_TO_STREAM (pp, handle);
btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p);