mac address inside eeprom.

Valentina Giusti valentina.giusti at ngi.it
Fri Mar 25 12:22:58 EDT 2011


Hi Andrea,

first things first. What kernel version are you using?

> Da: Andrea Gasparini <gaspa at yattaweb.it>
> Data: Fri, 25 Mar 2011 15:38:00 +0100
> A: kernelnewbies at kernelnewbies.org
> Oggetto: mac address inside eeprom.
>
> Hi,
> My system has an AT24 eeprom (drivers/misc/eeprom/at24.c), that contains 
> the mac adress of my ethernet.

I looked at the latest version (2.6.38), and I saw that in include/linux/i2c/at24.h there is a structure to access the eeprom data. You should initialize that structure in your driver, or at boot, making it point to the eeprom address where the mac address is located.

> Is there a standard way to retrieve data from other devices, that should be 
> used inside drivers?

The standard way is always through the api's given in header files under the "include" directory.

> 
> I've already modified both at24.c and the ethernet driver to do so, but I'm 
> wondering if there was already a better way.

Hope this is helping,

Cheers
Valentina

> 
> Thanks, bye!
> -- 
> -gaspa-
> -----------------------------------------------
> -------- https://launchpad.net/~gaspa ---------
> ----- HomePage: http://gaspa.yattaweb.it ------
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies> 




More information about the Kernelnewbies mailing list