diff options
Diffstat (limited to 'drivers/net/arcnet')
-rw-r--r-- | drivers/net/arcnet/arcnet.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 34b9a4d0da30..a80d4a30a464 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
@@ -95,12 +95,12 @@ EXPORT_SYMBOL(arcnet_unregister_proto); | |||
95 | EXPORT_SYMBOL(arcnet_debug); | 95 | EXPORT_SYMBOL(arcnet_debug); |
96 | EXPORT_SYMBOL(alloc_arcdev); | 96 | EXPORT_SYMBOL(alloc_arcdev); |
97 | EXPORT_SYMBOL(arcnet_interrupt); | 97 | EXPORT_SYMBOL(arcnet_interrupt); |
98 | EXPORT_SYMBOL(arcnet_open); | ||
99 | EXPORT_SYMBOL(arcnet_close); | ||
100 | EXPORT_SYMBOL(arcnet_send_packet); | ||
101 | EXPORT_SYMBOL(arcnet_timeout); | ||
98 | 102 | ||
99 | /* Internal function prototypes */ | 103 | /* Internal function prototypes */ |
100 | static int arcnet_open(struct net_device *dev); | ||
101 | static int arcnet_close(struct net_device *dev); | ||
102 | static int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev); | ||
103 | static void arcnet_timeout(struct net_device *dev); | ||
104 | static int arcnet_header(struct sk_buff *skb, struct net_device *dev, | 104 | static int arcnet_header(struct sk_buff *skb, struct net_device *dev, |
105 | unsigned short type, const void *daddr, | 105 | unsigned short type, const void *daddr, |
106 | const void *saddr, unsigned len); | 106 | const void *saddr, unsigned len); |
@@ -321,11 +321,18 @@ static const struct header_ops arcnet_header_ops = { | |||
321 | .rebuild = arcnet_rebuild_header, | 321 | .rebuild = arcnet_rebuild_header, |
322 | }; | 322 | }; |
323 | 323 | ||
324 | static const struct net_device_ops arcnet_netdev_ops = { | ||
325 | .ndo_open = arcnet_open, | ||
326 | .ndo_stop = arcnet_close, | ||
327 | .ndo_start_xmit = arcnet_send_packet, | ||
328 | .ndo_tx_timeout = arcnet_timeout, | ||
329 | }; | ||
324 | 330 | ||
325 | /* Setup a struct device for ARCnet. */ | 331 | /* Setup a struct device for ARCnet. */ |
326 | static void arcdev_setup(struct net_device *dev) | 332 | static void arcdev_setup(struct net_device *dev) |
327 | { | 333 | { |
328 | dev->type = ARPHRD_ARCNET; | 334 | dev->type = ARPHRD_ARCNET; |
335 | dev->netdev_ops = &arcnet_netdev_ops; | ||
329 | dev->header_ops = &arcnet_header_ops; | 336 | dev->header_ops = &arcnet_header_ops; |
330 | dev->hard_header_len = sizeof(struct archdr); | 337 | dev->hard_header_len = sizeof(struct archdr); |
331 | dev->mtu = choose_mtu(); | 338 | dev->mtu = choose_mtu(); |
@@ -338,17 +345,9 @@ static void arcdev_setup(struct net_device *dev) | |||
338 | /* New-style flags. */ | 345 | /* New-style flags. */ |
339 | dev->flags = IFF_BROADCAST; | 346 | dev->flags = IFF_BROADCAST; |
340 | 347 | ||
341 | /* | ||
342 | * Put in this stuff here, so we don't have to export the symbols to | ||
343 | * the chipset drivers. | ||
344 | */ | ||
345 | dev->open = arcnet_open; | ||
346 | dev->stop = arcnet_close; | ||
347 | dev->hard_start_xmit = arcnet_send_packet; | ||
348 | dev->tx_timeout = arcnet_timeout; | ||
349 | } | 348 | } |
350 | 349 | ||
351 | struct net_device *alloc_arcdev(char *name) | 350 | struct net_device *alloc_arcdev(const char *name) |
352 | { | 351 | { |
353 | struct net_device *dev; | 352 | struct net_device *dev; |
354 | 353 | ||
@@ -370,7 +369,7 @@ struct net_device *alloc_arcdev(char *name) | |||
370 | * that "should" only need to be set once at boot, so that there is | 369 | * that "should" only need to be set once at boot, so that there is |
371 | * non-reboot way to recover if something goes wrong. | 370 | * non-reboot way to recover if something goes wrong. |
372 | */ | 371 | */ |
373 | static int arcnet_open(struct net_device *dev) | 372 | int arcnet_open(struct net_device *dev) |
374 | { | 373 | { |
375 | struct arcnet_local *lp = netdev_priv(dev); | 374 | struct arcnet_local *lp = netdev_priv(dev); |
376 | int count, newmtu, error; | 375 | int count, newmtu, error; |
@@ -470,7 +469,7 @@ static int arcnet_open(struct net_device *dev) | |||
470 | 469 | ||
471 | 470 | ||
472 | /* The inverse routine to arcnet_open - shuts down the card. */ | 471 | /* The inverse routine to arcnet_open - shuts down the card. */ |
473 | static int arcnet_close(struct net_device *dev) | 472 | int arcnet_close(struct net_device *dev) |
474 | { | 473 | { |
475 | struct arcnet_local *lp = netdev_priv(dev); | 474 | struct arcnet_local *lp = netdev_priv(dev); |
476 | 475 | ||
@@ -599,7 +598,7 @@ static int arcnet_rebuild_header(struct sk_buff *skb) | |||
599 | 598 | ||
600 | 599 | ||
601 | /* Called by the kernel in order to transmit a packet. */ | 600 | /* Called by the kernel in order to transmit a packet. */ |
602 | static int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev) | 601 | int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev) |
603 | { | 602 | { |
604 | struct arcnet_local *lp = netdev_priv(dev); | 603 | struct arcnet_local *lp = netdev_priv(dev); |
605 | struct archdr *pkt; | 604 | struct archdr *pkt; |
@@ -718,7 +717,7 @@ static int go_tx(struct net_device *dev) | |||
718 | 717 | ||
719 | 718 | ||
720 | /* Called by the kernel when transmit times out */ | 719 | /* Called by the kernel when transmit times out */ |
721 | static void arcnet_timeout(struct net_device *dev) | 720 | void arcnet_timeout(struct net_device *dev) |
722 | { | 721 | { |
723 | unsigned long flags; | 722 | unsigned long flags; |
724 | struct arcnet_local *lp = netdev_priv(dev); | 723 | struct arcnet_local *lp = netdev_priv(dev); |