#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/net_tstamp.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/mm.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/uaccess.h>
#include <linux/module.h>
#include <linux/crc32.h>
#include <asm/types.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/phy.h>
#include <linux/sort.h>
#include <linux/if_vlan.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/fsl/ptp_qoriq.h>
#include "gianfar.h"
#define GFAR_MAX_COAL_USECS …
#define GFAR_MAX_COAL_FRAMES …
static const char stat_gstrings[][ETH_GSTRING_LEN] = …;
static void gfar_gstrings(struct net_device *dev, u32 stringset, u8 * buf)
{ … }
static void gfar_fill_stats(struct net_device *dev, struct ethtool_stats *dummy,
u64 *buf)
{ … }
static int gfar_sset_count(struct net_device *dev, int sset)
{ … }
static void gfar_gdrvinfo(struct net_device *dev,
struct ethtool_drvinfo *drvinfo)
{ … }
static int gfar_reglen(struct net_device *dev)
{ … }
static void gfar_get_regs(struct net_device *dev, struct ethtool_regs *regs,
void *regbuf)
{ … }
static unsigned int gfar_usecs2ticks(struct gfar_private *priv,
unsigned int usecs)
{ … }
static unsigned int gfar_ticks2usecs(struct gfar_private *priv,
unsigned int ticks)
{ … }
static int gfar_gcoalesce(struct net_device *dev,
struct ethtool_coalesce *cvals,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int gfar_scoalesce(struct net_device *dev,
struct ethtool_coalesce *cvals,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static void gfar_gringparam(struct net_device *dev,
struct ethtool_ringparam *rvals,
struct kernel_ethtool_ringparam *kernel_rvals,
struct netlink_ext_ack *extack)
{ … }
static int gfar_sringparam(struct net_device *dev,
struct ethtool_ringparam *rvals,
struct kernel_ethtool_ringparam *kernel_rvals,
struct netlink_ext_ack *extack)
{ … }
static void gfar_gpauseparam(struct net_device *dev,
struct ethtool_pauseparam *epause)
{ … }
static int gfar_spauseparam(struct net_device *dev,
struct ethtool_pauseparam *epause)
{ … }
int gfar_set_features(struct net_device *dev, netdev_features_t features)
{ … }
static uint32_t gfar_get_msglevel(struct net_device *dev)
{ … }
static void gfar_set_msglevel(struct net_device *dev, uint32_t data)
{ … }
#ifdef CONFIG_PM
static void gfar_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ … }
static int gfar_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ … }
#endif
static void ethflow_to_filer_rules (struct gfar_private *priv, u64 ethflow)
{ … }
static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow,
u64 class)
{ … }
static int gfar_set_hash_opts(struct gfar_private *priv,
struct ethtool_rxnfc *cmd)
{ … }
static int gfar_check_filer_hardware(struct gfar_private *priv)
{ … }
static void gfar_set_mask(u32 mask, struct filer_table *tab)
{ … }
static void gfar_set_parse_bits(u32 value, u32 mask, struct filer_table *tab)
{ … }
static void gfar_set_general_attribute(u32 value, u32 mask, u32 flag,
struct filer_table *tab)
{ … }
static void gfar_set_attribute(u32 value, u32 mask, u32 flag,
struct filer_table *tab)
{ … }
static void gfar_set_basic_ip(struct ethtool_tcpip4_spec *value,
struct ethtool_tcpip4_spec *mask,
struct filer_table *tab)
{ … }
static void gfar_set_user_ip(struct ethtool_usrip4_spec *value,
struct ethtool_usrip4_spec *mask,
struct filer_table *tab)
{ … }
static void gfar_set_ether(struct ethhdr *value, struct ethhdr *mask,
struct filer_table *tab)
{ … }
static inline u32 vlan_tci_vid(struct ethtool_rx_flow_spec *rule)
{ … }
static inline u32 vlan_tci_vidm(struct ethtool_rx_flow_spec *rule)
{ … }
static inline u32 vlan_tci_cfi(struct ethtool_rx_flow_spec *rule)
{ … }
static inline u32 vlan_tci_cfim(struct ethtool_rx_flow_spec *rule)
{ … }
static inline u32 vlan_tci_prio(struct ethtool_rx_flow_spec *rule)
{ … }
static inline u32 vlan_tci_priom(struct ethtool_rx_flow_spec *rule)
{ … }
static int gfar_convert_to_filer(struct ethtool_rx_flow_spec *rule,
struct filer_table *tab)
{ … }
static int gfar_write_filer_table(struct gfar_private *priv,
struct filer_table *tab)
{ … }
static int gfar_check_capability(struct ethtool_rx_flow_spec *flow,
struct gfar_private *priv)
{ … }
static int gfar_process_filer_changes(struct gfar_private *priv)
{ … }
static void gfar_invert_masks(struct ethtool_rx_flow_spec *flow)
{ … }
static int gfar_add_cls(struct gfar_private *priv,
struct ethtool_rx_flow_spec *flow)
{ … }
static int gfar_del_cls(struct gfar_private *priv, u32 loc)
{ … }
static int gfar_get_cls(struct gfar_private *priv, struct ethtool_rxnfc *cmd)
{ … }
static int gfar_get_cls_all(struct gfar_private *priv,
struct ethtool_rxnfc *cmd, u32 *rule_locs)
{ … }
static int gfar_set_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
{ … }
static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
u32 *rule_locs)
{ … }
static int gfar_get_ts_info(struct net_device *dev,
struct kernel_ethtool_ts_info *info)
{ … }
const struct ethtool_ops gfar_ethtool_ops = …;