Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
91e46ed588

+ 9
- 5
src/drivers/net/3c509.c Dosyayı Görüntüle

@@ -627,11 +627,15 @@ static int t509_probe(struct dev *dev, unsigned short *probe_addrs __unused)
627 627
 
628 628
 	nic->irqno    = 0;
629 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 640
 	/* Based on PnP ISA map */
637 641
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 9
- 5
src/drivers/net/3c515.c Dosyayı Görüntüle

@@ -686,11 +686,15 @@ static int t515_probe(struct dev *dev,
686 686
 
687 687
 		nic->irqno    = 0;
688 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 699
 		/* Based on PnP ISA map */
696 700
 		dev->devid.vendor_id = htons(ISAPNP_VENDOR('T', 'C', 'M'));

+ 8
- 4
src/drivers/net/3c595.c Dosyayı Görüntüle

@@ -508,10 +508,14 @@ static int t595_probe ( struct dev *dev ) {
508 508
 	printf("Ethernet address: %!\n", nic->node_addr);
509 509
 
510 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 519
 	return 1;
516 520
 
517 521
 }

+ 8
- 4
src/drivers/net/3c90x.c Dosyayı Görüntüle

@@ -951,10 +951,14 @@ static int a3c90x_probe ( struct dev *dev ) {
951 951
                                  cmdAcknowledgeInterrupt, 0x661);
952 952
 
953 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 963
     return 1;
960 964
 }

+ 9
- 5
src/drivers/net/cs89x0.c Dosyayı Görüntüle

@@ -691,11 +691,15 @@ static int cs89x0_probe(struct dev *dev, unsigned short *probe_addrs __unused)
691 691
 
692 692
 	nic->irqno    = 0;
693 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 704
 	/* Based on PnP ISA map */
701 705
 	dev->devid.vendor_id = htons(ISAPNP_VENDOR('C','S','C'));

+ 9
- 5
src/drivers/net/davicom.c Dosyayı Görüntüle

@@ -694,11 +694,15 @@ static int davicom_probe ( struct dev *dev ) {
694 694
 
695 695
   /* initialize device */
696 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 707
   return 1;
704 708
 }

+ 8
- 4
src/drivers/net/depca.c Dosyayı Görüntüle

@@ -773,10 +773,14 @@ static int depca_probe(struct dev *dev, unsigned short *probe_addrs)
773 773
 
774 774
 	depca_reset(nic);
775 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 785
 	/* Based on PnP ISA map */
782 786
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 8
- 4
src/drivers/net/dmfe.c Dosyayı Görüntüle

@@ -515,10 +515,14 @@ static int dmfe_probe ( struct dev *dev ) {
515 515
 	nic->ioaddr = pci->ioaddr;
516 516
 
517 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 527
 	return 1;
524 528
 }

+ 8
- 4
src/drivers/net/e1000.c Dosyayı Görüntüle

@@ -3663,10 +3663,14 @@ static int e1000_probe ( struct dev *dev ) {
3663 3663
 	init_descriptor();
3664 3664
 
3665 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 3675
 	return 1;
3672 3676
 }

+ 8
- 4
src/drivers/net/eepro.c Dosyayı Görüntüle

@@ -606,10 +606,14 @@ static int eepro_probe(struct dev *dev, unsigned short *probe_addrs)
606 606
 
607 607
 	eepro_reset(nic);
608 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 617
 	/* Based on PnP ISA map */
614 618
 	dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);
615 619
 	dev->devid.device_id = htons(0x828a);

+ 9
- 5
src/drivers/net/eepro100.c Dosyayı Görüntüle

@@ -767,11 +767,15 @@ static int eepro100_probe ( struct dev *dev ) {
767 767
 		eepro100_disable(dev);
768 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 779
 	return 1;
776 780
 }
777 781
 

+ 9
- 5
src/drivers/net/epic100.c Dosyayı Görüntüle

@@ -202,11 +202,15 @@ epic100_probe ( struct dev *dev ) {
202 202
     }
203 203
 
204 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 215
     return 1;
212 216
 }

+ 8
- 4
src/drivers/net/forcedeth.c Dosyayı Görüntüle

@@ -1015,10 +1015,14 @@ static int forcedeth_probe ( struct dev *dev ) {
1015 1015
 	forcedeth_reset(nic);
1016 1016
 //      if (board_found && valid_link)
1017 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 1026
 	return 1;
1023 1027
 //      }
1024 1028
 	/* else */

+ 8
- 4
src/drivers/net/mtd80x.c Dosyayı Görüntüle

@@ -763,10 +763,14 @@ static int mtd_probe ( struct dev *dev ) {
763 763
     mtd_reset( nic );
764 764
 
765 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 774
     return 1;
771 775
 }
772 776
 

+ 9
- 5
src/drivers/net/natsemi.c Dosyayı Görüntüle

@@ -316,11 +316,15 @@ natsemi_probe ( struct dev *dev ) {
316 316
 
317 317
     /* initialize device */
318 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 329
     return 1;
326 330
 }

+ 8
- 4
src/drivers/net/ns83820.c Dosyayı Görüntüle

@@ -1000,10 +1000,14 @@ static int ns83820_probe ( struct dev *dev ) {
1000 1000
 
1001 1001
 	ns83820_reset(nic);
1002 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 1011
 	return 1;
1008 1012
 }
1009 1013
 

+ 9
- 5
src/drivers/net/ns8390.c Dosyayı Görüntüle

@@ -930,11 +930,15 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
930 930
         if (eth_vendor != VENDOR_3COM)
931 931
 		eth_rmem = eth_bmem;
932 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 943
         /* Based on PnP ISA map */
940 944
 #ifdef	INCLUDE_WD

+ 9
- 5
src/drivers/net/pcnet32.c Dosyayı Görüntüle

@@ -945,11 +945,15 @@ static int pcnet32_probe ( struct dev *dev ) {
945 945
 		else
946 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 958
 	return 1;
955 959
 }

+ 8
- 4
src/drivers/net/prism2.c Dosyayı Görüntüle

@@ -856,10 +856,14 @@ static int prism2_pci_probe(struct dev *dev, struct pci_device *p)
856 856
   printf ( "Link connected (BSSID %! - MAC address %!)\n", hw->bssid, nic->node_addr );
857 857
   
858 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 867
   return 1;
864 868
 }
