aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-11-13 17:07:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-11-25 16:41:34 -0500
commitf1ca2167d89d991eed519c789d3902f9682c06b8 (patch)
treee170d7fe637f7a9ff552e694af6f409529865daa /drivers/net/wireless/rt2x00/rt73usb.c
parentc8f96974eebbc8f078ad64f2d8041e6dce741d67 (diff)
rt2x00: Detect USB BULK in/out endpoints
Instead of hardcoding the used in/out endpoints we should detect them by walking through all available endpoints. rt2800usb will gain the most out of this, because the legacy drivers indicate that there are multiple endpoints available. However this code might benefit at least rt73usb as well for the MIMO queues, and if we are really lucky rt2500usb will benefit because for the TX and PRIO queues. Even if rt2500usb and rt73usb do not get better performance after this patch, the endpoint detection still belongs to rt2x00usb, and it shouldn't hurt to always try to detect the available endpoints. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index ee59b4e35cdc..37a782dc8080 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1508,8 +1508,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
1508 entry->skb = NULL; 1508 entry->skb = NULL;
1509} 1509}
1510 1510
1511static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, 1511static int rt73usb_get_tx_data_len(struct queue_entry *entry)
1512 struct sk_buff *skb)
1513{ 1512{
1514 int length; 1513 int length;
1515 1514
@@ -1517,8 +1516,8 @@ static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev,
1517 * The length _must_ be a multiple of 4, 1516 * The length _must_ be a multiple of 4,
1518 * but it must _not_ be a multiple of the USB packet size. 1517 * but it must _not_ be a multiple of the USB packet size.
1519 */ 1518 */
1520 length = roundup(skb->len, 4); 1519 length = roundup(entry->skb->len, 4);
1521 length += (4 * !(length % rt2x00dev->usb_maxpacket)); 1520 length += (4 * !(length % entry->queue->usb_maxpacket));
1522 1521
1523 return length; 1522 return length;
1524} 1523}