Bluetooth: hci_uart: Add name information to hci_uart_proto struct
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Apr 2015 05:27:34 +0000 (22:27 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Apr 2015 16:47:10 +0000 (18:47 +0200)
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>
drivers/bluetooth/hci_ath.c
drivers/bluetooth/hci_bcsp.c
drivers/bluetooth/hci_h4.c
drivers/bluetooth/hci_h5.c
drivers/bluetooth/hci_ll.c
drivers/bluetooth/hci_uart.h

index c1c0b0c7e1c990fc23fdf7712cb40be3120d4044..32c46cd40d85cddf890cc3576d95b100fc4de1c8 100644 (file)
@@ -206,13 +206,14 @@ static int ath_recv(struct hci_uart *hu, const void *data, int count)
 }
 
 static const struct hci_uart_proto athp = {
-       .id = HCI_UART_ATH3K,
-       .open = ath_open,
-       .close = ath_close,
-       .recv = ath_recv,
-       .enqueue = ath_enqueue,
-       .dequeue = ath_dequeue,
-       .flush = ath_flush,
+       .id             = HCI_UART_ATH3K,
+       .name           = "ATH3K",
+       .open           = ath_open,
+       .close          = ath_close,
+       .recv           = ath_recv,
+       .enqueue        = ath_enqueue,
+       .dequeue        = ath_dequeue,
+       .flush          = ath_flush,
 };
 
 int __init ath_init(void)
index 7d30e05a973f9dc49010fd4d1b1f00959de2ad03..285fd0a97311e473f4c440638f413278fc53ba6e 100644 (file)
@@ -737,6 +737,7 @@ static int bcsp_close(struct hci_uart *hu)
 
 static const struct hci_uart_proto bcsp = {
        .id             = HCI_UART_BCSP,
+       .name           = "BCSP",
        .open           = bcsp_open,
        .close          = bcsp_close,
        .enqueue        = bcsp_enqueue,
index fc783103ee369218e454590de68f48b8819049b8..7c5e68cb99595a0e0fc7cf4fa37517e4af8fb85c 100644 (file)
@@ -141,6 +141,7 @@ static struct sk_buff *h4_dequeue(struct hci_uart *hu)
 
 static const struct hci_uart_proto h4p = {
        .id             = HCI_UART_H4,
+       .name           = "H4",
        .open           = h4_open,
        .close          = h4_close,
        .recv           = h4_recv,
index aac0e8f718b0efbbd1bb5ae1d546a8cc0e02bc4e..de7da17ccdab42906938920bd40757059d307555 100644 (file)
@@ -745,6 +745,7 @@ static int h5_flush(struct hci_uart *hu)
 
 static const struct hci_uart_proto h5p = {
        .id             = HCI_UART_3WIRE,
+       .name           = "Three-wire (H5)",
        .open           = h5_open,
        .close          = h5_close,
        .recv           = h5_recv,
index e66f0fa65485d519dcda37adc73748c50da3e0d1..c6a1aeb4e7fb55de93dd95248948a823973ee204 100644 (file)
@@ -507,6 +507,7 @@ static struct sk_buff *ll_dequeue(struct hci_uart *hu)
 
 static const struct hci_uart_proto llp = {
        .id             = HCI_UART_LL,
+       .name           = "LL",
        .open           = ll_open,
        .close          = ll_close,
        .recv           = ll_recv,
index 683153d2e9dbebddf31749b20eae4b76d96a3d4e..80e694a36143042665ba892c405b297465c71730 100644 (file)
@@ -57,6 +57,7 @@ struct hci_uart;
 
 struct hci_uart_proto {
        unsigned int id;
+       const char *name;
        int (*open)(struct hci_uart *hu);
        int (*close)(struct hci_uart *hu);
        int (*flush)(struct hci_uart *hu);