865 869
 

+ 8
- 4
src/drivers/net/r8169.c Dosyayı Görüntüle

@@ -831,10 +831,14 @@ static int r8169_probe ( struct dev *dev ) {
831 831
 
832 832
 	r8169_reset(nic);
833 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 842
 	nic->irqno = pci->irq;
839 843
 	nic->ioaddr = ioaddr;
840 844
 	return 1;

+ 9
- 5
src/drivers/net/rtl8139.c Dosyayı Görüntüle

@@ -223,11 +223,15 @@ static int rtl8139_probe ( struct dev *dev ) {
223 223
 		printf("Cable not connected or other link failure\n");
224 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 236
 	return 1;
233 237
 }

+ 9
- 5
src/drivers/net/sis900.c Dosyayı Görüntüle

@@ -409,11 +409,15 @@ static int sis900_probe ( struct dev *dev ) {
409 409
 
410 410
     /* initialize device */
411 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 422
     return 1;
419 423
 }

+ 8
- 4
src/drivers/net/sk_g16.c Dosyayı Görüntüle

@@ -782,10 +782,14 @@ static int SK_probe(struct dev *dev, unsigned short *probe_addrs)
782 782
 	        nic->ioaddr = ioaddr & ~3;
783 783
 		nic->irqno  = 0;
784 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 793
 		/* FIXME set dev->devid */
790 794
 		return 1;
791 795
 	}

+ 16
- 8
src/drivers/net/skel.c Dosyayı Görüntüle

@@ -145,10 +145,14 @@ static int skel_probe ( struct dev *dev ) {
145 145
 		nic->ioaddr = pci->ioaddr & ~3;
146 146
 		nic->irqno = pci->irq;
147 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 156
 		return 1;
153 157
 	}
154 158
 	/* else */
@@ -174,10 +178,14 @@ static int skel_isa_probe(struct dev *dev, unsigned short *probe_addrs)
174 178
 	if (board_found && valid_link)
175 179
 	{
176 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 190
 		/* Report the ISA pnp id of the board */
183 191
 		dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 9
- 5
src/drivers/net/smc9000.c Dosyayı Görüntüle

@@ -514,11 +514,15 @@ static int smc9000_probe(struct dev *dev, unsigned short *probe_addrs)
514 514
       _outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT,
515 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 527
    /* Based on PnP ISA map */
524 528
    dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR);

+ 8
- 4
src/drivers/net/sundance.c Dosyayı Görüntüle

@@ -735,10 +735,14 @@ static int sundance_probe ( struct dev *dev ) {
735 735
 	       sdc->mii_if.full_duplex ? "Full" : "Half");
736 736
 
737 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 746
 	nic->irqno = pci->irq;
743 747
 	nic->ioaddr = BASE;
744 748
 

+ 9
- 5
src/drivers/net/tg3.c Dosyayı Görüntüle

@@ -3340,11 +3340,15 @@ static int tg3_probe ( struct dev *dev ) {
3340 3340
 		printf("Valid link not established\n");
3341 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 3353
 	return 1;
3350 3354
 

+ 9
- 5
src/drivers/net/tlan.c Dosyayı Görüntüle

@@ -844,11 +844,15 @@ static int tlan_probe ( struct dev *dev ) {
844 844
 /*	if (board_found && valid_link)
845 845
 	{*/
846 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 856
 	return 1;
853 857
 }
854 858
 

+ 9
- 5
src/drivers/net/tulip.c Dosyayı Görüntüle

@@ -1422,11 +1422,15 @@ static int tulip_probe ( struct dev *dev ) {
1422 1422
 
1423 1423
     /* reset the device and make ready for tx and rx of packets */
1424 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 1435
     /* give the board a chance to reset before returning */
1432 1436
     tulip_wait(4*TICKS_PER_SEC);

+ 9
- 5
src/drivers/net/via-rhine.c Dosyayı Görüntüle

@@ -963,11 +963,15 @@ rhine_probe ( struct dev *dev ) {
963 963
 
964 964
     adjust_pci_device(pci);
965 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 975
     nic->irqno	  = pci->irq;
972 976
     nic->ioaddr   = tp->ioaddr;
973 977
 

+ 8
- 4
src/drivers/net/w89c840.c Dosyayı Görüntüle

@@ -698,10 +698,14 @@ static int w89c840_probe ( struct dev *dev ) {
698 698
     }
699 699
 
700 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 710
     w89c840_reset(nic);
707 711
 

Loading…
İptal
Kaydet