In vlan_transmit the IFCAP_VLAN_HWTAGGING cases uses
 sc->sc_tag + (prio << EVL_PRIO_BITS)
while the non IFCAP_VLAN_HWTAGGING cases uses
 sc->sc_tag | (prio << EVL_PRIO_BITS)

Lets use the same logic in both cases. IMO using '|' is more correct than
'+' so switch to that.
-- 
:wq Claudio

Index: net/if_vlan.c
===================================================================
RCS file: /cvs/src/sys/net/if_vlan.c,v
retrieving revision 1.210
diff -u -p -r1.210 if_vlan.c
--- net/if_vlan.c       10 Aug 2022 09:01:48 -0000      1.210
+++ net/if_vlan.c       2 Feb 2023 11:41:03 -0000
@@ -270,7 +270,7 @@ vlan_transmit(struct vlan_softc *sc, str
         */
        if ((ifp0->if_capabilities & IFCAP_VLAN_HWTAGGING) &&
            (sc->sc_type == ETHERTYPE_VLAN)) {
-               m->m_pkthdr.ether_vtag = sc->sc_tag +
+               m->m_pkthdr.ether_vtag = sc->sc_tag |
                    (prio << EVL_PRIO_BITS);
                m->m_flags |= M_VLANTAG;
        } else {

Reply via email to