Commit b0c3e138 authored by Adam Lee's avatar Adam Lee Committed by Marcel Holtmann

Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile()

Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
enough.
Signed-off-by: default avatarAdam Lee <adam8157@gmail.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 53730107
...@@ -288,10 +288,10 @@ static int ath3k_load_fwfile(struct usb_device *udev, ...@@ -288,10 +288,10 @@ static int ath3k_load_fwfile(struct usb_device *udev,
sent += size; sent += size;
count -= size; count -= size;
pipe = usb_sndbulkpipe(udev, 0x02);
while (count) { while (count) {
size = min_t(uint, count, BULK_SIZE); size = min_t(uint, count, BULK_SIZE);
pipe = usb_sndbulkpipe(udev, 0x02);
memcpy(send_buf, firmware->data + sent, size); memcpy(send_buf, firmware->data + sent, size);
err = usb_bulk_msg(udev, pipe, send_buf, size, err = usb_bulk_msg(udev, pipe, send_buf, size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment