X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/0c23904ff02d1287132e872c058879973455fd68..7a914840b833dba82398623bbde04a1744627398:/net/3c90x.c?ds=sidebyside diff --git a/net/3c90x.c b/net/3c90x.c index e7b95e9..f678aaf 100644 --- a/net/3c90x.c +++ b/net/3c90x.c @@ -38,9 +38,11 @@ */ #include "etherboot-compat.h" +#include "net.h" #include #include #include +#include #include #include @@ -250,6 +252,7 @@ static struct RXD ReceiveUPD; } INF_3C90X; +static struct nic nic; /*** a3c90x_internal_IssueCommand: sends a command to the 3c90x card @@ -689,7 +692,6 @@ void a3c90x_disable(struct dev *dev) ***/ static int a3c90x_probe(struct pci_dev * pci, void * data) { - struct nic *nic = (struct nic *)data; INF_3C90X.is3c556 = (pci->did == 0x6055); int i, c; @@ -713,8 +715,9 @@ static int a3c90x_probe(struct pci_dev * pci, void * data) /* adjust_pci_dev(pci); */ - nic->ioaddr = ioaddr & ~3; - nic->irqno = 0; + pci_bother_add(pci); + nic.ioaddr = ioaddr & ~3; + nic.irqno = 0; INF_3C90X.IOAddr = ioaddr & ~3; INF_3C90X.CurrentWindow = 255; @@ -824,7 +827,7 @@ static int a3c90x_probe(struct pci_dev * pci, void * data) /** Fill in our entry in the etherboot arp table **/ /* XXX ? for lwip? for(i=0;inode_addr[i] = (eeprom[HWADDR_OFFSET + i/2] >> (8*((i&1)^1))) & 0xff; + nic.node_addr[i] = (eeprom[HWADDR_OFFSET + i/2] >> (8*((i&1)^1))) & 0xff; */ /** Read the media options register, print a message and set default @@ -964,8 +967,8 @@ static int a3c90x_probe(struct pci_dev * pci, void * data) cmdAcknowledgeInterrupt, 0x661); /* * Set our exported functions **/ - nic->poll = a3c90x_poll; - nic->transmit = a3c90x_transmit; + nic.poll = a3c90x_poll; + nic.transmit = a3c90x_transmit; return 1; }