From 13fcc5ca3e6bae47b516d1a6444bfc1d3466c574 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 28 Oct 2015 21:14:31 +0200 Subject: [PATCH] Bluetooth: Make ACL/HCI user data private to hci_core.c Change-Id: I85ccbfd2d844195bffcc6dd3d6490808569ca129 Signed-off-by: Johan Hedberg --- net/bluetooth/hci_core.c | 17 +++++++++++++++++ net/bluetooth/hci_core.h | 18 ------------------ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 11f3af0d305..1b7c217ebf2 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -54,6 +54,23 @@ struct bt_dev bt_dev; static bt_le_scan_cb_t *scan_dev_found_cb; +struct bt_hci_data { + /** The command OpCode that the buffer contains */ + uint16_t opcode; + + /** Used by bt_hci_cmd_send_sync. Initially contains the waiting + * semaphore, as the semaphore is given back contains the bt_buf + * for the return parameters. + */ + void *sync; + +}; + +struct bt_acl_data { + /** ACL connection handle */ + uint16_t handle; +}; + #define bt_hci(buf) ((struct bt_hci_data *)net_buf_user_data(buf)) #define bt_acl(buf) ((struct bt_acl_data *)net_buf_user_data(buf)) diff --git a/net/bluetooth/hci_core.h b/net/bluetooth/hci_core.h index 0f7355ae46d..231c3194e11 100644 --- a/net/bluetooth/hci_core.h +++ b/net/bluetooth/hci_core.h @@ -176,8 +176,6 @@ const char *bt_addr_le_str(const bt_addr_le_t *addr); int bt_le_scan_update(void); -/* Buffer handling */ - /** @def BT_BUF_MAX_DATA * @brief Maximum amount of data that can fit in a buffer. * @@ -188,19 +186,3 @@ int bt_le_scan_update(void); * mark. */ #define BT_BUF_MAX_DATA 74 - -struct bt_hci_data { - /** The command OpCode that the buffer contains */ - uint16_t opcode; - - /** Used by bt_hci_cmd_send_sync. Initially contains the waiting - * semaphore, as the semaphore is given back contains the bt_buf - * for the return parameters. - */ - void *sync; - -}; -struct bt_acl_data { - /** ACL connection handle */ - uint16_t handle; -};