From 91e46ed588d619a690753d95577ec833a1b857e9 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 13 Apr 2005 00:02:40 +0000 Subject: [PATCH] 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 --- src/drivers/net/3c509.c | 14 +++++++++----- src/drivers/net/3c515.c | 14 +++++++++----- src/drivers/net/3c595.c | 12 ++++++++---- src/drivers/net/3c90x.c | 12 ++++++++---- src/drivers/net/cs89x0.c | 14 +++++++++----- src/drivers/net/davicom.c | 14 +++++++++----- src/drivers/net/depca.c | 12 ++++++++---- src/drivers/net/dmfe.c | 12 ++++++++---- src/drivers/net/e1000.c | 12 ++++++++---- src/drivers/net/eepro.c | 12 ++++++++---- src/drivers/net/eepro100.c | 14 +++++++++----- src/drivers/net/epic100.c | 14 +++++++++----- src/drivers/net/forcedeth.c | 12 ++++++++---- src/drivers/net/mtd80x.c | 12 ++++++++---- src/drivers/net/natsemi.c | 14 +++++++++----- src/drivers/net/ns83820.c | 12 ++++++++---- src/drivers/net/ns8390.c | 14 +++++++++----- src/drivers/net/pcnet32.c | 14 +++++++++----- src/drivers/net/prism2.c | 12 ++++++++---- src/drivers/net/r8169.c | 12 ++++++++---- src/drivers/net/rtl8139.c | 14 +++++++++----- src/drivers/net/sis900.c | 14 +++++++++----- src/drivers/net/sk_g16.c | 12 ++++++++---- src/drivers/net/skel.c | 24 ++++++++++++++++-------- src/drivers/net/smc9000.c | 14 +++++++++----- src/drivers/net/sundance.c | 12 ++++++++---- src/drivers/net/tg3.c | 14 +++++++++----- src/drivers/net/tlan.c | 14 +++++++++----- src/drivers/net/tulip.c | 14 +++++++++----- src/drivers/net/via-rhine.c | 14 +++++++++----- src/drivers/net/w89c840.c | 12 ++++++++---- 31 files changed, 272 insertions(+), 144 deletions(-) diff --git a/src/drivers/net/3c509.c b/src/drivers/net/3c509.c index df6a3138..cd0d5456 100644 --- a/src/drivers/net/3c509.c +++ b/src/drivers/net/3c509.c @@ -627,11 +627,15 @@ static int t509_probe(struct dev *dev, unsigned short *probe_addrs __unused) nic->irqno = 0; nic->ioaddr = eth_nic_base; - - dev->disable = t509_disable; - nic->poll = t509_poll; - nic->transmit = t509_transmit; - nic->irq = t509_irq; +static struct nic_operations t509_operations; +static struct nic_operations t509_operations = { + .connect = dummy_connect, + .poll = t509_poll, + .transmit = t509_transmit, + .irq = t509_irq, + .disable = t509_disable, +}; + nic->nic_op = &t509_operations; /* Based on PnP ISA map */ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); diff --git a/src/drivers/net/3c515.c b/src/drivers/net/3c515.c index 3d60079d..0bf275b9 100644 --- a/src/drivers/net/3c515.c +++ b/src/drivers/net/3c515.c @@ -686,11 +686,15 @@ static int t515_probe(struct dev *dev, nic->irqno = 0; nic->ioaddr = BASE; - - dev->disable = t515_disable; - nic->poll = t515_poll; - nic->transmit = t515_transmit; - nic->irq = t515_irq; +static struct nic_operations t515_operations; +static struct nic_operations t515_operations = { + .connect = dummy_connect, + .poll = t515_poll, + .transmit = t515_transmit, + .irq = t515_irq, + .disable = t515_disable, +}; + nic->nic_op = &t515_operations; /* Based on PnP ISA map */ dev->devid.vendor_id = htons(ISAPNP_VENDOR('T', 'C', 'M')); diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c index 9d530710..cac698de 100644 --- a/src/drivers/net/3c595.c +++ b/src/drivers/net/3c595.c @@ -508,10 +508,14 @@ static int t595_probe ( struct dev *dev ) { printf("Ethernet address: %!\n", nic->node_addr); t595_reset(nic); - dev->disable = t595_disable; - nic->poll = t595_poll; - nic->transmit = t595_transmit; - nic->irq = t595_irq; +static struct nic_operations t595_operations; +static struct nic_operations t595_operations = { + .connect = dummy_connect, + .poll = t595_poll, + .transmit = t595_transmit, + .irq = t595_irq, + .disable = t595_disable, +}; nic->nic_op = &t595_operations; return 1; } diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c index f72a6993..95350766 100644 --- a/src/drivers/net/3c90x.c +++ b/src/drivers/net/3c90x.c @@ -951,10 +951,14 @@ static int a3c90x_probe ( struct dev *dev ) { cmdAcknowledgeInterrupt, 0x661); /** Set our exported functions **/ - dev->disable = a3c90x_disable; - nic->poll = a3c90x_poll; - nic->transmit = a3c90x_transmit; - nic->irq = a3c90x_irq; +static struct nic_operations a3c90x_operations; +static struct nic_operations a3c90x_operations = { + .connect = dummy_connect, + .poll = a3c90x_poll, + .transmit = a3c90x_transmit, + .irq = a3c90x_irq, + .disable = a3c90x_disable, +}; nic->nic_op = &a3c90x_operations; return 1; } diff --git a/src/drivers/net/cs89x0.c b/src/drivers/net/cs89x0.c index bf8b659e..5483a091 100644 --- a/src/drivers/net/cs89x0.c +++ b/src/drivers/net/cs89x0.c @@ -691,11 +691,15 @@ static int cs89x0_probe(struct dev *dev, unsigned short *probe_addrs __unused) nic->irqno = 0; nic->ioaddr = ioaddr; - - dev->disable = cs89x0_disable; - nic->poll = cs89x0_poll; - nic->transmit = cs89x0_transmit; - nic->irq = cs89x0_irq; +static struct nic_operations cs89x0_operations; +static struct nic_operations cs89x0_operations = { + .connect = dummy_connect, + .poll = cs89x0_poll, + .transmit = cs89x0_transmit, + .irq = cs89x0_irq, + .disable = cs89x0_disable, +}; + nic->nic_op = &cs89x0_operations; /* Based on PnP ISA map */ dev->devid.vendor_id = htons(ISAPNP_VENDOR('C','S','C')); diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c index bbc7a566..b7e9a727 100644 --- a/src/drivers/net/davicom.c +++ b/src/drivers/net/davicom.c @@ -694,11 +694,15 @@ static int davicom_probe ( struct dev *dev ) { /* initialize device */ davicom_reset(nic); - - dev->disable = davicom_disable; - nic->poll = davicom_poll; - nic->transmit = davicom_transmit; - nic->irq = davicom_irq; +static struct nic_operations davicom_operations; +static struct nic_operations davicom_operations = { + .connect = dummy_connect, + .poll = davicom_poll, + .transmit = davicom_transmit, + .irq = davicom_irq, + .disable = davicom_disable, +}; + nic->nic_op = &davicom_operations; return 1; } diff --git a/src/drivers/net/depca.c b/src/drivers/net/depca.c index a4ea56cc..912bcac3 100644 --- a/src/drivers/net/depca.c +++ b/src/drivers/net/depca.c @@ -773,10 +773,14 @@ static int depca_probe(struct dev *dev, unsigned short *probe_addrs) depca_reset(nic); /* point to NIC specific routines */ - dev->disable = depca_disable; - nic->poll = depca_poll; - nic->transmit = depca_transmit; - nic->irq = depca_irq; +static struct nic_operations depca_operations; +static struct nic_operations depca_operations = { + .connect = dummy_connect, + .poll = depca_poll, + .transmit = depca_transmit, + .irq = depca_irq, + .disable = depca_disable, +}; nic->nic_op = &depca_operations; /* Based on PnP ISA map */ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c index 99046e6c..23668743 100644 --- a/src/drivers/net/dmfe.c +++ b/src/drivers/net/dmfe.c @@ -515,10 +515,14 @@ static int dmfe_probe ( struct dev *dev ) { nic->ioaddr = pci->ioaddr; /* point to NIC specific routines */ - dev->disable = dmfe_disable; - nic->poll = dmfe_poll; - nic->transmit = dmfe_transmit; - nic->irq = dmfe_irq; +static struct nic_operations dmfe_operations; +static struct nic_operations dmfe_operations = { + .connect = dummy_connect, + .poll = dmfe_poll, + .transmit = dmfe_transmit, + .irq = dmfe_irq, + .disable = dmfe_disable, +}; nic->nic_op = &dmfe_operations; return 1; } diff --git a/src/drivers/net/e1000.c b/src/drivers/net/e1000.c index a5bae064..163fc66d 100644 --- a/src/drivers/net/e1000.c +++ b/src/drivers/net/e1000.c @@ -3663,10 +3663,14 @@ static int e1000_probe ( struct dev *dev ) { init_descriptor(); /* point to NIC specific routines */ - dev->disable = e1000_disable; - nic->poll = e1000_poll; - nic->transmit = e1000_transmit; - nic->irq = e1000_irq; +static struct nic_operations e1000_operations; +static struct nic_operations e1000_operations = { + .connect = dummy_connect, + .poll = e1000_poll, + .transmit = e1000_transmit, + .irq = e1000_irq, + .disable = e1000_disable, +}; nic->nic_op = &e1000_operations; return 1; } diff --git a/src/drivers/net/eepro.c b/src/drivers/net/eepro.c index 42450b9d..c4c877a2 100644 --- a/src/drivers/net/eepro.c +++ b/src/drivers/net/eepro.c @@ -606,10 +606,14 @@ static int eepro_probe(struct dev *dev, unsigned short *probe_addrs) eepro_reset(nic); /* point to NIC specific routines */ - dev->disable = eepro_disable; - nic->poll = eepro_poll; - nic->transmit = eepro_transmit; - nic->irq = eepro_irq; +static struct nic_operations eepro_operations; +static struct nic_operations eepro_operations = { + .connect = dummy_connect, + .poll = eepro_poll, + .transmit = eepro_transmit, + .irq = eepro_irq, + .disable = eepro_disable, +}; nic->nic_op = &eepro_operations; /* Based on PnP ISA map */ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); dev->devid.device_id = htons(0x828a); diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c index e4b88b44..7798c2ea 100644 --- a/src/drivers/net/eepro100.c +++ b/src/drivers/net/eepro100.c @@ -767,11 +767,15 @@ static int eepro100_probe ( struct dev *dev ) { eepro100_disable(dev); return 0; } - - dev->disable = eepro100_disable; - nic->poll = eepro100_poll; - nic->transmit = eepro100_transmit; - nic->irq = eepro100_irq; +static struct nic_operations eepro100_operations; +static struct nic_operations eepro100_operations = { + .connect = dummy_connect, + .poll = eepro100_poll, + .transmit = eepro100_transmit, + .irq = eepro100_irq, + .disable = eepro100_disable, +}; + nic->nic_op = &eepro100_operations; return 1; } diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c index e9d06412..2360aed2 100644 --- a/src/drivers/net/epic100.c +++ b/src/drivers/net/epic100.c @@ -202,11 +202,15 @@ epic100_probe ( struct dev *dev ) { } epic100_open(); - - dev->disable = epic100_disable; - nic->poll = epic100_poll; - nic->transmit = epic100_transmit; - nic->irq = epic100_irq; +static struct nic_operations epic100_operations; +static struct nic_operations epic100_operations = { + .connect = dummy_connect, + .poll = epic100_poll, + .transmit = epic100_transmit, + .irq = epic100_irq, + .disable = epic100_disable, +}; + nic->nic_op = &epic100_operations; return 1; } diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c index 2f76c34d..c270e2dd 100644 --- a/src/drivers/net/forcedeth.c +++ b/src/drivers/net/forcedeth.c @@ -1015,10 +1015,14 @@ static int forcedeth_probe ( struct dev *dev ) { forcedeth_reset(nic); // if (board_found && valid_link) /* point to NIC specific routines */ - dev->disable = forcedeth_disable; - nic->poll = forcedeth_poll; - nic->transmit = forcedeth_transmit; - nic->irq = forcedeth_irq; +static struct nic_operations forcedeth_operations; +static struct nic_operations forcedeth_operations = { + .connect = dummy_connect, + .poll = forcedeth_poll, + .transmit = forcedeth_transmit, + .irq = forcedeth_irq, + .disable = forcedeth_disable, +}; nic->nic_op = &forcedeth_operations; return 1; // } /* else */ diff --git a/src/drivers/net/mtd80x.c b/src/drivers/net/mtd80x.c index 304db5a8..b58f0b95 100644 --- a/src/drivers/net/mtd80x.c +++ b/src/drivers/net/mtd80x.c @@ -763,10 +763,14 @@ static int mtd_probe ( struct dev *dev ) { mtd_reset( nic ); /* point to NIC specific routines */ - dev->disable = mtd_disable; - nic->poll = mtd_poll; - nic->transmit = mtd_transmit; - nic->irq = dummy_irq; +static struct nic_operations mtd_operations; +static struct nic_operations mtd_operations = { + .connect = dummy_connect, + .poll = mtd_poll, + .transmit = mtd_transmit, + .irq = dummy_irq, + .disable = mtd_disable, +}; nic->nic_op = &mtd_operations; return 1; } diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c index 6356b201..58aa2ec6 100644 --- a/src/drivers/net/natsemi.c +++ b/src/drivers/net/natsemi.c @@ -316,11 +316,15 @@ natsemi_probe ( struct dev *dev ) { /* initialize device */ natsemi_init(nic); - - dev->disable = natsemi_disable; - nic->poll = natsemi_poll; - nic->transmit = natsemi_transmit; - nic->irq = natsemi_irq; +static struct nic_operations natsemi_operations; +static struct nic_operations natsemi_operations = { + .connect = dummy_connect, + .poll = natsemi_poll, + .transmit = natsemi_transmit, + .irq = natsemi_irq, + .disable = natsemi_disable, +}; + nic->nic_op = &natsemi_operations; return 1; } diff --git a/src/drivers/net/ns83820.c b/src/drivers/net/ns83820.c index d6e1d4a7..3fd0ad1f 100755 --- a/src/drivers/net/ns83820.c +++ b/src/drivers/net/ns83820.c @@ -1000,10 +1000,14 @@ static int ns83820_probe ( struct dev *dev ) { ns83820_reset(nic); /* point to NIC specific routines */ - dev->disable = ns83820_disable; - nic->poll = ns83820_poll; - nic->transmit = ns83820_transmit; - nic->irq = ns83820_irq; +static struct nic_operations ns83820_operations; +static struct nic_operations ns83820_operations = { + .connect = dummy_connect, + .poll = ns83820_poll, + .transmit = ns83820_transmit, + .irq = ns83820_irq, + .disable = ns83820_disable, +}; nic->nic_op = &ns83820_operations; return 1; } diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c index a661effd..f1f47cd4 100644 --- a/src/drivers/net/ns8390.c +++ b/src/drivers/net/ns8390.c @@ -930,11 +930,15 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) if (eth_vendor != VENDOR_3COM) eth_rmem = eth_bmem; ns8390_reset(nic); - - dev->disable = ns8390_disable; - nic->poll = ns8390_poll; - nic->transmit = ns8390_transmit; - nic->irq = ns8390_irq; +static struct nic_operations ns8390_operations; +static struct nic_operations ns8390_operations = { + .connect = dummy_connect, + .poll = ns8390_poll, + .transmit = ns8390_transmit, + .irq = ns8390_irq, + .disable = ns8390_disable, +}; + nic->nic_op = &ns8390_operations; /* Based on PnP ISA map */ #ifdef INCLUDE_WD diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c index 4476be37..23b8d7d8 100644 --- a/src/drivers/net/pcnet32.c +++ b/src/drivers/net/pcnet32.c @@ -945,11 +945,15 @@ static int pcnet32_probe ( struct dev *dev ) { else printf("\n"); } - - dev->disable = pcnet32_disable; - nic->poll = pcnet32_poll; - nic->transmit = pcnet32_transmit; - nic->irq = pcnet32_irq; +static struct nic_operations pcnet32_operations; +static struct nic_operations pcnet32_operations = { + .connect = dummy_connect, + .poll = pcnet32_poll, + .transmit = pcnet32_transmit, + .irq = pcnet32_irq, + .disable = pcnet32_disable, +}; + nic->nic_op = &pcnet32_operations; return 1; } diff --git a/src/drivers/net/prism2.c b/src/drivers/net/prism2.c index 972256ad..df373d38 100644 --- a/src/drivers/net/prism2.c +++ b/src/drivers/net/prism2.c @@ -856,10 +856,14 @@ static int prism2_pci_probe(struct dev *dev, struct pci_device *p) printf ( "Link connected (BSSID %! - MAC address %!)\n", hw->bssid, nic->node_addr ); /* point to NIC specific routines */ - dev->disable = prism2_disable; - nic->poll = prism2_poll; - nic->transmit = prism2_transmit; - nic->irq = prism2_irq; +static struct nic_operations prism2_operations; +static struct nic_operations prism2_operations = { + .connect = dummy_connect, + .poll = prism2_poll, + .transmit = prism2_transmit, + .irq = prism2_irq, + .disable = prism2_disable, +}; nic->nic_op = &prism2_operations; return 1; } diff --git a/src/drivers/net/r8169.c b/src/drivers/net/r8169.c index 4eaace1c..f1da6420 100644 --- a/src/drivers/net/r8169.c +++ b/src/drivers/net/r8169.c @@ -831,10 +831,14 @@ static int r8169_probe ( struct dev *dev ) { r8169_reset(nic); /* point to NIC specific routines */ - dev->disable = r8169_disable; - nic->poll = r8169_poll; - nic->transmit = r8169_transmit; - nic->irq = r8169_irq; +static struct nic_operations r8169_operations; +static struct nic_operations r8169_operations = { + .connect = dummy_connect, + .poll = r8169_poll, + .transmit = r8169_transmit, + .irq = r8169_irq, + .disable = r8169_disable, +}; nic->nic_op = &r8169_operations; nic->irqno = pci->irq; nic->ioaddr = ioaddr; return 1; diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c index eef1e3e4..b4ae072d 100644 --- a/src/drivers/net/rtl8139.c +++ b/src/drivers/net/rtl8139.c @@ -223,11 +223,15 @@ static int rtl8139_probe ( struct dev *dev ) { printf("Cable not connected or other link failure\n"); return(0); } - - dev->disable = rtl_disable; - nic->poll = rtl_poll; - nic->transmit = rtl_transmit; - nic->irq = rtl_irq; +static struct nic_operations rtl_operations; +static struct nic_operations rtl_operations = { + .connect = dummy_connect, + .poll = rtl_poll, + .transmit = rtl_transmit, + .irq = rtl_irq, + .disable = rtl_disable, +}; + nic->nic_op = &rtl_operations; return 1; } diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c index 64e10e06..daf0ecfd 100644 --- a/src/drivers/net/sis900.c +++ b/src/drivers/net/sis900.c @@ -409,11 +409,15 @@ static int sis900_probe ( struct dev *dev ) { /* initialize device */ sis900_init(nic); - - dev->disable = sis900_disable; - nic->poll = sis900_poll; - nic->transmit = sis900_transmit; - nic->irq = sis900_irq; +static struct nic_operations sis900_operations; +static struct nic_operations sis900_operations = { + .connect = dummy_connect, + .poll = sis900_poll, + .transmit = sis900_transmit, + .irq = sis900_irq, + .disable = sis900_disable, +}; + nic->nic_op = &sis900_operations; return 1; } diff --git a/src/drivers/net/sk_g16.c b/src/drivers/net/sk_g16.c index 8d2065e5..c3a6bc9c 100644 --- a/src/drivers/net/sk_g16.c +++ b/src/drivers/net/sk_g16.c @@ -782,10 +782,14 @@ static int SK_probe(struct dev *dev, unsigned short *probe_addrs) nic->ioaddr = ioaddr & ~3; nic->irqno = 0; /* point to NIC specific routines */ - dev->disable = SK_disable; - nic->poll = SK_poll; - nic->transmit = SK_transmit; - nic->irq = SK_irq; +static struct nic_operations SK_operations; +static struct nic_operations SK_operations = { + .connect = dummy_connect, + .poll = SK_poll, + .transmit = SK_transmit, + .irq = SK_irq, + .disable = SK_disable, +}; nic->nic_op = &SK_operations; /* FIXME set dev->devid */ return 1; } diff --git a/src/drivers/net/skel.c b/src/drivers/net/skel.c index d5519955..45627883 100644 --- a/src/drivers/net/skel.c +++ b/src/drivers/net/skel.c @@ -145,10 +145,14 @@ static int skel_probe ( struct dev *dev ) { nic->ioaddr = pci->ioaddr & ~3; nic->irqno = pci->irq; /* point to NIC specific routines */ - dev->disable = skel_disable; - nic->poll = skel_poll; - nic->transmit = skel_transmit; - nic->irq = skel_irq; +static struct nic_operations skel_operations; +static struct nic_operations skel_operations = { + .connect = dummy_connect, + .poll = skel_poll, + .transmit = skel_transmit, + .irq = skel_irq, + .disable = skel_disable, +}; nic->nic_op = &skel_operations; return 1; } /* else */ @@ -174,10 +178,14 @@ static int skel_isa_probe(struct dev *dev, unsigned short *probe_addrs) if (board_found && valid_link) { /* point to NIC specific routines */ - dev->disable = skel_disable; - nic->poll = skel_poll; - nic->transmit = skel_transmit; - nic->irq = skel_irq; +static struct nic_operations skel_operations; +static struct nic_operations skel_operations = { + .connect = dummy_connect, + .poll = skel_poll, + .transmit = skel_transmit, + .irq = skel_irq, + .disable = skel_disable, +}; nic->nic_op = &skel_operations; /* Report the ISA pnp id of the board */ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); diff --git a/src/drivers/net/smc9000.c b/src/drivers/net/smc9000.c index 62505579..a67c1be4 100644 --- a/src/drivers/net/smc9000.c +++ b/src/drivers/net/smc9000.c @@ -514,11 +514,15 @@ static int smc9000_probe(struct dev *dev, unsigned short *probe_addrs) _outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT, smc9000_base + CONFIG ); } - - dev->disable = smc9000_disable; - nic->poll = smc9000_poll; - nic->transmit = smc9000_transmit; - nic->irq = smc9000_irq; +static struct nic_operations smc9000_operations; +static struct nic_operations smc9000_operations = { + .connect = dummy_connect, + .poll = smc9000_poll, + .transmit = smc9000_transmit, + .irq = smc9000_irq, + .disable = smc9000_disable, +}; + nic->nic_op = &smc9000_operations; /* Based on PnP ISA map */ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c index 141c21d4..7bedeab1 100644 --- a/src/drivers/net/sundance.c +++ b/src/drivers/net/sundance.c @@ -735,10 +735,14 @@ static int sundance_probe ( struct dev *dev ) { sdc->mii_if.full_duplex ? "Full" : "Half"); /* point to NIC specific routines */ - dev->disable = sundance_disable; - nic->poll = sundance_poll; - nic->transmit = sundance_transmit; - nic->irq = sundance_irq; +static struct nic_operations sundance_operations; +static struct nic_operations sundance_operations = { + .connect = dummy_connect, + .poll = sundance_poll, + .transmit = sundance_transmit, + .irq = sundance_irq, + .disable = sundance_disable, +}; nic->nic_op = &sundance_operations; nic->irqno = pci->irq; nic->ioaddr = BASE; diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c index 0e4f3d62..77c4712a 100644 --- a/src/drivers/net/tg3.c +++ b/src/drivers/net/tg3.c @@ -3340,11 +3340,15 @@ static int tg3_probe ( struct dev *dev ) { printf("Valid link not established\n"); goto err_out_disable; } - - dev->disable = tg3_disable; - nic->poll = tg3_poll; - nic->transmit = tg3_transmit; - nic->irq = tg3_irq; +static struct nic_operations tg3_operations; +static struct nic_operations tg3_operations = { + .connect = dummy_connect, + .poll = tg3_poll, + .transmit = tg3_transmit, + .irq = tg3_irq, + .disable = tg3_disable, +}; + nic->nic_op = &tg3_operations; return 1; diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c index 67f64dc1..2b12ca36 100644 --- a/src/drivers/net/tlan.c +++ b/src/drivers/net/tlan.c @@ -844,11 +844,15 @@ static int tlan_probe ( struct dev *dev ) { /* if (board_found && valid_link) {*/ /* point to NIC specific routines */ - - dev->disable = tlan_disable; - nic->poll = tlan_poll; - nic->transmit = tlan_transmit; - nic->irq = tlan_irq; +static struct nic_operations tlan_operations; +static struct nic_operations tlan_operations = { + .connect = dummy_connect, + .poll = tlan_poll, + .transmit = tlan_transmit, + .irq = tlan_irq, + .disable = tlan_disable, +}; + nic->nic_op = &tlan_operations; return 1; } diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c index 42b11136..c08ca20d 100644 --- a/src/drivers/net/tulip.c +++ b/src/drivers/net/tulip.c @@ -1422,11 +1422,15 @@ static int tulip_probe ( struct dev *dev ) { /* reset the device and make ready for tx and rx of packets */ tulip_reset(nic); - - dev->disable = tulip_disable; - nic->poll = tulip_poll; - nic->transmit = tulip_transmit; - nic->irq = tulip_irq; +static struct nic_operations tulip_operations; +static struct nic_operations tulip_operations = { + .connect = dummy_connect, + .poll = tulip_poll, + .transmit = tulip_transmit, + .irq = tulip_irq, + .disable = tulip_disable, +}; + nic->nic_op = &tulip_operations; /* give the board a chance to reset before returning */ tulip_wait(4*TICKS_PER_SEC); diff --git a/src/drivers/net/via-rhine.c b/src/drivers/net/via-rhine.c index f142c59c..716e5360 100644 --- a/src/drivers/net/via-rhine.c +++ b/src/drivers/net/via-rhine.c @@ -963,11 +963,15 @@ rhine_probe ( struct dev *dev ) { adjust_pci_device(pci); rhine_reset (nic); - - dev->disable = rhine_disable; - nic->poll = rhine_poll; - nic->transmit = rhine_transmit; - nic->irq = rhine_irq; +static struct nic_operations rhine_operations; +static struct nic_operations rhine_operations = { + .connect = dummy_connect, + .poll = rhine_poll, + .transmit = rhine_transmit, + .irq = rhine_irq, + .disable = rhine_disable, +}; + nic->nic_op = &rhine_operations; nic->irqno = pci->irq; nic->ioaddr = tp->ioaddr; diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c index 7a57fa4f..0d4c0567 100644 --- a/src/drivers/net/w89c840.c +++ b/src/drivers/net/w89c840.c @@ -698,10 +698,14 @@ static int w89c840_probe ( struct dev *dev ) { } /* point to NIC specific routines */ - dev->disable = w89c840_disable; - nic->poll = w89c840_poll; - nic->transmit = w89c840_transmit; - nic->irq = w89c840_irq; +static struct nic_operations w89c840_operations; +static struct nic_operations w89c840_operations = { + .connect = dummy_connect, + .poll = w89c840_poll, + .transmit = w89c840_transmit, + .irq = w89c840_irq, + .disable = w89c840_disable, +}; nic->nic_op = &w89c840_operations; w89c840_reset(nic);