Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Support HCI_QUIRK_EXTERNAL_CONFIG for hci_vhci driver

This adds support for configuring the hci_vhci virtual controllers
to require a setup stage using HCI_QUIRK_EXTERNAL_CONFIG. With this
option the virtual controller will start out as unconfigured.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>

authored by

Marcel Holtmann and committed by
Johan Hedberg
0ad184ef af202f84

+6 -2
+6 -2
drivers/bluetooth/hci_vhci.c
··· 107 107 if (dev_type != HCI_BREDR && dev_type != HCI_AMP) 108 108 return -EINVAL; 109 109 110 - /* bits 2-6 are reserved (must be zero) */ 111 - if (opcode & 0x7c) 110 + /* bits 2-5 are reserved (must be zero) */ 111 + if (opcode & 0x3c) 112 112 return -EINVAL; 113 113 114 114 skb = bt_skb_alloc(4, GFP_KERNEL); ··· 131 131 hdev->close = vhci_close_dev; 132 132 hdev->flush = vhci_flush; 133 133 hdev->send = vhci_send_frame; 134 + 135 + /* bit 6 is for external configuration */ 136 + if (opcode & 0x40) 137 + set_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks); 134 138 135 139 /* bit 7 is for raw device */ 136 140 if (opcode & 0x80)