Browse Source

Automatically updated using

perl -pi -0777 -e 's/^(\s*)dev->disable(\s*)=\s*(\w+)_disable;\s*nic->poll\s*=\s*(\w+);\s*nic->transmit\s*=\s*(\w+);\s*nic->irq\s*=\s*(\w+);/static struct nic_operations ${3}_operations;\nstatic struct nic_operations ${3}_operations = {\n\t.connect\t= dummy_connect,\n\t.poll\t\t= $4,\n\t.transmit\t= $5,\n\t.irq\t\t= $6,\n\t.disable\t= ${3}_disable,\n};${1}nic->nic_op\t= &${3}_operations;/msg' *.c
tags/v0.9.3
Michael Brown 19 years ago
parent
commit
91e46ed588

+ 9
- 5
src/drivers/net/3c509.c View File

627
 
627
 
628
 	nic->irqno    = 0;
628
 	nic->irqno    = 0;
629
 	nic->ioaddr   = eth_nic_base;
629
 	nic->ioaddr   = eth_nic_base;
630
-
631
-	dev->disable  = t509_disable; 
632
-	nic->poll     = t509_poll;
633
-	nic->transmit = t509_transmit;
634
-	nic->irq      = t509_irq;
630
+static struct nic_operations t509_operations;
631
+static struct nic_operations t509_operations = {
632
+	.connect	= dummy_connect,
633
+	.poll		= t509_poll,
634
+	.transmit	= t509_transmit,
635
+	.irq		= t509_irq,
636
+	.disable	= t509_disable,
637
+};
638
+	nic->nic_op	= &t509_operations;
635
 
639
 
636
 	/* Based on PnP ISA map */
640
 	/* Based on PnP ISA map */
637
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
641
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 9
- 5
src/drivers/net/3c515.c View File

686
 
686
 
687
 		nic->irqno    = 0;
687
 		nic->irqno    = 0;
688
 		nic->ioaddr   = BASE;
688
 		nic->ioaddr   = BASE;
689
-
690
-		dev->disable = t515_disable;
691
-		nic->poll = t515_poll;
692
-		nic->transmit = t515_transmit;
693
-		nic->irq      = t515_irq;
689
+static struct nic_operations t515_operations;
690
+static struct nic_operations t515_operations = {
691
+	.connect	= dummy_connect,
692
+	.poll		= t515_poll,
693
+	.transmit	= t515_transmit,
694
+	.irq		= t515_irq,
695
+	.disable	= t515_disable,
696
+};
697
+		nic->nic_op	= &t515_operations;
694
 
698
 
695
 		/* Based on PnP ISA map */
699
 		/* Based on PnP ISA map */
696
 		dev->devid.vendor_id = htons(ISAPNP_VENDOR('T', 'C', 'M'));
700
 		dev->devid.vendor_id = htons(ISAPNP_VENDOR('T', 'C', 'M'));

+ 8
- 4
src/drivers/net/3c595.c View File

508
 	printf("Ethernet address: %!\n", nic->node_addr);
508
 	printf("Ethernet address: %!\n", nic->node_addr);
509
 
509
 
510
 	t595_reset(nic);
510
 	t595_reset(nic);
511
-	dev->disable  = t595_disable;
512
-	nic->poll     = t595_poll;
513
-	nic->transmit = t595_transmit;
514
-	nic->irq      = t595_irq;
511
+static struct nic_operations t595_operations;
512
+static struct nic_operations t595_operations = {
513
+	.connect	= dummy_connect,
514
+	.poll		= t595_poll,
515
+	.transmit	= t595_transmit,
516
+	.irq		= t595_irq,
517
+	.disable	= t595_disable,
518
+};	nic->nic_op	= &t595_operations;
515
 	return 1;
519
 	return 1;
516
 
520
 
517
 }
521
 }

+ 8
- 4
src/drivers/net/3c90x.c View File

951
                                  cmdAcknowledgeInterrupt, 0x661);
951
                                  cmdAcknowledgeInterrupt, 0x661);
952
 
952
 
953
     /** Set our exported functions **/
