diff options
author | David Lechner <david@lechnology.com> | 2017-12-04 04:21:21 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2017-12-13 00:28:41 +0100 |
commit | 7c6ca1201e5e87513b27196138f06df9cbd09a7a (patch) | |
tree | 2ae33ead2f2168f463c17bbbd8f23e889771d1cb /drivers/bluetooth/hci_ll.c | |
parent | Bluetooth: serdev: hci_ll: Wait for CTS instead of using msleep (diff) | |
download | linux-7c6ca1201e5e87513b27196138f06df9cbd09a7a.tar.xz linux-7c6ca1201e5e87513b27196138f06df9cbd09a7a.zip |
Bluetooth: hci_ll: add constant for vendor-specific command
This adds a #define for the vendor-specific HCI command to set the
baudrate instead of using the bare 0xff36 multiple times.
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/bluetooth/hci_ll.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index 447abea2fa04..974a78879d20 100644 --- a/drivers/bluetooth/hci_ll.c +++ b/drivers/bluetooth/hci_ll.c @@ -56,6 +56,9 @@ #include "hci_uart.h" +/* Vendor-specific HCI commands */ +#define HCI_VS_UPDATE_UART_HCI_BAUDRATE 0xff36 + /* HCILL commands */ #define HCILL_GO_TO_SLEEP_IND 0x30 #define HCILL_GO_TO_SLEEP_ACK 0x31 @@ -620,7 +623,7 @@ static int download_firmware(struct ll_device *lldev) case ACTION_SEND_COMMAND: /* action send */ bt_dev_dbg(lldev->hu.hdev, "S"); cmd = (struct hci_command *)action_ptr; - if (cmd->opcode == 0xff36) { + if (cmd->opcode == HCI_VS_UPDATE_UART_HCI_BAUDRATE) { /* ignore remote change * baud rate HCI VS command */ @@ -704,7 +707,10 @@ static int ll_setup(struct hci_uart *hu) speed = 0; if (speed) { - struct sk_buff *skb = __hci_cmd_sync(hu->hdev, 0xff36, sizeof(speed), &speed, HCI_INIT_TIMEOUT); + struct sk_buff *skb; + + skb = __hci_cmd_sync(hu->hdev, HCI_VS_UPDATE_UART_HCI_BAUDRATE, + sizeof(speed), &speed, HCI_INIT_TIMEOUT); if (!IS_ERR(skb)) { kfree_skb(skb); serdev_device_set_baudrate(serdev, speed); |