Skip to content

Commit

Permalink
[NIU]: Fix BMAC alternate MAC address indexing.
Browse files Browse the repository at this point in the history
BMAC port alternate MAC address index needs to start at 1. Index 0 is
used for the main MAC address.

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matheos Worku authored and David S. Miller committed Feb 19, 2008
1 parent 3172936 commit 3b5bced
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5147,7 +5147,12 @@ static void niu_set_rx_mode(struct net_device *dev)
index++;
}
} else {
for (i = 0; i < niu_num_alt_addr(np); i++) {
int alt_start;
if (np->flags & NIU_FLAGS_XMAC)
alt_start = 0;
else
alt_start = 1;
for (i = alt_start; i < niu_num_alt_addr(np); i++) {
err = niu_enable_alt_mac(np, i, 0);
if (err)
printk(KERN_WARNING PFX "%s: Error %d "
Expand Down

0 comments on commit 3b5bced

Please sign in to comment.