diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-25 21:12:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 21:12:49 -0500 |
commit | 8884c092e5e4f9a1b6e44f2e02a3eb5481af87ab (patch) | |
tree | 3afd7d5b3453aa34ce1f6bb010c3e843ca337b90 /drivers/net/8390p.c | |
parent | b27aeadb5948d400df83db4d29590fb9862ba49d (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.c | 39 |
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 | } |
23 | EXPORT_SYMBOL(eip_close); | 23 | EXPORT_SYMBOL(eip_close); |
24 | 24 | ||
25 | int eip_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
26 | { | ||
27 | return __ei_start_xmit(skb, dev); | ||
28 | } | ||
29 | EXPORT_SYMBOL(eip_start_xmit); | ||
30 | |||
31 | struct net_device_stats *eip_get_stats(struct net_device *dev) | ||
32 | { | ||
33 | return __ei_get_stats(dev); | ||
34 | } | ||
35 | EXPORT_SYMBOL(eip_get_stats); | ||
36 | |||
37 | void eip_set_multicast_list(struct net_device *dev) | ||
38 | { | ||
39 | __ei_set_multicast_list(dev); | ||
40 | } | ||
41 | EXPORT_SYMBOL(eip_set_multicast_list); | ||
42 | |||
43 | void eip_tx_timeout(struct net_device *dev) | ||
44 | { | ||
45 | __ei_tx_timeout(dev); | ||
46 | } | ||
47 | EXPORT_SYMBOL(eip_tx_timeout); | ||
48 | |||
25 | irqreturn_t eip_interrupt(int irq, void *dev_id) | 49 | irqreturn_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) | |||
36 | EXPORT_SYMBOL(eip_poll); | 60 | EXPORT_SYMBOL(eip_poll); |
37 | #endif | 61 | #endif |
38 | 62 | ||
63 | const 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 | }; | ||
76 | EXPORT_SYMBOL(eip_netdev_ops); | ||
77 | |||
39 | struct net_device *__alloc_eip_netdev(int size) | 78 | struct net_device *__alloc_eip_netdev(int size) |
40 | { | 79 | { |
41 | return ____alloc_ei_netdev(size); | 80 | return ____alloc_ei_netdev(size); |