]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Bluetooth: hci_uart: Provide initial manufacturer information
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 20 Oct 2015 19:30:45 +0000 (21:30 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 21 Oct 2015 04:20:44 +0000 (07:20 +0300)
Provide an early indication about the manufacturer information so that
it can be forwarded into monitor channel.

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_bcm.c
drivers/bluetooth/hci_intel.c
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_qca.c
drivers/bluetooth/hci_uart.h

index 6da5e4ca13ea6d925807660582be5957c4903752..d776dfd5147811ef37071e68ffd9d9ceaa961c0d 100644 (file)
@@ -243,6 +243,7 @@ static struct sk_buff *ath_dequeue(struct hci_uart *hu)
 static const struct hci_uart_proto athp = {
        .id             = HCI_UART_ATH3K,
        .name           = "ATH3K",
+       .manufacturer   = 69,
        .open           = ath_open,
        .close          = ath_close,
        .flush          = ath_flush,
index 645e66e9a94594d26dbb8ee929c88cca11ef447b..1aa88dbd6fec990f9e9244f79b963e4c4bacd317 100644 (file)
@@ -799,6 +799,7 @@ static int bcm_remove(struct platform_device *pdev)
 static const struct hci_uart_proto bcm_proto = {
        .id             = HCI_UART_BCM,
        .name           = "BCM",
+       .manufacturer   = 15,
        .init_speed     = 115200,
        .oper_speed     = 4000000,
        .open           = bcm_open,
index c5e69e08788a40c73641df8b4e92d8976a6d7ddb..4a414a5a31655a4d3d0a8a0b03749ef73ff14357 100644 (file)
@@ -1148,6 +1148,7 @@ static struct sk_buff *intel_dequeue(struct hci_uart *hu)
 static const struct hci_uart_proto intel_proto = {
        .id             = HCI_UART_INTEL,
        .name           = "Intel",
+       .manufacturer   = 2,
        .init_speed     = 115200,
        .oper_speed     = 3000000,
        .open           = intel_open,
index 01a83a3f8a1d1d603a93a1fd9810b61120438b9c..96bcec5598c221e4cec2841bbc4eb521d20778c1 100644 (file)
@@ -587,6 +587,13 @@ static int hci_uart_register_dev(struct hci_uart *hu)
        hdev->bus = HCI_UART;
        hci_set_drvdata(hdev, hu);
 
+       /* Only when vendor specific setup callback is provided, consider
+        * the manufacturer information valid. This avoids filling in the
+        * value for Ericsson when nothing is specified.
+        */
+       if (hu->proto->setup)
+               hdev->manufacturer = hu->proto->manufacturer;
+
        hdev->open  = hci_uart_open;
        hdev->close = hci_uart_close;
        hdev->flush = hci_uart_flush;
index b4a0393b2862f3a37eeb9893122c67362620346d..77eae64000b398bd1501dae92135b880bd18bcbc 100644 (file)
@@ -947,6 +947,7 @@ static int qca_setup(struct hci_uart *hu)
 static struct hci_uart_proto qca_proto = {
        .id             = HCI_UART_QCA,
        .name           = "QCA",
+       .manufacturer   = 29,
        .init_speed     = 115200,
        .oper_speed     = 3000000,
        .open           = qca_open,
index 2f7bb35a890efc287d85e3fd9d46d022c19fc300..82c92f1b65b4af7c317c8a0af91723a481ac3874 100644 (file)
@@ -59,6 +59,7 @@ struct hci_uart;
 struct hci_uart_proto {
        unsigned int id;
        const char *name;
+       unsigned int manufacturer;
        unsigned int init_speed;
        unsigned int oper_speed;
        int (*open)(struct hci_uart *hu);