[OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field supported

John Crispin blogic at openwrt.org
Thu Jul 9 02:24:18 EDT 2015


Hi,

On 07/07/2015 14:58, Günther Kelleter wrote:
> to allow target specific override of phydev->supported.
> 

why do you need to do this ? do you want to force a specific link type ?
if so, then using a fixed link would be preferable to faking phy caps

	John


> Signed-off-by: Günther Kelleter <guenther.kelleter at 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",
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list