Al Viro | 6c3561b | 2006-10-10 00:19:36 +0100 | [diff] [blame] | 1 | /* 8390 core for usual drivers */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | |
| 3 | static const char version[] = |
| 4 | "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; |
| 5 | |
Al Viro | 6c3561b | 2006-10-10 00:19:36 +0100 | [diff] [blame] | 6 | #include "lib8390.c" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | int ei_open(struct net_device *dev) |
| 9 | { |
Al Viro | 6c3561b | 2006-10-10 00:19:36 +0100 | [diff] [blame] | 10 | return __ei_open(dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | } |
Gustavo F. Padovan | 11795aa | 2008-08-02 15:55:13 -0300 | [diff] [blame] | 12 | EXPORT_SYMBOL(ei_open); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | int ei_close(struct net_device *dev) |
| 15 | { |
Al Viro | 6c3561b | 2006-10-10 00:19:36 +0100 | [diff] [blame] | 16 | return __ei_close(dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | } |
Gustavo F. Padovan | 11795aa | 2008-08-02 15:55:13 -0300 | [diff] [blame] | 18 | EXPORT_SYMBOL(ei_close); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | |
Stephen Hemminger | 8884c09 | 2008-11-25 18:12:49 -0800 | [diff] [blame] | 20 | int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) |
| 21 | { |
| 22 | return __ei_start_xmit(skb, dev); |
| 23 | } |
| 24 | EXPORT_SYMBOL(ei_start_xmit); |
| 25 | |
| 26 | struct net_device_stats *ei_get_stats(struct net_device *dev) |
| 27 | { |
| 28 | return __ei_get_stats(dev); |
| 29 | } |
| 30 | EXPORT_SYMBOL(ei_get_stats); |
| 31 | |
| 32 | void ei_set_multicast_list(struct net_device *dev) |
| 33 | { |
| 34 | __ei_set_multicast_list(dev); |
| 35 | } |
| 36 | EXPORT_SYMBOL(ei_set_multicast_list); |
| 37 | |
| 38 | void ei_tx_timeout(struct net_device *dev) |
| 39 | { |
| 40 | __ei_tx_timeout(dev); |
| 41 | } |
| 42 | EXPORT_SYMBOL(ei_tx_timeout); |
| 43 | |
David Howells | 7d12e78 | 2006-10-05 14:55:46 +0100 | [diff] [blame] | 44 | irqreturn_t ei_interrupt(int irq, void *dev_id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | { |
Al Viro | 6c3561b | 2006-10-10 00:19:36 +0100 | [diff] [blame] | 46 | return __ei_interrupt(irq, dev_id); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | } |
Gustavo F. Padovan | 11795aa | 2008-08-02 15:55:13 -0300 | [diff] [blame] | 48 | EXPORT_SYMBOL(ei_interrupt); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | |
| 50 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 51 | void ei_poll(struct net_device *dev) |
| 52 | { |
Al Viro | 6c3561b | 2006-10-10 00:19:36 +0100 | [diff] [blame] | 53 | __ei_poll(dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | } |
Gustavo F. Padovan | 11795aa | 2008-08-02 15:55:13 -0300 | [diff] [blame] | 55 | EXPORT_SYMBOL(ei_poll); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | #endif |
| 57 | |
Stephen Hemminger | 8884c09 | 2008-11-25 18:12:49 -0800 | [diff] [blame] | 58 | const 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, |
Stephen Hemminger | fe96aaa | 2009-01-09 11:13:14 +0000 | [diff] [blame] | 66 | .ndo_set_mac_address = eth_mac_addr, |
Stephen Hemminger | 8884c09 | 2008-11-25 18:12:49 -0800 | [diff] [blame] | 67 | .ndo_change_mtu = eth_change_mtu, |
| 68 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 69 | .ndo_poll_controller = ei_poll, |
| 70 | #endif |
| 71 | }; |
| 72 | EXPORT_SYMBOL(ei_netdev_ops); |
| 73 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | struct net_device *__alloc_ei_netdev(int size) |
| 75 | { |
David S. Miller | 9a4a842 | 2008-12-15 15:14:59 -0800 | [diff] [blame] | 76 | struct net_device *dev = ____alloc_ei_netdev(size); |
Alexander Beregalov | eb9bdae | 2009-04-15 07:58:29 +0000 | [diff] [blame] | 77 | if (dev) |
| 78 | dev->netdev_ops = &ei_netdev_ops; |
David S. Miller | 9a4a842 | 2008-12-15 15:14:59 -0800 | [diff] [blame] | 79 | return dev; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | } |
Gustavo F. Padovan | 11795aa | 2008-08-02 15:55:13 -0300 | [diff] [blame] | 81 | EXPORT_SYMBOL(__alloc_ei_netdev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | void NS8390_init(struct net_device *dev, int startp) |
| 84 | { |
Harvey Harrison | ab59859 | 2008-05-01 02:47:38 -0700 | [diff] [blame] | 85 | __NS8390_init(dev, startp); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | EXPORT_SYMBOL(NS8390_init); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | |
| 89 | #if defined(MODULE) |
| 90 | |
Jon Schindler | 08dc732 | 2008-02-28 01:30:14 -0600 | [diff] [blame] | 91 | static int __init ns8390_module_init(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | { |
| 93 | return 0; |
| 94 | } |
| 95 | |
Jon Schindler | 08dc732 | 2008-02-28 01:30:14 -0600 | [diff] [blame] | 96 | static void __exit ns8390_module_exit(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | { |
| 98 | } |
| 99 | |
David S. Miller | d5706ef | 2008-03-22 18:33:28 -0700 | [diff] [blame] | 100 | module_init(ns8390_module_init); |
Jon Schindler | 08dc732 | 2008-02-28 01:30:14 -0600 | [diff] [blame] | 101 | module_exit(ns8390_module_exit); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | #endif /* MODULE */ |
| 103 | MODULE_LICENSE("GPL"); |