linux/drivers/net/ethernet/mellanox/mlxsw/minimal.c

// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/* Copyright (c) 2016-2019 Mellanox Technologies. All rights reserved */

#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/types.h>

#include "core.h"
#include "core_env.h"
#include "i2c.h"

static const char mlxsw_m_driver_name[] =;

#define MLXSW_M_FWREV_MINOR
#define MLXSW_M_FWREV_SUBMINOR

static const struct mlxsw_fw_rev mlxsw_m_fw_rev =;

struct mlxsw_m_port;

struct mlxsw_m_line_card {};

struct mlxsw_m {};

struct mlxsw_m_port {};

static int mlxsw_m_base_mac_get(struct mlxsw_m *mlxsw_m)
{}

static int mlxsw_m_port_open(struct net_device *dev)
{}

static int mlxsw_m_port_stop(struct net_device *dev)
{}

static const struct net_device_ops mlxsw_m_port_netdev_ops =;

static void mlxsw_m_module_get_drvinfo(struct net_device *dev,
				       struct ethtool_drvinfo *drvinfo)
{}

static int mlxsw_m_get_module_info(struct net_device *netdev,
				   struct ethtool_modinfo *modinfo)
{}

static int
mlxsw_m_get_module_eeprom(struct net_device *netdev, struct ethtool_eeprom *ee,
			  u8 *data)
{}

static int
mlxsw_m_get_module_eeprom_by_page(struct net_device *netdev,
				  const struct ethtool_module_eeprom *page,
				  struct netlink_ext_ack *extack)
{}

static int
mlxsw_m_set_module_eeprom_by_page(struct net_device *netdev,
				  const struct ethtool_module_eeprom *page,
				  struct netlink_ext_ack *extack)
{}

static int mlxsw_m_reset(struct net_device *netdev, u32 *flags)
{}

static int
mlxsw_m_get_module_power_mode(struct net_device *netdev,
			      struct ethtool_module_power_mode_params *params,
			      struct netlink_ext_ack *extack)
{}

static int
mlxsw_m_set_module_power_mode(struct net_device *netdev,
			      const struct ethtool_module_power_mode_params *params,
			      struct netlink_ext_ack *extack)
{}

static const struct ethtool_ops mlxsw_m_port_ethtool_ops =;

static int
mlxsw_m_port_module_info_get(struct mlxsw_m *mlxsw_m, u16 local_port,
			     u8 *p_module, u8 *p_width, u8 *p_slot_index)
{}

static int
mlxsw_m_port_dev_addr_get(struct mlxsw_m_port *mlxsw_m_port)
{}

static bool mlxsw_m_port_created(struct mlxsw_m *mlxsw_m, u16 local_port)
{}

static int
mlxsw_m_port_create(struct mlxsw_m *mlxsw_m, u16 local_port, u8 slot_index,
		    u8 module)
{}

static void mlxsw_m_port_remove(struct mlxsw_m *mlxsw_m, u16 local_port)
{}

static int*
mlxsw_m_port_mapping_get(struct mlxsw_m *mlxsw_m, u8 slot_index, u8 module)
{}

static int mlxsw_m_port_module_map(struct mlxsw_m *mlxsw_m, u16 local_port,
				   u8 *last_module)
{}

static void
mlxsw_m_port_module_unmap(struct mlxsw_m *mlxsw_m, u8 slot_index, u8 module)
{}

static int mlxsw_m_linecards_init(struct mlxsw_m *mlxsw_m)
{}

static void mlxsw_m_linecards_fini(struct mlxsw_m *mlxsw_m)
{}

static void
mlxsw_m_linecard_port_module_unmap(struct mlxsw_m *mlxsw_m, u8 slot_index)
{}

static int
mlxsw_m_linecard_ports_create(struct mlxsw_m *mlxsw_m, u8 slot_index)
{}

static void
mlxsw_m_linecard_ports_remove(struct mlxsw_m *mlxsw_m, u8 slot_index)
{}

static int mlxsw_m_ports_module_map(struct mlxsw_m *mlxsw_m)
{}

static int mlxsw_m_ports_create(struct mlxsw_m *mlxsw_m)
{}

static void mlxsw_m_ports_remove(struct mlxsw_m *mlxsw_m)
{}

static void
mlxsw_m_ports_remove_selected(struct mlxsw_core *mlxsw_core,
			      bool (*selector)(void *priv, u16 local_port),
			      void *priv)
{}

static int mlxsw_m_fw_rev_validate(struct mlxsw_m *mlxsw_m)
{}

static void
mlxsw_m_got_active(struct mlxsw_core *mlxsw_core, u8 slot_index, void *priv)
{}

static void
mlxsw_m_got_inactive(struct mlxsw_core *mlxsw_core, u8 slot_index, void *priv)
{}

static struct mlxsw_linecards_event_ops mlxsw_m_event_ops =;

static int mlxsw_m_init(struct mlxsw_core *mlxsw_core,
			const struct mlxsw_bus_info *mlxsw_bus_info,
			struct netlink_ext_ack *extack)
{}

static void mlxsw_m_fini(struct mlxsw_core *mlxsw_core)
{}

static const struct mlxsw_config_profile mlxsw_m_config_profile;

static struct mlxsw_driver mlxsw_m_driver =;

static const struct i2c_device_id mlxsw_m_i2c_id[] =;

static struct i2c_driver mlxsw_m_i2c_driver =;

static int __init mlxsw_m_module_init(void)
{}

static void __exit mlxsw_m_module_exit(void)
{}

module_init();
module_exit(mlxsw_m_module_exit);

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_DEVICE_TABLE(i2c, mlxsw_m_i2c_id);