summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath11k/dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dp.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/dp.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index b966a16a930f..b112825a52ed 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -3,7 +3,6 @@
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*/
-#include <linux/kfifo.h>
#include "core.h"
#include "dp_tx.h"
#include "hal_tx.h"
@@ -828,10 +827,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);
+ kfree(dp->tx_ring[i].tx_status);
}
/* Deinit any SOC level resource */
@@ -871,17 +867,17 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
if (ret)
goto fail_link_desc_cleanup;
- size = roundup_pow_of_two(DP_TX_COMP_RING_SIZE);
+ size = sizeof(struct hal_wbm_release_ring) * DP_TX_COMP_RING_SIZE;
for (i = 0; i < DP_TCL_NUM_RING_MAX; i++) {
idr_init(&dp->tx_ring[i].txbuf_idr);
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)
+ dp->tx_ring[i].tx_status_head = 0;
+ dp->tx_ring[i].tx_status_tail = DP_TX_COMP_RING_SIZE - 1;
+ dp->tx_ring[i].tx_status = kmalloc(size, GFP_KERNEL);
+ if (!dp->tx_ring[i].tx_status)
goto fail_cmn_srng_cleanup;
}