ath10k: switch to ieee80211_tx_dequeue_ni
authorErik Stromdahl <erik.stromdahl@gmail.com>
Mon, 17 Jun 2019 20:01:40 +0000 (22:01 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 1 Oct 2019 11:16:28 +0000 (14:16 +0300)
Since ath10k_mac_tx_push_txq() can be called from process context, we
must explicitly disable softirqs before the call into mac80211.

By calling ieee80211_tx_dequeue_ni() instead of ieee80211_tx_dequeue()
we make sure softirqs are always disabled even in the case when
ath10k_mac_tx_push_txq() is called from process context.

Calling ieee80211_tx_dequeue_ni() with softirq's already disabled
(e.g., from softirq context) should be safe as the local_bh_disable()
and local_bh_enable() functions (called from ieee80211_tx_dequeue_ni)
are fully reentrant.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/mac.c

index 02ca34b..08876f0 100644 (file)
@@ -4065,7 +4065,7 @@ int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw,
        if (ret)
                return ret;
 
-       skb = ieee80211_tx_dequeue(hw, txq);
+       skb = ieee80211_tx_dequeue_ni(hw, txq);
        if (!skb) {
                spin_lock_bh(&ar->htt.tx_lock);
                ath10k_htt_tx_dec_pending(htt);