kernel: generic: Add kernel 4.14 support
[openwrt/staging/chunkeey.git] / target / linux / generic / files / drivers / net / phy / rtl8306.c
index 7bbac40617bc8123d62e6aba2814516560199134..6d09c1063cec3aa467374831c75971c6b93df5aa 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/switch.h>
 #include <linux/delay.h>
 #include <linux/phy.h>
+#include <linux/version.h>
 
 //#define DEBUG 1
 
@@ -1032,7 +1033,9 @@ rtl8306_read_status(struct phy_device *pdev)
 
 static struct phy_driver rtl8306_driver = {
        .name           = "Realtek RTL8306S",
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0))
        .flags          = PHY_HAS_MAGICANEG,
+#endif
        .phy_id         = RTL8306_MAGIC,
        .phy_id_mask    = 0xffffffff,
        .features       = PHY_BASIC_FEATURES,