mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/net/sunhme.c patch
@ 2007-10-29 14:54 Tom Southerland
  2007-10-29 15:11 ` Jan Engelhardt
  2007-10-29 22:07 ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Tom Southerland @ 2007-10-29 14:54 UTC (permalink / raw)
  To: linux-kernel

This patch provides a unique mac address for all interfaces
for the Sun QFE card (non-sparc).  It takes the base mac from
the first interface and increments the mac address for the
other interfaces.

It still preserves the 'macaddr' parameter so if desired, it
can still be used.

Before patching:

eth0      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BB
eth1      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BB
eth2      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BB
eth3      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BB

After patching:

eth0      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BB
eth1      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BC
eth2      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BD
eth3      Link encap:Ethernet  HWaddr 00:03:BA:17:4C:BE

Cheers,

Tom



--- linux-2.6.23.1/drivers/net/sunhme.c.orig    2007-10-29 07:58:25.000000000 -0600
+++ linux-2.6.23.1/drivers/net/sunhme.c 2007-10-29 08:53:03.000000000 -0600
@@ -3083,6 +3083,11 @@ static int __devinit happy_meal_pci_prob
                 }
  #else
                 get_hme_mac_nonsparc(pdev, &dev->dev_addr[0]);
+                if(macaddr[5] == 0){
+                 for (i = 0; i < 6; i++)
+                       macaddr[i] = dev->dev_addr[i];
+                 macaddr[5]++;
+                }
  #endif
         }


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-29 22:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-29 14:54 drivers/net/sunhme.c patch Tom Southerland
2007-10-29 15:11 ` Jan Engelhardt
2007-10-29 22:10   ` David Miller
2007-10-29 22:12     ` Jan Engelhardt
2007-10-29 22:41       ` David Miller
2007-10-29 22:07 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®