mac80211: Add TXQ scheduling API

This adds an API to mac80211 to handle scheduling of TXQs and changes the
interface between driver and mac80211 for TXQ handling as follows:

- The wake_tx_queue callback interface no longer includes the TXQ. Instead,
  the driver is expected to retrieve that from ieee80211_next_txq()

- Two new mac80211 functions are added: ieee80211_next_txq() and
  ieee80211_schedule_txq(). The former returns the next TXQ that should be
  scheduled, and is how the driver gets a queue to pull packets from. The
  latter is called internally by mac80211 to start scheduling a queue, and
  the driver is supposed to call it to re-schedule the TXQ after it is
  finished pulling packets from it (unless the queue emptied).

The ath9k and ath10k drivers are changed to use the new API.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Toke Høiland-Jørgensen
2017-10-31 12:27:45 +01:00
committed by Johannes Berg
parent 9de18d8186
commit e937b8da5a
15 changed files with 174 additions and 263 deletions

View File

@@ -1158,16 +1158,10 @@ drv_tdls_recv_channel_switch(struct ieee80211_local *local,
trace_drv_return_void(local);
}
static inline void drv_wake_tx_queue(struct ieee80211_local *local,
struct txq_info *txq)
static inline void drv_wake_tx_queue(struct ieee80211_local *local)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif);
if (!check_sdata_in_driver(sdata))
return;
trace_drv_wake_tx_queue(local, sdata, txq);
local->ops->wake_tx_queue(&local->hw, &txq->txq);
trace_drv_wake_tx_queue(local);
local->ops->wake_tx_queue(&local->hw);
}
static inline int drv_start_nan(struct ieee80211_local *local,