Larry Finger wrote:
> I think your system doesn't use PCI, so this probably won't work,
> but you should be able to implement something similar. Once you
> have a dump, you should be able to find the MAC addresses of the
> wireless and ethernet interfaces.
IIRC the WRTs don't have a sprom, instead its stored in their nvram
flash area:
For a WRT54GS v1.1:
[EMAIL PROTECTED]:~# nvram show | grep -E "^(wl0[^_]|pa0|board|et0|il0)"
size: 7749 bytes (25019 left)
boardrev=0x10
il0macaddr=00:12:17:15:fe:9e
et0macaddr=00:12:17:15:FE:9C
et0mdcport=0
boardtype=0x0101
wl0id=0x4320
wl0gpio2=0
wl0gpio3=0
boardflags2=0
pa0itssit=62
pa0maxpwr=0x48
boardflags=0x0188
et0phyaddr=30
pa0b0=0x170c
pa0b1=0xfa24
pa0b2=0xfe70
boardnum=42
For a WRT54GL v1.?:
[EMAIL PROTECTED]:~# nvram show | grep -E "^(wl0[^_]|pa0|board|et0|il0)"
size: 1771 bytes (30997 left)
boardrev=0x10
il0macaddr=00:13:10:3f:35:27
et0macaddr=00:13:10:3F:35:25
et0mdcport=0
boardtype=0x0708
wl0id=0x4320
wl0gpio2=0
wl0gpio3=0
boardflags2=0
pa0itssit=62
pa0maxpwr=0x4e
boardflags=0x0118
et0phyaddr=30
pa0b0=0x15eb
pa0b1=0xfa82
pa0b2=0xfe66
boardnum=42
An older bcm47xx patch had this part in bcm43xx_main.c to fetch the
values from nvram:
#ifdef CONFIG_BCM947XX
/* In the case some settings are found in nvram, use them
* to override those read from sprom.
*/
c = nvram_get("boardflags2");
if (c)
sprom[BCM43xx_SPROM_BOARDFLAGS2] = simple_strtoul(c, NULL, 0);
c = nvram_get("boardflags");
if (c)
sprom[BCM43xx_SPROM_BOARDFLAGS] = simple_strtoul(c, NULL, 0);
c = nvram_get("il0macaddr");
if (c)
bcm43xx_aton(c, (char *)&(sprom[BCM43xx_SPROM_IL0MACADDR]));
c = nvram_get("et1macaddr");
if (c)
bcm43xx_aton(c, (char *)&(sprom[BCM43xx_SPROM_ET1MACADDR]));
c = nvram_get("pa0b0");
if (c)
sprom[BCM43xx_SPROM_PA0B0] = simple_strtoul(c, NULL, 0);
c = nvram_get("pa0b1");
if (c)
sprom[BCM43xx_SPROM_PA0B1] = simple_strtoul(c, NULL, 0);
c = nvram_get("pa0b2");
if (c)
sprom[BCM43xx_SPROM_PA0B2] = simple_strtoul(c, NULL, 0);
c = nvram_get("pa1b0");
if (c)
sprom[BCM43xx_SPROM_PA1B0] = simple_strtoul(c, NULL, 0);
c = nvram_get("pa1b1");
if (c)
sprom[BCM43xx_SPROM_PA1B1] = simple_strtoul(c, NULL, 0);
c = nvram_get("pa1b2");
if (c)
sprom[BCM43xx_SPROM_PA1B2] = simple_strtoul(c, NULL, 0);
c = nvram_get("boardrev");
if (c)
sprom[BCM43xx_SPROM_BOARDREV] = simple_strtoul(c, NULL, 0);
#endif
--
Tobias PGP: http://9ac7e0bc.uguu.de
このメールは十割再利用されたビットで作られています。
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev