Esempio n. 1
0
/*
 * Reads MAC address from adapter RAM, which should've read it from
 * the onboard ROM.
 *
 * Calling this on a board that does not support it can be a very
 * dangerous thing.  The Madge board, for instance, will lock your
 * machine hard when this is called.  Luckily, its supported in a
 * separate driver.  --ASF
 */
static void tms_pci_read_eeprom(struct net_device *dev)
{
    int i;

    /* Address: 0000:0000 */
    tms_pci_sifwritew(dev, 0, SIFADX);
    tms_pci_sifwritew(dev, 0, SIFADR);

    /* Read six byte MAC address data */
    dev->addr_len = 6;
    for(i = 0; i < 6; i++)
        dev->dev_addr[i] = tms_pci_sifreadw(dev, SIFINC) >> 8;
}
Esempio n. 2
0
static void tms_pci_read_eeprom(struct net_device *dev)
{
	int i;
	
	
	tms_pci_sifwritew(dev, 0, SIFADX);
	tms_pci_sifwritew(dev, 0, SIFADR);	
	
	
	dev->addr_len = 6;
	for(i = 0; i < 6; i++)
		dev->dev_addr[i] = tms_pci_sifreadw(dev, SIFINC) >> 8;
}