953
     /** Set our exported functions **/
954
-    dev->disable  = a3c90x_disable;
955
-    nic->poll     = a3c90x_poll;
956
-    nic->transmit = a3c90x_transmit;
957
-    nic->irq      = a3c90x_irq;
954
+static struct nic_operations a3c90x_operations;
955
+static struct nic_operations a3c90x_operations = {
956
+	.connect	= dummy_connect,
957
+	.poll		= a3c90x_poll,
958
+	.transmit	= a3c90x_transmit,
959
+	.irq		= a3c90x_irq,
960
+	.disable	= a3c90x_disable,
961
+};    nic->nic_op	= &a3c90x_operations;
958
 
962
 
959
     return 1;
963
     return 1;
960
 }
964
 }

+ 9
- 5
src/drivers/net/cs89x0.c View File

691
 
691
 
692
 	nic->irqno    = 0;
692
 	nic->irqno    = 0;
693
 	nic->ioaddr   = ioaddr;
693
 	nic->ioaddr   = ioaddr;
694
-
695
-	dev->disable  = cs89x0_disable;
696
-	nic->poll     = cs89x0_poll;
697
-	nic->transmit = cs89x0_transmit;
698
-	nic->irq      = cs89x0_irq;
694
+static struct nic_operations cs89x0_operations;
695
+static struct nic_operations cs89x0_operations = {
696
+	.connect	= dummy_connect,
697
+	.poll		= cs89x0_poll,
698
+	.transmit	= cs89x0_transmit,
699
+	.irq		= cs89x0_irq,
700
+	.disable	= cs89x0_disable,
701
+};
702
+	nic->nic_op	= &cs89x0_operations;
699
 
703
 
700
 	/* Based on PnP ISA map */
704
 	/* Based on PnP ISA map */
701
 	dev->devid.vendor_id = htons(ISAPNP_VENDOR('C','S','C'));
705
 	dev->devid.vendor_id = htons(ISAPNP_VENDOR('C','S','C'));

+ 9
- 5
src/drivers/net/davicom.c View File

694
 
694
 
695
   /* initialize device */
695
   /* initialize device */
696
   davicom_reset(nic);
696
   davicom_reset(nic);
697
-
698
-  dev->disable  = davicom_disable;
699
-  nic->poll     = davicom_poll;
700
-  nic->transmit = davicom_transmit;
701
-  nic->irq      = davicom_irq;
697
+static struct nic_operations davicom_operations;
698
+static struct nic_operations davicom_operations = {
699
+	.connect	= dummy_connect,
700
+	.poll		= davicom_poll,
701
+	.transmit	= davicom_transmit,
702
+	.irq		= davicom_irq,
703
+	.disable	= davicom_disable,
704
+};
705
+  nic->nic_op	= &davicom_operations;
702
 
706
 
703
   return 1;
707
   return 1;
704
 }
708
 }

+ 8
- 4
src/drivers/net/depca.c View File

773
 
773
 
774
 	depca_reset(nic);
774
 	depca_reset(nic);
775
 	/* point to NIC specific routines */
775
 	/* point to NIC specific routines */
776
-	dev->disable  = depca_disable;
777
-	nic->poll     = depca_poll;
778
-	nic->transmit = depca_transmit;
779
-	nic->irq      = depca_irq;
776
+static struct nic_operations depca_operations;
777
+static struct nic_operations depca_operations = {
778
+	.connect	= dummy_connect,
779
+	.poll		= depca_poll,
780
+	.transmit	= depca_transmit,
781
+	.irq		= depca_irq,
782
+	.disable	= depca_disable,
783
+};	nic->nic_op	= &depca_operations;
780
 
784
 
781
 	/* Based on PnP ISA map */
785
 	/* Based on PnP ISA map */
782
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
786
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 8
- 4
src/drivers/net/dmfe.c View File

515
 	nic->ioaddr = pci->ioaddr;
515
 	nic->ioaddr = pci->ioaddr;
516
 
516
 
517
 	/* point to NIC specific routines */
517
 	/* point to NIC specific routines */
