From: Tom Southerland <toms@wonderland.us.com>
To: netdev@vger.kernel.org
Subject: drivers/net/sunhme.c patch
Date: Mon, 29 Oct 2007 19:53:52 -0600 [thread overview]
Message-ID: <47268EB0.5030703@wonderland.us.com> (raw)
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
}
next reply other threads:[~2007-10-30 2:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-30 1:53 Tom Southerland [this message]
2007-10-30 3:12 ` drivers/net/sunhme.c patch David Miller
[not found] <4725F416.2030100@wonderland.us.com>
[not found] ` <Pine.LNX.4.64.0710291606260.26070@fbirervta.pbzchgretzou.qr>
2007-10-29 22:10 ` David Miller
2007-10-29 22:12 ` Jan Engelhardt
2007-10-29 22:41 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47268EB0.5030703@wonderland.us.com \
--to=toms@wonderland.us.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).