[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210204113121.29786-5-john.efstathiades@pebblebay.com>
Date: Thu, 4 Feb 2021 11:31:16 +0000
From: John Efstathiades <john.efstathiades@...blebay.com>
To: unlisted-recipients:; (no To-header on input)
Cc: UNGLinuxDriver@...rochip.com, davem@...emloft.net,
netdev@...r.kernel.org, john.efstathiades@...blebay.com
Subject: [PATCH net-next 4/9] lan78xx: disable MAC address filter before updating entry
Disable the station MAC address entry in the perfect address filter
table before updating the table entry with a new MAC address.
Signed-off-by: John Efstathiades <john.efstathiades@...blebay.com>
---
drivers/net/usb/lan78xx.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 776d84d2b513..d2fcc3c5eff2 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2493,9 +2493,12 @@ static int lan78xx_set_mac_addr(struct net_device *netdev, void *p)
lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
- /* Added to support MAC address changes */
- lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
- lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
+ /* The station MAC address in the perfect address filter table
+ * must also be updated to ensure frames are received
+ */
+ ret = lan78xx_write_reg(dev, MAF_HI(0), 0);
+ ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
+ ret = lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
return 0;
}
--
2.17.1
Powered by blists - more mailing lists