summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBen Greear2017-05-31 13:21:26 +0200
committerKalle Valo2017-06-01 14:57:12 +0200
commit4f40b423339b8121fbd5d6735bf6942020355c98 (patch)
tree463d4a2164d2c95b41694edd36811cf96ba402c7 /drivers/net
parentath10k: log when longer bmi cmds happen (diff)
downloadkernel-qcow2-linux-4f40b423339b8121fbd5d6735bf6942020355c98.tar.gz
kernel-qcow2-linux-4f40b423339b8121fbd5d6735bf6942020355c98.tar.xz
kernel-qcow2-linux-4f40b423339b8121fbd5d6735bf6942020355c98.zip
ath10k: initialize nbytes to 0
ath10k firmware checks nbytes == 0 as part of determining if DMA has completed successfully. To help make this work more often, have the driver initialize nbytes to zero when freeing the descriptor slot. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath10k/ce.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index ee1090ca2eac..51309563990f 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -594,6 +594,7 @@ int ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state,
unsigned int nentries_mask = src_ring->nentries_mask;
unsigned int sw_index = src_ring->sw_index;
unsigned int read_index;
+ struct ce_desc *desc;
if (src_ring->hw_index == sw_index) {
/*
@@ -623,6 +624,9 @@ int ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state,
/* sanity */
src_ring->per_transfer_context[sw_index] = NULL;
+ desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space,
+ sw_index);
+ desc->nbytes = 0;
/* Update sw_index */
sw_index = CE_RING_IDX_INCR(nentries_mask, sw_index);