kamalem2000 / avr-uip

Automatically exported from code.google.com/p/avr-uip
0 stars 0 forks source link

network.c network_get_MAC() bug #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It is mentioned in net_conf.c some place, that network_set_MAC() does not work 
properly, while, in fact, seems to behave properly. 

The bug why network_get_MAC() reports the mac address wrong is, that the last 
read does not store the value to temp variable.

... 
    /* Read QMU MAC address (high) */
    temp = ksz8851_regrd(REG_MAC_ADDR_45);
    ^^^^^^^^ missing
    macaddr[1] = temp & 0xff;
    macaddr[0] = temp >>  8;
}

The EEPROM-less configuration therefore seems to work.

Original issue reported on code.google.com by andrus.a...@gmail.com on 6 Dec 2011 at 10:22

GoogleCodeExporter commented 9 years ago
Fix checked in.

Please review and test the change.  Thank you.

qarce@giraffe:~/avr-uip/drivers/ksz8851$ svn ci network.c -m " correct issue 13 
per issue submitter.  
> Correctly store the reg value in the temp var before using it."
Sending        network.c
Transmitting file data .
Committed revision 154.

Original comment by qarc...@gmail.com on 7 Dec 2011 at 5:25