aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
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:32:44 +0200
commit81d0da118694feb874f992093063a2852285d194 (patch)
treea893a364bf241925814be4bb13a1d8ea4f85911c /target/linux/ar71xx
parente773838813c268720f61dd5946dbac40e414b56a (diff)
downloadupstream-81d0da118694feb874f992093063a2852285d194.tar.gz
upstream-81d0da118694feb874f992093063a2852285d194.tar.bz2
upstream-81d0da118694feb874f992093063a2852285d194.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>
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c2
1 files changed, 1 insertions, 1 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 ee703a48bf..ebbe8a7472 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
@@ -298,7 +298,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;