linux/drivers/net/ethernet/marvell/prestera/prestera_main.c

// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved */

#include <linux/etherdevice.h>
#include <linux/jiffies.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/netdev_features.h>
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/if_vlan.h>
#include <linux/phylink.h>

#include "prestera.h"
#include "prestera_hw.h"
#include "prestera_acl.h"
#include "prestera_flow.h"
#include "prestera_span.h"
#include "prestera_rxtx.h"
#include "prestera_devlink.h"
#include "prestera_ethtool.h"
#include "prestera_counter.h"
#include "prestera_switchdev.h"

#define PRESTERA_MTU_DEFAULT

#define PRESTERA_STATS_DELAY_MS

#define PRESTERA_MAC_ADDR_NUM_MAX

static struct workqueue_struct *prestera_wq;
static struct workqueue_struct *prestera_owq;

void prestera_queue_work(struct work_struct *work)
{}

void prestera_queue_delayed_work(struct delayed_work *work, unsigned long delay)
{}

void prestera_queue_drain(void)
{}

int prestera_port_learning_set(struct prestera_port *port, bool learn)
{}

int prestera_port_uc_flood_set(struct prestera_port *port, bool flood)
{}

int prestera_port_mc_flood_set(struct prestera_port *port, bool flood)
{}

int prestera_port_br_locked_set(struct prestera_port *port, bool br_locked)
{}

int prestera_port_pvid_set(struct prestera_port *port, u16 vid)
{}

struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw,
						 u32 dev_id, u32 hw_id)
{}

struct prestera_port *prestera_find_port(struct prestera_switch *sw, u32 id)
{}

struct prestera_switch *prestera_switch_get(struct net_device *dev)
{}

int prestera_port_cfg_mac_read(struct prestera_port *port,
			       struct prestera_port_mac_config *cfg)
{}

int prestera_port_cfg_mac_write(struct prestera_port *port,
				struct prestera_port_mac_config *cfg)
{}

static int prestera_port_open(struct net_device *dev)
{}

static int prestera_port_close(struct net_device *dev)
{}

static void
prestera_port_mac_state_cache_read(struct prestera_port *port,
				   struct prestera_port_mac_state *state)
{}

static void
prestera_port_mac_state_cache_write(struct prestera_port *port,
				    struct prestera_port_mac_state *state)
{}

static struct prestera_port *prestera_pcs_to_port(struct phylink_pcs *pcs)
{}

static void prestera_mac_config(struct phylink_config *config,
				unsigned int an_mode,
				const struct phylink_link_state *state)
{}

static void prestera_mac_link_down(struct phylink_config *config,
				   unsigned int mode, phy_interface_t interface)
{}

static void prestera_mac_link_up(struct phylink_config *config,
				 struct phy_device *phy,
				 unsigned int mode, phy_interface_t interface,
				 int speed, int duplex,
				 bool tx_pause, bool rx_pause)
{}

static struct phylink_pcs *
prestera_mac_select_pcs(struct phylink_config *config,
			phy_interface_t interface)
{}

static void prestera_pcs_get_state(struct phylink_pcs *pcs,
				   struct phylink_link_state *state)
{}

static int prestera_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
			       phy_interface_t interface,
			       const unsigned long *advertising,
			       bool permit_pause_to_mac)
{}

static void prestera_pcs_an_restart(struct phylink_pcs *pcs)
{}

static const struct phylink_mac_ops prestera_mac_ops =;

static const struct phylink_pcs_ops prestera_pcs_ops =;

static int prestera_port_sfp_bind(struct prestera_port *port)
{}

static int prestera_port_sfp_unbind(struct prestera_port *port)
{}

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

int prestera_is_valid_mac_addr(struct prestera_port *port, const u8 *addr)
{}

static int prestera_port_set_mac_address(struct net_device *dev, void *p)
{}

static int prestera_port_change_mtu(struct net_device *dev, int mtu)
{}

static void prestera_port_get_stats64(struct net_device *dev,
				      struct rtnl_link_stats64 *stats)
{}

static void prestera_port_get_hw_stats(struct prestera_port *port)
{}

static void prestera_port_stats_update(struct work_struct *work)
{}

static int prestera_port_setup_tc(struct net_device *dev,
				  enum tc_setup_type type,
				  void *type_data)
{}

static const struct net_device_ops prestera_netdev_ops =;

