aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/dsa/mv88e6060.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c
index dce7fa57eb55..f123ed57630d 100644
--- a/drivers/net/dsa/mv88e6060.c
+++ b/drivers/net/dsa/mv88e6060.c
@@ -214,8 +214,14 @@ static int mv88e6060_setup(struct dsa_switch *ds)
214 214
215static int mv88e6060_set_addr(struct dsa_switch *ds, u8 *addr) 215static int mv88e6060_set_addr(struct dsa_switch *ds, u8 *addr)
216{ 216{
217 /* Use the same MAC Address as FD Pause frames for all ports */ 217 u16 val = addr[0] << 8 | addr[1];
218 REG_WRITE(REG_GLOBAL, GLOBAL_MAC_01, (addr[0] << 9) | addr[1]); 218
219 /* The multicast bit is always transmitted as a zero, so the switch uses
220 * bit 8 for "DiffAddr", where 0 means all ports transmit the same SA.
221 */
222 val &= 0xfeff;
223
224 REG_WRITE(REG_GLOBAL, GLOBAL_MAC_01, val);
219 REG_WRITE(REG_GLOBAL, GLOBAL_MAC_23, (addr[2] << 8) | addr[3]); 225 REG_WRITE(REG_GLOBAL, GLOBAL_MAC_23, (addr[2] << 8) | addr[3]);
220 REG_WRITE(REG_GLOBAL, GLOBAL_MAC_45, (addr[4] << 8) | addr[5]); 226 REG_WRITE(REG_GLOBAL, GLOBAL_MAC_45, (addr[4] << 8) | addr[5]);
221 227