diff options
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 2fe14b0c5c67..d11ba61baa4f 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -33,8 +33,8 @@ | |||
33 | 33 | ||
34 | #define DRV_MODULE_NAME "niu" | 34 | #define DRV_MODULE_NAME "niu" |
35 | #define PFX DRV_MODULE_NAME ": " | 35 | #define PFX DRV_MODULE_NAME ": " |
36 | #define DRV_MODULE_VERSION "0.6" | 36 | #define DRV_MODULE_VERSION "0.7" |
37 | #define DRV_MODULE_RELDATE "January 5, 2008" | 37 | #define DRV_MODULE_RELDATE "February 18, 2008" |
38 | 38 | ||
39 | static char version[] __devinitdata = | 39 | static char version[] __devinitdata = |
40 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 40 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
@@ -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) |
@@ -5147,7 +5148,12 @@ static void niu_set_rx_mode(struct net_device *dev) | |||
5147 | index++; | 5148 | index++; |
5148 | } | 5149 | } |
5149 | } else { | 5150 | } else { |
5150 | for (i = 0; i < niu_num_alt_addr(np); i++) { | 5151 | int alt_start; |
5152 | if (np->flags & NIU_FLAGS_XMAC) | ||
5153 | alt_start = 0; | ||
5154 | else | ||
5155 | alt_start = 1; | ||
5156 | for (i = alt_start; i < niu_num_alt_addr(np); i++) { | ||
5151 | err = niu_enable_alt_mac(np, i, 0); | 5157 | err = niu_enable_alt_mac(np, i, 0); |
5152 | if (err) | 5158 | if (err) |
5153 | printk(KERN_WARNING PFX "%s: Error %d " | 5159 | printk(KERN_WARNING PFX "%s: Error %d " |