From: sthen Date: Sat, 2 Apr 2022 15:35:06 +0000 (+0000) Subject: Don't byte swap URE_TXPKT_VLAN_TAG when setting up the packet to transmit. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fe07c29872c3a67d8f4ecff6dfae36dab4b4996f;p=openbsd 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@ --- 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 * Copyright (c) 2020 Jonathon Fletcher @@ -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 |