mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
Add hardware airtime fairness (ATF) support for mt7996, using the MAC's weighted DWRR scheduler (VoW) to balance TX airtime between stations, in the same way as the mt7915 implementation. This supplements mac80211's software airtime fairness rather than replacing it: software ATF keeps scheduling the host TX queues, while the hardware scheduler enforces fairness on the offloaded path where the host has no airtime accounting, such as when WED is active. A station's TX airtime weight is taken from mac80211 through the sta_set_airtime_weight op and applied to the hardware scheduler directly; the per-AC DWRR quantum levels and the station's BSS group index are derived on the fly, mapping the weight logarithmically onto the global hardware quantum table. ATF and WATF are enabled by default and can be toggled together at runtime through the "vow_atf" debugfs file. Signed-off-by: Benjamin Lin <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>