Tagging the more knowledgeable people with Linksys WRT AC series hardware in this discussion (and have had longer ownership of this devices in this series than me): @eduperez@mindwolf@solidus1983@davidc502
This does not directly answer your question, but the MT76 driver has AC and airtime fairness support. Might be an easier solution to switch to a MT76 device instead of trying to port the functionality. Especially since a much larger part of the driver is closed source for mlwifi in the form of firmware blobs. Thankfully the MT76 uses very small firmware blobs (although I would have preferred full opensource drivers of course)
I don't know how this impacts mwlwifi/mwl8k and if this will add support for AQL in mwlwifi/mwl8k, but IIRC this mac80211 approach seeks to eliminate the need to add AQL from scratch in every single driver.
Backported the patch for OpenWrt Master-5f68333952 here. Copy as 700-Add-Airtime-Queue-Limits-Master-5f68333952.patch into {working_dir}/package/kernel/mac80211/subsys/
Having just read through the code in a much more thorough manner, I don't think it will do anything differently for the Marvell Wireless chipsets. It still needs struct ieee80211_txq(). Neither mwlwifi nor mwl8k expose their txqs to mac80211. Thus, it won't benefit from this change.
Who will benefit? Current of users of ieee80211_txq() are [in Linux 5.4]:
ath10k
ath9k
iwlwifi
mt76
EDIT: I'm closing this since I've answered my own question – no it's not possible (at least with my level of C knowledge and driver coding) to port ATF and AQL for mwlwifi because it's queues aren't managed by mac80211. It will require drastic changes and a sizeable amount of time to refactor mwlwifi to use that.
I also had it wrong – one also needs to look into: mwlwifi's mac80211.c file.
It contains things like:
mwl_get_rateinfo
mwl_mac80211_tx
mwl_mac80211_conf_tx
mwl_mac80211_get_stats
mwl_mac80211_ampdu_action
If we can somehow adopt the above to use ieee80211_txq, then the ATF and AQL features can follow.
And just a general note on terminology, since this can be confusing: What mac80211 calls a "TXQ" is an abstract queueing structure controlled by FQ-CoDel where packets are kept until they are ready to transmit. Sorta like a qdisc on the netdev, but adapted to WiFi usage.
Whereas the queues drivers manage are hardware queues, i.e., the pipelines of packets that the hardware/firmware manages. Some drivers (e.g., ath9k) use the name "txq" for these hardware queues as well, while others (e.g., mt76 I think), call them "hwq". So there is not necessarily a one-to-one relationship between a "mac80211 TXQ", and a "hardware queue". Although, to confuse matters further, I think that the iwl driver does actually couple mac80211 TXQs to hardware queues.
I'd help port the driver but I have no idea how.
I've been trying to get some info from people related to this driver and either they don't answer or they don't know anything...