diff options
author | Henric Jungheim <henric@cvs.openbsd.org> | 2003-05-28 11:23:20 +0000 |
---|---|---|
committer | Henric Jungheim <henric@cvs.openbsd.org> | 2003-05-28 11:23:20 +0000 |
commit | 30bfa3445de242e34a53c34325a5c55b1aeee59a (patch) | |
tree | 2ee95077e83ff941294bc128e709c663c24776d1 /sys | |
parent | 3d0d141b1572e2b5564b284cd17a856577a44fa1 (diff) |
The statistics are wrong endian. "netstat -i" now gives sane results.
ok pb@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/fxp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 070e97945d6..01e146fb97b 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.41 2003/02/19 04:24:39 jason Exp $ */ +/* $OpenBSD: fxp.c,v 1.42 2003/05/28 11:23:19 henric Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -895,25 +895,25 @@ fxp_stats_update(arg) int s; FXP_STATS_SYNC(sc, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); - ifp->if_opackets += sp->tx_good; - ifp->if_collisions += sp->tx_total_collisions; + ifp->if_opackets += letoh32(sp->tx_good); + ifp->if_collisions += letoh32(sp->tx_total_collisions); if (sp->rx_good) { - ifp->if_ipackets += sp->rx_good; + ifp->if_ipackets += letoh32(sp->rx_good); sc->rx_idle_secs = 0; } else { sc->rx_idle_secs++; } ifp->if_ierrors += - sp->rx_crc_errors + - sp->rx_alignment_errors + - sp->rx_rnr_errors + - sp->rx_overrun_errors; + letoh32(sp->rx_crc_errors) + + letoh32(sp->rx_alignment_errors) + + letoh32(sp->rx_rnr_errors) + + letoh32(sp->rx_overrun_errors); /* * If any transmit underruns occurred, bump up the transmit * threshold by another 512 bytes (64 * 8). */ if (sp->tx_underruns) { - ifp->if_oerrors += sp->tx_underruns; + ifp->if_oerrors += letoh32(sp->tx_underruns); if (tx_threshold < 192) tx_threshold += 64; } |