From d27e1e9b14e9c074ec24cc2263876fbc198c2dd5 Mon Sep 17 00:00:00 2001 From: William San Filippo Date: Tue, 13 Dec 2016 11:45:56 -0800 Subject: [PATCH] MYNEWT-508: The ocf at the host needs to be a uint16_t. This is due to the vendor specific ocf added for multi-advertising. X-Original-Commit: 5e0f1bce52c53756a2e4547be3ed1f9e4a84b3ed --- nimble/host/src/ble_hs_hci_cmd.c | 6 +++--- nimble/host/src/ble_hs_hci_priv.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nimble/host/src/ble_hs_hci_cmd.c b/nimble/host/src/ble_hs_hci_cmd.c index 0f2d9819e..f8e7dde1c 100644 --- a/nimble/host/src/ble_hs_hci_cmd.c +++ b/nimble/host/src/ble_hs_hci_cmd.c @@ -47,7 +47,7 @@ ble_hs_hci_cmd_transport(uint8_t *cmdbuf) } void -ble_hs_hci_cmd_write_hdr(uint8_t ogf, uint8_t ocf, uint8_t len, void *buf) +ble_hs_hci_cmd_write_hdr(uint8_t ogf, uint16_t ocf, uint8_t len, void *buf) { uint16_t opcode; uint8_t *u8ptr; @@ -60,7 +60,7 @@ ble_hs_hci_cmd_write_hdr(uint8_t ogf, uint8_t ocf, uint8_t len, void *buf) } int -ble_hs_hci_cmd_send(uint8_t ogf, uint8_t ocf, uint8_t len, const void *cmddata) +ble_hs_hci_cmd_send(uint8_t ogf, uint16_t ocf, uint8_t len, const void *cmddata) { uint8_t *buf; int rc; @@ -74,7 +74,7 @@ ble_hs_hci_cmd_send(uint8_t ogf, uint8_t ocf, uint8_t len, const void *cmddata) memcpy(buf + BLE_HCI_CMD_HDR_LEN, cmddata, len); } - BLE_HS_LOG(DEBUG, "ble_hs_hci_cmd_send: ogf=0x%02x ocf=0x%02x len=%d\n", + BLE_HS_LOG(DEBUG, "ble_hs_hci_cmd_send: ogf=0x%02x ocf=0x%04x len=%d\n", ogf, ocf, len); ble_hs_log_flat_buf(buf, len + BLE_HCI_CMD_HDR_LEN); BLE_HS_LOG(DEBUG, "\n"); diff --git a/nimble/host/src/ble_hs_hci_priv.h b/nimble/host/src/ble_hs_hci_priv.h index a37973044..bdc545760 100644 --- a/nimble/host/src/ble_hs_hci_priv.h +++ b/nimble/host/src/ble_hs_hci_priv.h @@ -58,9 +58,9 @@ int ble_hs_hci_util_data_hdr_strip(struct os_mbuf *om, int ble_hs_hci_evt_process(uint8_t *data); uint16_t ble_hs_hci_util_opcode_join(uint8_t ogf, uint16_t ocf); -void ble_hs_hci_cmd_write_hdr(uint8_t ogf, uint8_t ocf, uint8_t len, +void ble_hs_hci_cmd_write_hdr(uint8_t ogf, uint16_t ocf, uint8_t len, void *buf); -int ble_hs_hci_cmd_send(uint8_t ogf, uint8_t ocf, uint8_t len, +int ble_hs_hci_cmd_send(uint8_t ogf, uint16_t ocf, uint8_t len, const void *cmddata); int ble_hs_hci_cmd_send_buf(void *cmddata); void ble_hs_hci_cmd_build_read_bd_addr(uint8_t *dst, int dst_len);