Message ID | 20210615211407.92233-10-jouni@codeaurora.org |
---|---|
State | New |
Headers | show |
Series | [01/12] ath11k: disable unused CE8 interrupts for ipq8074 | expand |
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index a58e86e42b5b..0326c2fed374 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -654,8 +654,11 @@ u32 *ath11k_hal_srng_dst_get_next_entry(struct ath11k_base *ab, desc = srng->ring_base_vaddr + srng->u.dst_ring.tp; - srng->u.dst_ring.tp = (srng->u.dst_ring.tp + srng->entry_size) % - srng->ring_size; + srng->u.dst_ring.tp += srng->entry_size; + + /* wrap around to start of ring */ + if (srng->u.dst_ring.tp == srng->ring_size) + srng->u.dst_ring.tp = 0; /* Try to prefetch the next descriptor in the ring */ if (srng->flags & HAL_SRNG_FLAGS_CACHED)