aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/files/drivers/net
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2019-08-12 12:18:15 +0200
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2019-08-27 10:31:06 +0200
commit0a59e9197395e8db0ac2b69bec9a0c93258ff1f9 (patch)
treee08a619ed3eb3d2785a67db85a1962c256cef671 /target/linux/ath79/files/drivers/net
parentdb1a935e5c6c8f55342b1996e09fa799bbda1239 (diff)
downloadupstream-0a59e9197395e8db0ac2b69bec9a0c93258ff1f9.tar.gz
upstream-0a59e9197395e8db0ac2b69bec9a0c93258ff1f9.tar.bz2
upstream-0a59e9197395e8db0ac2b69bec9a0c93258ff1f9.zip
ar71xx/ath79: ag71xx: dont fetch the same var again
tx_size was just declared above and set to BIT(tx->order) Use the declaration instead, which could avoid a pointer deref Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> (cherry picked from commit 6852eab58236e3991f5d73f211018dfef01f2a64)
Diffstat (limited to 'target/linux/ath79/files/drivers/net')
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c2
1 files changed, 1 insertions, 1 deletions
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 5d2e8df298..b4ffa1154f 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
@@ -284,7 +284,7 @@ static int ag71xx_rings_init(struct ag71xx *ag)
return -ENOMEM;
}
- rx->buf = &tx->buf[BIT(tx->order)];
+ rx->buf = &tx->buf[tx_size];
rx->descs_cpu = ((void *)tx->descs_cpu) + tx_size * AG71XX_DESC_SIZE;
rx->descs_dma = tx->descs_dma + tx_size * AG71XX_DESC_SIZE;