Skip to content

Commit b0c3e13

Browse files
adam8157holtmann
authored andcommitted
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: Adam Lee <adam8157@gmail.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
1 parent 5373010 commit b0c3e13

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/bluetooth/ath3k.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ static int ath3k_load_fwfile(struct usb_device *udev,
288288
sent += size;
289289
count -= size;
290290

291+
pipe = usb_sndbulkpipe(udev, 0x02);
292+
291293
while (count) {
292294
size = min_t(uint, count, BULK_SIZE);
293-
pipe = usb_sndbulkpipe(udev, 0x02);
294-
295295
memcpy(send_buf, firmware->data + sent, size);
296296

297297
err = usb_bulk_msg(udev, pipe, send_buf, size,

0 commit comments

Comments
 (0)