summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/pcnet32.c
diff options
context:
space:
mode:
authorMichael Brown2005-04-13 02:02:40 +0200
committerMichael Brown2005-04-13 02:02:40 +0200
commit91e46ed588d619a690753d95577ec833a1b857e9 (patch)
tree1fb4d478e9292d425f8dee97988f41e9f27b320a /src/drivers/net/pcnet32.c
parentManual tweaks to get all drivers to follow the "disable, poll, transmit, (diff)
downloadipxe-91e46ed588d619a690753d95577ec833a1b857e9.tar.gz
ipxe-91e46ed588d619a690753d95577ec833a1b857e9.tar.xz
ipxe-91e46ed588d619a690753d95577ec833a1b857e9.zip
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
Diffstat (limited to 'src/drivers/net/pcnet32.c')
-rw-r--r--src/drivers/net/pcnet32.c14
1 files changed, 9 insertions, 5 deletions
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;
}