ar71xx: ag71xx: add missing register writes
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Wed, 7 Aug 2019 15:08:05 +0000 (17:08 +0200)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Tue, 27 Aug 2019 08:32:44 +0000 (10:32 +0200)
These are added in ath79, but were not backported here

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

index f0d8d46a18a11e2877f4c18e39034928c9509773..e97317bd20ff435b1699753aac76fd5a74e4a0d0 100644 (file)
@@ -1274,6 +1274,9 @@ static int ag71xx_change_mtu(struct net_device *dev, int new_mtu)
                return -EBUSY;
 
        dev->mtu = new_mtu;
+       ag71xx_wr(ag, AG71XX_REG_MAC_MFL,
+                 ag71xx_max_frame_len(dev->mtu));
+
        return 0;
 }
 
@@ -1413,6 +1416,8 @@ static int ag71xx_probe(struct platform_device *pdev)
 
        ag71xx_dump_regs(ag);
 
+       ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, 0);
+
        ag71xx_hw_init(ag);
 
        ag71xx_dump_regs(ag);