518
-	dev->disable = dmfe_disable;
519
-	nic->poll = dmfe_poll;
520
-	nic->transmit = dmfe_transmit;
521
-        nic->irq      = dmfe_irq;
518
+static struct nic_operations dmfe_operations;
519
+static struct nic_operations dmfe_operations = {
520
+	.connect	= dummy_connect,
521
+	.poll		= dmfe_poll,
522
+	.transmit	= dmfe_transmit,
523
+	.irq		= dmfe_irq,
524
+	.disable	= dmfe_disable,
525
+};	nic->nic_op	= &dmfe_operations;
522
 
526
 
523
 	return 1;
527
 	return 1;
524
 }
528
 }

+ 8
- 4
src/drivers/net/e1000.c View File

3663
 	init_descriptor();
3663
 	init_descriptor();
3664
 
3664
 
3665
 	/* point to NIC specific routines */
3665
 	/* point to NIC specific routines */
3666
-	dev->disable  = e1000_disable;
3667
-	nic->poll     = e1000_poll;
3668
-	nic->transmit = e1000_transmit;
3669
-	nic->irq      = e1000_irq;
3666
+static struct nic_operations e1000_operations;
3667
+static struct nic_operations e1000_operations = {
3668
+	.connect	= dummy_connect,
3669
+	.poll		= e1000_poll,
3670
+	.transmit	= e1000_transmit,
3671
+	.irq		= e1000_irq,
3672
+	.disable	= e1000_disable,
3673
+};	nic->nic_op	= &e1000_operations;
3670
 
3674
 
3671
 	return 1;
3675
 	return 1;
3672
 }
3676
 }

+ 8
- 4
src/drivers/net/eepro.c View File

606
 
606
 
607
 	eepro_reset(nic);
607
 	eepro_reset(nic);
608
 	/* point to NIC specific routines */
608
 	/* point to NIC specific routines */
609
-	dev->disable  = eepro_disable;
610
-	nic->poll     = eepro_poll;
611
-	nic->transmit = eepro_transmit;
612
-	nic->irq      = eepro_irq;
609
+static struct nic_operations eepro_operations;
610
+static struct nic_operations eepro_operations = {
611
+	.connect	= dummy_connect,
612
+	.poll		= eepro_poll,
613
+	.transmit	= eepro_transmit,
614
+	.irq		= eepro_irq,
615
+	.disable	= eepro_disable,
616
+};	nic->nic_op	= &eepro_operations;
613
 	/* Based on PnP ISA map */
617
 	/* Based on PnP ISA map */
614
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
618
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
615
 	dev->devid.device_id = htons(0x828a);
619
 	dev->devid.device_id = htons(0x828a);

+ 9
- 5
src/drivers/net/eepro100.c View File

767
 		eepro100_disable(dev);
767
 		eepro100_disable(dev);
768
 		return 0;
768
 		return 0;
769
 	}
769
 	}
770
-
771
-	dev->disable  = eepro100_disable;
772
-	nic->poll     = eepro100_poll;
773
-	nic->transmit = eepro100_transmit;
774
-	nic->irq      = eepro100_irq;
770
+static struct nic_operations eepro100_operations;
771
+static struct nic_operations eepro100_operations = {
772
+	.connect	= dummy_connect,
773
+	.poll		= eepro100_poll,
774
+	.transmit	= eepro100_transmit,
775
+	.irq		= eepro100_irq,
776
+	.disable	= eepro100_disable,
777
+};
778
+	nic->nic_op	= &eepro100_operations;
775
 	return 1;
779
 	return 1;
776
 }
780
 }
777
 
781
 

+ 9
- 5
src/drivers/net/epic100.c View File

202
     }
202
     }
203
 
203
 
204
     epic100_open();
204
     epic100_open();
205
-
206
-    dev->disable  = epic100_disable;
207
-    nic->poll     = epic100_poll;
208
-    nic->transmit = epic100_transmit;
209
-    nic->irq      = epic100_irq;
205
+static struct nic_operations epic100_operations;
206
+static struct nic_operations epic100_operations = {
207
+	.connect	= dummy_connect,
208
+	.poll		= epic100_poll,
209
+	.transmit	= epic100_transmit,
210
+	.irq		= epic100_irq,
211
+	.disable	= epic100_disable,
212
+};
213
+    nic->nic_op	= &epic100_operations;
210
 
214
 
211
     return 1;
215
     return 1;
212
 }
216
 }

+ 8
- 4
src/drivers/net/forcedeth.c View File

1015
 	forcedeth_reset(nic);
1015
 	forcedeth_reset(nic);
1016
 //      if (board_found && valid_link)
1016
 //      if (board_found && valid_link)
1017
 	/* point to NIC specific routines */
1017
 	/* point to NIC specific routines */
1018
-	dev->disable = forcedeth_disable;
1019
-	nic->poll = forcedeth_poll;
1020
-	nic->transmit = forcedeth_transmit;
1021
-	nic->irq    = forcedeth_irq;
1018
+static struct nic_operations forcedeth_operations;
1019
+static struct nic_operations forcedeth_operations = {
1020
+	.connect	= dummy_connect,
1021
+	.poll		= forcedeth_poll,
1022
+	.transmit	= forcedeth_transmit,
1023
+	.irq		= forcedeth_irq,
1024
+	.disable	= forcedeth_disable,
1025
+};	nic->nic_op	= &forcedeth_operations;
1022
 	return 1;
1026
 	return 1;
1023
 //      }
1027
 //      }
1024
 	/* else */
1028
 	/* else */

+ 8
- 4
src/drivers/net/mtd80x.c View File

763
     mtd_reset( nic );
763
     mtd_reset( nic );
764
 
764
 
765
     /* point to NIC specific routines */
765
     /* point to NIC specific routines */
766
-    dev->disable  = mtd_disable;
767
-    nic->poll     = mtd_poll;
768
-    nic->transmit = mtd_transmit;
769
-    nic->irq	  = dummy_irq;
766
+static struct nic_operations mtd_operations;
767
+static struct nic_operations mtd_operations = {
768
+	.connect	= dummy_connect,
769
+	.poll		= mtd_poll,
770
+	.transmit	= mtd_transmit,
771
+	.irq		= dummy_irq,
772
+	.disable	= mtd_disable,
773
+};    nic->nic_op	= &mtd_operations;
770
     return 1;
774
     return 1;
771
 }
775
 }
772
 
776
 

+ 9
- 5
src/drivers/net/natsemi.c View File

316
 
316
 
317
     /* initialize device */
317
     /* initialize device */
318
     natsemi_init(nic);
318
     natsemi_init(nic);
319
-
320
-    dev->disable  = natsemi_disable;
321
-    nic->poll     = natsemi_poll;
322
-    nic->transmit = natsemi_transmit;
323
-    nic->irq      = natsemi_irq;
319
+static struct nic_operations natsemi_operations;
320
+static struct nic_operations natsemi_operations = {
321
+	.connect	= dummy_connect,
322
+	.poll		= natsemi_poll,
323
+	.transmit	= natsemi_transmit,
324
+	.irq		= natsemi_irq,
325
+	.disable	= natsemi_disable,
326
+};
327
+    nic->nic_op	= &natsemi_operations;
324
 
328
 
325
     return 1;
329
     return 1;
326
 }
330
 }

+ 8
- 4
src/drivers/net/ns83820.c View File

1000
 
1000
 
1001
 	ns83820_reset(nic);
1001
 	ns83820_reset(nic);
1002
 	/* point to NIC specific routines */
1002
 	/* point to NIC specific routines */
1003
-	dev->disable  = ns83820_disable;
1004
-	nic->poll     = ns83820_poll;
1005
-	nic->transmit = ns83820_transmit;
1006
-	nic->irq      = ns83820_irq;
1003
+static struct nic_operations ns83820_operations;
1004
+static struct nic_operations ns83820_operations = {
1005
+	.connect	= dummy_connect,
1006
+	.poll		= ns83820_poll,
1007
+	.transmit	= ns83820_transmit,
1008
+	.irq		= ns83820_irq,
1009
+	.disable	= ns83820_disable,
1010
+};	nic->nic_op	= &ns83820_operations;
1007
 	return 1;
