From cd7fda7f492bbedd7755a92d1f286fd916ef89d8 Mon Sep 17 00:00:00 2001 From: kevlo Date: Thu, 21 Apr 2022 05:08:39 +0000 Subject: [PATCH] Repair hw vlan tagging. Previously swapped byte RGE_TDEXTSTS_VTAG, this caused no tag was sent on the outgoing packet. Bug reported and the fix tested by Andrew Laramore. --- sys/dev/pci/if_rge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_rge.c b/sys/dev/pci/if_rge.c index 41b09cd27b4..0a3392001bc 100644 --- a/sys/dev/pci/if_rge.c +++ b/sys/dev/pci/if_rge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rge.c,v 1.18 2022/03/12 06:54:05 jmatthew Exp $ */ +/* $OpenBSD: if_rge.c,v 1.19 2022/04/21 05:08:39 kevlo Exp $ */ /* * Copyright (c) 2019, 2020 Kevin Lo @@ -452,7 +452,7 @@ rge_encap(struct rge_queues *q, struct mbuf *m, int idx) /* Set up hardware VLAN tagging. */ #if NVLAN > 0 if (m->m_flags & M_VLANTAG) - cflags |= swap16(m->m_pkthdr.ether_vtag | RGE_TDEXTSTS_VTAG); + cflags |= swap16(m->m_pkthdr.ether_vtag) | RGE_TDEXTSTS_VTAG; #endif cur = idx; -- 2.20.1