aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2010-06-14 16:12:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-15 16:00:50 -0400
commite1b4d7b735c564444d0db668a65c547ad1d29058 (patch)
treedbdf590d02a39cf8c76c5338ee5a8c7e786e7720 /drivers/net/wireless/rt2x00
parent3d2bc1036a64bc015671283833430035f7dbbed0 (diff)
rt2x00: Enable fallback rates for rt61pci and rt73usb
Explicitly enable the usage of fallback rates for the transmission of frames with rt61pci and rt73usb hardware. Note that for txdone reporting, only rt61pci is capable of reporting the fallback rates, for USB it is not possible to determine the number of retries. However the device will use the fallback rates, so it might still help in the performance. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c22
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c3
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 243df08ae910..d1270118f7d3 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -931,6 +931,9 @@ static void rt61pci_config_retry_limit(struct rt2x00_dev *rt2x00dev,
931 u32 reg; 931 u32 reg;
932 932
933 rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, &reg); 933 rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, &reg);
934 rt2x00_set_field32(&reg, TXRX_CSR4_OFDM_TX_RATE_DOWN, 1);
935 rt2x00_set_field32(&reg, TXRX_CSR4_OFDM_TX_RATE_STEP, 0);
936 rt2x00_set_field32(&reg, TXRX_CSR4_OFDM_TX_FALLBACK_CCK, 0);
934 rt2x00_set_field32(&reg, TXRX_CSR4_LONG_RETRY_LIMIT, 937 rt2x00_set_field32(&reg, TXRX_CSR4_LONG_RETRY_LIMIT,
935 libconf->conf->long_frame_max_tx_count); 938 libconf->conf->long_frame_max_tx_count);
936 rt2x00_set_field32(&reg, TXRX_CSR4_SHORT_RETRY_LIMIT, 939 rt2x00_set_field32(&reg, TXRX_CSR4_SHORT_RETRY_LIMIT,
@@ -2130,6 +2133,13 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
2130 } 2133 }
2131 txdesc.retry = rt2x00_get_field32(reg, STA_CSR4_RETRY_COUNT); 2134 txdesc.retry = rt2x00_get_field32(reg, STA_CSR4_RETRY_COUNT);
2132 2135
2136 /*
2137 * the frame was retried at least once
2138 * -> hw used fallback rates
2139 */
2140 if (txdesc.retry)
2141 __set_bit(TXDONE_FALLBACK, &txdesc.flags);
2142
2133 rt2x00pci_txdone(entry, &txdesc); 2143 rt2x00pci_txdone(entry, &txdesc);
2134 } 2144 }
2135} 2145}
@@ -2587,6 +2597,18 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
2587 EEPROM_MAC_ADDR_0)); 2597 EEPROM_MAC_ADDR_0));
2588 2598
2589 /* 2599 /*
2600 * As rt61 has a global fallback table we cannot specify
2601 * more then one tx rate per frame but since the hw will
2602 * try several rates (based on the fallback table) we should
2603 * still initialize max_rates to the maximum number of rates
2604 * we are going to try. Otherwise mac80211 will truncate our
2605 * reported tx rates and the rc algortihm will end up with
2606 * incorrect data.
2607 */
2608 rt2x00dev->hw->max_rates = 7;
2609 rt2x00dev->hw->max_rate_tries = 1;
2610
2611 /*
2590 * Initialize hw_mode information. 2612 * Initialize hw_mode information.
2591 */ 2613 */
2592 spec->supported_bands = SUPPORT_BAND_2GHZ; 2614 spec->supported_bands = SUPPORT_BAND_2GHZ;
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 113ad690f9d3..d06d90f003e7 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -816,6 +816,9 @@ static void rt73usb_config_retry_limit(struct rt2x00_dev *rt2x00dev,
816 u32 reg; 816 u32 reg;
817 817
818 rt2x00usb_register_read(rt2x00dev, TXRX_CSR4, &reg); 818 rt2x00usb_register_read(rt2x00dev, TXRX_CSR4, &reg);
819 rt2x00_set_field32(&reg, TXRX_CSR4_OFDM_TX_RATE_DOWN, 1);
820 rt2x00_set_field32(&reg, TXRX_CSR4_OFDM_TX_RATE_STEP, 0);
821 rt2x00_set_field32(&reg, TXRX_CSR4_OFDM_TX_FALLBACK_CCK, 0);
819 rt2x00_set_field32(&reg, TXRX_CSR4_LONG_RETRY_LIMIT, 822 rt2x00_set_field32(&reg, TXRX_CSR4_LONG_RETRY_LIMIT,
820 libconf->conf->long_frame_max_tx_count); 823 libconf->conf->long_frame_max_tx_count);
821 rt2x00_set_field32(&reg, TXRX_CSR4_SHORT_RETRY_LIMIT, 824 rt2x00_set_field32(&reg, TXRX_CSR4_SHORT_RETRY_LIMIT,