1011
 	return 1;
1008
 }
1012
 }
1009
 
1013
 

+ 9
- 5
src/drivers/net/ns8390.c View File

930
         if (eth_vendor != VENDOR_3COM)
930
         if (eth_vendor != VENDOR_3COM)
931
 		eth_rmem = eth_bmem;
931
 		eth_rmem = eth_bmem;
932
 	ns8390_reset(nic);
932
 	ns8390_reset(nic);
933
-
934
-	dev->disable  = ns8390_disable; 
935
-	nic->poll     = ns8390_poll;
936
-	nic->transmit = ns8390_transmit;
937
-	nic->irq      = ns8390_irq;
933
+static struct nic_operations ns8390_operations;
934
+static struct nic_operations ns8390_operations = {
935
+	.connect	= dummy_connect,
936
+	.poll		= ns8390_poll,
937
+	.transmit	= ns8390_transmit,
938
+	.irq		= ns8390_irq,
939
+	.disable	= ns8390_disable,
940
+};
941
+	nic->nic_op	= &ns8390_operations;
938
 
942
 
939
         /* Based on PnP ISA map */
943
         /* Based on PnP ISA map */
940
 #ifdef	INCLUDE_WD
944
 #ifdef	INCLUDE_WD

+ 9
- 5
src/drivers/net/pcnet32.c View File

945
 		else
945
 		else
946
 			printf("\n");
946
 			printf("\n");
947
 	}
947
 	}
948
-
949
-	dev->disable  = pcnet32_disable;
950
-	nic->poll     = pcnet32_poll;
951
-	nic->transmit = pcnet32_transmit;
952
-	nic->irq      = pcnet32_irq;
948
+static struct nic_operations pcnet32_operations;
949
+static struct nic_operations pcnet32_operations = {
950
+	.connect	= dummy_connect,
951
+	.poll		= pcnet32_poll,
952
+	.transmit	= pcnet32_transmit,
953
+	.irq		= pcnet32_irq,
954
+	.disable	= pcnet32_disable,
955
+};
956
+	nic->nic_op	= &pcnet32_operations;
953
 
957
 
954
 	return 1;
958
 	return 1;
955
 }
959
 }

+ 8
- 4
src/drivers/net/prism2.c View File

856
   printf ( "Link connected (BSSID %! - MAC address %!)\n", hw->bssid, nic->node_addr );
856
   printf ( "Link connected (BSSID %! - MAC address %!)\n", hw->bssid, nic->node_addr );
857
   
857
   
858
   /* point to NIC specific routines */
858
   /* point to NIC specific routines */
859
-  dev->disable  = prism2_disable; 
860
-  nic->poll     = prism2_poll;
861
-  nic->transmit = prism2_transmit;
862
-  nic->irq      = prism2_irq;
859
+static struct nic_operations prism2_operations;
860
+static struct nic_operations prism2_operations = {
861
+	.connect	= dummy_connect,
862
+	.poll		= prism2_poll,
863
+	.transmit	= prism2_transmit,
864
+	.irq		= prism2_irq,
865
+	.disable	= prism2_disable,
866
+};  nic->nic_op	= &prism2_operations;
863
   return 1;
867
   return 1;
864
 }
868
 }
865
 
869
 

+ 8
- 4
src/drivers/net/r8169.c View File

831
 
831
 
832
 	r8169_reset(nic);
832
 	r8169_reset(nic);
833
 	/* point to NIC specific routines */
833
 	/* point to NIC specific routines */
834
-	dev->disable = r8169_disable;
835
-	nic->poll = r8169_poll;
836
-	nic->transmit = r8169_transmit;
837
-	nic->irq = r8169_irq;
834
+static struct nic_operations r8169_operations;
835
+static struct nic_operations r8169_operations = {
836
+	.connect	= dummy_connect,
837
+	.poll		= r8169_poll,
838
+	.transmit	= r8169_transmit,
839
+	.irq		= r8169_irq,
840
+	.disable	= r8169_disable,
841
+};	nic->nic_op	= &r8169_operations;
838
 	nic->irqno = pci->irq;
