summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/bluetooth/h4.c1
-rw-r--r--drivers/bluetooth/h5.c1
-rw-r--r--include/bluetooth/driver.h3
-rw-r--r--net/bluetooth/hci_core.c4
-rw-r--r--tests/bluetooth/test_bluetooth/src/bluetooth.c1
5 files changed, 9 insertions, 1 deletions
diff --git a/drivers/bluetooth/h4.c b/drivers/bluetooth/h4.c
index a5bc16f3b..051cd71d4 100644
--- a/drivers/bluetooth/h4.c
+++ b/drivers/bluetooth/h4.c
@@ -254,6 +254,7 @@ static int h4_open(void)
}
static struct bt_driver drv = {
+ .name = "H:4",
.bus = BT_DRIVER_BUS_UART,
.open = h4_open,
.send = h4_send,
diff --git a/drivers/bluetooth/h5.c b/drivers/bluetooth/h5.c
index 33c44200e..8c8462139 100644
--- a/drivers/bluetooth/h5.c
+++ b/drivers/bluetooth/h5.c
@@ -764,6 +764,7 @@ static int h5_open(void)
}
static struct bt_driver drv = {
+ .name = "H:5",
.bus = BT_DRIVER_BUS_UART,
.open = h5_open,
.send = h5_queue,
diff --git a/include/bluetooth/driver.h b/include/bluetooth/driver.h
index 331a9153a..28cfb3811 100644
--- a/include/bluetooth/driver.h
+++ b/include/bluetooth/driver.h
@@ -63,6 +63,9 @@ enum bt_driver_bus {
};
struct bt_driver {
+ /* Name of the driver */
+ const char *name;
+
/* Bus of the transport (BT_DRIVER_BUS_*) */
enum bt_driver_bus bus;
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 4ca58069d..1215d7e7c 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3095,8 +3095,10 @@ int bt_driver_register(struct bt_driver *drv)
bt_dev.drv = drv;
+ BT_DBG("Registered %s", drv->name ? drv->name : "");
+
bt_monitor_new_index(BT_MONITOR_TYPE_PRIMARY, drv->bus,
- BT_ADDR_ANY, "bt0");
+ BT_ADDR_ANY, drv->name ? drv->name : "bt0");
return 0;
}
diff --git a/tests/bluetooth/test_bluetooth/src/bluetooth.c b/tests/bluetooth/test_bluetooth/src/bluetooth.c
index 0dd473152..a0908c9e3 100644
--- a/tests/bluetooth/test_bluetooth/src/bluetooth.c
+++ b/tests/bluetooth/test_bluetooth/src/bluetooth.c
@@ -40,6 +40,7 @@ static int driver_send(struct net_buf *buf)
}
static struct bt_driver drv = {
+ .name = "test",
.bus = BT_DRIVER_BUS_VIRTUAL,
.open = driver_open,
.send = driver_send,