[PATCH RFC v4 1/4] mac80211: Add TXQ scheduling API

2018-09-16 Thread Toke Høiland-Jørgensen
This adds an API to mac80211 to handle scheduling of TXQs. The interface between driver and mac80211 for TXQ handling is changed by adding two new functions: ieee80211_next_txq(), which will return the next TXQ to schedule in the current round-robin rotation, and ieee80211_return_txq(), which the

[PATCH RFC v4 0/4] Move TXQ scheduling into mac80211

2018-09-16 Thread Toke Høiland-Jørgensen
Another update, addressing most of the concerns raised in the last round: - Added schedule_start()/end() functions that adds locking around the whole scheduling operation, which means we can get rid of the 'first' parameter to ieee80211_next_txq(). - Adds a callback in the wake_txqs tasklet

[PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-09-16 Thread Toke Høiland-Jørgensen
This adds airtime accounting and scheduling to the mac80211 TXQ scheduler. A new callback, ieee80211_sta_register_airtime(), is added that drivers can call to report airtime usage for stations. When airtime information is present, mac80211 will schedule TXQs (through ieee80211_next_txq()) in a

[PATCH RFC v4 2/4] cfg80211: Add airtime statistics and settings

2018-09-16 Thread Toke Høiland-Jørgensen
This adds TX airtime statistics to the cfg80211 station dump (to go along with the RX info already present), and adds a new parameter to set the airtime weight of each station. The latter allows userspace to implement policies for different stations by varying their weights. Signed-off-by: Toke

[PATCH RFC v4 4/4] ath9k: Switch to mac80211 TXQ scheduling and airtime APIs

2018-09-16 Thread Toke Høiland-Jørgensen
This moves the ath9k driver to use the mac80211 TXQ scheduling and airtime accounting APIs, removing the corresponding state tracking inside the driver. Signed-off-by: Toke Høiland-Jørgensen --- drivers/net/wireless/ath/ath9k/ath9k.h | 14 -- drivers/net/wireless/ath/ath9k/debug.c |