8390.c 2.2 KB
Newer Older
1
/* 8390 core for usual drivers */
L
Linus Torvalds 已提交
2 3 4 5

static const char version[] =
    "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";

6
#include "lib8390.c"
7

L
Linus Torvalds 已提交
8 9
int ei_open(struct net_device *dev)
{
10
	return __ei_open(dev);
L
Linus Torvalds 已提交
11
}
12
EXPORT_SYMBOL(ei_open);
L
Linus Torvalds 已提交
13 14 15

int ei_close(struct net_device *dev)
{
16
	return __ei_close(dev);
L
Linus Torvalds 已提交
17
}
18
EXPORT_SYMBOL(ei_close);
19

20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
	return __ei_start_xmit(skb, dev);
}
EXPORT_SYMBOL(ei_start_xmit);

struct net_device_stats *ei_get_stats(struct net_device *dev)
{
	return __ei_get_stats(dev);
}
EXPORT_SYMBOL(ei_get_stats);

void ei_set_multicast_list(struct net_device *dev)
{
	__ei_set_multicast_list(dev);
}
EXPORT_SYMBOL(ei_set_multicast_list);

void ei_tx_timeout(struct net_device *dev)
{
	__ei_tx_timeout(dev);
}
EXPORT_SYMBOL(ei_tx_timeout);

44
irqreturn_t ei_interrupt(int irq, void *dev_id)
L
Linus Torvalds 已提交
45
{
46
	return __ei_interrupt(irq, dev_id);
L
Linus Torvalds 已提交
47
}
48
EXPORT_SYMBOL(ei_interrupt);
L
Linus Torvalds 已提交
49 50 51 52

#ifdef CONFIG_NET_POLL_CONTROLLER
void ei_poll(struct net_device *dev)
{
53
	__ei_poll(dev);
L
Linus Torvalds 已提交
54
}
55
EXPORT_SYMBOL(ei_poll);
L
Linus Torvalds 已提交
56 57
#endif

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
const struct net_device_ops ei_netdev_ops = {
	.ndo_open		= ei_open,
	.ndo_stop		= ei_close,
	.ndo_start_xmit		= ei_start_xmit,
	.ndo_tx_timeout		= ei_tx_timeout,
	.ndo_get_stats		= ei_get_stats,
	.ndo_set_multicast_list = ei_set_multicast_list,
	.ndo_validate_addr	= eth_validate_addr,
	.ndo_change_mtu		= eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
	.ndo_poll_controller	= ei_poll,
#endif
};
EXPORT_SYMBOL(ei_netdev_ops);

L
Linus Torvalds 已提交
73 74
struct net_device *__alloc_ei_netdev(int size)
{
75 76 77 78 79 80 81 82 83 84
	struct net_device *dev = ____alloc_ei_netdev(size);
#ifdef CONFIG_COMPAT_NET_DEV_OPS
	if (dev) {
		dev->hard_start_xmit = ei_start_xmit;
		dev->get_stats	= ei_get_stats;
		dev->set_multicast_list = ei_set_multicast_list;
		dev->tx_timeout = ei_tx_timeout;
	}
#endif
	return dev;
L
Linus Torvalds 已提交
85
}
86
EXPORT_SYMBOL(__alloc_ei_netdev);
L
Linus Torvalds 已提交
87 88 89

void NS8390_init(struct net_device *dev, int startp)
{
90
	__NS8390_init(dev, startp);
L
Linus Torvalds 已提交
91 92 93 94 95
}
EXPORT_SYMBOL(NS8390_init);

#if defined(MODULE)

96
static int __init ns8390_module_init(void)
L
Linus Torvalds 已提交
97 98 99 100
{
	return 0;
}

101
static void __exit ns8390_module_exit(void)
L
Linus Torvalds 已提交
102 103 104
{
}

D
David S. Miller 已提交
105
module_init(ns8390_module_init);
106
module_exit(ns8390_module_exit);
L
Linus Torvalds 已提交
107 108
#endif /* MODULE */
MODULE_LICENSE("GPL");