X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/3c2c3b0dd358924410d12f8a71b5fee7a3f02e83..42125f27f3d2a77966f2015c545a88c4113368ef:/net/net.c?ds=sidebyside diff --git a/net/net.c b/net/net.c index b89abe2..18eaddf 100644 --- a/net/net.c +++ b/net/net.c @@ -1,8 +1,9 @@ #include +#include #include -#include "3c905.h" +#include "net.h" -static int found = 0, _bus, _dev, _fn; +struct nic nic; static int bother_3c905(pci_dev_t *dev, void *nutrinus) { @@ -10,11 +11,7 @@ static int bother_3c905(pci_dev_t *dev, void *nutrinus) { outputf("Found a 3c905 to bother"); - _bus = dev->bus; - _dev = dev->dev; - _fn = dev->fn; - found = 1; - + pci_bother_add(dev); return 1; } return 0; @@ -22,12 +19,7 @@ static int bother_3c905(pci_dev_t *dev, void *nutrinus) void eth_poll() { - if (!found) - return; - - pci_write16(_bus, _dev, _fn, 0x04, 0xFF); - - pci_write16(_bus, _dev, _fn, 0x04, 0x00); + /* ... */ } void eth_init()