From: Matheos Worku Date: Tue, 19 Feb 2008 05:30:03 +0000 (-0800) Subject: [NIU]: Fix BMAC alternate MAC address indexing. X-Git-Tag: v2.6.25-rc3~126^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b5bcedeeb755b6e813537fcf4c32f010b490aef;p=linux-2.6 [NIU]: Fix BMAC alternate MAC address indexing. 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 2fe14b0c5c..1f1b815e08 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -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 "