[PATCH 2/9] include: import if_vlan.h from Linux
Ramon Fried
rfried.dev at gmail.com
Tue Sep 28 15:26:09 CEST 2021
On Tue, Sep 28, 2021 at 2:48 AM Vladimir Oltean <vladimir.oltean at nxp.com> wrote:
>
> This is needed for the VLAN header structure.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> ---
> include/linux/if_vlan.h | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
> create mode 100644 include/linux/if_vlan.h
>
> diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
> new file mode 100644
> index 000000000000..cbc82f4cc217
> --- /dev/null
> +++ b/include/linux/if_vlan.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * VLAN An implementation of 802.1Q VLAN tagging.
> + *
> + * Authors: Ben Greear <greearb at candelatech.com>
> + */
> +#ifndef _LINUX_IF_VLAN_H_
> +#define _LINUX_IF_VLAN_H_
> +
> +/**
> + * struct vlan_ethhdr - vlan ethernet header (ethhdr + vlan_hdr)
> + * @h_dest: destination ethernet address
> + * @h_source: source ethernet address
> + * @h_vlan_proto: ethernet protocol
> + * @h_vlan_TCI: priority and VLAN ID
> + * @h_vlan_encapsulated_proto: packet type ID or len
> + */
> +struct vlan_ethhdr {
> + unsigned char h_dest[ETH_ALEN];
> + unsigned char h_source[ETH_ALEN];
> + __be16 h_vlan_proto;
> + __be16 h_vlan_TCI;
> + __be16 h_vlan_encapsulated_proto;
> +};
> +
> +#endif /* !(_LINUX_IF_VLAN_H_) */
> --
> 2.25.1
>
Reviewed-by: Ramon Fried <rfried.dev at gmail.com>
More information about the U-Boot
mailing list