]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rt2800: use TXOP_BACKOFF for probe frames
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 15 Feb 2017 09:25:12 +0000 (10:25 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 8 Mar 2017 15:05:53 +0000 (17:05 +0200)
Even if we do not set AMPDU bit in TXWI, device still can aggregate
frame and send it with rate not corresponding to requested. That mean
we can do not sent probe frames with requested rate. To prevent that
use TXOP_BACKOFF for probe frames.

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

index e1660b92b20c7793c88ea5d470e1d793f495bbf6..a2c1ca5c76d1c7d5b9191d8ad0f35aba949dfcc7 100644 (file)
@@ -372,15 +372,16 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 
        /*
         * Determine IFS values
-        * - Use TXOP_BACKOFF for management frames except beacons
+        * - Use TXOP_BACKOFF for probe and management frames except beacons
         * - Use TXOP_SIFS for fragment bursts
         * - Use TXOP_HTTXOP for everything else
         *
         * Note: rt2800 devices won't use CTS protection (if used)
         * for frames not transmitted with TXOP_HTTXOP
         */
-       if (ieee80211_is_mgmt(hdr->frame_control) &&
-           !ieee80211_is_beacon(hdr->frame_control))
+       if ((ieee80211_is_mgmt(hdr->frame_control) &&
+            !ieee80211_is_beacon(hdr->frame_control)) ||
+           (tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE))
                txdesc->u.ht.txop = TXOP_BACKOFF;
        else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT))
                txdesc->u.ht.txop = TXOP_SIFS;