On 2022/04/02 15:47, Stuart Henderson wrote:
> It doesn't, but this fixes it:
>
> Index: if_ure.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ure.c,v
> retrieving revision 1.29
> diff -u -p -r1.29 if_ure.c
> --- if_ure.c 2 Apr 2022 12:22:56 -0000 1.29
> +++ if_ure.c 2 Apr 2022 14:46:50 -0000
> @@ -2142,7 +2142,7 @@ ure_encap_txpkt(struct mbuf *m, char *bu
>
> #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 |
>
And here's equivalent code in Realtek's Linux driver:
2059 static inline void rtl_tx_vlan_tag(struct tx_desc *desc, struct sk_buff
*skb)
2060 {
2061 if (skb_vlan_tag_present(skb)) {
2062 u32 opts2;
2063
2064 opts2 = TX_VLAN_TAG | swab16(skb_vlan_tag_get(skb));
2065 desc->opts2 |= cpu_to_le32(opts2);
2066 }
2067 }