#include <linux/ethtool.h>
#include <linux/phy.h>
#include <linux/switch.h>
+#include <linux/version.h>
#include <asm/io.h>
#include <asm/irq.h>
struct adm6996_priv *priv;
int ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+ linkmode_zero(pdev->supported);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, pdev->supported);
+ linkmode_copy(pdev->advertising, pdev->supported);
+#else
pdev->supported = ADVERTISED_100baseT_Full;
pdev->advertising = ADVERTISED_100baseT_Full;
+#endif
if (pdev->mdio.addr != 0) {
pr_info ("%s: PHY overlaps ADM6996, providing fixed PHY 0x%x.\n"
#include <linux/ethtool.h>
#include <linux/phy.h>
#include <linux/if_vlan.h>
+#include <linux/version.h>
#include <asm/io.h>
#include <asm/irq.h>
return -EINVAL;
printk("%s: Marvell 88E6060 PHY driver attached.\n", dev->name);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+ linkmode_zero(pdev->supported);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, pdev->supported);
+ linkmode_copy(pdev->advertising, pdev->supported);
+#else
pdev->supported = ADVERTISED_100baseT_Full;
pdev->advertising = ADVERTISED_100baseT_Full;
+#endif
dev->phy_ptr = priv;
pdev->irq = PHY_POLL;
#ifdef HEADER_MODE
#include <linux/netdevice.h>
#include <linux/switch.h>
#include <linux/phy.h>
+#include <linux/version.h>
#define PSB6970_MAX_VLANS 16
#define PSB6970_NUM_PORTS 7
return 0;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+ linkmode_zero(pdev->supported);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, pdev->supported);
+ linkmode_copy(pdev->advertising, pdev->supported);
+#else
pdev->supported = pdev->advertising = SUPPORTED_100baseT_Full;
+#endif
mutex_init(&priv->reg_mutex);
priv->read = psb6970_mii_read;