| plan 9 kernel history: overview | file list | diff list |
2000/0817/pc/devether.c (diff list | history)
| 2000/0713/sys/src/9/pc/devether.c:244,254 – 2000/0817/sys/src/9/pc/devether.c:244,263 (short | long | prev | next) | ||
| 1992/0407 | { | |
| 1997/0327 | Ether *ether; Block *bp; | |
| 2000/0817 | int nn; | |
| 1992/0407 | ||
| 1997/0327 | ether = etherxx[chan->dev]; | |
| 2000/0817 | if(NETTYPE(chan->qid.path) != Ndataqid) { nn = netifwrite(ether, chan, buf, n); if(nn >= 0) return nn; | |
| 1992/0403 | ||
| 2000/0817 | if(ether->ctl!=nil) return ether->ctl(ether,buf,n); error(Ebadctl); } | |
| 1997/1101 | if(n > ETHERMAXTU) error(Etoobig); if(n < ETHERMINTU) | |
| 2000/0713/sys/src/9/pc/devether.c:255,267 – 2000/0817/sys/src/9/pc/devether.c:264,271 | ||
| 1997/1101 | error(Etoosmall); | |
| 1997/0327 | bp = allocb(n); | |
| 1992/0403 |
| |
| 1997/0327 |
| |
| 1992/0403 |
| |
| 1997/0327 | memmove(bp->rp, buf, n); memmove(bp->rp+Eaddrlen, ether->ea, Eaddrlen); | |
| 1995/0822 |
| |
| 1997/0327 | bp->wp += n; | |
| 1992/0403 | ||
| 1997/0327 | return etheroq(ether, bp); | |
| 2000/0713/sys/src/9/pc/devether.c:274,285 – 2000/0817/sys/src/9/pc/devether.c:278,293 | ||
| 1997/0327 | long n; n = BLEN(bp); | |
| 2000/0817 | if(waserror()) { freeb(bp); nexterror(); } n = etherwrite(chan, bp->rp, n, 0); | |
| 1997/0327 | freeb(bp); return n; } | |
| 2000/0817 | ether = etherxx[chan->dev]; | |
| 1997/0327 | ||
| 1997/1101 | if(n > ETHERMAXTU){ freeb(bp); | |
| 2000/0713/sys/src/9/pc/devether.c:369,375 – 2000/0817/sys/src/9/pc/devether.c:377,388 | ||
| 1997/0327 | if(ether->irq == 2) ether->irq = 9; | |
| 1999/0819 | snprint(name, sizeof(name), "ether%d", ctlrno); | |
| 2000/0817 | /* If ether->irq is less than 0, it is a hack to indicate no interrupt * used for the seocnd logical ethernet for the wavelan card */ if(ether->irq >= 0) intrenable(ether->irq, ether->interrupt, ether, ether->tbdf, name); | |
| 1993/0212 | ||
| 1998/0825 | i = sprint(buf, "#l%d: %s: %dMbps port 0x%luX irq %lud", | |
| 1997/0327 | ctlrno, ether->type, ether->mbps, ether->port, ether->irq); | |