net: sunxi: Correct MAC address register order
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 1 May 2018 21:33:55 +0000 (16:33 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 13 Jun 2018 18:54:15 +0000 (13:54 -0500)
Put the enetaddr data in the same order as it was before the change in
commit ace1520cb5fc ("net: sunxi-emac: Write HW address via function")

Reported-by: Udo Maslo <u.maslo@web.de>
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/sunxi_emac.c

index d20b808c12b79f1ac4a879e8bb871d73d750d27e..8dbd3c50c117ce25729fbfdbf9314d6fde1a2bb5 100644 (file)
@@ -334,8 +334,8 @@ static int _sunxi_write_hwaddr(struct emac_eth_dev *priv, u8 *enetaddr)
        enetaddr_lo = enetaddr[2] | (enetaddr[1] << 8) | (enetaddr[0] << 16);
        enetaddr_hi = enetaddr[5] | (enetaddr[4] << 8) | (enetaddr[3] << 16);
 
-       writel(enetaddr_hi, &regs->mac_a1);
-       writel(enetaddr_lo, &regs->mac_a0);
+       writel(enetaddr_hi, &regs->mac_a0);
+       writel(enetaddr_lo, &regs->mac_a1);
 
        return 0;
 }