1 Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
2 ===================================================================
3 --- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/platform.h
4 +++ linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
5 @@ -100,6 +100,7 @@ struct mac_plat_info {
6 int phy_id; /* ID of the connected PHY (PCB/platform dependent) */
7 int rxq_id; /* Queue ID of the RX-free q*/
8 int txq_id; /* Where to push the outgoing packets */
9 + unsigned char hwaddr[6]; /* Desired hardware address */
13 Index: linux-2.6.19/drivers/net/ixp4xx/mac_driver.c
14 ===================================================================
15 --- linux-2.6.19.orig/drivers/net/ixp4xx/mac_driver.c
16 +++ linux-2.6.19/drivers/net/ixp4xx/mac_driver.c
17 @@ -189,6 +189,24 @@ static int ixmac_open (struct net_device
19 mac->rxq_pkt += RX_QUEUE_PREFILL;
21 + /* printk(KERN_INFO "...Platform MAC=0x%02x%02x%02x%02x%02x%02x\n",
22 + mac->plat->hwaddr[0],
23 + mac->plat->hwaddr[1],
24 + mac->plat->hwaddr[2],
25 + mac->plat->hwaddr[3],
26 + mac->plat->hwaddr[4],
27 + mac->plat->hwaddr[5]
29 + /* Only use platform or random if there's currently no device hw addr */
30 + if (is_zero_ether_addr(dev->dev_addr)) {
31 + if (is_zero_ether_addr(mac->plat->hwaddr)) {
32 + random_ether_addr(dev->dev_addr);
33 + dev->dev_addr[5] = mac->plat->phy_id;
36 + memcpy(dev->dev_addr, mac->plat->hwaddr, 6);
40 npe_mh_set_rxqid(npe, mac->plat, RX_DONE_QID);
42 @@ -434,9 +452,15 @@ static int mac_probe(struct platform_dev
44 * "ip link set address 02:03:04:04:04:01 dev eth0"
45 * "ifconfig eth0 hw ether 02:03:04:04:04:07"
47 - random_ether_addr(dev->dev_addr);
48 - dev->dev_addr[5] = plat->phy_id;
50 +/* Note: moved to ixmac_open to allow notifiers to run for compiled in modules
51 + if (is_zero_ether_addr(plat->hwaddr)) {
52 + random_ether_addr(dev->dev_addr);
53 + dev->dev_addr[5] = plat->phy_id;
56 + memcpy(dev->dev_addr, plat->hwaddr, 6);
59 printk(KERN_INFO IXMAC_NAME " driver " IXMAC_VERSION
60 ": %s on %s with PHY[%d] initialized\n",