Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag
@ 2021-05-18 11:07 Philipp Borgers
  2021-05-18 11:07 ` [PATCH 2/2] mac80211: refactor rc_no_data_or_no_ack_use_min function Philipp Borgers
  2021-05-18 11:17 ` [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Felix Fietkau
  0 siblings, 2 replies; 8+ messages in thread
From: Philipp Borgers @ 2021-05-18 11:07 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Philipp Borgers

Data Frames with no ack flag set should be handle by the rate controler.
Make sure we reach the rate controler by returning early from
rate_control_send_low if the frame is a data frame with no ack flag.

Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de>
---
 net/mac80211/rate.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 63652c39c8e0..4f5b35a0ea28 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -391,11 +391,16 @@ static bool rate_control_send_low(struct ieee80211_sta *pubsta,
 				  struct ieee80211_tx_rate_control *txrc)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb);
+	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) txrc->skb->data;
 	struct ieee80211_supported_band *sband = txrc->sband;
 	struct sta_info *sta;
 	int mcast_rate;
 	bool use_basicrate = false;
 
+	if (ieee80211_is_data(hdr->frame_control) &&
+			(info->flags & IEEE80211_TX_CTL_NO_ACK))
+		return false;
+
 	if (!pubsta || rc_no_data_or_no_ack_use_min(txrc)) {
 		__rate_control_send_low(txrc->hw, sband, pubsta, info,
 					txrc->rate_idx_mask);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-19 10:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-18 11:07 [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Philipp Borgers
2021-05-18 11:07 ` [PATCH 2/2] mac80211: refactor rc_no_data_or_no_ack_use_min function Philipp Borgers
2021-05-18 17:37   ` Kalle Valo
2021-05-18 11:17 ` [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Felix Fietkau
2021-05-18 11:19   ` Johannes Berg
2021-05-18 11:30     ` Felix Fietkau
2021-05-19 10:47     ` Philipp Borgers
2021-05-19 10:48       ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox