aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/niu.c9
-rw-r--r--drivers/net/niu.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index e98ce1e4965b..d11ba61baa4f 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -1616,12 +1616,13 @@ static int niu_enable_alt_mac(struct niu *np, int index, int on)
1616 if (index >= niu_num_alt_addr(np)) 1616 if (index >= niu_num_alt_addr(np))
1617 return -EINVAL; 1617 return -EINVAL;
1618 1618
1619 if (np->flags & NIU_FLAGS_XMAC) 1619 if (np->flags & NIU_FLAGS_XMAC) {
1620 reg = XMAC_ADDR_CMPEN; 1620 reg = XMAC_ADDR_CMPEN;
1621 else 1621 mask = 1 << index;
1622 } else {
1622 reg = BMAC_ADDR_CMPEN; 1623 reg = BMAC_ADDR_CMPEN;
1623 1624 mask = 1 << (index + 1);
1624 mask = 1 << index; 1625 }
1625 1626
1626 val = nr64_mac(reg); 1627 val = nr64_mac(reg);
1627 if (on) 1628 if (on)
diff --git a/drivers/net/niu.h b/drivers/net/niu.h
index 0e8626adc573..59dc05fcd371 100644
--- a/drivers/net/niu.h
+++ b/drivers/net/niu.h
@@ -499,7 +499,7 @@
499#define BMAC_ADDR2 0x00110UL 499#define BMAC_ADDR2 0x00110UL
500#define BMAC_ADDR2_ADDR2 0x000000000000ffffULL 500#define BMAC_ADDR2_ADDR2 0x000000000000ffffULL
501 501
502#define BMAC_NUM_ALT_ADDR 7 502#define BMAC_NUM_ALT_ADDR 6
503 503
504#define BMAC_ALT_ADDR0(NUM) (0x00118UL + (NUM)*0x18UL) 504#define BMAC_ALT_ADDR0(NUM) (0x00118UL + (NUM)*0x18UL)
505#define BMAC_ALT_ADDR0_ADDR0 0x000000000000ffffULL 505#define BMAC_ALT_ADDR0_ADDR0 0x000000000000ffffULL