const struct ethtool_flow_ext *ext_h_spec = &fs->h_ext;
                const struct ethtool_flow_ext *ext_m_spec = &fs->m_ext;
 
-               if (ext_m_spec->vlan_etype &&
-                   ext_m_spec->vlan_tci) {
+               if (ext_m_spec->vlan_etype) {
                        match->key.vlan.vlan_tpid = ext_h_spec->vlan_etype;
                        match->mask.vlan.vlan_tpid = ext_m_spec->vlan_etype;
+               }
 
+               if (ext_m_spec->vlan_tci) {
                        match->key.vlan.vlan_id =
                                ntohs(ext_h_spec->vlan_tci) & 0x0fff;
                        match->mask.vlan.vlan_id =
                                (ntohs(ext_h_spec->vlan_tci) & 0xe000) >> 13;
                        match->mask.vlan.vlan_priority =
                                (ntohs(ext_m_spec->vlan_tci) & 0xe000) >> 13;
+               }
 
+               if (ext_m_spec->vlan_etype ||
+                   ext_m_spec->vlan_tci) {
                        match->dissector.used_keys |=
                                BIT(FLOW_DISSECTOR_KEY_VLAN);
                        match->dissector.offset[FLOW_DISSECTOR_KEY_VLAN] =