blob: 78f3e532c6006fe9d41c3ca6bd0cb320307b8b04 [file] [log] [blame]
Thomas Gleixner09c434b2019-05-19 13:08:20 +01001// SPDX-License-Identifier: GPL-2.0-only
Al Viro6c3561b2006-10-10 00:19:36 +01002/* 8390 core for usual drivers */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
4static const char version[] =
5 "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
6
Al Viro6c3561b2006-10-10 00:19:36 +01007#include "lib8390.c"
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
Linus Torvalds1da177e2005-04-16 15:20:36 -07009int ei_open(struct net_device *dev)
10{
Al Viro6c3561b2006-10-10 00:19:36 +010011 return __ei_open(dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -070012}
Gustavo F. Padovan11795aa2008-08-02 15:55:13 -030013EXPORT_SYMBOL(ei_open);
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
Linus Torvalds1da177e2005-04-16 15:20:36 -070015int ei_close(struct net_device *dev)
16{
Al Viro6c3561b2006-10-10 00:19:36 +010017 return __ei_close(dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -070018}
Gustavo F. Padovan11795aa2008-08-02 15:55:13 -030019EXPORT_SYMBOL(ei_close);
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Stephen Hemminger613573252009-08-31 19:50:58 +000021netdev_tx_t ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
Stephen Hemminger8884c092008-11-25 18:12:49 -080022{
23 return __ei_start_xmit(skb, dev);
24}
25EXPORT_SYMBOL(ei_start_xmit);
26
27struct net_device_stats *ei_get_stats(struct net_device *dev)
28{
29 return __ei_get_stats(dev);
30}
31EXPORT_SYMBOL(ei_get_stats);
32
33void ei_set_multicast_list(struct net_device *dev)
34{
35 __ei_set_multicast_list(dev);
36}
37EXPORT_SYMBOL(ei_set_multicast_list);
38
39void ei_tx_timeout(struct net_device *dev)
40{
41 __ei_tx_timeout(dev);
42}
43EXPORT_SYMBOL(ei_tx_timeout);
44
David Howells7d12e782006-10-05 14:55:46 +010045irqreturn_t ei_interrupt(int irq, void *dev_id)
Linus Torvalds1da177e2005-04-16 15:20:36 -070046{
Al Viro6c3561b2006-10-10 00:19:36 +010047 return __ei_interrupt(irq, dev_id);
Linus Torvalds1da177e2005-04-16 15:20:36 -070048}
Gustavo F. Padovan11795aa2008-08-02 15:55:13 -030049EXPORT_SYMBOL(ei_interrupt);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
51#ifdef CONFIG_NET_POLL_CONTROLLER
52void ei_poll(struct net_device *dev)
53{
Al Viro6c3561b2006-10-10 00:19:36 +010054 __ei_poll(dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -070055}
Gustavo F. Padovan11795aa2008-08-02 15:55:13 -030056EXPORT_SYMBOL(ei_poll);
Linus Torvalds1da177e2005-04-16 15:20:36 -070057#endif
58
Stephen Hemminger8884c092008-11-25 18:12:49 -080059const struct net_device_ops ei_netdev_ops = {
60 .ndo_open = ei_open,
61 .ndo_stop = ei_close,
62 .ndo_start_xmit = ei_start_xmit,
63 .ndo_tx_timeout = ei_tx_timeout,
64 .ndo_get_stats = ei_get_stats,
Jiri Pirkoafc4b132011-08-16 06:29:01 +000065 .ndo_set_rx_mode = ei_set_multicast_list,
Stephen Hemminger8884c092008-11-25 18:12:49 -080066 .ndo_validate_addr = eth_validate_addr,
Stephen Hemmingerfe96aaa2009-01-09 11:13:14 +000067 .ndo_set_mac_address = eth_mac_addr,
Stephen Hemminger8884c092008-11-25 18:12:49 -080068#ifdef CONFIG_NET_POLL_CONTROLLER
69 .ndo_poll_controller = ei_poll,
70#endif
71};
72EXPORT_SYMBOL(ei_netdev_ops);
73
Linus Torvalds1da177e2005-04-16 15:20:36 -070074struct net_device *__alloc_ei_netdev(int size)
75{
David S. Miller9a4a8422008-12-15 15:14:59 -080076 struct net_device *dev = ____alloc_ei_netdev(size);
Alexander Beregaloveb9bdae2009-04-15 07:58:29 +000077 if (dev)
78 dev->netdev_ops = &ei_netdev_ops;
David S. Miller9a4a8422008-12-15 15:14:59 -080079 return dev;
Linus Torvalds1da177e2005-04-16 15:20:36 -070080}
Gustavo F. Padovan11795aa2008-08-02 15:55:13 -030081EXPORT_SYMBOL(__alloc_ei_netdev);
Linus Torvalds1da177e2005-04-16 15:20:36 -070082
Linus Torvalds1da177e2005-04-16 15:20:36 -070083void NS8390_init(struct net_device *dev, int startp)
84{
Harvey Harrisonab598592008-05-01 02:47:38 -070085 __NS8390_init(dev, startp);
Linus Torvalds1da177e2005-04-16 15:20:36 -070086}
Linus Torvalds1da177e2005-04-16 15:20:36 -070087EXPORT_SYMBOL(NS8390_init);
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
89#if defined(MODULE)
90
Jon Schindler08dc7322008-02-28 01:30:14 -060091static int __init ns8390_module_init(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070092{
93 return 0;
94}
95
Jon Schindler08dc7322008-02-28 01:30:14 -060096static void __exit ns8390_module_exit(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070097{
98}
99
David S. Millerd5706ef2008-03-22 18:33:28 -0700100module_init(ns8390_module_init);
Jon Schindler08dc7322008-02-28 01:30:14 -0600101module_exit(ns8390_module_exit);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102#endif /* MODULE */
103MODULE_LICENSE("GPL");