int prestera_port_autoneg_set(struct prestera_port *port, u64 link_modes)
{}

static void prestera_port_list_add(struct prestera_port *port)
{}

static void prestera_port_list_del(struct prestera_port *port)
{}

static int prestera_port_create(struct prestera_switch *sw, u32 id)
{}

static void prestera_port_destroy(struct prestera_port *port)
{}

static void prestera_destroy_ports(struct prestera_switch *sw)
{}

static int prestera_create_ports(struct prestera_switch *sw)
{}

static void prestera_port_handle_event(struct prestera_switch *sw,
				       struct prestera_event *evt, void *arg)
{}

static int prestera_event_handlers_register(struct prestera_switch *sw)
{}

static void prestera_event_handlers_unregister(struct prestera_switch *sw)
{}

static int prestera_switch_set_base_mac_addr(struct prestera_switch *sw)
{}

struct prestera_lag *prestera_lag_by_id(struct prestera_switch *sw, u16 id)
{}

static struct prestera_lag *prestera_lag_by_dev(struct prestera_switch *sw,
						struct net_device *dev)
{}

int prestera_lag_id(struct prestera_switch *sw,
		    struct net_device *lag_dev, u16 *lag_id)
{}

static struct prestera_lag *prestera_lag_create(struct prestera_switch *sw,
						struct net_device *lag_dev)
{}

static void prestera_lag_destroy(struct prestera_switch *sw,
				 struct prestera_lag *lag)
{}

static int prestera_lag_port_add(struct prestera_port *port,
				 struct net_device *lag_dev)
{}

static int prestera_lag_port_del(struct prestera_port *port)
{}

bool prestera_port_is_lag_member(const struct prestera_port *port)
{}

u16 prestera_port_lag_id(const struct prestera_port *port)
{}

static int prestera_lag_init(struct prestera_switch *sw)
{}

static void prestera_lag_fini(struct prestera_switch *sw)
{}

bool prestera_netdev_check(const struct net_device *dev)
{}

static int prestera_lower_dev_walk(struct net_device *dev,
				   struct netdev_nested_priv *priv)
{}

struct prestera_port *prestera_port_dev_lower_find(struct net_device *dev)
{}

static int prestera_netdev_port_lower_event(struct net_device *dev,
					    unsigned long event, void *ptr)
{}

static bool prestera_lag_master_check(struct net_device *lag_dev,
				      struct netdev_lag_upper_info *info,
				      struct netlink_ext_ack *ext_ack)
{}

static int prestera_netdev_port_event(struct net_device *lower,
				      struct net_device *dev,
				      unsigned long event, void *ptr)
{}

static int prestera_netdevice_lag_event(struct net_device *lag_dev,
					unsigned long event, void *ptr)
{}

static int prestera_netdev_event_handler(struct notifier_block *nb,
					 unsigned long event, void *ptr)
{}

struct prestera_mdb_entry *
prestera_mdb_entry_create(struct prestera_switch *sw,
			  const unsigned char *addr, u16 vid)
{}

void prestera_mdb_entry_destroy(struct prestera_mdb_entry *mdb_entry)
{}

struct prestera_flood_domain *
prestera_flood_domain_create(struct prestera_switch *sw)
{}

void prestera_flood_domain_destroy(struct prestera_flood_domain *flood_domain)
{}

int
prestera_flood_domain_port_create(struct prestera_flood_domain *flood_domain,
				  struct net_device *dev,
				  u16 vid)
{}

void
prestera_flood_domain_port_destroy(struct prestera_flood_domain_port *port)
{}

struct prestera_flood_domain_port *
prestera_flood_domain_port_find(struct prestera_flood_domain *flood_domain,
				struct net_device *dev, u16 vid)
{}

static int prestera_netdev_event_handler_register(struct prestera_switch *sw)
{}

static void prestera_netdev_event_handler_unregister(struct prestera_switch *sw)
{}

static int prestera_switch_init(struct prestera_switch *sw)
{}

static void prestera_switch_fini(struct prestera_switch *sw)
{}

int prestera_device_register(struct prestera_device *dev)
{}
EXPORT_SYMBOL();

void prestera_device_unregister(struct prestera_device *dev)
{}
EXPORT_SYMBOL();

static int __init prestera_module_init(void)
{}

static void __exit prestera_module_exit(void)
{}

module_init();
module_exit(prestera_module_exit);

MODULE_LICENSE();
MODULE_DESCRIPTION();