1 --- a/drivers/net/smc91x.c
2 +++ b/drivers/net/smc91x.c
3 @@ -1815,6 +1815,39 @@ static int __init smc_findirq(void __iom
4 return probe_irq_off(cookie);
7 +static inline unsigned int is_gumstix_oui(u8 *addr)
9 + return (addr[0] == 0x00 && addr[1] == 0x15 && addr[2] == 0xC9);
13 + * gen_serial_ether_addr - Generate software assigned Ethernet address
14 + * based on the system_serial number
15 + * @addr: Pointer to a six-byte array containing the Ethernet address
17 + * Generate an Ethernet address (MAC) that is not multicast
18 + * and has the local assigned bit set, keyed on the system_serial
20 +static inline void gen_serial_ether_addr(u8 *addr)
22 + static u8 ether_serial_digit = 0;
23 + addr [0] = system_serial_high >> 8;
24 + addr [1] = system_serial_high;
25 + addr [2] = system_serial_low >> 24;
26 + addr [3] = system_serial_low >> 16;
27 + addr [4] = system_serial_low >> 8;
28 + addr [5] = (system_serial_low & 0xc0) | /* top bits are from system serial */
29 + (1 << 4) | /* 2 bits identify interface type 1=ether, 2=usb, 3&4 undef */
30 + ((ether_serial_digit++) & 0x0f); /* 15 possible interfaces of each type */
32 + if(!is_gumstix_oui(addr))
34 + addr [0] &= 0xfe; /* clear multicast bit */
35 + addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
41 * Function: smc_probe(unsigned long ioaddr)
43 @@ -2032,15 +2065,13 @@ static int __init smc_probe(struct net_d
44 THROTTLE_TX_PKTS ? " [throttle_tx]" : "");
46 if (!is_valid_ether_addr(dev->dev_addr)) {
47 - printk("%s: Invalid ethernet MAC address. Please "
48 - "set using ifconfig\n", dev->name);
50 + gen_serial_ether_addr(dev->dev_addr);
52 /* Print the Ethernet address */
53 printk("%s: Ethernet addr: ", dev->name);
54 for (i = 0; i < 5; i++)
55 printk("%2.2x:", dev->dev_addr[i]);
56 printk("%2.2x\n", dev->dev_addr[5]);
59 if (lp->phy_type == 0) {
60 PRINTK("%s: No PHY found\n", dev->name);