aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8390.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/8390.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/8390.c')
-rw-r--r--drivers/net/8390.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/net/8390.c b/drivers/net/8390.c
index f72a2e87d569..029ad08f0330 100644
--- a/drivers/net/8390.c
+++ b/drivers/net/8390.c
@@ -17,6 +17,30 @@ int ei_close(struct net_device *dev)
17} 17}
18EXPORT_SYMBOL(ei_close); 18EXPORT_SYMBOL(ei_close);
19 19
20int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
21{
22 return __ei_start_xmit(skb, dev);
23}
24EXPORT_SYMBOL(ei_start_xmit);
25
26struct net_device_stats *ei_get_stats(struct net_device *dev)
27{
28 return __ei_get_stats(dev);
29}
30EXPORT_SYMBOL(ei_get_stats);
31
32void ei_set_multicast_list(struct net_device *dev)
33{
34 __ei_set_multicast_list(dev);
35}
36EXPORT_SYMBOL(ei_set_multicast_list);
37
38void ei_tx_timeout(struct net_device *dev)
39{
40 __ei_tx_timeout(dev);
41}
42EXPORT_SYMBOL(ei_tx_timeout);
43
20irqreturn_t ei_interrupt(int irq, void *dev_id) 44irqreturn_t ei_interrupt(int irq, void *dev_id)
21{ 45{
22 return __ei_interrupt(irq, dev_id); 46 return __ei_interrupt(irq, dev_id);
@@ -31,6 +55,21 @@ void ei_poll(struct net_device *dev)
31EXPORT_SYMBOL(ei_poll); 55EXPORT_SYMBOL(ei_poll);
32#endif 56#endif
33 57
58const struct net_device_ops ei_netdev_ops = {
59 .ndo_open = ei_open,
60 .ndo_stop = ei_close,
61 .ndo_start_xmit = ei_start_xmit,
62 .ndo_tx_timeout = ei_tx_timeout,
63 .ndo_get_stats = ei_get_stats,
64 .ndo_set_multicast_list = ei_set_multicast_list,
65 .ndo_validate_addr = eth_validate_addr,
66 .ndo_change_mtu = eth_change_mtu,
67#ifdef CONFIG_NET_POLL_CONTROLLER
68 .ndo_poll_controller = ei_poll,
69#endif
70};
71EXPORT_SYMBOL(ei_netdev_ops);
72
34struct net_device *__alloc_ei_netdev(int size) 73struct net_device *__alloc_ei_netdev(int size)
35{ 74{
36 return ____alloc_ei_netdev(size); 75 return ____alloc_ei_netdev(size);