summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/tulip.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/tulip.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/tulip.c')
-rw-r--r--src/drivers/net/tulip.c14
1 files changed, 9 insertions, 5 deletions
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);