diff options
author | yongari <yongari@FreeBSD.org> | 2008-08-13 03:40:08 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2008-08-13 03:40:08 +0000 |
commit | 0fa4e4ac22c800e4d497d50504c891e37f62714a (patch) | |
tree | 16f702fcb8697ab2d68775a4b227f791b8bb5a5f /sys/dev/re/if_re.c | |
parent | d2bb855ab7f6cc6f11e753fdb0a609257603254d (diff) | |
download | FreeBSD-src-0fa4e4ac22c800e4d497d50504c891e37f62714a.zip FreeBSD-src-0fa4e4ac22c800e4d497d50504c891e37f62714a.tar.gz |
Fix VLAN hardware tag insertion/stripping on big-endian
architectures.
Reported by: naddy
Tested on: sparc64
MFC after: 1 week
Diffstat (limited to 'sys/dev/re/if_re.c')
-rw-r--r-- | sys/dev/re/if_re.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index c845c74..5979439 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1903,7 +1903,7 @@ re_rxeof(struct rl_softc *sc) maxpkt--; if (rxvlan & RL_RDESC_VLANCTL_TAG) { m->m_pkthdr.ether_vtag = - ntohs((rxvlan & RL_RDESC_VLANCTL_DATA)); + bswap16((rxvlan & RL_RDESC_VLANCTL_DATA)); m->m_flags |= M_VLANTAG; } RL_UNLOCK(sc); @@ -2307,7 +2307,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head) * transmission attempt. */ if ((*m_head)->m_flags & M_VLANTAG) - vlanctl |= htons((*m_head)->m_pkthdr.ether_vtag) | + vlanctl |= bswap16((*m_head)->m_pkthdr.ether_vtag) | RL_TDESC_VLANCTL_TAG; si = prod; |