From 42b42d2c9bd19b102663c1598b180dde4833320c Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Thu, 8 Aug 2019 11:05:11 +0200 Subject: [PATCH] ar71xx/ath79: ag71xx: get ring_mask consistent All other instances of this identical declaration fetch the value directly from the ring_order. Also do it here. Signed-off-by: Koen Vandeputte --- .../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 2 +- .../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index e97317bd20..484f0ee71d 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -127,7 +127,7 @@ static void ag71xx_ring_tx_init(struct ag71xx *ag) { struct ag71xx_ring *ring = &ag->tx_ring; int ring_size = BIT(ring->order); - int ring_mask = ring_size - 1; + int ring_mask = BIT(ring->order) - 1; int i; for (i = 0; i < ring_size; i++) { diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index b540a56a3a..5d2e8df298 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -130,7 +130,7 @@ static void ag71xx_ring_tx_init(struct ag71xx *ag) { struct ag71xx_ring *ring = &ag->tx_ring; int ring_size = BIT(ring->order); - int ring_mask = ring_size - 1; + int ring_mask = BIT(ring->order) - 1; int i; for (i = 0; i < ring_size; i++) { -- 2.25.1