ar71xx: improve the wndr3700 quirks - move most of the code out of ath9k and instead...
[openwrt.git] / target / linux / generic / files / drivers / net / phy / rtl8366rb.c
index 7db3e65..ae6d429 100644 (file)
@@ -26,6 +26,7 @@
 #define RTL8366RB_PHY_NO_MAX   4
 #define RTL8366RB_PHY_PAGE_MAX 7
 #define RTL8366RB_PHY_ADDR_MAX 31
 #define RTL8366RB_PHY_NO_MAX   4
 #define RTL8366RB_PHY_PAGE_MAX 7
 #define RTL8366RB_PHY_ADDR_MAX 31
+#define RTL8366RB_PHY_WAN      4
 
 /* Switch Global Configuration register */
 #define RTL8366RB_SGCR                         0x0000
 
 /* Switch Global Configuration register */
 #define RTL8366RB_SGCR                         0x0000
@@ -1208,7 +1209,7 @@ static struct rtl8366_smi_ops rtl8366rb_smi_ops = {
        .enable_vlan4k  = rtl8366rb_enable_vlan4k,
 };
 
        .enable_vlan4k  = rtl8366rb_enable_vlan4k,
 };
 
-static int __init rtl8366rb_probe(struct platform_device *pdev)
+static int __devinit rtl8366rb_probe(struct platform_device *pdev)
 {
        static int rtl8366_smi_version_printed;
        struct rtl8366rb_platform_data *pdata;
 {
        static int rtl8366_smi_version_printed;
        struct rtl8366rb_platform_data *pdata;
@@ -1272,6 +1273,10 @@ static int rtl8366rb_phy_config_init(struct phy_device *phydev)
 
 static int rtl8366rb_phy_config_aneg(struct phy_device *phydev)
 {
 
 static int rtl8366rb_phy_config_aneg(struct phy_device *phydev)
 {
+       /* phy 4 might be connected to a second mac, allow aneg config */
+       if (phydev->addr == RTL8366RB_PHY_WAN)
+               return genphy_config_aneg(phydev);
+
        return 0;
 }
 
        return 0;
 }
 
This page took 0.023703 seconds and 4 git commands to generate.