1 --- linux-2.4.32.old/drivers/net/b44.c 2006-01-11 04:41:11.175458750 +0100
2 +++ linux-2.4.32/drivers/net/b44.c 2006-01-11 20:19:57.900822500 +0100
4 * Copyright (C) 2002 David S. Miller (davem@redhat.com)
5 * Copyright (C) 2004 Pekka Pietikainen (pp@ee.oulu.fi)
6 * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
7 + * Copyright (C) 2006 Felix Fietkau (nbd@openwrt.org)
9 * Distribute under GPL.
15 +#ifdef CONFIG_BCM947XX
16 +#define atoi(str) simple_strtoul(((str != NULL) ? str : ""), NULL, 0)
18 +static inline void e_aton(char *str, char *dest)
21 + u16 *d = (u16 *) dest;
29 + dest[i++] = (char) simple_strtoul(str, NULL, 16);
31 + if (!*str++ || i == 6)
36 +static int instance = 0;
40 #define DRV_MODULE_NAME "b44"
41 #define PFX DRV_MODULE_NAME ": "
42 #define DRV_MODULE_VERSION "0.93"
47 -static void __b44_cam_read(struct b44 *bp, unsigned char *data, int index)
48 +static inline void __b44_cam_read(struct b44 *bp, unsigned char *data, int index)
52 @@ -1751,10 +1777,18 @@
53 static int __devinit b44_get_invariants(struct b44 *bp)
60 if (bp->pdev->device == PCI_DEVICE_ID_BCM4713) {
61 +#ifdef CONFIG_BCM947XX
62 + sprintf(buf, "et%dmacaddr", instance - 1);
63 + e_aton(nvram_get(buf), bp->dev->dev_addr);
65 + sprintf(buf, "et%dphyaddr", instance - 1);
66 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
69 * BCM47xx boards don't have a EEPROM. The MAC is stored in
70 * a NVRAM area somewhere in the flash memory. As we don't
72 * chip with multiple PHYs connected to the PHY port.
74 bp->phy_addr = B44_PHY_ADDR_NO_PHY;
78 err = b44_read_eeprom(bp, &eeprom[0]);
79 @@ -1814,6 +1849,10 @@
83 +#ifdef CONFIG_BCM947XX
87 if (b44_version_printed++ == 0)
88 printk(KERN_INFO "%s", version);