summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/driver-ops.h4
-rw-r--r--net/mac80211/tx.c13
2 files changed, 14 insertions, 3 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 1aab1734b26f..ba3c07b10cd0 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1176,9 +1176,7 @@ static inline void drv_wake_tx_queue(struct ieee80211_local *local,
static inline void schedule_and_wake_txq(struct ieee80211_local *local,
struct txq_info *txqi)
{
- spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
- ieee80211_return_txq(&local->hw, &txqi->txq);
- spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
+ ieee80211_schedule_txq(&local->hw, &txqi->txq);
drv_wake_tx_queue(local, txqi);
}
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f46d8d822f86..037f95e39a45 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3703,6 +3703,19 @@ void ieee80211_return_txq(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_return_txq);
+void ieee80211_schedule_txq(struct ieee80211_hw *hw,
+ struct ieee80211_txq *txq)
+ __acquires(txq_lock) __releases(txq_lock)
+{
+ struct ieee80211_local *local = hw_to_local(hw);
+ struct txq_info *txqi = to_txq_info(txq);
+
+ spin_lock_bh(&local->active_txq_lock[txq->ac]);
+ ieee80211_return_txq(hw, txq);
+ spin_unlock_bh(&local->active_txq_lock[txq->ac]);
+}
+EXPORT_SYMBOL(ieee80211_schedule_txq);
+
bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
struct ieee80211_txq *txq)
{