diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-04-05 01:27:34 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-04-07 12:47:10 -0400 |
commit | 7c40fb8db135288485f4f6226ceb69d64610a84e (patch) | |
tree | 6a54af660d80d93947e566f5cf83c5496e53a129 /drivers/bluetooth | |
parent | 4ee7ef19894c0ac35cc6dc374d65658a26d7496a (diff) |
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>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_ath.c | 15 | ||||
-rw-r--r-- | drivers/bluetooth/hci_bcsp.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_h4.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_h5.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_ll.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_uart.h | 1 |
6 files changed, 13 insertions, 7 deletions
diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c index c1c0b0c7e1c9..32c46cd40d85 100644 --- a/drivers/bluetooth/hci_ath.c +++ b/drivers/bluetooth/hci_ath.c | |||
@@ -206,13 +206,14 @@ static int ath_recv(struct hci_uart *hu, const void *data, int count) | |||
206 | } | 206 | } |
207 | 207 | ||
208 | static const struct hci_uart_proto athp = { | 208 | static const struct hci_uart_proto athp = { |
209 | .id = HCI_UART_ATH3K, | 209 | .id = HCI_UART_ATH3K, |
210 | .open = ath_open, | 210 | .name = "ATH3K", |
211 | .close = ath_close, | 211 | .open = ath_open, |
212 | .recv = ath_recv, | 212 | .close = ath_close, |
213 | .enqueue = ath_enqueue, | 213 | .recv = ath_recv, |
214 | .dequeue = ath_dequeue, | 214 | .enqueue = ath_enqueue, |
215 | .flush = ath_flush, | 215 | .dequeue = ath_dequeue, |
216 | .flush = ath_flush, | ||
216 | }; | 217 | }; |
217 | 218 | ||
218 | int __init ath_init(void) | 219 | int __init ath_init(void) |
diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c index 7d30e05a973f..285fd0a97311 100644 --- a/drivers/bluetooth/hci_bcsp.c +++ b/drivers/bluetooth/hci_bcsp.c | |||
@@ -737,6 +737,7 @@ static int bcsp_close(struct hci_uart *hu) | |||
737 | 737 | ||
738 | static const struct hci_uart_proto bcsp = { | 738 | static const struct hci_uart_proto bcsp = { |
739 | .id = HCI_UART_BCSP, | 739 | .id = HCI_UART_BCSP, |
740 | .name = "BCSP", | ||
740 | .open = bcsp_open, | 741 | .open = bcsp_open, |
741 | .close = bcsp_close, | 742 | .close = bcsp_close, |
742 | .enqueue = bcsp_enqueue, | 743 | .enqueue = bcsp_enqueue, |
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c index fc783103ee36..7c5e68cb9959 100644 --- a/drivers/bluetooth/hci_h4.c +++ b/drivers/bluetooth/hci_h4.c | |||
@@ -141,6 +141,7 @@ static struct sk_buff *h4_dequeue(struct hci_uart *hu) | |||
141 | 141 | ||
142 | static const struct hci_uart_proto h4p = { | 142 | static const struct hci_uart_proto h4p = { |
143 | .id = HCI_UART_H4, | 143 | .id = HCI_UART_H4, |
144 | .name = "H4", | ||
144 | .open = h4_open, | 145 | .open = h4_open, |
145 | .close = h4_close, | 146 | .close = h4_close, |
146 | .recv = h4_recv, | 147 | .recv = h4_recv, |
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index aac0e8f718b0..de7da17ccdab 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c | |||
@@ -745,6 +745,7 @@ static int h5_flush(struct hci_uart *hu) | |||
745 | 745 | ||
746 | static const struct hci_uart_proto h5p = { | 746 | static const struct hci_uart_proto h5p = { |
747 | .id = HCI_UART_3WIRE, | 747 | .id = HCI_UART_3WIRE, |
748 | .name = "Three-wire (H5)", | ||
748 | .open = h5_open, | 749 | .open = h5_open, |
749 | .close = h5_close, | 750 | .close = h5_close, |
750 | .recv = h5_recv, | 751 | .recv = h5_recv, |
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index e66f0fa65485..c6a1aeb4e7fb 100644 --- a/drivers/bluetooth/hci_ll.c +++ b/drivers/bluetooth/hci_ll.c | |||
@@ -507,6 +507,7 @@ static struct sk_buff *ll_dequeue(struct hci_uart *hu) | |||
507 | 507 | ||
508 | static const struct hci_uart_proto llp = { | 508 | static const struct hci_uart_proto llp = { |
509 | .id = HCI_UART_LL, | 509 | .id = HCI_UART_LL, |
510 | .name = "LL", | ||
510 | .open = ll_open, | 511 | .open = ll_open, |
511 | .close = ll_close, | 512 | .close = ll_close, |
512 | .recv = ll_recv, | 513 | .recv = ll_recv, |
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h index 683153d2e9db..80e694a36143 100644 --- a/drivers/bluetooth/hci_uart.h +++ b/drivers/bluetooth/hci_uart.h | |||
@@ -57,6 +57,7 @@ struct hci_uart; | |||
57 | 57 | ||
58 | struct hci_uart_proto { | 58 | struct hci_uart_proto { |
59 | unsigned int id; | 59 | unsigned int id; |
60 | const char *name; | ||
60 | int (*open)(struct hci_uart *hu); | 61 | int (*open)(struct hci_uart *hu); |
61 | int (*close)(struct hci_uart *hu); | 62 | int (*close)(struct hci_uart *hu); |
62 | int (*flush)(struct hci_uart *hu); | 63 | int (*flush)(struct hci_uart *hu); |