system/bt
リビジョン | cbe04cc58cbf7f9aaf20d7b0ff423e87a3e00595 (tree) |
---|---|
日時 | 2019-08-08 00:09:23 |
作者 | Jakub Pawlowski <jpawlowski@goog...> |
コミッター | Vasyl Gello |
DO NOT MERGE Send HCI Read Encryption Key properly
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)
@@ -1375,9 +1375,12 @@ BOOLEAN btsnd_hcic_read_encryption_key_size(UINT16 handle) { | ||
1375 | 1375 | BT_HDR *p = (BT_HDR *)osi_malloc(HCI_CMD_BUF_SIZE); |
1376 | 1376 | UINT8 *pp = (UINT8 *)(p + 1); |
1377 | 1377 | |
1378 | - p->len = HCIC_PREAMBLE_SIZE + 2; | |
1378 | + p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_CMD_HANDLE; | |
1379 | 1379 | p->offset = 0; |
1380 | 1380 | |
1381 | + UINT16_TO_STREAM (pp, HCI_READ_ENCR_KEY_SIZE); | |
1382 | + UINT8_TO_STREAM (pp, HCIC_PARAM_SIZE_CMD_HANDLE); | |
1383 | + | |
1381 | 1384 | UINT16_TO_STREAM (pp, handle); |
1382 | 1385 | |
1383 | 1386 | btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p); |