MAC address runtime configuration in new driver (was Re: ...no subject)

From: Stefan Richter
Date: Sun Jan 11 2009 - 10:12:37 EST


Jose Luis Marchetti wrote:
> Hi,
>
> I would like to open/read/write/close a regular file from my device
> driver.
> I think it would be possible, but I am confused, the "The Linux Kernel
> Module Programming Guide" states that I can not use standard libraries
> from within a module, I know the standard library ends up calling
> system calls, but which calls should I use to deal with regular
> files ?

http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad discusses this.

> I am developing a Ethernet driver and the Mac address configuration
>
> Thanks in advance!
>
> José Luís Marchetti

Userspace could write the necessary configuration data into the kernel,
for example a sysfs attribute. Of course the attribute could also be
readable. But perhaps there are already established mechanisms for
exactly this purpose. I added Cc: netdev, maybe somebody there can give
advice.
--
Stefan Richter
-=====-==--= ---= -=-==
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/