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>
This commit is contained in:
Родитель
4ee7ef1989
Коммит
7c40fb8db1
|
@ -206,13 +206,14 @@ static int ath_recv(struct hci_uart *hu, const void *data, int count)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct hci_uart_proto athp = {
|
static const struct hci_uart_proto athp = {
|
||||||
.id = HCI_UART_ATH3K,
|
.id = HCI_UART_ATH3K,
|
||||||
.open = ath_open,
|
.name = "ATH3K",
|
||||||
.close = ath_close,
|
.open = ath_open,
|
||||||
.recv = ath_recv,
|
.close = ath_close,
|
||||||
.enqueue = ath_enqueue,
|
.recv = ath_recv,
|
||||||
.dequeue = ath_dequeue,
|
.enqueue = ath_enqueue,
|
||||||
.flush = ath_flush,
|
.dequeue = ath_dequeue,
|
||||||
|
.flush = ath_flush,
|
||||||
};
|
};
|
||||||
|
|
||||||
int __init ath_init(void)
|
int __init ath_init(void)
|
||||||
|
|
|
@ -737,6 +737,7 @@ static int bcsp_close(struct hci_uart *hu)
|
||||||
|
|
||||||
static const struct hci_uart_proto bcsp = {
|
static const struct hci_uart_proto bcsp = {
|
||||||
.id = HCI_UART_BCSP,
|
.id = HCI_UART_BCSP,
|
||||||
|
.name = "BCSP",
|
||||||
.open = bcsp_open,
|
.open = bcsp_open,
|
||||||
.close = bcsp_close,
|
.close = bcsp_close,
|
||||||
.enqueue = bcsp_enqueue,
|
.enqueue = bcsp_enqueue,
|
||||||
|
|
|
@ -141,6 +141,7 @@ static struct sk_buff *h4_dequeue(struct hci_uart *hu)
|
||||||
|
|
||||||
static const struct hci_uart_proto h4p = {
|
static const struct hci_uart_proto h4p = {
|
||||||
.id = HCI_UART_H4,
|
.id = HCI_UART_H4,
|
||||||
|
.name = "H4",
|
||||||
.open = h4_open,
|
.open = h4_open,
|
||||||
.close = h4_close,
|
.close = h4_close,
|
||||||
.recv = h4_recv,
|
.recv = h4_recv,
|
||||||
|
|
|
@ -745,6 +745,7 @@ static int h5_flush(struct hci_uart *hu)
|
||||||
|
|
||||||
static const struct hci_uart_proto h5p = {
|
static const struct hci_uart_proto h5p = {
|
||||||
.id = HCI_UART_3WIRE,
|
.id = HCI_UART_3WIRE,
|
||||||
|
.name = "Three-wire (H5)",
|
||||||
.open = h5_open,
|
.open = h5_open,
|
||||||
.close = h5_close,
|
.close = h5_close,
|
||||||
.recv = h5_recv,
|
.recv = h5_recv,
|
||||||
|
|
|
@ -507,6 +507,7 @@ static struct sk_buff *ll_dequeue(struct hci_uart *hu)
|
||||||
|
|
||||||
static const struct hci_uart_proto llp = {
|
static const struct hci_uart_proto llp = {
|
||||||
.id = HCI_UART_LL,
|
.id = HCI_UART_LL,
|
||||||
|
.name = "LL",
|
||||||
.open = ll_open,
|
.open = ll_open,
|
||||||
.close = ll_close,
|
.close = ll_close,
|
||||||
.recv = ll_recv,
|
.recv = ll_recv,
|
||||||
|
|
|
@ -57,6 +57,7 @@ struct hci_uart;
|
||||||
|
|
||||||
struct hci_uart_proto {
|
struct hci_uart_proto {
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
|
const char *name;
|
||||||
int (*open)(struct hci_uart *hu);
|
int (*open)(struct hci_uart *hu);
|
||||||
int (*close)(struct hci_uart *hu);
|
int (*close)(struct hci_uart *hu);
|
||||||
int (*flush)(struct hci_uart *hu);
|
int (*flush)(struct hci_uart *hu);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче