forked from mirrors/linux
		
	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 <vikram.kandukuri@atheros.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
		
							parent
							
								
									981b1414d7
								
							
						
					
					
						commit
						290ba20081
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
					@ -301,7 +301,7 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags)
 | 
				
			||||||
	struct urb *urb;
 | 
						struct urb *urb;
 | 
				
			||||||
	unsigned char *buf;
 | 
						unsigned char *buf;
 | 
				
			||||||
	unsigned int pipe;
 | 
						unsigned int pipe;
 | 
				
			||||||
	int err, size;
 | 
						int err, size = HCI_MAX_FRAME_SIZE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	BT_DBG("%s", hdev->name);
 | 
						BT_DBG("%s", hdev->name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -312,8 +312,6 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags)
 | 
				
			||||||
	if (!urb)
 | 
						if (!urb)
 | 
				
			||||||
		return -ENOMEM;
 | 
							return -ENOMEM;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	size = le16_to_cpu(data->bulk_rx_ep->wMaxPacketSize);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	buf = kmalloc(size, mem_flags);
 | 
						buf = kmalloc(size, mem_flags);
 | 
				
			||||||
	if (!buf) {
 | 
						if (!buf) {
 | 
				
			||||||
		usb_free_urb(urb);
 | 
							usb_free_urb(urb);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue