linux/net/dsa/tag_rzn1_a5psw.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2022 Schneider Electric
 *
 * Clément Léger <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <net/dsa.h>

#include "tag.h"

/* To define the outgoing port and to discover the incoming port a TAG is
 * inserted after Src MAC :
 *
 *       Dest MAC       Src MAC           TAG         Type
 * ...| 1 2 3 4 5 6 | 1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 | 1 2 |...
 *                                |<--------------->|
 *
 * See struct a5psw_tag for layout
 */

#define A5PSW_NAME

#define ETH_P_DSA_A5PSW
#define A5PSW_TAG_LEN
#define A5PSW_CTRL_DATA_FORCE_FORWARD
/* This is both used for xmit tag and rcv tagging */
#define A5PSW_CTRL_DATA_PORT

struct a5psw_tag {};

static struct sk_buff *a5psw_tag_xmit(struct sk_buff *skb, struct net_device *dev)
{}

static struct sk_buff *a5psw_tag_rcv(struct sk_buff *skb,
				     struct net_device *dev)
{}

static const struct dsa_device_ops a5psw_netdev_ops =;

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS_DSA_TAG_DRIVER();
module_dsa_tag_driver(a5psw_netdev_ops);