From b38c83dd08665a93e439c4ffd9eef31bc098a6ea Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 14 Apr 2015 12:07:54 +0200 Subject: bgmac: simplify tx ring index handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keep incrementing ring->start and ring->end instead of pointing it to the actual ring slot entry. This simplifies the calculation of the number of free slots. Signed-off-by: Felix Fietkau Acked-by: Rafał Miłecki Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bgmac.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/ethernet/broadcom/bgmac.h') diff --git a/drivers/net/ethernet/broadcom/bgmac.h b/drivers/net/ethernet/broadcom/bgmac.h index 3ad965fe7fcc..5a198d56f3e7 100644 --- a/drivers/net/ethernet/broadcom/bgmac.h +++ b/drivers/net/ethernet/broadcom/bgmac.h @@ -414,10 +414,10 @@ enum bgmac_dma_ring_type { * empty. */ struct bgmac_dma_ring { - u16 num_slots; - u16 start; - u16 end; + u32 start; + u32 end; + u16 num_slots; u16 mmio_base; struct bgmac_dma_desc *cpu_base; dma_addr_t dma_base; -- cgit v1.2.3