]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rt2800: use RTS/CTS protection instead of CTS-to-self
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 18 Nov 2016 09:43:59 +0000 (10:43 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 23 Nov 2016 15:38:51 +0000 (17:38 +0200)
Change default to RTS/CTS protection. This has a cost of transmitting
one more control frame (RTS) however protect us from traffic from
hidden node.

On station mode will use CTS-to-self if AP will configure that
for the network.

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

index 438f7151195b3cbd46f8eec790e97b186aa0db22..11cc079207ef54eef2d648a5a49a96834d3d5e12 100644 (file)
@@ -1621,7 +1621,7 @@ static void rt2800_config_ht_opmode(struct rt2x00_dev *rt2x00dev,
                 * => Protect all HT40 transmissions.
                 */
                mm20_mode = gf20_mode = 0;
-               mm40_mode = gf40_mode = 2;
+               mm40_mode = gf40_mode = 1;
 
                break;
        case IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER:
@@ -1644,7 +1644,7 @@ static void rt2800_config_ht_opmode(struct rt2x00_dev *rt2x00dev,
                 * Legacy STAs are present
                 * => Protect all HT transmissions.
                 */
-               mm20_mode = mm40_mode = gf20_mode = gf40_mode = 2;
+               mm20_mode = mm40_mode = gf20_mode = gf40_mode = 1;
 
                /*
                 * If erp protection is needed we have to protect HT
@@ -1660,7 +1660,7 @@ static void rt2800_config_ht_opmode(struct rt2x00_dev *rt2x00dev,
 
        /* check for STAs not supporting greenfield mode */
        if (any_sta_nongf)
-               gf20_mode = gf40_mode = 2;
+               gf20_mode = gf40_mode = 1;
 
        /* Update HT protection config */
        rt2800_register_read(rt2x00dev, MM20_PROT_CFG, &reg);