From: Peter Seiderer <ps.report@gmx.net>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Felix Fietkau <nbd@nbd.name>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [RFC v2] mac80211: minstrel_ht: do not set RTS/CTS flag for fallback rates
Date: Tue, 16 Nov 2021 22:28:28 +0100 [thread overview]
Message-ID: <20211116212828.27613-1-ps.report@gmx.net> (raw)
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.
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
- change from 'respect RTS threshold setting' to 'do not set RTS/CTS
flag for fallback rates' (see commit message for reasoning)
---
net/mac80211/rc80211_minstrel_ht.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 72b44d4c42d0..f151acbe7bf5 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -1355,11 +1355,9 @@ minstrel_ht_set_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
/* enable RTS/CTS if needed:
* - if station is in dynamic SMPS (and streams > 1)
- * - for fallback rates, to increase chances of getting through
*/
- if (offset > 0 ||
- (mi->sta->smps_mode == IEEE80211_SMPS_DYNAMIC &&
- group->streams > 1)) {
+ if (mi->sta->smps_mode == IEEE80211_SMPS_DYNAMIC &&
+ group->streams > 1) {
ratetbl->rate[offset].count = ratetbl->rate[offset].count_rts;
flags |= IEEE80211_TX_RC_USE_RTS_CTS;
}
--
2.33.1
next reply other threads:[~2021-11-16 21:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 21:28 Peter Seiderer [this message]
2021-11-26 12:47 ` [RFC v2] mac80211: minstrel_ht: do not set RTS/CTS flag for fallback rates Felix Fietkau
2021-11-26 14:25 ` Peter Seiderer
2021-11-29 8:34 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211116212828.27613-1-ps.report@gmx.net \
--to=ps.report@gmx.net \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.