phy/realtek: WOL: get the wol state from command line
authorNick <nick@khadas.com>
Mon, 3 Jun 2019 09:27:06 +0000 (17:27 +0800)
committerNick <nick@khadas.com>
Mon, 3 Jun 2019 09:53:14 +0000 (17:53 +0800)
Signed-off-by: Nick <nick@khadas.com>
drivers/net/phy/realtek.c

index 4df28bf..878601b 100644 (file)
@@ -46,10 +46,22 @@ MODULE_AUTHOR("Johnson Leung");
 MODULE_LICENSE("GPL");
 
 struct phy_device *g_phydev;
+static int wol_enable = 0;
 
 #ifdef CONFIG_AMLOGIC_ETH_PRIVE
 unsigned int support_external_phy_wol;
 #endif
+
+static int __init init_wol_state(char *str)
+{
+       wol_enable = simple_strtol(str, NULL, 0);
+       support_external_phy_wol = wol_enable;
+       printk("%s, wol_enable=%d\b",__func__, wol_enable);
+
+       return 0;
+}
+__setup("wol_enable=", init_wol_state);
+
 static int rtl821x_ack_interrupt(struct phy_device *phydev)
 {
        int err;