[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: ethernet driver : how to allocate space for net_device struct
Mandeep,
> i have seen in 8139too.c a call to "alloc_etherdev(dev)".
> is this the preffered way to allocate space for the net_device
this initializes a few net_device structure variables.
As the name suggests, it shud be used when allocating net_device for an
ethernet interface.
> struct. In rubini's book he has mentioned the use of
> "ether_setup" (there is no mention of "alloc_etherdev")
> to partially fill up the net_device struct, but this fxn
alloc_etherdev() calls alloc_netdev(..., ether_setup)
alloc_netdev calls ether_setup() to setup the net_device members to
ethernet functions/values.
So, both methods are almost equivalent.
> realtek card (8139too.c). where can i get info on what
> functions like "alloc_etherdev" do???
Check out the sources...use lxr.linux.no
Vivek.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/