Re: [PATCH] net: ethernet: mtk_eth_soc: implement Clause 45 MDIO access

From: Andrew Lunn
Date: Sun Dec 26 2021 - 16:52:08 EST


> + if (phy_register & MII_ADDR_C45) {
> + u8 dev_num = (phy_register >> 16) & 0x1f;
> + u16 reg = (u16)(phy_register & 0xffff);

Hi Daniel

You can use the helpers

mdio_phy_id_is_c45()
mdio_phy_id_prtad()
mdio_phy_id_devad()

Andrew