RE: ethernet driver : how to allocate space for net_device struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
the diffrence b/w alloc_etherdev(dev) and ether_setup() is the memory
allocation for the device struct,
In alloc_etherdev() u dnt have to allocate memory ,it is taken care by the
api,
but in ether_setup() u hav e 2 allocate memory for the dev struct  b4 u pass
it on
Hope this helps
Rgds
Anand


> -----Original Message-----
> From: kernelnewbies-bounce@nl.linux.org 
> [mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of 
> Mandeep Singh Sandhu
> Sent: Thursday, March 04, 2004 2:28 PM
> To: kernelnewbies@nl.linux.org
> Subject: ethernet driver : how to allocate space for net_device struct
> 
> 
> hi all,
> in my ethernet driveres intialization function, how shud
> i allocate space for the net_device structure???
> 
> i have seen in 8139too.c a call to "alloc_etherdev(dev)".
> is this the preffered way to allocate space for the net_device
> 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
> is not used in some real world drivers like the driver for
> realtek card (8139too.c). where can i get info on what
> functions like "alloc_etherdev" do???
> 
> TIA
> - /dev/mandeep
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

<<attachment: winmail.dat>>


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux