#include <net/dsa.h>
#include <linux/etherdevice.h>
#include <linux/if_bridge.h>
#include <linux/of.h>
#include <linux/netdev_features.h>
#include <linux/if_hsr.h>
#include "xrs700x.h"
#include "xrs700x_reg.h"
#define XRS700X_MIB_INTERVAL …
#define XRS7000X_SUPPORTED_HSR_FEATURES …
#define XRS7003E_ID …
#define XRS7003F_ID …
#define XRS7004E_ID …
#define XRS7004F_ID …
const struct xrs700x_info xrs7003e_info = …;
EXPORT_SYMBOL(…);
const struct xrs700x_info xrs7003f_info = …;
EXPORT_SYMBOL(…);
const struct xrs700x_info xrs7004e_info = …;
EXPORT_SYMBOL(…);
const struct xrs700x_info xrs7004f_info = …;
EXPORT_SYMBOL(…);
struct xrs700x_regfield { … };
struct xrs700x_mib { … };
#define XRS700X_MIB_ETHTOOL_ONLY(o, n) …
#define XRS700X_MIB(o, n, m) …
static const struct xrs700x_mib xrs700x_mibs[] = …;
static const u8 eth_hsrsup_addr[ETH_ALEN] = …;
static void xrs700x_get_strings(struct dsa_switch *ds, int port,
u32 stringset, u8 *data)
{ … }
static int xrs700x_get_sset_count(struct dsa_switch *ds, int port, int sset)
{ … }
static void xrs700x_read_port_counters(struct xrs700x *priv, int port)
{ … }
static void xrs700x_mib_work(struct work_struct *work)
{ … }
static void xrs700x_get_ethtool_stats(struct dsa_switch *ds, int port,
u64 *data)
{ … }
static void xrs700x_get_stats64(struct dsa_switch *ds, int port,
struct rtnl_link_stats64 *s)
{ … }
static int xrs700x_setup_regmap_range(struct xrs700x *priv)
{ … }
static enum dsa_tag_protocol xrs700x_get_tag_protocol(struct dsa_switch *ds,
int port,
enum dsa_tag_protocol m)
{ … }
static int xrs700x_reset(struct dsa_switch *ds)
{ … }
static void xrs700x_port_stp_state_set(struct dsa_switch *ds, int port,
u8 state)
{ … }
static int xrs700x_port_add_bpdu_ipf(struct dsa_switch *ds, int port)
{ … }
static int xrs700x_port_add_hsrsup_ipf(struct dsa_switch *ds, int port,
int fwdport)
{ … }
static int xrs700x_port_setup(struct dsa_switch *ds, int port)
{ … }
static int xrs700x_setup(struct dsa_switch *ds)
{ … }
static void xrs700x_teardown(struct dsa_switch *ds)
{ … }
static void xrs700x_phylink_get_caps(struct dsa_switch *ds, int port,
struct phylink_config *config)
{ … }
static void xrs700x_mac_config(struct phylink_config *config, unsigned int mode,
const struct phylink_link_state *state)
{ … }
static void xrs700x_mac_link_down(struct phylink_config *config,
unsigned int mode, phy_interface_t interface)
{ … }
static void xrs700x_mac_link_up(struct phylink_config *config,
struct phy_device *phydev,
unsigned int mode, phy_interface_t interface,
int speed, int duplex,
bool tx_pause, bool rx_pause)
{ … }
static int xrs700x_bridge_common(struct dsa_switch *ds, int port,
struct dsa_bridge bridge, bool join)
{ … }
static int xrs700x_bridge_join(struct dsa_switch *ds, int port,
struct dsa_bridge bridge, bool *tx_fwd_offload,
struct netlink_ext_ack *extack)
{ … }
static void xrs700x_bridge_leave(struct dsa_switch *ds, int port,
struct dsa_bridge bridge)
{ … }
static int xrs700x_hsr_join(struct dsa_switch *ds, int port,
struct net_device *hsr,
struct netlink_ext_ack *extack)
{ … }
static int xrs700x_hsr_leave(struct dsa_switch *ds, int port,
struct net_device *hsr)
{ … }
static const struct phylink_mac_ops xrs700x_phylink_mac_ops = …;
static const struct dsa_switch_ops xrs700x_ops = …;
static int xrs700x_detect(struct xrs700x *priv)
{ … }
struct xrs700x *xrs700x_switch_alloc(struct device *base, void *devpriv)
{ … }
EXPORT_SYMBOL(…);
static int xrs700x_alloc_port_mib(struct xrs700x *priv, int port)
{ … }
int xrs700x_switch_register(struct xrs700x *priv)
{ … }
EXPORT_SYMBOL(…);
void xrs700x_switch_remove(struct xrs700x *priv)
{ … }
EXPORT_SYMBOL(…);
void xrs700x_switch_shutdown(struct xrs700x *priv)
{ … }
EXPORT_SYMBOL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;