#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/mdio.h>
#include <linux/phy.h>
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
#define PHY_ID_TN2020 …
#define MDIO_PHYXS_LNSTAT_SYNC0 …
#define MDIO_PHYXS_LNSTAT_SYNC1 …
#define MDIO_PHYXS_LNSTAT_SYNC2 …
#define MDIO_PHYXS_LNSTAT_SYNC3 …
#define MDIO_PHYXS_LNSTAT_ALIGN …
#define MDIO_PHYXS_LANE_READY …
static int teranetics_aneg_done(struct phy_device *phydev)
{ … }
static int teranetics_read_status(struct phy_device *phydev)
{ … }
static int teranetics_match_phy_device(struct phy_device *phydev)
{ … }
static struct phy_driver teranetics_driver[] = …;
module_phy_driver(teranetics_driver);
static struct mdio_device_id __maybe_unused teranetics_tbl[] = …;
MODULE_DEVICE_TABLE(mdio, teranetics_tbl);