[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e098a58a-8ec0-f90d-dbc9-7b621e31d051@nbd.name>
Date: Fri, 26 Nov 2021 13:47:07 +0100
From: Felix Fietkau <nbd@....name>
To: Peter Seiderer <ps.report@....net>, linux-wireless@...r.kernel.org
Cc: Johannes Berg <johannes@...solutions.net>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [RFC v2] mac80211: minstrel_ht: do not set RTS/CTS flag for
fallback rates
On 2021-11-16 22:28, Peter Seiderer wrote:
> Despite the 'RTS thr:off' setting a wireshark trace of IBSS
> traffic with HT40 mode enabled between two ath9k cards revealed
> some RTS/CTS traffic.
>
> Debug and code analysis showed that most places setting
> IEEE80211_TX_RC_USE_RTS_CTS respect the RTS strategy by
> evaluating rts_threshold, e.g. net/mac80211/tx.c:
>
> 698 /* set up RTS protection if desired */
> 699 if (len > tx->local->hw.wiphy->rts_threshold) {
> 700 txrc.rts = true;
> 701 }
> 702
> 703 info->control.use_rts = txrc.rts;
>
> or drivers/net/wireless/ath/ath9k/xmit.c
>
> 1238 /*
> 1239 * Handle RTS threshold for unaggregated HT frames.
> 1240 */
> 1241 if (bf_isampdu(bf) && !bf_isaggr(bf) &&
> 1242 (rates[i].flags & IEEE80211_TX_RC_MCS) &&
> 1243 unlikely(rts_thresh != (u32) -1)) {
> 1244 if (!rts_thresh || (len > rts_thresh))
> 1245 rts = true;
> 1246 }
>
> The only place setting IEEE80211_TX_RC_USE_RTS_CTS unconditionally
> was found in net/mac80211/rc80211_minstrel_ht.c.
>
> As the use_rts value is only calculated after hitting the minstrel_ht code
> preferre to not set IEEE80211_TX_RC_USE_RTS_CTS (and overruling the
> RTS threshold setting) for the fallback rates case.
The idea behind the this part of minstrel_ht code is to avoid the
overhead of RTS/CTS for transmissions using the primary rate and to
increase the reliability of retransmissions by adding it for fallback
rates. This is completely unrelated to the RTS threshold.
If you don't want this behavior, I'm fine with adding a way to
explicitly disable it. However, I do think leaving it on by default
makes sense.
- Felix
Powered by blists - more mailing lists