]> Joshua Wise's Git repositories - netwatch.git/blobdiff - net/net.c
Actually invoke the 3c90x driver load routine.
[netwatch.git] / net / net.c
index 18eaddf2dc625729b5af87d7d9ee55c339d93cb9..575b5e446f827209fdb9662a403382d2cdade348 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -3,26 +3,26 @@
 #include <output.h>
 #include "net.h"
 
-struct nic nic;
+static struct nic *_nic = 0x0;
 
-static int bother_3c905(pci_dev_t *dev, void *nutrinus)
+extern struct pci_driver a3c90x_driver;
+
+void eth_poll()
 {
-       if (dev->vid == 0x10B7 || dev->did == 0x9200)
-       {
-               outputf("Found a 3c905 to bother");
-               
-               pci_bother_add(dev);
-               return 1;
-       }
-       return 0;
+       if (_nic)
+               _nic->poll(_nic, 0);
 }
 
-void eth_poll()
+int eth_register(struct nic *nic)
 {
-       /* ... */
+       if (_nic)
+               return -1;
+       _nic = nic;
+       return 0;
 }
 
 void eth_init()
 {
-       pci_probe(bother_3c905, 0x0);
+       if (pci_probe_driver(a3c90x_driver))
+               outputf("found 3c90x, hopefully!");
 }
This page took 0.028144 seconds and 4 git commands to generate.