diff options
| -rw-r--r-- | sys/src/9/pc64/pc64 | 2 | ||||
| -rw-r--r-- | sys/src/9/port/ethersink.c | 25 |
2 files changed, 20 insertions, 7 deletions
diff --git a/sys/src/9/pc64/pc64 b/sys/src/9/pc64/pc64 index 73dfc4c33..07cd66172 100644 --- a/sys/src/9/pc64/pc64 +++ b/sys/src/9/pc64/pc64 @@ -68,7 +68,7 @@ link # ethervgbe pci ethermii # ethervt6102 pci ethermii # ethervt6105m pci ethermii -# ethersink + ethersink # ethersmc devi82365 cis etheryuk pci # etherwavelan wavelan devi82365 cis pci diff --git a/sys/src/9/port/ethersink.c b/sys/src/9/port/ethersink.c index a005af3a8..aa62d3719 100644 --- a/sys/src/9/port/ethersink.c +++ b/sys/src/9/port/ethersink.c @@ -33,22 +33,35 @@ ctl(Ether *ether, void *buf, long n) } static void -nop(Ether*) +attach(Ether *ether) +{ + /* silently discard output */ + qnoblock(ether->oq, 1); + qsetlimit(ether->oq, 0); +} + +static void +multicast(void *, uchar*, int) +{ +} + +static void +promiscuous(void *, int) { } static int reset(Ether* ether) { + static uchar zeros[Eaddrlen]; + if(ether->type==nil) return -1; ether->mbps = 1000; - ether->attach = nop; - ether->transmit = nop; - ether->ifstat = nil; + ether->attach = attach; + ether->multicast = multicast; + ether->promiscuous = promiscuous; ether->ctl = ctl; - ether->promiscuous = nil; - ether->multicast = nil; ether->arg = ether; return 0; } |
