Skip to content

Commit 290ba20

Browse files
Vikram Kandukuriholtmann
authored andcommitted
Bluetooth: Improve USB driver throughput by increasing the frame size
This patch increases the receive buffer size to HCI_MAX_FRAME_SIZE which improves the RX throughput considerably. Tested against BRM/Atheros/CSR USB Dongles with PAN profile using iperf and chariot. This gave significant (around 40%) increase in performance (increased from 0.8 to 1.5 Mb/s in Sheld room) Signed-off-by: Vikram Kandukuri <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 981b141 commit 290ba20

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/bluetooth/btusb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags)
301301
struct urb *urb;
302302
unsigned char *buf;
303303
unsigned int pipe;
304-
int err, size;
304+
int err, size = HCI_MAX_FRAME_SIZE;
305305

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

@@ -312,8 +312,6 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags)
312312
if (!urb)
313313
return -ENOMEM;
314314

315-
size = le16_to_cpu(data->bulk_rx_ep->wMaxPacketSize);
316-
317315
buf = kmalloc(size, mem_flags);
318316
if (!buf) {
319317
usb_free_urb(urb);

0 commit comments

Comments
 (0)