]> git.baikalelectronics.ru Git - kernel.git/commit
netdev: network device operations infrastructure
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 20 Nov 2008 05:32:24 +0000 (21:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Nov 2008 05:32:24 +0000 (21:32 -0800)
commit5fa48f05c358971bed909260ddcfda8558b11849
tree1c7778b509cea814aa2b7115949667941037d07c
parent365a7a7ef69c4d946968b66125c6e63cab6bec79
netdev: network device operations infrastructure

This patch changes the network device internal API to move adminstrative
operations out of the network device structure and into a separate structure.

This patch involves some hackery to maintain compatablity between the
new and old model, so all 300+ drivers don't have to be changed at once.
For drivers that aren't converted yet, the netdevice_ops virt function list
still resides in the net_device structure. For old protocols, the new
net_device_ops are copied out to the old net_device pointers.

After the transistion is completed the nag message can be changed to
an WARN_ON, and the compatiablity code can be made configurable.

Some function pointers aren't moved:
* destructor can't be in net_device_ops because
  it may need to be referenced after the module is unloaded.
* neighbor setup is manipulated in a couple of places that need special
  consideration
* hard_start_xmit is in the fast path for transmit.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/Kconfig
net/core/dev.c
net/core/netpoll.c
net/core/rtnetlink.c
net/sched/sch_generic.c