Skip to content

Commit 7c40fb8

Browse files
committed
Bluetooth: hci_uart: Add name information to hci_uart_proto struct
This adds an extra name field to the hci_uart_proto struct that provides a simple way of adding a string identifier to the protocol. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
1 parent 4ee7ef1 commit 7c40fb8

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

drivers/bluetooth/hci_ath.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,14 @@ static int ath_recv(struct hci_uart *hu, const void *data, int count)
206206
}
207207

208208
static const struct hci_uart_proto athp = {
209-
.id = HCI_UART_ATH3K,
210-
.open = ath_open,
211-
.close = ath_close,
212-
.recv = ath_recv,
213-
.enqueue = ath_enqueue,
214-
.dequeue = ath_dequeue,
215-
.flush = ath_flush,
209+
.id = HCI_UART_ATH3K,
210+
.name = "ATH3K",
211+
.open = ath_open,
212+
.close = ath_close,
213+
.recv = ath_recv,
214+
.enqueue = ath_enqueue,
215+
.dequeue = ath_dequeue,
216+
.flush = ath_flush,
216217
};
217218

218219
int __init ath_init(void)

drivers/bluetooth/hci_bcsp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ static int bcsp_close(struct hci_uart *hu)
737737

738738
static const struct hci_uart_proto bcsp = {
739739
.id = HCI_UART_BCSP,
740+
.name = "BCSP",
740741
.open = bcsp_open,
741742
.close = bcsp_close,
742743
.enqueue = bcsp_enqueue,

drivers/bluetooth/hci_h4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ static struct sk_buff *h4_dequeue(struct hci_uart *hu)
141141

142142
static const struct hci_uart_proto h4p = {
143143
.id = HCI_UART_H4,
144+
.name = "H4",
144145
.open = h4_open,
145146
.close = h4_close,
146147
.recv = h4_recv,

drivers/bluetooth/hci_h5.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ static int h5_flush(struct hci_uart *hu)
745745

746746
static const struct hci_uart_proto h5p = {
747747
.id = HCI_UART_3WIRE,
748+
.name = "Three-wire (H5)",
748749
.open = h5_open,
749750
.close = h5_close,
750751
.recv = h5_recv,

drivers/bluetooth/hci_ll.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ static struct sk_buff *ll_dequeue(struct hci_uart *hu)
507507

508508
static const struct hci_uart_proto llp = {
509509
.id = HCI_UART_LL,
510+
.name = "LL",
510511
.open = ll_open,
511512
.close = ll_close,
512513
.recv = ll_recv,

drivers/bluetooth/hci_uart.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ struct hci_uart;
5757

5858
struct hci_uart_proto {
5959
unsigned int id;
60+
const char *name;
6061
int (*open)(struct hci_uart *hu);
6162
int (*close)(struct hci_uart *hu);
6263
int (*flush)(struct hci_uart *hu);

0 commit comments

Comments
 (0)