From: Alexander Wetzel <alexander@xxxxxxxxxxxxxx> Always providing and use the MMPDU TX queue to prepare to move all TX into TXQs. For drivers not supporting the MMPDU TXQ, mac80211 will handle it internally. Signed-off-by: Alexander Wetzel <alexander@xxxxxxxxxxxxxx> --- net/mac80211/driver-ops.h | 12 ++++++++++++ net/mac80211/sta_info.c | 1 - net/mac80211/tx.c | 19 ++----------------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 307587c8a003..992fa2957621 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1364,6 +1364,18 @@ static inline void drv_wake_tx_queue(struct ieee80211_local *local, return; trace_drv_wake_tx_queue(local, sdata, txq); + + /* Driver support for MPDU TXQ support is optional */ + if (unlikely(txq->txq.tid == IEEE80211_NUM_TIDS && + ((sdata->vif.type == NL80211_IFTYPE_STATION && + !ieee80211_hw_check(&sdata->local->hw, STA_MMPDU_TXQ)) || + (sdata->vif.type != NL80211_IFTYPE_STATION && + !ieee80211_hw_check(&sdata->local->hw, + BUFF_MMPDU_TXQ))))) { + ieee80211_handle_wake_tx_queue(&local->hw, &txq->txq); + return; + } + local->ops->wake_tx_queue(&local->hw, &txq->txq); } diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index f83268fa9f92..3ba03b6142cc 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -638,7 +638,6 @@ __sta_info_alloc(struct ieee80211_sub_if_data *sdata, for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) { struct txq_info *txq = txq_data + i * size; - /* might not do anything for the (bufferable) MMPDU TXQ */ ieee80211_txq_init(sdata, sta, txq, i); } diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 20179db88c4a..914fba53d7f1 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1311,10 +1311,6 @@ static struct txq_info *ieee80211_get_txq(struct ieee80211_local *local, ieee80211_is_bufferable_mmpdu(skb) || vif->type == NL80211_IFTYPE_STATION) && sta && sta->uploaded) { - /* - * This will be NULL if the driver didn't set the - * opt-in hardware flag. - */ txq = sta->sta.txq[IEEE80211_NUM_TIDS]; } } else if (sta) { @@ -1521,21 +1517,10 @@ void ieee80211_txq_init(struct ieee80211_sub_if_data *sdata, return; } - if (tid == IEEE80211_NUM_TIDS) { - if (sdata->vif.type == NL80211_IFTYPE_STATION) { - /* Drivers need to opt in to the management MPDU TXQ */ - if (!ieee80211_hw_check(&sdata->local->hw, - STA_MMPDU_TXQ)) - return; - } else if (!ieee80211_hw_check(&sdata->local->hw, - BUFF_MMPDU_TXQ)) { - /* Drivers need to opt in to the bufferable MMPDU TXQ */ - return; - } + if (tid == IEEE80211_NUM_TIDS) txqi->txq.ac = IEEE80211_AC_VO; - } else { + else txqi->txq.ac = ieee80211_ac_from_tid(tid); - } txqi->txq.sta = &sta->sta; txqi->txq.tid = tid; -- 2.48.1