diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2022-04-02 15:35:07 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2022-04-02 15:35:07 +0000 |
commit | 9a99a5db16999cd7df6283e6c8a3160ee8d52528 (patch) | |
tree | aed2b47f2f16dc33c7e431bcb2b4420102dbf7f9 /sys/dev/usb | |
parent | 72c8703886841839b88da33f010d814b50f75231 (diff) |
Don't byte swap URE_TXPKT_VLAN_TAG when setting up the packet to transmit.
Fixes vlan transmission with hw tagging (problem seen on RTL8153B but there's
no reason this wouldn't apply to others) and matches what the Linux driver
is doing. looks correct kettenis@ ok kevlo@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/if_ure.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/if_ure.c b/sys/dev/usb/if_ure.c index 4946163ba89..186b2a6fb0e 100644 --- a/sys/dev/usb/if_ure.c +++ b/sys/dev/usb/if_ure.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ure.c,v 1.29 2022/04/02 12:22:56 kevlo Exp $ */ +/* $OpenBSD: if_ure.c,v 1.30 2022/04/02 15:35:06 sthen Exp $ */ /*- * Copyright (c) 2015, 2016, 2019 Kevin Lo <kevlo@openbsd.org> * Copyright (c) 2020 Jonathon Fletcher <jonathon.fletcher@gmail.com> @@ -2142,7 +2142,7 @@ ure_encap_txpkt(struct mbuf *m, char *buf, uint32_t maxlen) #if NVLAN > 0 if (m->m_flags & M_VLANTAG) - cflags |= swap16(m->m_pkthdr.ether_vtag | URE_TXPKT_VLAN_TAG); + cflags |= URE_TXPKT_VLAN_TAG | swap16(m->m_pkthdr.ether_vtag); #endif txhdr.ure_pktlen = htole32(m->m_pkthdr.len | URE_TXPKT_TX_FS | |