mac80211: refresh patches
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 020-16-rt2800-use-TXOP_BACKOFF-for-probe-frames.patch
1 From fb47ada8dc3c30c8e7b415da155742b49536c61e Mon Sep 17 00:00:00 2001
2 From: Stanislaw Gruszka <sgruszka@redhat.com>
3 Date: Wed, 15 Feb 2017 10:25:12 +0100
4 Subject: [PATCH 16/19] rt2800: use TXOP_BACKOFF for probe frames
5
6 Even if we do not set AMPDU bit in TXWI, device still can aggregate
7 frame and send it with rate not corresponding to requested. That mean
8 we can do not sent probe frames with requested rate. To prevent that
9 use TXOP_BACKOFF for probe frames.
10
11 Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
12 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
13 ---
14 drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 7 ++++---
15 1 file changed, 4 insertions(+), 3 deletions(-)
16
17 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
18 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
19 @@ -372,15 +372,16 @@ static void rt2x00queue_create_tx_descri
20
21 /*
22 * Determine IFS values
23 - * - Use TXOP_BACKOFF for management frames except beacons
24 + * - Use TXOP_BACKOFF for probe and management frames except beacons
25 * - Use TXOP_SIFS for fragment bursts
26 * - Use TXOP_HTTXOP for everything else
27 *
28 * Note: rt2800 devices won't use CTS protection (if used)
29 * for frames not transmitted with TXOP_HTTXOP
30 */
31 - if (ieee80211_is_mgmt(hdr->frame_control) &&
32 - !ieee80211_is_beacon(hdr->frame_control))
33 + if ((ieee80211_is_mgmt(hdr->frame_control) &&
34 + !ieee80211_is_beacon(hdr->frame_control)) ||
35 + (tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE))
36 txdesc->u.ht.txop = TXOP_BACKOFF;
37 else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT))
38 txdesc->u.ht.txop = TXOP_SIFS;