diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-07-04 11:23:35 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-04 14:10:22 -0400 |
commit | 0ad184ef5828542e3e73cce8a875fb4e029725b7 (patch) | |
tree | effaaa20f81cb77ed073ec9f2c9f19a96ca18fcf /drivers/bluetooth | |
parent | af202f84415a69b964a9ec371e11781f2a1e5396 (diff) |
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>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index aa446c7eb7e5..5bb5872ffee6 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -107,8 +107,8 @@ static int vhci_create_device(struct vhci_data *data, __u8 opcode) | |||
107 | if (dev_type != HCI_BREDR && dev_type != HCI_AMP) | 107 | if (dev_type != HCI_BREDR && dev_type != HCI_AMP) |
108 | return -EINVAL; | 108 | return -EINVAL; |
109 | 109 | ||
110 | /* bits 2-6 are reserved (must be zero) */ | 110 | /* bits 2-5 are reserved (must be zero) */ |
111 | if (opcode & 0x7c) | 111 | if (opcode & 0x3c) |
112 | return -EINVAL; | 112 | return -EINVAL; |
113 | 113 | ||
114 | skb = bt_skb_alloc(4, GFP_KERNEL); | 114 | skb = bt_skb_alloc(4, GFP_KERNEL); |
@@ -132,6 +132,10 @@ static int vhci_create_device(struct vhci_data *data, __u8 opcode) | |||
132 | hdev->flush = vhci_flush; | 132 | hdev->flush = vhci_flush; |
133 | hdev->send = vhci_send_frame; | 133 | hdev->send = vhci_send_frame; |
134 | 134 | ||
135 | /* bit 6 is for external configuration */ | ||
136 | if (opcode & 0x40) | ||
137 | set_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks); | ||
138 | |||
135 | /* bit 7 is for raw device */ | 139 | /* bit 7 is for raw device */ |
136 | if (opcode & 0x80) | 140 | if (opcode & 0x80) |
137 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); | 141 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); |