From: Jacob Potter Date: Thu, 2 Oct 2008 23:34:35 +0000 (-0400) Subject: changes to make it compile X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/42125f27f3d2a77966f2015c545a88c4113368ef?ds=inline;hp=--cc changes to make it compile --- 42125f27f3d2a77966f2015c545a88c4113368ef diff --git a/aseg/Makefile b/aseg/Makefile index 4072606..64b3c5a 100644 --- a/aseg/Makefile +++ b/aseg/Makefile @@ -4,7 +4,7 @@ CFLAGS=-I../include -I../include/raw -nostdlib -nostdinc -fno-builtin -D__RAW__ OBJS=counter.o firstrun.o ../pci/pci-raw.o ../lib/minilib.o ../lib/console.o \ ../ich2/smram-ich2.o ../ich2/smi.o vga-overlay.o packet.o \ ../lib/sprintf.o ../lib/doprnt.o ../pci/pci.o ../net/net.o \ - ../ich2/ich2-timer.o ../pci/pci-bother.o + ../ich2/ich2-timer.o ../pci/pci-bother.o ../net/3c90x.o all: aseg.elf diff --git a/include/timer.h b/include/timer.h index 56054b0..b3b6985 100644 --- a/include/timer.h +++ b/include/timer.h @@ -4,4 +4,4 @@ void oneshot_start_ms(unsigned long milliseconds); int oneshot_running(void); -#endif TIMER_H +#endif /* TIMER_H */ diff --git a/net/3c90x.c b/net/3c90x.c index 37fd34d..711b69d 100644 --- a/net/3c90x.c +++ b/net/3c90x.c @@ -38,6 +38,7 @@ */ #include "etherboot-compat.h" +#include "net.h" #include #include #include @@ -712,8 +713,8 @@ static int a3c90x_probe(struct pci_dev * pci, void * data) /* adjust_pci_dev(pci); */ - nic->ioaddr = ioaddr & ~3; - nic->irqno = 0; + nic.ioaddr = ioaddr & ~3; + nic.irqno = 0; INF_3C90X.IOAddr = ioaddr & ~3; INF_3C90X.CurrentWindow = 255; @@ -823,7 +824,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 @@ -963,8 +964,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; } diff --git a/net/etherboot-compat.h b/net/etherboot-compat.h index 6c96458..2d8d98f 100644 --- a/net/etherboot-compat.h +++ b/net/etherboot-compat.h @@ -1,3 +1,6 @@ +#ifndef _ETHERBOOT_COMPAT_H +#define _ETHERBOOT_COMPAT_H + #define ETH_ALEN 6 struct dev { @@ -16,3 +19,5 @@ struct nic { }; #define virt_to_bus(x) ((unsigned long)x) + +#endif diff --git a/net/net.h b/net/net.h index f10e304..01505ab 100644 --- a/net/net.h +++ b/net/net.h @@ -6,4 +6,6 @@ extern void eth_init(); extern void eth_poll(); +extern struct nic nic; + #endif