Skip to content

Commit

Permalink
Bluetooth: btusb: Add setup callback for chip init on USB
Browse files Browse the repository at this point in the history
Some of chipset does not allow to send a patch or config files through
HCI VS channel at early stage as well as they don't support to send
USB patch files to other channel except USB bulk path.

New callback added is for initialization of BT controller through USB

Signed-off-by: Ben Young Tae Kim <ytkim@qca.qualcomm.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Kim, Ben Young Tae authored and Marcel Holtmann committed Mar 3, 2015
1 parent 49b31e5 commit ace3198
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ struct btusb_data {

int (*recv_event)(struct hci_dev *hdev, struct sk_buff *skb);
int (*recv_bulk)(struct btusb_data *data, void *buffer, int count);

int (*setup_on_usb)(struct hci_dev *hdev);
};

static inline void btusb_free_frags(struct btusb_data *data)
Expand Down Expand Up @@ -878,6 +880,15 @@ static int btusb_open(struct hci_dev *hdev)

BT_DBG("%s", hdev->name);

/* Patching USB firmware files prior to starting any URBs of HCI path
* It is more safe to use USB bulk channel for downloading USB patch
*/
if (data->setup_on_usb) {
err = data->setup_on_usb(hdev);
if (err <0)
return err;
}

err = usb_autopm_get_interface(data->intf);
if (err < 0)
return err;
Expand Down

0 comments on commit ace3198

Please sign in to comment.