842
 	nic->irqno = pci->irq;
839
 	nic->ioaddr = ioaddr;
843
 	nic->ioaddr = ioaddr;
840
 	return 1;
844
 	return 1;

+ 9
- 5
src/drivers/net/rtl8139.c View File

223
 		printf("Cable not connected or other link failure\n");
223
 		printf("Cable not connected or other link failure\n");
224
 		return(0);
224
 		return(0);
225
 	}
225
 	}
226
-
227
-	dev->disable  = rtl_disable;
228
-	nic->poll     = rtl_poll;
229
-	nic->transmit = rtl_transmit;
230
-	nic->irq      = rtl_irq;
226
+static struct nic_operations rtl_operations;
227
+static struct nic_operations rtl_operations = {
228
+	.connect	= dummy_connect,
229
+	.poll		= rtl_poll,
230
+	.transmit	= rtl_transmit,
231
+	.irq		= rtl_irq,
232
+	.disable	= rtl_disable,
233
+};
234
+	nic->nic_op	= &rtl_operations;
231
 
235
 
232
 	return 1;
236
 	return 1;
233
 }
237
 }

+ 9
- 5
src/drivers/net/sis900.c View File

409
 
409
 
410
     /* initialize device */
410
     /* initialize device */
411
     sis900_init(nic);
411
     sis900_init(nic);
412
-
413
-    dev->disable  = sis900_disable;
414
-    nic->poll     = sis900_poll;
415
-    nic->transmit = sis900_transmit;
416
-    nic->irq      = sis900_irq;
412
+static struct nic_operations sis900_operations;
413
+static struct nic_operations sis900_operations = {
414
+	.connect	= dummy_connect,
415
+	.poll		= sis900_poll,
416
+	.transmit	= sis900_transmit,
417
+	.irq		= sis900_irq,
418
+	.disable	= sis900_disable,
419
+};
420
+    nic->nic_op	= &sis900_operations;
417
 
421
 
418
     return 1;
422
     return 1;
419
 }
423
 }

+ 8
- 4
src/drivers/net/sk_g16.c View File

782
 	        nic->ioaddr = ioaddr & ~3;
782
 	        nic->ioaddr = ioaddr & ~3;
783
 		nic->irqno  = 0;
783
 		nic->irqno  = 0;
784
 		/* point to NIC specific routines */
784
 		/* point to NIC specific routines */
785
-		dev->disable  = SK_disable;
786
-		nic->poll     = SK_poll;
787
-		nic->transmit = SK_transmit;
788
-		nic->irq      = SK_irq;
785
+static struct nic_operations SK_operations;
786
+static struct nic_operations SK_operations = {
787
+	.connect	= dummy_connect,
788
+	.poll		= SK_poll,
789
+	.transmit	= SK_transmit,
790
+	.irq		= SK_irq,
791
+	.disable	= SK_disable,
792
+};		nic->nic_op	= &SK_operations;
789
 		/* FIXME set dev->devid */
793
 		/* FIXME set dev->devid */
790
 		return 1;
794
 		return 1;
791
 	}
795
 	}

+ 16
- 8
src/drivers/net/skel.c View File

145
 		nic->ioaddr = pci->ioaddr & ~3;
145
 		nic->ioaddr = pci->ioaddr & ~3;
146
 		nic->irqno = pci->irq;
146
 		nic->irqno = pci->irq;
147
 		/* point to NIC specific routines */
147
 		/* point to NIC specific routines */
148
-		dev->disable  = skel_disable;
149
-		nic->poll     = skel_poll;
150
-		nic->transmit = skel_transmit;
151
-		nic->irq      = skel_irq;
148
+static struct nic_operations skel_operations;
149
+static struct nic_operations skel_operations = {
150
+	.connect	= dummy_connect,
151
+	.poll		= skel_poll,
152
+	.transmit	= skel_transmit,
153
+	.irq		= skel_irq,
154
+	.disable	= skel_disable,
155
+};		nic->nic_op	= &skel_operations;
152
 		return 1;
