aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8390p.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-25 21:12:49 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 21:12:49 -0500
commit8884c092e5e4f9a1b6e44f2e02a3eb5481af87ab (patch)
tree3afd7d5b3453aa34ce1f6bb010c3e843ca337b90 /drivers/net/8390p.c
parentb27aeadb5948d400df83db4d29590fb9862ba49d (diff)
8390: add common net_device ops
Fix the defactoring of ei_XXX functions in 8390 and 8390p. Remove the tx_timeout hack since no driver including the 3c503 overrides tx_timeout at this time, looks like a legacy thing. Also, since several drivers all have same hooks, provide common netdev_ops. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/8390p.c')
-rw-r--r--drivers/net/8390p.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/net/8390p.c b/drivers/net/8390p.c
index 4c6eea4611a2..9c916d4d206e 100644
--- a/drivers/net/8390p.c
+++ b/drivers/net/8390p.c
@@ -22,6 +22,30 @@ int eip_close(struct net_device *dev)
22} 22}
23EXPORT_SYMBOL(eip_close); 23EXPORT_SYMBOL(eip_close);
24 24
25int eip_start_xmit(struct sk_buff *skb, struct net_device *dev)
26{
27 return __ei_start_xmit(skb, dev);
28}
29EXPORT_SYMBOL(eip_start_xmit);
30
31struct net_device_stats *eip_get_stats(struct net_device *dev)
32{
33 return __ei_get_stats(dev);
34}
35EXPORT_SYMBOL(eip_get_stats);
36
37void eip_set_multicast_list(struct net_device *dev)
38{
39 __ei_set_multicast_list(dev);
40}
41EXPORT_SYMBOL(eip_set_multicast_list);
42
43void eip_tx_timeout(struct net_device *dev)
44{
45 __ei_tx_timeout(dev);
46}
47EXPORT_SYMBOL(eip_tx_timeout);
48
25irqreturn_t eip_interrupt(int irq, void *dev_id) 49irqreturn_t eip_interrupt(int irq, void *dev_id)
26{ 50{
27 return __ei_interrupt(irq, dev_id); 51 return __ei_interrupt(irq, dev_id);
@@ -36,6 +60,21 @@ void eip_poll(struct net_device *dev)
36EXPORT_SYMBOL(eip_poll); 60EXPORT_SYMBOL(eip_poll);
37#endif 61#endif
38 62
63const struct net_device_ops eip_netdev_ops = {
64 .ndo_open = eip_open,
65 .ndo_stop = eip_close,
66 .ndo_start_xmit = eip_start_xmit,
67 .ndo_tx_timeout = eip_tx_timeout,
68 .ndo_get_stats = eip_get_stats,
69 .ndo_set_multicast_list = eip_set_multicast_list,
70 .ndo_validate_addr = eth_validate_addr,
71 .ndo_change_mtu = eth_change_mtu,
72#ifdef CONFIG_NET_POLL_CONTROLLER
73 .ndo_poll_controller = eip_poll,
74#endif
75};
76EXPORT_SYMBOL(eip_netdev_ops);
77
39struct net_device *__alloc_eip_netdev(int size) 78struct net_device *__alloc_eip_netdev(int size)
40{ 79{
41 return ____alloc_ei_netdev(size); 80 return ____alloc_ei_netdev(size);