linux/drivers/net/ethernet/microchip/lan966x/lan966x_mac.c

// SPDX-License-Identifier: GPL-2.0+

#include <net/switchdev.h>
#include "lan966x_main.h"

#define LAN966X_MAC_COLUMNS
#define MACACCESS_CMD_IDLE
#define MACACCESS_CMD_LEARN
#define MACACCESS_CMD_FORGET
#define MACACCESS_CMD_AGE
#define MACACCESS_CMD_GET_NEXT
#define MACACCESS_CMD_INIT
#define MACACCESS_CMD_READ
#define MACACCESS_CMD_WRITE
#define MACACCESS_CMD_SYNC_GET_NEXT

#define LAN966X_MAC_INVALID_ROW

struct lan966x_mac_entry {};

struct lan966x_mac_raw_entry {};

static int lan966x_mac_get_status(struct lan966x *lan966x)
{}

static int lan966x_mac_wait_for_completion(struct lan966x *lan966x)
{}

static void lan966x_mac_select(struct lan966x *lan966x,
			       const unsigned char mac[ETH_ALEN],
			       unsigned int vid)
{}

static int __lan966x_mac_learn_locked(struct lan966x *lan966x, int pgid,
				      bool cpu_copy,
				      const unsigned char mac[ETH_ALEN],
				      unsigned int vid,
				      enum macaccess_entry_type type)
{}

static int __lan966x_mac_learn(struct lan966x *lan966x, int pgid,
			       bool cpu_copy,
			       const unsigned char mac[ETH_ALEN],
			       unsigned int vid,
			       enum macaccess_entry_type type)
{}

/* The mask of the front ports is encoded inside the mac parameter via a call
 * to lan966x_mdb_encode_mac().
 */
int lan966x_mac_ip_learn(struct lan966x *lan966x,
			 bool cpu_copy,
			 const unsigned char mac[ETH_ALEN],
			 unsigned int vid,
			 enum macaccess_entry_type type)
{}

int lan966x_mac_learn(struct lan966x *lan966x, int port,
		      const unsigned char mac[ETH_ALEN],
		      unsigned int vid,
		      enum macaccess_entry_type type)
{}

static int lan966x_mac_learn_locked(struct lan966x *lan966x, int port,
				    const unsigned char mac[ETH_ALEN],
				    unsigned int vid,
				    enum macaccess_entry_type type)
{}

static int lan966x_mac_forget_locked(struct lan966x *lan966x,
				     const unsigned char mac[ETH_ALEN],
				     unsigned int vid,
				     enum macaccess_entry_type type)
{}

int lan966x_mac_forget(struct lan966x *lan966x,
		       const unsigned char mac[ETH_ALEN],
		       unsigned int vid,
		       enum macaccess_entry_type type)
{}

int lan966x_mac_cpu_learn(struct lan966x *lan966x, const char *addr, u16 vid)
{}

int lan966x_mac_cpu_forget(struct lan966x *lan966x, const char *addr, u16 vid)
{}

void lan966x_mac_set_ageing(struct lan966x *lan966x,
			    u32 ageing)
{}

void lan966x_mac_init(struct lan966x *lan966x)
{}

static struct lan966x_mac_entry *lan966x_mac_alloc_entry(struct lan966x_port *port,
							 const unsigned char *mac,
							 u16 vid)
{}

static struct lan966x_mac_entry *lan966x_mac_find_entry(struct lan966x *lan966x,
							const unsigned char *mac,
							u16 vid, u16 port_index)
{}

static int lan966x_mac_lookup(struct lan966x *lan966x,
			      const unsigned char mac[ETH_ALEN],
			      unsigned int vid, enum macaccess_entry_type type)
{}

static void lan966x_fdb_call_notifiers(enum switchdev_notifier_type type,
				       const char *mac, u16 vid,
				       struct net_device *dev)
{}

int lan966x_mac_add_entry(struct lan966x *lan966x, struct lan966x_port *port,
			  const unsigned char *addr, u16 vid)
{}

int lan966x_mac_del_entry(struct lan966x *lan966x, const unsigned char *addr,
			  u16 vid)
{}

void lan966x_mac_lag_replace_port_entry(struct lan966x *lan966x,
					struct lan966x_port *src,
					struct lan966x_port *dst)
{}

void lan966x_mac_lag_remove_port_entry(struct lan966x *lan966x,
				       struct lan966x_port *src)
{}

void lan966x_mac_purge_entries(struct lan966x *lan966x)
{}

static void lan966x_mac_notifiers(enum switchdev_notifier_type type,
				  unsigned char *mac, u32 vid,
				  struct net_device *dev)
{}

static void lan966x_mac_process_raw_entry(struct lan966x_mac_raw_entry *raw_entry,
					  u8 *mac, u16 *vid, u32 *dest_idx)
{}

static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row,
				    struct lan966x_mac_raw_entry *raw_entries)
{}

irqreturn_t lan966x_mac_irq_handler(struct lan966x *lan966x)
{}