2022-05-13 12:42:24

by Evelyn Tsai

[permalink] [raw]
Subject: [PATCH] mac80211: Use ATF by NL80211_EXT_FEATURE_AIRTIME_FAIRNESS

Except for using debugfs to change airtime_flags (AIRTIME_USE_TX/RX),
turn ATF into a proper NL80211_EXT_FEATURE, so the driver can determine
whether using airtime scheduling.

Signed-off-by: Evelyn Tsai <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
---
net/mac80211/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 5311c3cd3050..89542bed7d89 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -717,7 +717,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H;
}

- local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX;
+ if (wiphy_ext_feature_isset(local->hw.wiphy,
+ NL80211_EXT_FEATURE_AIRTIME_FAIRNESS))
+ local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX;
local->aql_threshold = IEEE80211_AQL_THRESHOLD;
atomic_set(&local->aql_total_pending_airtime, 0);

--
2.29.2



2022-05-13 16:50:29

by Toke Høiland-Jørgensen

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Use ATF by NL80211_EXT_FEATURE_AIRTIME_FAIRNESS

Evelyn Tsai <[email protected]> writes:

> Except for using debugfs to change airtime_flags (AIRTIME_USE_TX/RX),
> turn ATF into a proper NL80211_EXT_FEATURE, so the driver can determine
> whether using airtime scheduling.

So the reason we didn't do this from the beginning was that the driver
would just not call ieee80211_register_airtime() if it did not support
airtime fairness. Why is this not applicable to your use case?

-Toke