aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-11-04 15:37:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:25:56 -0500
commitefd2f271e44c7ea011cdb0363d38f40338ab80d2 (patch)
tree492e4f0c41f0b6388b35a9817c1b22d5719b5342 /drivers/net/wireless/rt2x00/rt2800usb.c
parent961621abee08fde2328daf6f8000e1059e5205e9 (diff)
rt2x00: Sync Tx and RX ring sizes with legacy drivers
All rt2x00 devices used the same Tx and Rx ring size (24 entries) till now. Newer devices (like rt2800) can however make use of a larger TX and RX ring due to 11n capabilities (AMPDUs of size 64 for example). Hence, bring rt2x00 in sync with the legacy drivers and use the same TX and RX ring sizes. Also remove the global defines RX_ENTRIES, TX_ENTRIES, BEACON_ENTRIES and ATIM_ENTRIES and use per driver values. That is 24 entries for rt2400pci, 32 entries for rt2500pci, rt2500usb, rt61pci and rt73usb and 128 (RX) and 64 (TX) for rt2800pci and rt2800usb. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> 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/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 3dff56ec195a..3f44131baeee 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -165,7 +165,8 @@ static int rt2800usb_enable_radio(struct rt2x00_dev *rt2x00dev)
165 * this limit so reduce the number to prevent errors. 165 * this limit so reduce the number to prevent errors.
166 */ 166 */
167 rt2x00_set_field32(&reg, USB_DMA_CFG_RX_BULK_AGG_LIMIT, 167 rt2x00_set_field32(&reg, USB_DMA_CFG_RX_BULK_AGG_LIMIT,
168 ((RX_ENTRIES * DATA_FRAME_SIZE) / 1024) - 3); 168 ((rt2x00dev->ops->rx->entry_num * DATA_FRAME_SIZE)
169 / 1024) - 3);
169 rt2x00_set_field32(&reg, USB_DMA_CFG_RX_BULK_EN, 1); 170 rt2x00_set_field32(&reg, USB_DMA_CFG_RX_BULK_EN, 1);
170 rt2x00_set_field32(&reg, USB_DMA_CFG_TX_BULK_EN, 1); 171 rt2x00_set_field32(&reg, USB_DMA_CFG_TX_BULK_EN, 1);
171 rt2800_register_write(rt2x00dev, USB_DMA_CFG, reg); 172 rt2800_register_write(rt2x00dev, USB_DMA_CFG, reg);
@@ -553,21 +554,21 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
553}; 554};
554 555
555static const struct data_queue_desc rt2800usb_queue_rx = { 556static const struct data_queue_desc rt2800usb_queue_rx = {
556 .entry_num = RX_ENTRIES, 557 .entry_num = 128,
557 .data_size = AGGREGATION_SIZE, 558 .data_size = AGGREGATION_SIZE,
558 .desc_size = RXINFO_DESC_SIZE + RXWI_DESC_SIZE, 559 .desc_size = RXINFO_DESC_SIZE + RXWI_DESC_SIZE,
559 .priv_size = sizeof(struct queue_entry_priv_usb), 560 .priv_size = sizeof(struct queue_entry_priv_usb),
560}; 561};
561 562
562static const struct data_queue_desc rt2800usb_queue_tx = { 563static const struct data_queue_desc rt2800usb_queue_tx = {
563 .entry_num = TX_ENTRIES, 564 .entry_num = 64,
564 .data_size = AGGREGATION_SIZE, 565 .data_size = AGGREGATION_SIZE,
565 .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE, 566 .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE,
566 .priv_size = sizeof(struct queue_entry_priv_usb), 567 .priv_size = sizeof(struct queue_entry_priv_usb),
567}; 568};
568 569
569static const struct data_queue_desc rt2800usb_queue_bcn = { 570static const struct data_queue_desc rt2800usb_queue_bcn = {
570 .entry_num = 8 * BEACON_ENTRIES, 571 .entry_num = 8,
571 .data_size = MGMT_FRAME_SIZE, 572 .data_size = MGMT_FRAME_SIZE,
572 .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE, 573 .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE,
573 .priv_size = sizeof(struct queue_entry_priv_usb), 574 .priv_size = sizeof(struct queue_entry_priv_usb),