diff options
author | Tedd Ho-Jeong An <tedd.an@intel.com> | 2021-08-05 02:32:11 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-08-05 16:03:29 +0200 |
commit | 53492a668e3b9b823fc9a3ba563a5d10fef32c03 (patch) | |
tree | fe5d8f2de6bcb3f380b67b4ce2d0c8152a29a9b9 /drivers/bluetooth/btusb.c | |
parent | Bluetooth: btintel: Refactoring setup routine for legacy ROM sku (diff) | |
download | linux-53492a668e3b9b823fc9a3ba563a5d10fef32c03.tar.xz linux-53492a668e3b9b823fc9a3ba563a5d10fef32c03.zip |
Bluetooth: btintel: Add btintel data struct
This patch adds a data structure for btintel for btintel object, and the
definition of bootloder states. It also adds macros to set/test/clear
the flags.
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r-- | drivers/bluetooth/btusb.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index ce05085ff158..887b8839e4b2 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4299,7 +4299,7 @@ static int btusb_probe(struct usb_interface *intf, struct btusb_data *data; struct hci_dev *hdev; unsigned ifnum_base; - int i, err; + int i, err, priv_size; BT_DBG("intf %p id %p", intf, id); @@ -4385,6 +4385,13 @@ static int btusb_probe(struct usb_interface *intf, init_usb_anchor(&data->ctrl_anchor); spin_lock_init(&data->rxlock); + priv_size = 0; + + if (id->driver_info & BTUSB_INTEL_COMBINED) { + /* Allocate extra space for Intel device */ + priv_size += sizeof(struct btintel_data); + } + if (id->driver_info & BTUSB_INTEL_NEW) { data->recv_event = btusb_recv_event_intel; data->recv_bulk = btusb_recv_bulk_intel; @@ -4396,7 +4403,7 @@ static int btusb_probe(struct usb_interface *intf, data->recv_acl = hci_recv_frame; - hdev = hci_alloc_dev(); + hdev = hci_alloc_dev_priv(priv_size); if (!hdev) return -ENOMEM; |