linux/net/dsa/conduit.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Handling of a conduit device, switching frames via its switch fabric CPU port
 *
 * Copyright (c) 2017 Savoir-faire Linux Inc.
 *	Vivien Didelot <[email protected]>
 */

#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <net/dsa.h>

#include "conduit.h"
#include "dsa.h"
#include "port.h"
#include "tag.h"

static int dsa_conduit_get_regs_len(struct net_device *dev)
{}

static void dsa_conduit_get_regs(struct net_device *dev,
				 struct ethtool_regs *regs, void *data)
{}

static void dsa_conduit_get_ethtool_stats(struct net_device *dev,
					  struct ethtool_stats *stats,
					  uint64_t *data)
{}

static void dsa_conduit_get_ethtool_phy_stats(struct net_device *dev,
					      struct ethtool_stats *stats,
					      uint64_t *data)
{}

static int dsa_conduit_get_sset_count(struct net_device *dev, int sset)
{}

static void dsa_conduit_get_strings(struct net_device *dev, uint32_t stringset,
				    uint8_t *data)
{}

/* Deny PTP operations on conduit if there is at least one switch in the tree
 * that is PTP capable.
 */
int __dsa_conduit_hwtstamp_validate(struct net_device *dev,
				    const struct kernel_hwtstamp_config *config,
				    struct netlink_ext_ack *extack)
{}

static int dsa_conduit_ethtool_setup(struct net_device *dev)
{}

static void dsa_conduit_ethtool_teardown(struct net_device *dev)
{}

/* Keep the conduit always promiscuous if the tagging protocol requires that
 * (garbles MAC DA) or if it doesn't support unicast filtering, case in which
 * it would revert to promiscuous mode as soon as we call dev_uc_add() on it
 * anyway.
 */
static void dsa_conduit_set_promiscuity(struct net_device *dev, int inc)
{}

static ssize_t tagging_show(struct device *d, struct device_attribute *attr,
			    char *buf)
{}

static ssize_t tagging_store(struct device *d, struct device_attribute *attr,
			     const char *buf, size_t count)
{}
static DEVICE_ATTR_RW(tagging);

static struct attribute *dsa_user_attrs[] =;

static const struct attribute_group dsa_group =;

static void dsa_conduit_reset_mtu(struct net_device *dev)
{}

int dsa_conduit_setup(struct net_device *dev, struct dsa_port *cpu_dp)
{}

void dsa_conduit_teardown(struct net_device *dev)
{}

int dsa_conduit_lag_setup(struct net_device *lag_dev, struct dsa_port *cpu_dp,
			  struct netdev_lag_upper_info *uinfo,
			  struct netlink_ext_ack *extack)
{}

/* Tear down a conduit if there isn't any other user port on it,
 * optionally also destroying LAG information.
 */
void dsa_conduit_lag_teardown(struct net_device *lag_dev,
			      struct dsa_port *cpu_dp)
{}