156
 		return 1;
153
 	}
157
 	}
154
 	/* else */
158
 	/* else */
174
 	if (board_found && valid_link)
178
 	if (board_found && valid_link)
175
 	{
179
 	{
176
 		/* point to NIC specific routines */
180
 		/* point to NIC specific routines */
177
-		dev->disable  = skel_disable;
178
-		nic->poll     = skel_poll;
179
-		nic->transmit = skel_transmit;
180
-		nic->irq      = skel_irq;
181
+static struct nic_operations skel_operations;
182
+static struct nic_operations skel_operations = {
183
+	.connect	= dummy_connect,
184
+	.poll		= skel_poll,
185
+	.transmit	= skel_transmit,
186
+	.irq		= skel_irq,
187
+	.disable	= skel_disable,
188
+};		nic->nic_op	= &skel_operations;
181
 
189
 
182
 		/* Report the ISA pnp id of the board */
190
 		/* Report the ISA pnp id of the board */
183
 		dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
191
 		dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 9
- 5
src/drivers/net/smc9000.c View File

514
       _outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT,
514
       _outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT,
515
 	   smc9000_base + CONFIG );
515
 	   smc9000_base + CONFIG );
516
    }
516
    }
517
-
518
-   dev->disable  = smc9000_disable;
519
-   nic->poll     = smc9000_poll;
520
-   nic->transmit = smc9000_transmit;
521
-   nic->irq      = smc9000_irq;
517
+static struct nic_operations smc9000_operations;
518
+static struct nic_operations smc9000_operations = {
519
+	.connect	= dummy_connect,
520
+	.poll		= smc9000_poll,
521
+	.transmit	= smc9000_transmit,
522
+	.irq		= smc9000_irq,
523
+	.disable	= smc9000_disable,
524
+};
525
+   nic->nic_op	= &smc9000_operations;
522
 
526
 
523
    /* Based on PnP ISA map */
527
    /* Based on PnP ISA map */
524
    dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
528
    dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 8
- 4
src/drivers/net/sundance.c View File

735
 	       sdc->mii_if.full_duplex ? "Full" : "Half");
735
 	       sdc->mii_if.full_duplex ? "Full" : "Half");
736
 
736
 
737
 	/* point to NIC specific routines */
737
 	/* point to NIC specific routines */
738
-	dev->disable = sundance_disable;
739
-	nic->poll = sundance_poll;
740
-	nic->transmit = sundance_transmit;
741
-	nic->irq = sundance_irq;
738
+static struct nic_operations sundance_operations;
739
+static struct nic_operations sundance_operations = {
740
+	.connect	= dummy_connect,
741
+	.poll		= sundance_poll,
742
+	.transmit	= sundance_transmit,
743
+	.irq		= sundance_irq,
744
+	.disable	= sundance_disable,
745
+};	nic->nic_op	= &sundance_operations;
742
 	nic->irqno = pci->irq;
746
 	nic->irqno = pci->irq;
743
 	nic->ioaddr = BASE;
747
 	nic->ioaddr = BASE;
744
 
748
 

+ 9
- 5
src/drivers/net/tg3.c View File

3340
 		printf("Valid link not established\n");
3340
 		printf("Valid link not established\n");
3341
 		goto err_out_disable;
3341
 		goto err_out_disable;
3342
 	}
3342
 	}
3343
-
3344
-	dev->disable  = tg3_disable;
3345
-	nic->poll     = tg3_poll;
3346
-	nic->transmit = tg3_transmit;
3347
-	nic->irq      = tg3_irq;
3343
+static struct nic_operations tg3_operations;
3344
+static struct nic_operations tg3_operations = {
3345
+	.connect	= dummy_connect,
3346
+	.poll		= tg3_poll,
3347
+	.transmit	= tg3_transmit,
3348
+	.irq		= tg3_irq,
3349
+	.disable	= tg3_disable,
3350
+};
3351
+	nic->nic_op	= &tg3_operations;
3348
 
3352
 
3349
 	return 1;
3353
 	return 1;
3350
 
3354
 

+ 9
- 5
src/drivers/net/tlan.c View File

