summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/api/bluetooth.rst2
-rw-r--r--drivers/bluetooth/Kconfig99
-rw-r--r--drivers/bluetooth/Makefile3
-rw-r--r--drivers/bluetooth/controller/hci/hci_driver.c10
-rw-r--r--drivers/bluetooth/hci/Kconfig98
-rw-r--r--drivers/bluetooth/hci/Makefile2
-rw-r--r--drivers/bluetooth/hci/h4.c (renamed from drivers/bluetooth/h4.c)14
-rw-r--r--drivers/bluetooth/hci/h5.c (renamed from drivers/bluetooth/h5.c)14
-rw-r--r--drivers/bluetooth/nble/Kconfig2
-rw-r--r--drivers/bluetooth/nble/uart.c2
-rw-r--r--include/bluetooth/hci_driver.h (renamed from include/bluetooth/driver.h)38
-rw-r--r--net/bluetooth/att.c2
-rw-r--r--net/bluetooth/conn.c2
-rw-r--r--net/bluetooth/gatt.c2
-rw-r--r--net/bluetooth/hci_core.c8
-rw-r--r--net/bluetooth/hci_core.h2
-rw-r--r--net/bluetooth/hci_ecc.c2
-rw-r--r--net/bluetooth/hci_raw.c10
-rw-r--r--net/bluetooth/l2cap.c2
-rw-r--r--net/bluetooth/l2cap_br.c2
-rw-r--r--net/bluetooth/rfcomm.c2
-rw-r--r--samples/bluetooth/hci-uart/src/main.c2
-rw-r--r--tests/bluetooth/init/prj_17.conf2
-rw-r--r--tests/bluetooth/init/prj_20.conf2
-rw-r--r--tests/bluetooth/init/prj_21.conf2
-rw-r--r--tests/bluetooth/init/prj_controller_dbg.conf2
-rw-r--r--tests/bluetooth/init/prj_h5_dbg.conf2
-rw-r--r--tests/bluetooth/test_bluetooth/src/bluetooth.c8
28 files changed, 170 insertions, 168 deletions
diff --git a/doc/api/bluetooth.rst b/doc/api/bluetooth.rst
index c601c0fe7..aca296599 100644
--- a/doc/api/bluetooth.rst
+++ b/doc/api/bluetooth.rst
@@ -74,7 +74,7 @@ Persistent Storage
HCI Drivers
***********
-.. doxygengroup:: bt_driver
+.. doxygengroup:: bt_hci_driver
:project: Zephyr
:content-only:
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index eb4416b3e..895eb425b 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -24,104 +24,7 @@ if BLUETOOTH
menu "Bluetooth Drivers"
-if BLUETOOTH_STACK_HCI || BLUETOOTH_STACK_HCI_RAW
-
-comment "Bluetooth HCI Driver Options"
-
-config BLUETOOTH_UART
- bool
- default n
-
-choice
- prompt "Bluetooth HCI driver"
- default BLUETOOTH_H4
-
-config BLUETOOTH_H4
- bool "H:4 UART"
- select SERIAL
- select UART_INTERRUPT_DRIVEN
- select BLUETOOTH_UART
- select BLUETOOTH_HOST_BUFFERS
- help
- Bluetooth H:4 UART driver. Requires hardware flow control
- lines to be available.
-
-config BLUETOOTH_H5
- bool "H:5 UART [EXPERIMENTAL]"
- select SERIAL
- select UART_INTERRUPT_DRIVEN
- select BLUETOOTH_UART
- select BLUETOOTH_HOST_BUFFERS
- select NANO_WORKQUEUE
- select SYSTEM_WORKQUEUE
- help
- Bluetooth three-wire (H:5) UART driver. Implementation of HCI
- Three-Wire UART Transport Layer.
-
-config BLUETOOTH_CONTROLLER
- bool "Controller"
- select BLUETOOTH_HOST_BUFFERS
- help
- Enables support for SoC native controller implementation.
-
-config BLUETOOTH_NO_DRIVER
- bool "No default HCI driver"
- help
- This is intended for unit tests where no internal driver
- should be selected.
-
-endchoice
-
-config BLUETOOTH_HOST_BUFFERS
- bool "Host managed incoming data buffers"
- default n
- help
- Enable this to have the host stack manage incoming ACL data
- and HCI event buffers. This makes sense for all HCI drivers
- that talk to a controller running on a different CPU.
-
- If the controller resides in the same address space it may
- make sense to have the lower layers manage these buffers, in
- which case this option can be left disabled.
-
-config BLUETOOTH_DEBUG_DRIVER
- bool "Bluetooth driver debug"
- depends on BLUETOOTH_DEBUG && (BLUETOOTH_UART || BLUETOOTH_CONTROLLER)
- default n
- help
- This option enables debug support for the chosen
- Bluetooth HCI driver
-
-config BLUETOOTH_UART_ON_DEV_NAME
- string "Device Name of UART Device for Bluetooth"
- default "UART_0"
- depends on BLUETOOTH_UART
- help
- This option specifies the name of UART device to be used
- for Bluetooth.
-
-# Headroom that the driver needs for sending and receiving buffers.
-# Add a new 'default' entry for each new driver.
-
-# Needed headroom for outgoing buffers (to controller)
-config BLUETOOTH_HCI_SEND_RESERVE
- int
- # Even if no driver is selected the following default is still
- # needed e.g. for unit tests.
- default 0
- default 0 if BLUETOOTH_H4
- default 1 if BLUETOOTH_H5
-
-# Needed headroom for incoming buffers (from controller)
-config BLUETOOTH_HCI_RECV_RESERVE
- int
- # Even if no driver is selected the following default is still
- # needed e.g. for unit tests.
- default 0
- default 0 if BLUETOOTH_H4
- default 0 if BLUETOOTH_H5
-
-endif # BLUETOOTH_STACK_HCI
+source "drivers/bluetooth/hci/Kconfig"
source "drivers/bluetooth/nble/Kconfig"
diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
index 93744327d..ebb0303b6 100644
--- a/drivers/bluetooth/Makefile
+++ b/drivers/bluetooth/Makefile
@@ -1,5 +1,4 @@
-obj-$(CONFIG_BLUETOOTH_H4) += h4.o
-obj-$(CONFIG_BLUETOOTH_H5) += h5.o
+obj-y += hci/
obj-$(CONFIG_NBLE) += nble/
obj-$(CONFIG_BLUETOOTH_NRF51_PM) += nrf51_pm.o
obj-$(CONFIG_BLUETOOTH_CONTROLLER) += controller/
diff --git a/drivers/bluetooth/controller/hci/hci_driver.c b/drivers/bluetooth/controller/hci/hci_driver.c
index 6854f0bcb..b6915c066 100644
--- a/drivers/bluetooth/controller/hci/hci_driver.c
+++ b/drivers/bluetooth/controller/hci/hci_driver.c
@@ -32,7 +32,7 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/log.h>
#include <bluetooth/hci.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include "util/defines.h"
#include "util/work.h"
@@ -45,7 +45,7 @@
#include "hal/debug.h"
-#if !defined(CONFIG_BLUETOOTH_DEBUG_DRIVER)
+#if !defined(CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER)
#undef BT_DBG
#define BT_DBG(fmt, ...)
#endif
@@ -324,9 +324,9 @@ static int hci_driver_open(void)
return 0;
}
-static struct bt_driver drv = {
+static struct bt_hci_driver drv = {
.name = "Controller",
- .bus = BT_DRIVER_BUS_VIRTUAL,
+ .bus = BT_HCI_DRIVER_BUS_VIRTUAL,
.open = hci_driver_open,
.send = hci_driver_send,
};
@@ -335,7 +335,7 @@ static int _hci_driver_init(struct device *unused)
{
ARG_UNUSED(unused);
- bt_driver_register(&drv);
+ bt_hci_driver_register(&drv);
return 0;
}
diff --git a/drivers/bluetooth/hci/Kconfig b/drivers/bluetooth/hci/Kconfig
new file mode 100644
index 000000000..d0157ad88
--- /dev/null
+++ b/drivers/bluetooth/hci/Kconfig
@@ -0,0 +1,98 @@
+if BLUETOOTH_STACK_HCI || BLUETOOTH_STACK_HCI_RAW
+
+comment "Bluetooth HCI Driver Options"
+
+config BLUETOOTH_UART
+ bool
+ default n
+
+choice
+ prompt "Bluetooth HCI driver"
+ default BLUETOOTH_H4
+
+config BLUETOOTH_H4
+ bool "H:4 UART"
+ select SERIAL
+ select UART_INTERRUPT_DRIVEN
+ select BLUETOOTH_UART
+ select BLUETOOTH_HOST_BUFFERS
+ help
+ Bluetooth H:4 UART driver. Requires hardware flow control
+ lines to be available.
+
+config BLUETOOTH_H5
+ bool "H:5 UART [EXPERIMENTAL]"
+ select SERIAL
+ select UART_INTERRUPT_DRIVEN
+ select BLUETOOTH_UART
+ select BLUETOOTH_HOST_BUFFERS
+ select NANO_WORKQUEUE
+ select SYSTEM_WORKQUEUE
+ help
+ Bluetooth three-wire (H:5) UART driver. Implementation of HCI
+ Three-Wire UART Transport Layer.
+
+config BLUETOOTH_CONTROLLER
+ bool "Controller"
+ select BLUETOOTH_HOST_BUFFERS
+ help
+ Enables support for SoC native controller implementation.
+
+config BLUETOOTH_NO_DRIVER
+ bool "No default HCI driver"
+ help
+ This is intended for unit tests where no internal driver
+ should be selected.
+
+endchoice
+
+config BLUETOOTH_HOST_BUFFERS
+ bool "Host managed incoming data buffers"
+ default n
+ help
+ Enable this to have the host stack manage incoming ACL data
+ and HCI event buffers. This makes sense for all HCI drivers
+ that talk to a controller running on a different CPU.
+
+ If the controller resides in the same address space it may
+ make sense to have the lower layers manage these buffers, in
+ which case this option can be left disabled.
+
+config BLUETOOTH_DEBUG_HCI_DRIVER
+ bool "Bluetooth HCI driver debug"
+ depends on BLUETOOTH_DEBUG && (BLUETOOTH_UART || BLUETOOTH_CONTROLLER)
+ default n
+ help
+ This option enables debug support for the chosen
+ Bluetooth HCI driver
+
+config BLUETOOTH_UART_ON_DEV_NAME
+ string "Device Name of UART Device for Bluetooth"
+ default "UART_0"
+ depends on BLUETOOTH_UART
+ help
+ This option specifies the name of UART device to be used
+ for Bluetooth.
+
+# Headroom that the driver needs for sending and receiving buffers.
+# Add a new 'default' entry for each new driver.
+
+# Needed headroom for outgoing buffers (to controller)
+config BLUETOOTH_HCI_SEND_RESERVE
+ int
+ # Even if no driver is selected the following default is still
+ # needed e.g. for unit tests.
+ default 0
+ default 0 if BLUETOOTH_H4
+ default 1 if BLUETOOTH_H5
+
+# Needed headroom for incoming buffers (from controller)
+config BLUETOOTH_HCI_RECV_RESERVE
+ int
+ # Even if no driver is selected the following default is still
+ # needed e.g. for unit tests.
+ default 0
+ default 0 if BLUETOOTH_H4
+ default 0 if BLUETOOTH_H5
+
+endif # BLUETOOTH_STACK_HCI || BLUETOOTH_STACK_HCI_RAW
diff --git a/drivers/bluetooth/hci/Makefile b/drivers/bluetooth/hci/Makefile
new file mode 100644
index 000000000..f9bcca378
--- /dev/null
+++ b/drivers/bluetooth/hci/Makefile
@@ -0,0 +1,2 @@
+obj-$(CONFIG_BLUETOOTH_H4) += h4.o
+obj-$(CONFIG_BLUETOOTH_H5) += h5.o
diff --git a/drivers/bluetooth/h4.c b/drivers/bluetooth/hci/h4.c
index 65783d89e..4c26c78f3 100644
--- a/drivers/bluetooth/h4.c
+++ b/drivers/bluetooth/hci/h4.c
@@ -31,17 +31,17 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/log.h>
#include <bluetooth/hci.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
-#include "util.h"
+#include "../util.h"
-#if !defined(CONFIG_BLUETOOTH_DEBUG_DRIVER)
+#if !defined(CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER)
#undef BT_DBG
#define BT_DBG(fmt, ...)
#endif
#if defined(CONFIG_BLUETOOTH_NRF51_PM)
-#include "nrf51_pm.h"
+#include "../nrf51_pm.h"
#endif
#define H4_CMD 0x01
@@ -249,9 +249,9 @@ static int h4_open(void)
return 0;
}
-static struct bt_driver drv = {
+static struct bt_hci_driver drv = {
.name = "H:4",
- .bus = BT_DRIVER_BUS_UART,
+ .bus = BT_HCI_DRIVER_BUS_UART,
.open = h4_open,
.send = h4_send,
};
@@ -265,7 +265,7 @@ static int _bt_uart_init(struct device *unused)
return -EINVAL;
}
- bt_driver_register(&drv);
+ bt_hci_driver_register(&drv);
return 0;
}
diff --git a/drivers/bluetooth/h5.c b/drivers/bluetooth/hci/h5.c
index 4290fd326..c87c0687f 100644
--- a/drivers/bluetooth/h5.c
+++ b/drivers/bluetooth/hci/h5.c
@@ -33,11 +33,11 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/log.h>
#include <bluetooth/hci.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
-#include "util.h"
+#include "../util.h"
-#if !defined(CONFIG_BLUETOOTH_DEBUG_DRIVER)
+#if !defined(CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER)
#undef BT_DBG
#define BT_DBG(fmt, ...)
#endif
@@ -241,7 +241,7 @@ static void h5_print_header(const uint8_t *hdr, const char *str)
}
}
-#if defined(CONFIG_BLUETOOTH_DEBUG_DRIVER)
+#if defined(CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER)
static void hexdump(const char *str, const uint8_t *packet, size_t length)
{
int n = 0;
@@ -739,9 +739,9 @@ static int h5_open(void)
return 0;
}
-static struct bt_driver drv = {
+static struct bt_hci_driver drv = {
.name = "H:5",
- .bus = BT_DRIVER_BUS_UART,
+ .bus = BT_HCI_DRIVER_BUS_UART,
.open = h5_open,
.send = h5_queue,
};
@@ -756,7 +756,7 @@ static int _bt_uart_init(struct device *unused)
return -EINVAL;
}
- bt_driver_register(&drv);
+ bt_hci_driver_register(&drv);
return 0;
}
diff --git a/drivers/bluetooth/nble/Kconfig b/drivers/bluetooth/nble/Kconfig
index 70e084f7d..fcb6ad29e 100644
--- a/drivers/bluetooth/nble/Kconfig
+++ b/drivers/bluetooth/nble/Kconfig
@@ -89,7 +89,7 @@ config BLUETOOTH_RX_STACK_SIZE
if BLUETOOTH_DEBUG
-config BLUETOOTH_DEBUG_DRIVER
+config BLUETOOTH_DEBUG_HCI_DRIVER
bool "Bluetooth driver debug"
default n
help
diff --git a/drivers/bluetooth/nble/uart.c b/drivers/bluetooth/nble/uart.c
index 093e9bbad..b63ef9198 100644
--- a/drivers/bluetooth/nble/uart.c
+++ b/drivers/bluetooth/nble/uart.c
@@ -38,7 +38,7 @@
#include "nrf51_pm.h"
#endif
-#if !defined(CONFIG_BLUETOOTH_DEBUG_DRIVER)
+#if !defined(CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER)
#undef BT_DBG
#define BT_DBG(fmt, ...)
#endif
diff --git a/include/bluetooth/driver.h b/include/bluetooth/hci_driver.h
index 19cca122c..436580b4d 100644
--- a/include/bluetooth/driver.h
+++ b/include/bluetooth/hci_driver.h
@@ -17,12 +17,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef __BT_DRIVER_H
-#define __BT_DRIVER_H
+#ifndef __BT_HCI_DRIVER_H
+#define __BT_HCI_DRIVER_H
/**
* @brief HCI drivers
- * @defgroup bt_driver HCI drivers
+ * @defgroup bt_hci_driver HCI drivers
* @ingroup bluetooth
* @{
*/
@@ -58,24 +58,24 @@ struct net_buf *bt_buf_get_acl(void);
/* Receive data from the controller/HCI driver */
int bt_recv(struct net_buf *buf);
-enum bt_driver_bus {
- BT_DRIVER_BUS_VIRTUAL = 0,
- BT_DRIVER_BUS_USB = 1,
- BT_DRIVER_BUS_PCCARD = 2,
- BT_DRIVER_BUS_UART = 3,
- BT_DRIVER_BUS_RS232 = 4,
- BT_DRIVER_BUS_PCI = 5,
- BT_DRIVER_BUS_SDIO = 6,
- BT_DRIVER_BUS_SPI = 7,
- BT_DRIVER_BUS_I2C = 8,
+enum bt_hci_driver_bus {
+ BT_HCI_DRIVER_BUS_VIRTUAL = 0,
+ BT_HCI_DRIVER_BUS_USB = 1,
+ BT_HCI_DRIVER_BUS_PCCARD = 2,
+ BT_HCI_DRIVER_BUS_UART = 3,
+ BT_HCI_DRIVER_BUS_RS232 = 4,
+ BT_HCI_DRIVER_BUS_PCI = 5,
+ BT_HCI_DRIVER_BUS_SDIO = 6,
+ BT_HCI_DRIVER_BUS_SPI = 7,
+ BT_HCI_DRIVER_BUS_I2C = 8,
};
-struct bt_driver {
+struct bt_hci_driver {
/* Name of the driver */
const char *name;
- /* Bus of the transport (BT_DRIVER_BUS_*) */
- enum bt_driver_bus bus;
+ /* Bus of the transport (BT_HCI_DRIVER_BUS_*) */
+ enum bt_hci_driver_bus bus;
/* Open the HCI transport */
int (*open)(void);
@@ -85,10 +85,10 @@ struct bt_driver {
};
/* Register a new HCI driver to the Bluetooth stack */
-int bt_driver_register(struct bt_driver *drv);
+int bt_hci_driver_register(struct bt_hci_driver *drv);
/* Unregister a previously registered HCI driver */
-void bt_driver_unregister(struct bt_driver *drv);
+void bt_hci_driver_unregister(struct bt_hci_driver *drv);
#ifdef __cplusplus
}
@@ -98,4 +98,4 @@ void bt_driver_unregister(struct bt_driver *drv);
* @}
*/
-#endif /* __BT_DRIVER_H */
+#endif /* __BT_HCI_DRIVER_H */
diff --git a/net/bluetooth/att.c b/net/bluetooth/att.c
index ce66f0aaf..9941fba25 100644
--- a/net/bluetooth/att.c
+++ b/net/bluetooth/att.c
@@ -30,7 +30,7 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/uuid.h>
#include <bluetooth/gatt.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include "hci_core.h"
#include "conn_internal.h"
diff --git a/net/bluetooth/conn.c b/net/bluetooth/conn.c
index 828756da0..1dc9f365f 100644
--- a/net/bluetooth/conn.c
+++ b/net/bluetooth/conn.c
@@ -29,7 +29,7 @@
#include <bluetooth/hci.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/conn.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include <bluetooth/att.h>
#include "hci_core.h"
diff --git a/net/bluetooth/gatt.c b/net/bluetooth/gatt.c
index 6197c3130..9566fde2f 100644
--- a/net/bluetooth/gatt.c
+++ b/net/bluetooth/gatt.c
@@ -30,7 +30,7 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/uuid.h>
#include <bluetooth/gatt.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include "hci_core.h"
#include "conn_internal.h"
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 77d520eca..0dc235bef 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -30,7 +30,7 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/conn.h>
#include <bluetooth/hci.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include <bluetooth/storage.h>
#include <tinycrypt/constants.h>
@@ -3481,7 +3481,7 @@ int bt_recv(struct net_buf *buf)
return 0;
}
-int bt_driver_register(struct bt_driver *drv)
+int bt_hci_driver_register(struct bt_hci_driver *drv)
{
if (bt_dev.drv) {
return -EALREADY;
@@ -3501,7 +3501,7 @@ int bt_driver_register(struct bt_driver *drv)
return 0;
}
-void bt_driver_unregister(struct bt_driver *drv)
+void bt_hci_driver_unregister(struct bt_hci_driver *drv)
{
bt_dev.drv = NULL;
}
@@ -3542,7 +3542,7 @@ static int irk_init(void)
static int bt_init(void)
{
- struct bt_driver *drv = bt_dev.drv;
+ struct bt_hci_driver *drv = bt_dev.drv;
int err;
bt_hci_ecc_init();
diff --git a/net/bluetooth/hci_core.h b/net/bluetooth/hci_core.h
index b8c6fa48d..c897e4fa3 100644
--- a/net/bluetooth/hci_core.h
+++ b/net/bluetooth/hci_core.h
@@ -120,7 +120,7 @@ struct bt_dev {
struct nano_fifo cmd_tx_queue;
/* Registered HCI driver */
- struct bt_driver *drv;
+ struct bt_hci_driver *drv;
#if defined(CONFIG_BLUETOOTH_PRIVACY)
/* Local Identity Resolving Key */
diff --git a/net/bluetooth/hci_ecc.c b/net/bluetooth/hci_ecc.c
index cd303f537..7bbb06e03 100644
--- a/net/bluetooth/hci_ecc.c
+++ b/net/bluetooth/hci_ecc.c
@@ -30,7 +30,7 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/log.h>
#include <bluetooth/hci.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include "hci_core.h"
#if !defined(CONFIG_BLUETOOTH_DEBUG_HCI_CORE)
diff --git a/net/bluetooth/hci_raw.c b/net/bluetooth/hci_raw.c
index 81572dd7d..b19fdb507 100644
--- a/net/bluetooth/hci_raw.c
+++ b/net/bluetooth/hci_raw.c
@@ -19,7 +19,7 @@
#include <errno.h>
#include <atomic.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include <bluetooth/log.h>
#include "monitor.h"
@@ -40,10 +40,10 @@ static NET_BUF_POOL(hci_evt_pool, CONFIG_BLUETOOTH_HCI_EVT_COUNT,
static struct bt_dev {
/* Registered HCI driver */
- struct bt_driver *drv;
+ struct bt_hci_driver *drv;
} bt_dev;
-int bt_driver_register(struct bt_driver *drv)
+int bt_hci_driver_register(struct bt_hci_driver *drv)
{
if (bt_dev.drv) {
return -EALREADY;
@@ -63,7 +63,7 @@ int bt_driver_register(struct bt_driver *drv)
return 0;
}
-void bt_driver_unregister(struct bt_driver *drv)
+void bt_hci_driver_unregister(struct bt_hci_driver *drv)
{
bt_dev.drv = NULL;
}
@@ -115,7 +115,7 @@ int bt_send(struct net_buf *buf)
int bt_enable_raw(struct nano_fifo *rx_queue)
{
- struct bt_driver *drv = bt_dev.drv;
+ struct bt_hci_driver *drv = bt_dev.drv;
int err;
BT_DBG("");
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 4fe0acb81..4a203def4 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -28,7 +28,7 @@
#include <bluetooth/hci.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/conn.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include "hci_core.h"
#include "conn_internal.h"
diff --git a/net/bluetooth/l2cap_br.c b/net/bluetooth/l2cap_br.c
index 5cac08333..bd86d30b8 100644
--- a/net/bluetooth/l2cap_br.c
+++ b/net/bluetooth/l2cap_br.c
@@ -28,7 +28,7 @@
#include <bluetooth/hci.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/conn.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include "hci_core.h"
#include "conn_internal.h"
diff --git a/net/bluetooth/rfcomm.c b/net/bluetooth/rfcomm.c
index d7cac6f65..795656f2e 100644
--- a/net/bluetooth/rfcomm.c
+++ b/net/bluetooth/rfcomm.c
@@ -27,7 +27,7 @@
#include <bluetooth/hci.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/conn.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include <bluetooth/l2cap.h>
#include <bluetooth/rfcomm.h>
diff --git a/samples/bluetooth/hci-uart/src/main.c b/samples/bluetooth/hci-uart/src/main.c
index c2fa4e506..da4e972af 100644
--- a/samples/bluetooth/hci-uart/src/main.c
+++ b/samples/bluetooth/hci-uart/src/main.c
@@ -33,7 +33,7 @@
#include <net/buf.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#include <bluetooth/buf.h>
#include <bluetooth/hci_raw.h>
diff --git a/tests/bluetooth/init/prj_17.conf b/tests/bluetooth/init/prj_17.conf
index 6ff1170af..8aaffb22f 100644
--- a/tests/bluetooth/init/prj_17.conf
+++ b/tests/bluetooth/init/prj_17.conf
@@ -16,7 +16,7 @@ CONFIG_BLUETOOTH_DEBUG_CONN=y
CONFIG_BLUETOOTH_DEBUG_KEYS=y
CONFIG_BLUETOOTH_DEBUG_L2CAP=y
CONFIG_BLUETOOTH_DEBUG_SMP=y
-CONFIG_BLUETOOTH_DEBUG_DRIVER=y
+CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER=y
CONFIG_BLUETOOTH_SMP_SELFTEST=y
CONFIG_BLUETOOTH_DEBUG_ATT=y
CONFIG_BLUETOOTH_DEBUG_GATT=y
diff --git a/tests/bluetooth/init/prj_20.conf b/tests/bluetooth/init/prj_20.conf
index 1b785fdfa..fc68dd0ba 100644
--- a/tests/bluetooth/init/prj_20.conf
+++ b/tests/bluetooth/init/prj_20.conf
@@ -17,7 +17,7 @@ CONFIG_BLUETOOTH_DEBUG_CONN=y
CONFIG_BLUETOOTH_DEBUG_KEYS=y
CONFIG_BLUETOOTH_DEBUG_L2CAP=y
CONFIG_BLUETOOTH_DEBUG_SMP=y
-CONFIG_BLUETOOTH_DEBUG_DRIVER=y
+CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER=y
CONFIG_BLUETOOTH_SMP_SELFTEST=y
CONFIG_BLUETOOTH_DEBUG_ATT=y
CONFIG_BLUETOOTH_DEBUG_GATT=y
diff --git a/tests/bluetooth/init/prj_21.conf b/tests/bluetooth/init/prj_21.conf
index c58a47b2d..783b82825 100644
--- a/tests/bluetooth/init/prj_21.conf
+++ b/tests/bluetooth/init/prj_21.conf
@@ -16,7 +16,7 @@ CONFIG_BLUETOOTH_DEBUG_CONN=y
CONFIG_BLUETOOTH_DEBUG_KEYS=y
CONFIG_BLUETOOTH_DEBUG_L2CAP=y
CONFIG_BLUETOOTH_DEBUG_SMP=y
-CONFIG_BLUETOOTH_DEBUG_DRIVER=y
+CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER=y
CONFIG_BLUETOOTH_SMP_SELFTEST=y
CONFIG_BLUETOOTH_DEBUG_ATT=y
CONFIG_BLUETOOTH_DEBUG_GATT=y
diff --git a/tests/bluetooth/init/prj_controller_dbg.conf b/tests/bluetooth/init/prj_controller_dbg.conf
index 4b1728c3b..cb6005d12 100644
--- a/tests/bluetooth/init/prj_controller_dbg.conf
+++ b/tests/bluetooth/init/prj_controller_dbg.conf
@@ -17,7 +17,7 @@ CONFIG_BLUETOOTH_DEBUG_CONN=y
CONFIG_BLUETOOTH_DEBUG_KEYS=y
CONFIG_BLUETOOTH_DEBUG_L2CAP=y
CONFIG_BLUETOOTH_DEBUG_SMP=y
-CONFIG_BLUETOOTH_DEBUG_DRIVER=y
+CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER=y
CONFIG_BLUETOOTH_SMP_SELFTEST=y
CONFIG_BLUETOOTH_DEBUG_ATT=y
CONFIG_BLUETOOTH_DEBUG_GATT=y
diff --git a/tests/bluetooth/init/prj_h5_dbg.conf b/tests/bluetooth/init/prj_h5_dbg.conf
index 555be0c1f..f1ddecd69 100644
--- a/tests/bluetooth/init/prj_h5_dbg.conf
+++ b/tests/bluetooth/init/prj_h5_dbg.conf
@@ -2,4 +2,4 @@ CONFIG_BLUETOOTH=y
CONFIG_BLUETOOTH_H5=y
CONFIG_BLUETOOTH_LE=y
CONFIG_BLUETOOTH_DEBUG_LOG=y
-CONFIG_BLUETOOTH_DEBUG_DRIVER=y
+CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER=y
diff --git a/tests/bluetooth/test_bluetooth/src/bluetooth.c b/tests/bluetooth/test_bluetooth/src/bluetooth.c
index ce2cb9c16..f214a2a15 100644
--- a/tests/bluetooth/test_bluetooth/src/bluetooth.c
+++ b/tests/bluetooth/test_bluetooth/src/bluetooth.c
@@ -22,7 +22,7 @@
#include <tc_util.h>
#include <bluetooth/bluetooth.h>
-#include <bluetooth/driver.h>
+#include <bluetooth/hci_driver.h>
#define EXPECTED_ERROR -ENOSYS
@@ -39,16 +39,16 @@ static int driver_send(struct net_buf *buf)
return 0;
}
-static struct bt_driver drv = {
+static struct bt_hci_driver drv = {
.name = "test",
- .bus = BT_DRIVER_BUS_VIRTUAL,
+ .bus = BT_HCI_DRIVER_BUS_VIRTUAL,
.open = driver_open,
.send = driver_send,
};
static void driver_init(void)
{
- bt_driver_register(&drv);
+ bt_hci_driver_register(&drv);
}
void main(void)