aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/subsys/331-mac80211-improve-AQL-tx-time-estimation.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-06-18 10:33:47 +0200
committerFelix Fietkau <nbd@nbd.name>2022-06-18 10:34:00 +0200
commit1c377a176ba13075a1b1cfba085c1f3538c7acc1 (patch)
treead56ae08dd5d2fccf594bb1b001ac06380c354b6 /package/kernel/mac80211/patches/subsys/331-mac80211-improve-AQL-tx-time-estimation.patch
parent7676808434233aeeeecce6a560ccd7846805b107 (diff)
downloadupstream-1c377a176ba13075a1b1cfba085c1f3538c7acc1.tar.gz
upstream-1c377a176ba13075a1b1cfba085c1f3538c7acc1.tar.bz2
upstream-1c377a176ba13075a1b1cfba085c1f3538c7acc1.zip
Revert "mac80211: sync airtime fairness fixes with updated upstream submission"
This reverts commit 958785508cc802de75698607670f9a236883d24d. Needs some more work until it is ready Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/331-mac80211-improve-AQL-tx-time-estimation.patch')
-rw-r--r--package/kernel/mac80211/patches/subsys/331-mac80211-improve-AQL-tx-time-estimation.patch80
1 files changed, 0 insertions, 80 deletions
diff --git a/package/kernel/mac80211/patches/subsys/331-mac80211-improve-AQL-tx-time-estimation.patch b/package/kernel/mac80211/patches/subsys/331-mac80211-improve-AQL-tx-time-estimation.patch
deleted file mode 100644
index 529ad13902..0000000000
--- a/package/kernel/mac80211/patches/subsys/331-mac80211-improve-AQL-tx-time-estimation.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Sat, 11 Jun 2022 16:34:32 +0200
-Subject: [PATCH] mac80211: improve AQL tx time estimation
-
-If airtime cannot be calculated because of missing or unsupported rate info,
-use the smallest possible non-zero value for estimated tx time.
-This improves handling of these cases by preventing queueing of as many packets
-as the driver/hardware queue can hold for these stations.
-Also slightly improve limiting queueing by explicitly rounding up small values.
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/include/net/mac80211.h
-+++ b/include/net/mac80211.h
-@@ -1107,20 +1107,24 @@ struct ieee80211_tx_info {
- };
- };
-
-+#define IEEE80211_TX_TIME_EST_UNIT 4
-+
-+static inline u16
-+ieee80211_info_get_tx_time_est(struct ieee80211_tx_info *info)
-+{
-+ return info->tx_time_est * IEEE80211_TX_TIME_EST_UNIT;
-+}
-+
- static inline u16
- ieee80211_info_set_tx_time_est(struct ieee80211_tx_info *info, u16 tx_time_est)
- {
- /* We only have 10 bits in tx_time_est, so store airtime
- * in increments of 4us and clamp the maximum to 2**12-1
- */
-- info->tx_time_est = min_t(u16, tx_time_est, 4095) >> 2;
-- return info->tx_time_est << 2;
--}
-+ tx_time_est = DIV_ROUND_UP(tx_time_est, IEEE80211_TX_TIME_EST_UNIT);
-+ info->tx_time_est = min_t(u16, tx_time_est, BIT(10) - 1);
-
--static inline u16
--ieee80211_info_get_tx_time_est(struct ieee80211_tx_info *info)
--{
-- return info->tx_time_est << 2;
-+ return ieee80211_info_get_tx_time_est(info);
- }
-
- /**
---- a/net/mac80211/status.c
-+++ b/net/mac80211/status.c
-@@ -999,6 +999,8 @@ static void __ieee80211_tx_status(struct
- NULL,
- skb->len,
- false);
-+ if (!airtime)
-+ airtime = IEEE80211_TX_TIME_EST_UNIT;
-
- ieee80211_register_airtime(txq, airtime, 0);
- }
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -3798,13 +3798,12 @@ encap_out:
-
- airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta,
- skb->len, ampdu);
-- if (airtime) {
-- airtime = ieee80211_info_set_tx_time_est(info, airtime);
-- ieee80211_sta_update_pending_airtime(local, tx.sta,
-- txq->ac,
-- airtime,
-- false);
-- }
-+ if (!airtime)
-+ airtime = IEEE80211_TX_TIME_EST_UNIT;
-+
-+ airtime = ieee80211_info_set_tx_time_est(info, airtime);
-+ ieee80211_sta_update_pending_airtime(local, tx.sta, txq->ac,
-+ airtime, false);
- }
-
- return skb;