]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rt2800: tune TX_RTS_CFG config
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 6 Jan 2017 13:05:14 +0000 (14:05 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 17 Jan 2017 11:58:37 +0000 (13:58 +0200)
Enable RTS frame retry fall-back and limit number of RTS retries to 7
what is default number of retries for small frames. As RTS/CTS is used
for TXOP protection, those settings prevent posting lots of RTS
frames when remote station do not response with CTS at the moment. After
sending 7 RTS's the HW will start back-off mechanism and after it will
start posing RTS again to get access to the medium.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c

index 4833ec63b7cde6b9755e92a2f9384f18d7cf998f..1f4a120fb16d8f054de214d193391011fe2b5ba2 100644 (file)
@@ -4902,10 +4902,10 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
        rt2800_register_write(rt2x00dev, TXOP_HLDR_ET, reg);
 
        rt2800_register_read(rt2x00dev, TX_RTS_CFG, &reg);
-       rt2x00_set_field32(&reg, TX_RTS_CFG_AUTO_RTS_RETRY_LIMIT, 32);
+       rt2x00_set_field32(&reg, TX_RTS_CFG_AUTO_RTS_RETRY_LIMIT, 7);
        rt2x00_set_field32(&reg, TX_RTS_CFG_RTS_THRES,
                           IEEE80211_MAX_RTS_THRESHOLD);
-       rt2x00_set_field32(&reg, TX_RTS_CFG_RTS_FBK_EN, 0);
+       rt2x00_set_field32(&reg, TX_RTS_CFG_RTS_FBK_EN, 1);
        rt2800_register_write(rt2x00dev, TX_RTS_CFG, reg);
 
        rt2800_register_write(rt2x00dev, EXP_ACK_TIME, 0x002400ca);