realtek: Use MDIO_* constants from <linux/mdio.h>
authorPascal Ernster <git@hardfalcon.net>
Sun, 4 Jun 2023 20:16:20 +0000 (22:16 +0200)
committerSander Vanheule <sander@svanheule.net>
Sat, 1 Jul 2023 18:25:48 +0000 (20:25 +0200)
commit87a2f03b86588d7a71af789225ebce284c6cb25d
tree4a15f4c0e528326097e06ef14a3be2cfdb96e4ec
parent171e67e2f792dd0b3c757b2fd5c804244584cf0c
realtek: Use MDIO_* constants from <linux/mdio.h>

To improve code readability in drivers/net/phy/rtl83xx-phy.c, replace
constants MMD_AN and MMD_VEND2 from drivers/net/phy/rtl83xx-phy.h with
MDIO_MMD_AN and MDIO_MMD_VEND2 from <linux/mdio.h>.

Also, replace
BIT(0) with MDIO_EEE_2_5GT,
BIT(1) with MDIO_EEE_100TX,
BIT(2) with MDIO_EEE_1000T,
BIT(9) with MDIO_AN_CTRL1_RESTART,
BIT(12) with MDIO_AN_CTRL1_ENABLE,
32 with MDIO_AN_10GBT_CTRL,
60 with MDIO_AN_EEE_ADV, and
62 with MDIO_AN_EEE_ADV2
from <linux/mdio.h>.

Suggested-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c
target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.h