]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NIU: Fix BMAC alternate MAC address indexing.
authorMatheos Worku <matheos.worku@sun.com>
Wed, 5 Mar 2008 22:47:36 +0000 (14:47 -0800)
committerChris Wright <chrisw@sous-sol.org>
Mon, 24 Mar 2008 18:47:05 +0000 (11:47 -0700)
Upstream commit: 3b5bcedeeb755b6e813537fcf4c32f010b490aef

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/niu.c

index faf87a010a1e3fe8f31b59b19379e082b05d27fd..e6581941fb6c14c591482193ac185933b581d856 100644 (file)
@@ -5148,7 +5148,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 "