Skip to content

Commit aee61f7

Browse files
holtmannjhedberg
authored andcommitted
Bluetooth: hci_uart: Provide initial manufacturer information
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>
1 parent 9f7378a commit aee61f7

6 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎drivers/bluetooth/hci_ath.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ static struct sk_buff *ath_dequeue(struct hci_uart *hu)
243243
static const struct hci_uart_proto athp = {
244244
.id = HCI_UART_ATH3K,
245245
.name = "ATH3K",
246+
.manufacturer = 69,
246247
.open = ath_open,
247248
.close = ath_close,
248249
.flush = ath_flush,

‎drivers/bluetooth/hci_bcm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ static int bcm_remove(struct platform_device *pdev)
799799
static const struct hci_uart_proto bcm_proto = {
800800
.id = HCI_UART_BCM,
801801
.name = "BCM",
802+
.manufacturer = 15,
802803
.init_speed = 115200,
803804
.oper_speed = 4000000,
804805
.open = bcm_open,

‎drivers/bluetooth/hci_intel.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,7 @@ static struct sk_buff *intel_dequeue(struct hci_uart *hu)
11481148
static const struct hci_uart_proto intel_proto = {
11491149
.id = HCI_UART_INTEL,
11501150
.name = "Intel",
1151+
.manufacturer = 2,
11511152
.init_speed = 115200,
11521153
.oper_speed = 3000000,
11531154
.open = intel_open,

‎drivers/bluetooth/hci_ldisc.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,13 @@ static int hci_uart_register_dev(struct hci_uart *hu)
587587
hdev->bus = HCI_UART;
588588
hci_set_drvdata(hdev, hu);
589589

590+
/* Only when vendor specific setup callback is provided, consider
591+
* the manufacturer information valid. This avoids filling in the
592+
* value for Ericsson when nothing is specified.
593+
*/
594+
if (hu->proto->setup)
595+
hdev->manufacturer = hu->proto->manufacturer;
596+
590597
hdev->open = hci_uart_open;
591598
hdev->close = hci_uart_close;
592599
hdev->flush = hci_uart_flush;

‎drivers/bluetooth/hci_qca.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,7 @@ static int qca_setup(struct hci_uart *hu)
947947
static struct hci_uart_proto qca_proto = {
948948
.id = HCI_UART_QCA,
949949
.name = "QCA",
950+
.manufacturer = 29,
950951
.init_speed = 115200,
951952
.oper_speed = 3000000,
952953
.open = qca_open,

‎drivers/bluetooth/hci_uart.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct hci_uart;
5959
struct hci_uart_proto {
6060
unsigned int id;
6161
const char *name;
62+
unsigned int manufacturer;
6263
unsigned int init_speed;
6364
unsigned int oper_speed;
6465
int (*open)(struct hci_uart *hu);

0 commit comments

Comments
 (0)