Commit cac152c8 authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by chrome-bot
Browse files

BACKPORT: mac80211: Add TXQ scheduling API



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
driver uses to indicate that it has finished scheduling a TXQ (which will
then be put back in the scheduling rotation if it isn't empty).

The driver must call ieee80211_txq_schedule_start() at the start of each
scheduling session, and ieee80211_txq_schedule_end() at the end. The API
then guarantees that the same TXQ is not returned twice in the same
session (so a driver can loop on ieee80211_next_txq() without worrying
about breaking the loop.

Usage of the new API is optional, so drivers can be ported one at a time.
In this patch, the actual scheduling performed by mac80211 is simple
round-robin, but a subsequent commit adds airtime fairness awareness to the
scheduler.

Signed-off-by: default avatarToke Hiland-Jrgensen <toke@toke.dk>
[minor kernel-doc fix, propagate sparse locking checks out]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>

BUG=b:131197056
TEST=Wifi stress and latency under load test.

(cherry picked from commit 18667600)

Resloved conflicts in:
net/mac80211/driver-ops.h
net/mac80211/sta_info.c
include/net/cfg80211.h

Signed-off-by: default avatarKan Yan <kyan@google.com>
Change-Id: I93500919ba6dbb5021c6d1903ea1e774ece55387
Reviewed-on: https://chromium-review.googlesource.com/1636897


Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: default avatarJulan Hsu <julanhsu@google.com>
Reviewed-by: default avatarKan Yan <kyan@chromium.org>
parent 2e8fcfa1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment