Lines Matching refs:sch

332 	struct schan *sch;
405 sch = sc->ch[i];
408 i, NG_HOOK_NAME(sch->hook));
411 if (sch->last_recv)
413 (unsigned long)(time_second - sch->last_recv));
418 if (sch->last_rxerr)
420 (unsigned long)(time_second - sch->last_rxerr));
425 if (sch->last_xmit)
427 (unsigned long)(time_second - sch->last_xmit));
431 pos += sprintf(r + pos, " RX error(s) %lu", sch->rx_error);
432 pos += sprintf(r + pos, " Short: %lu", sch->short_error);
433 pos += sprintf(r + pos, " CRC: %lu", sch->crc_error);
434 pos += sprintf(r + pos, " Mod8: %lu", sch->dribble_error);
435 pos += sprintf(r + pos, " Long: %lu", sch->long_error);
436 pos += sprintf(r + pos, " Abort: %lu", sch->abort_error);
437 pos += sprintf(r + pos, " Overflow: %lu\n", sch->overflow_error);
440 sch->last_error, "\20\7SHORT\5CRC\4MOD8\3LONG\2ABORT\1OVERRUN",
441 sch->prev_error, "\20\7SHORT\5CRC\4MOD8\3LONG\2ABORT\1OVERRUN");
443 sch->tx_pending);
585 struct schan *sch;
590 sch = NG_HOOK_PRIVATE(hook);
591 sc = sch->sc;
592 chan = sch->chan;
594 if (sch->state != UP) {
599 if (sch->tx_pending + m->m_pkthdr.len > sch->tx_limit * mn_maxlatency) {
648 sch->tx_pending + m->m_pkthdr.len,
649 sch->tx_pending , m->m_pkthdr.len, m);
651 sch->tx_pending += m->m_pkthdr.len;
667 struct schan *sch;
670 sch = NG_HOOK_PRIVATE(hook);
671 chan = sch->chan;
672 sc = sch->sc;
674 if (sch->state == UP)
676 sch->state = UP;
680 if (sch->ts & (1 << i)) {
758 struct schan *sch;
762 sch = NG_HOOK_PRIVATE(hook);
763 chan = sch->chan;
764 sc = sch->sc;
766 if (sch->state == DOWN)
768 sch->state = DOWN;
815 struct schan *sch;
817 sch = sc->ch[chan] = (struct schan *)malloc(sizeof *sc->ch[chan],
819 sch->sc = sc;
820 sch->state = DOWN;
821 sch->chan = chan;
822 sprintf(sch->name, "%s%d", sc->name, chan);
1111 struct schan *sch;
1116 sch = sc->ch[chan];
1117 if (sch->state != UP) {
1123 sch->rx_error++;
1125 dp = sch->r1;
1134 NG_SEND_DATA_ONLY(error, sch->hook, m);
1135 sch->last_recv = time_second;
1137 if (sch->state != UP)
1140 sch->short_error++;
1142 sch->crc_error++;
1144 sch->dribble_error++;
1146 sch->long_error++;
1148 sch->abort_error++;
1150 sch->overflow_error++;
1153 sch->last_rxerr = time_second;
1154 sch->prev_error = sch->last_error;
1155 sch->last_error = err;