@@ -95,12 +95,12 @@ EXPORT_SYMBOL(arcnet_unregister_proto);
9595EXPORT_SYMBOL (arcnet_debug );
9696EXPORT_SYMBOL (alloc_arcdev );
9797EXPORT_SYMBOL (arcnet_interrupt );
98+ EXPORT_SYMBOL (arcnet_open );
99+ EXPORT_SYMBOL (arcnet_close );
100+ EXPORT_SYMBOL (arcnet_send_packet );
101+ EXPORT_SYMBOL (arcnet_timeout );
98102
99103/* 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 );
104104static int arcnet_header (struct sk_buff * skb , struct net_device * dev ,
105105 unsigned short type , const void * daddr ,
106106 const void * saddr , unsigned len );
@@ -321,11 +321,18 @@ static const struct header_ops arcnet_header_ops = {
321321 .rebuild = arcnet_rebuild_header ,
322322};
323323
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+ };
324330
325331/* Setup a struct device for ARCnet. */
326332static void arcdev_setup (struct net_device * dev )
327333{
328334 dev -> type = ARPHRD_ARCNET ;
335+ dev -> netdev_ops = & arcnet_netdev_ops ;
329336 dev -> header_ops = & arcnet_header_ops ;
330337 dev -> hard_header_len = sizeof (struct archdr );
331338 dev -> mtu = choose_mtu ();
@@ -338,17 +345,9 @@ static void arcdev_setup(struct net_device *dev)
338345 /* New-style flags. */
339346 dev -> flags = IFF_BROADCAST ;
340347
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 ;
349348}
350349
351- struct net_device * alloc_arcdev (char * name )
350+ struct net_device * alloc_arcdev (const char * name )
352351{
353352 struct net_device * dev ;
354353
@@ -370,7 +369,7 @@ struct net_device *alloc_arcdev(char *name)
370369 * that "should" only need to be set once at boot, so that there is
371370 * non-reboot way to recover if something goes wrong.
372371 */
373- static int arcnet_open (struct net_device * dev )
372+ int arcnet_open (struct net_device * dev )
374373{
375374 struct arcnet_local * lp = netdev_priv (dev );
376375 int count , newmtu , error ;
@@ -470,7 +469,7 @@ static int arcnet_open(struct net_device *dev)
470469
471470
472471/* 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 )
474473{
475474 struct arcnet_local * lp = netdev_priv (dev );
476475
@@ -599,7 +598,7 @@ static int arcnet_rebuild_header(struct sk_buff *skb)
599598
600599
601600/* 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 )
603602{
604603 struct arcnet_local * lp = netdev_priv (dev );
605604 struct archdr * pkt ;
@@ -718,7 +717,7 @@ static int go_tx(struct net_device *dev)
718717
719718
720719/* 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 )
722721{
723722 unsigned long flags ;
724723 struct arcnet_local * lp = netdev_priv (dev );
0 commit comments