to allow target specific override of phydev->supported. Signed-off-by: Günther Kelleter <guenther.kelle...@devolo.de> --- .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h | 1 + .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c | 5 +++++ 2 files changed, 6 insertions(+)
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h index d46dc4e..aa7663b 100644 --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h @@ -30,6 +30,7 @@ struct ag71xx_platform_data { u32 reset_bit; u8 mac_addr[ETH_ALEN]; struct device *mii_bus_dev; + u32 supported; u8 has_gbit:1; u8 is_ar91xx:1; diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c index 9de77e9..0f5ec9c 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c @@ -146,6 +146,11 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag) else phydev->supported &= PHY_BASIC_FEATURES; + if (pdata->supported) { + dev_info(dev, "overriding phydev->supported (%08x)\n", pdata->supported); + phydev->supported = pdata->supported; + } + phydev->advertising = phydev->supported; dev_info(dev, "connected to PHY at %s [uid=%08x, driver=%s]\n", -- 2.4.4.88.gac2ab0d _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel