aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt61pci.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/rt61pci.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/rt61pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index af548c87f108..3232336b7f42 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2078,7 +2078,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
2078 * that the TX_STA_FIFO stack has a size of 16. We stick to our 2078 * that the TX_STA_FIFO stack has a size of 16. We stick to our
2079 * tx ring size for now. 2079 * tx ring size for now.
2080 */ 2080 */
2081 for (i = 0; i < TX_ENTRIES; i++) { 2081 for (i = 0; i < rt2x00dev->ops->tx->entry_num; i++) {
2082 rt2x00pci_register_read(rt2x00dev, STA_CSR4, &reg); 2082 rt2x00pci_register_read(rt2x00dev, STA_CSR4, &reg);
2083 if (!rt2x00_get_field32(reg, STA_CSR4_VALID)) 2083 if (!rt2x00_get_field32(reg, STA_CSR4_VALID))
2084 break; 2084 break;
@@ -2857,21 +2857,21 @@ static const struct rt2x00lib_ops rt61pci_rt2x00_ops = {
2857}; 2857};
2858 2858
2859static const struct data_queue_desc rt61pci_queue_rx = { 2859static const struct data_queue_desc rt61pci_queue_rx = {
2860 .entry_num = RX_ENTRIES, 2860 .entry_num = 32,
2861 .data_size = DATA_FRAME_SIZE, 2861 .data_size = DATA_FRAME_SIZE,
2862 .desc_size = RXD_DESC_SIZE, 2862 .desc_size = RXD_DESC_SIZE,
2863 .priv_size = sizeof(struct queue_entry_priv_pci), 2863 .priv_size = sizeof(struct queue_entry_priv_pci),
2864}; 2864};
2865 2865
2866static const struct data_queue_desc rt61pci_queue_tx = { 2866static const struct data_queue_desc rt61pci_queue_tx = {
2867 .entry_num = TX_ENTRIES, 2867 .entry_num = 32,
2868 .data_size = DATA_FRAME_SIZE, 2868 .data_size = DATA_FRAME_SIZE,
2869 .desc_size = TXD_DESC_SIZE, 2869 .desc_size = TXD_DESC_SIZE,
2870 .priv_size = sizeof(struct queue_entry_priv_pci), 2870 .priv_size = sizeof(struct queue_entry_priv_pci),
2871}; 2871};
2872 2872
2873static const struct data_queue_desc rt61pci_queue_bcn = { 2873static const struct data_queue_desc rt61pci_queue_bcn = {
2874 .entry_num = 4 * BEACON_ENTRIES, 2874 .entry_num = 4,
2875 .data_size = 0, /* No DMA required for beacons */ 2875 .data_size = 0, /* No DMA required for beacons */
2876 .desc_size = TXINFO_SIZE, 2876 .desc_size = TXINFO_SIZE,
2877 .priv_size = sizeof(struct queue_entry_priv_pci), 2877 .priv_size = sizeof(struct queue_entry_priv_pci),