@@ -822,10 +822,7 @@ void ath11k_dp_free(struct ath11k_base *ab)
ath11k_dp_tx_pending_cleanup, ab);
idr_destroy(&dp->tx_ring[i].txbuf_idr);
spin_unlock_bh(&dp->tx_ring[i].tx_idr_lock);
-
- spin_lock_bh(&dp->tx_ring[i].tx_status_lock);
kfifo_free(&dp->tx_ring[i].tx_status_fifo);
- spin_unlock_bh(&dp->tx_ring[i].tx_status_lock);
}
/* Deinit any SOC level resource */
@@ -872,7 +869,6 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
spin_lock_init(&dp->tx_ring[i].tx_idr_lock);
dp->tx_ring[i].tcl_data_ring_id = i;
- spin_lock_init(&dp->tx_ring[i].tx_status_lock);
ret = kfifo_alloc(&dp->tx_ring[i].tx_status_fifo, size,
GFP_KERNEL);
if (ret)
@@ -66,10 +66,6 @@ struct dp_tx_ring {
/* Protects txbuf_idr and num_pending */
spinlock_t tx_idr_lock;
DECLARE_KFIFO_PTR(tx_status_fifo, struct hal_wbm_release_ring);
- /* lock to protect tx_status_fifo because tx_status_fifo can be
- * accessed concurrently.
- */
- spinlock_t tx_status_lock;
};
struct ath11k_pdev_mon_stats {
@@ -445,7 +445,6 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
ath11k_hal_srng_access_begin(ab, status_ring);
- spin_lock_bh(&tx_ring->tx_status_lock);
while (!kfifo_is_full(&tx_ring->tx_status_fifo) &&
(desc = ath11k_hal_srng_dst_get_next_entry(ab, status_ring)))
kfifo_in(&tx_ring->tx_status_fifo, (void *)desc, sizeof(struct hal_wbm_release_ring));
@@ -456,12 +455,9 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
ath11k_warn(ab, "Unable to process some of the tx_status ring desc because status_fifo is full\n");
}
- spin_unlock_bh(&tx_ring->tx_status_lock);
-
ath11k_hal_srng_access_end(ab, status_ring);
spin_unlock_bh(&status_ring->lock);
- spin_lock_bh(&tx_ring->tx_status_lock);
while (kfifo_get(&tx_ring->tx_status_fifo, &tx_status)) {
ath11k_hal_tx_status_parse(ab, &tx_status, &ts);
@@ -492,12 +488,8 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
if (atomic_dec_and_test(&ar->dp.num_tx_pending))
wake_up(&ar->dp.tx_empty_waitq);
- /* TODO: Locking optimization so that tx_completion for an msdu
- * is not called with tx_status_lock acquired
- */
ath11k_dp_tx_complete_msdu(ar, msdu, &ts);
}
- spin_unlock_bh(&tx_ring->tx_status_lock);
}
int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx_tid,
The access to the fifo happens inside a napi context, which is an atomic operation. Locking is therefore not required. Signed-off-by: John Crispin <john@phrozen.org> --- drivers/net/wireless/ath/ath11k/dp.c | 4 ---- drivers/net/wireless/ath/ath11k/dp.h | 4 ---- drivers/net/wireless/ath/ath11k/dp_tx.c | 8 -------- 3 files changed, 16 deletions(-)