844
 /*	if (board_found && valid_link)
844
 /*	if (board_found && valid_link)
845
 	{*/
845
 	{*/
846
 	/* point to NIC specific routines */
846
 	/* point to NIC specific routines */
847
-
848
-	dev->disable = tlan_disable;
849
-	nic->poll = tlan_poll;
850
-	nic->transmit = tlan_transmit;
851
-	nic->irq    = tlan_irq;
847
+static struct nic_operations tlan_operations;
848
+static struct nic_operations tlan_operations = {
849
+	.connect	= dummy_connect,
850
+	.poll		= tlan_poll,
851
+	.transmit	= tlan_transmit,
852
+	.irq		= tlan_irq,
853
+	.disable	= tlan_disable,
854
+};
855
+	nic->nic_op	= &tlan_operations;
852
 	return 1;
856
 	return 1;
853
 }
857
 }
854
 
858
 

+ 9
- 5
src/drivers/net/tulip.c View File

1422
 
1422
 
1423
     /* reset the device and make ready for tx and rx of packets */
1423
     /* reset the device and make ready for tx and rx of packets */
1424
     tulip_reset(nic);
1424
     tulip_reset(nic);
1425
-
1426
-    dev->disable  = tulip_disable;
1427
-    nic->poll     = tulip_poll;
1428
-    nic->transmit = tulip_transmit;
1429
-    nic->irq      = tulip_irq;
1425
+static struct nic_operations tulip_operations;
1426
+static struct nic_operations tulip_operations = {
1427
+	.connect	= dummy_connect,
1428
+	.poll		= tulip_poll,
1429
+	.transmit	= tulip_transmit,
1430
+	.irq		= tulip_irq,
1431
+	.disable	= tulip_disable,
1432
+};
1433
+    nic->nic_op	= &tulip_operations;
1430
 
1434
 
1431
     /* give the board a chance to reset before returning */
1435
     /* give the board a chance to reset before returning */
1432
     tulip_wait(4*TICKS_PER_SEC);
1436
     tulip_wait(4*TICKS_PER_SEC);

+ 9
- 5
src/drivers/net/via-rhine.c View File

963
 
963
 
964
     adjust_pci_device(pci);
964
     adjust_pci_device(pci);
965
     rhine_reset (nic);
965
     rhine_reset (nic);
966
-
967
-    dev->disable  = rhine_disable;
968
-    nic->poll     = rhine_poll;
969
-    nic->transmit = rhine_transmit;
970
-    nic->irq      = rhine_irq;
966
+static struct nic_operations rhine_operations;
967
+static struct nic_operations rhine_operations = {
968
+	.connect	= dummy_connect,
969
+	.poll		= rhine_poll,
970
+	.transmit	= rhine_transmit,
971
+	.irq		= rhine_irq,
972
+	.disable	= rhine_disable,
973
+};
974
+    nic->nic_op	= &rhine_operations;
971
     nic->irqno	  = pci->irq;
975
     nic->irqno	  = pci->irq;
972
     nic->ioaddr   = tp->ioaddr;
976
     nic->ioaddr   = tp->ioaddr;
973
 
977
 

+ 8
- 4
src/drivers/net/w89c840.c View File

698
     }
698
     }
699
 
699
 
700
     /* point to NIC specific routines */
700
     /* point to NIC specific routines */
701
-    dev->disable  = w89c840_disable;
702
-    nic->poll     = w89c840_poll;
703
-    nic->transmit = w89c840_transmit;
704
-    nic->irq      = w89c840_irq;
701
+static struct nic_operations w89c840_operations;
702
+static struct nic_operations w89c840_operations = {
703
+	.connect	= dummy_connect,
704
+	.poll		= w89c840_poll,
705
+	.transmit	= w89c840_transmit,
706
+	.irq		= w89c840_irq,
707
+	.disable	= w89c840_disable,
708
+};    nic->nic_op	= &w89c840_operations;
705
 
709
 
706
     w89c840_reset(nic);
710
     w89c840_reset(nic);
707
 
711
 

Loading…
Cancel
Save