#include <linux/clk.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/of.h>
#include <linux/phy.h>
#include <linux/netdevice.h>
#include <linux/crc16.h>
#include <linux/etherdevice.h>
#include <linux/smscphy.h>
#define PHY_EDPD_CONFIG …
#define PHY_EDPD_CONFIG_EXT_CROSSOVER_ …
#define SPECIAL_CTRL_STS …
#define SPECIAL_CTRL_STS_OVRRD_AMDIX_ …
#define SPECIAL_CTRL_STS_AMDIX_ENABLE_ …
#define SPECIAL_CTRL_STS_AMDIX_STATE_ …
#define EDPD_MAX_WAIT_DFLT_MS …
#define PHY_STATE_MACH_MS …
struct smsc_hw_stat { … };
static struct smsc_hw_stat smsc_hw_stats[] = …;
struct smsc_phy_priv { … };
static int smsc_phy_ack_interrupt(struct phy_device *phydev)
{ … }
int smsc_phy_config_intr(struct phy_device *phydev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int smsc_phy_config_edpd(struct phy_device *phydev)
{ … }
irqreturn_t smsc_phy_handle_interrupt(struct phy_device *phydev)
{ … }
EXPORT_SYMBOL_GPL(…);
int smsc_phy_config_init(struct phy_device *phydev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int smsc_phy_reset(struct phy_device *phydev)
{ … }
static int lan87xx_config_aneg(struct phy_device *phydev)
{ … }
static int lan95xx_config_aneg_ext(struct phy_device *phydev)
{ … }
int lan87xx_read_status(struct phy_device *phydev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int lan874x_phy_config_init(struct phy_device *phydev)
{ … }
static void lan874x_get_wol(struct phy_device *phydev,
struct ethtool_wolinfo *wol)
{ … }
static u16 smsc_crc16(const u8 *buffer, size_t len)
{ … }
static int lan874x_chk_wol_pattern(const u8 pattern[], const u16 *mask,
u8 len, u8 *data, u8 *datalen)
{ … }
static int lan874x_set_wol_pattern(struct phy_device *phydev, u16 val,
const u8 data[], u8 datalen,
const u16 *mask, u8 masklen)
{ … }
static int lan874x_set_wol(struct phy_device *phydev,
struct ethtool_wolinfo *wol)
{ … }
static int smsc_get_sset_count(struct phy_device *phydev)
{ … }
static void smsc_get_strings(struct phy_device *phydev, u8 *data)
{ … }
static u64 smsc_get_stat(struct phy_device *phydev, int i)
{ … }
static void smsc_get_stats(struct phy_device *phydev,
struct ethtool_stats *stats, u64 *data)
{ … }
static int smsc_phy_get_edpd(struct phy_device *phydev, u16 *edpd)
{ … }
static int smsc_phy_set_edpd(struct phy_device *phydev, u16 edpd)
{ … }
int smsc_phy_get_tunable(struct phy_device *phydev,
struct ethtool_tunable *tuna, void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
int smsc_phy_set_tunable(struct phy_device *phydev,
struct ethtool_tunable *tuna, const void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
int smsc_phy_probe(struct phy_device *phydev)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct phy_driver smsc_phy_driver[] = …;
module_phy_driver(smsc_phy_driver);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static struct mdio_device_id __maybe_unused smsc_tbl[] = …;
MODULE_DEVICE_TABLE(mdio, smsc_tbl);