diff options
author | mux <mux@FreeBSD.org> | 2003-04-08 17:21:15 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2003-04-08 17:21:15 +0000 |
commit | d266784cd13e17dd5659b9e429d8b7cb435867c7 (patch) | |
tree | eb25de66f74aa68fd8e10b72783c5ddccf2124aa /sys/dev/fxp | |
parent | e3a20d4e48ab70aa457cb399117fad010a57691b (diff) | |
download | FreeBSD-src-d266784cd13e17dd5659b9e429d8b7cb435867c7.zip FreeBSD-src-d266784cd13e17dd5659b9e429d8b7cb435867c7.tar.gz |
- Endian fixes.
- 6 -> ETHER_ADDR_LEN.
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index e7adfd1..756a1a9 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -1385,9 +1385,10 @@ fxp_start(struct ifnet *ifp) * This could cause us to overwrite the completion status. */ atomic_clear_short(&sc->fxp_desc.tx_last->tx_cb->cb_command, - FXP_CB_COMMAND_S); + htole16(FXP_CB_COMMAND_S)); #else - sc->fxp_desc.tx_last->tx_cb->cb_command &= ~FXP_CB_COMMAND_S; + sc->fxp_desc.tx_last->tx_cb->cb_command &= + htole16(~FXP_CB_COMMAND_S); #endif /*__alpha__*/ sc->fxp_desc.tx_last = txp; @@ -1625,7 +1626,7 @@ fxp_intr_body(struct fxp_softc *sc, u_int8_t statack, int count) * upon completion), and drop the packet in case * of bogus length or CRC errors. */ - total_len = le16toh(rfa->actual_size & 0x3fff); + total_len = le16toh(rfa->actual_size) & 0x3fff; if (total_len < sizeof(struct ether_header) || total_len > MCLBYTES - RFA_ALIGNMENT_FUDGE - sc->rfa_size || @@ -2375,11 +2376,11 @@ fxp_mc_addrs(struct fxp_softc *sc) break; } bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - &sc->mcsp->mc_addr[nmcasts][0], 6); + &sc->mcsp->mc_addr[nmcasts][0], ETHER_ADDR_LEN); nmcasts++; } } - mcsp->mc_cnt = htole16(nmcasts * 6); + mcsp->mc_cnt = htole16(nmcasts * ETHER_ADDR_LEN); return (nmcasts); } |