linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Use ATF by NL80211_EXT_FEATURE_AIRTIME_FAIRNESS
@ 2022-05-13  7:19 Evelyn Tsai
  2022-05-13  9:44 ` Toke Høiland-Jørgensen
  0 siblings, 1 reply; 2+ messages in thread
From: Evelyn Tsai @ 2022-05-13  7:19 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Evelyn Tsai, Sujuan Chen

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 <evelyn.tsai@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
 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


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

end of thread, other threads:[~2022-05-13  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-13  7:19 [PATCH] mac80211: Use ATF by NL80211_EXT_FEATURE_AIRTIME_FAIRNESS Evelyn Tsai
2022-05-13  9:44 ` Toke Høiland-Jørgensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).