linux/net/dsa/tag_gswip.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Intel / Lantiq GSWIP V2.0 PMAC tag support
 *
 * Copyright (C) 2017 - 2018 Hauke Mehrtens <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <net/dsa.h>

#include "tag.h"

#define GSWIP_NAME

#define GSWIP_TX_HEADER_LEN

/* special tag in TX path header */
/* Byte 0 */
#define GSWIP_TX_SLPID_SHIFT
#define GSWIP_TX_SLPID_CPU
#define GSWIP_TX_SLPID_APP1
#define GSWIP_TX_SLPID_APP2
#define GSWIP_TX_SLPID_APP3
#define GSWIP_TX_SLPID_APP4
#define GSWIP_TX_SLPID_APP5

/* Byte 1 */
#define GSWIP_TX_CRCGEN_DIS
#define GSWIP_TX_DPID_SHIFT
#define GSWIP_TX_DPID_ELAN
#define GSWIP_TX_DPID_EWAN
#define GSWIP_TX_DPID_CPU
#define GSWIP_TX_DPID_APP1
#define GSWIP_TX_DPID_APP2
#define GSWIP_TX_DPID_APP3
#define GSWIP_TX_DPID_APP4
#define GSWIP_TX_DPID_APP5

/* Byte 2 */
#define GSWIP_TX_PORT_MAP_EN
#define GSWIP_TX_PORT_MAP_SEL
#define GSWIP_TX_LRN_DIS
#define GSWIP_TX_CLASS_EN
#define GSWIP_TX_CLASS_SHIFT
#define GSWIP_TX_CLASS_MASK

/* Byte 3 */
#define GSWIP_TX_DPID_EN
#define GSWIP_TX_PORT_MAP_SHIFT
#define GSWIP_TX_PORT_MAP_MASK

#define GSWIP_RX_HEADER_LEN

/* special tag in RX path header */
/* Byte 7 */
#define GSWIP_RX_SPPID_SHIFT
#define GSWIP_RX_SPPID_MASK

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

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

static const struct dsa_device_ops gswip_netdev_ops =;

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS_DSA_TAG_DRIVER();

module_dsa_tag_driver(gswip_netdev_ops);