diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-04-14 13:07:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-14 21:57:10 +0300 |
commit | b38c83dd08665a93e439c4ffd9eef31bc098a6ea (patch) | |
tree | e35af7b479d02c713b303d24bbf60442e0f52bc8 /drivers/net/ethernet/broadcom/bgmac.h | |
parent | e07678341b612bbf98c2bf205c3f26f3ef5f8e93 (diff) | |
download | linux-b38c83dd08665a93e439c4ffd9eef31bc098a6ea.tar.xz |
bgmac: simplify tx ring index handling
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 <nbd@openwrt.org>
Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bgmac.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bgmac.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; |