commit | 5145ebbcbdf205e86792ffda5f48058a344085c2 | [log] [tgz] |
---|---|---|
author | developer <developer@mediatek.com> | Thu Jul 14 15:16:24 2022 +0800 |
committer | developer <developer@mediatek.com> | Fri Jul 15 08:44:58 2022 +0800 |
tree | 209daad8c9cd1351adf7b9fb833de7ddc1fff583 | |
parent | d59e477190b6a7e7d34587958f1b606408dc90dd [diff] [blame] |
[][Fix switch command can be used both in 7531 and jaguar] [Description] Fix switch command can be used both in 7531 and jaguar. The change sumbit before affects the use of switch command in 7531. (https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6189993.) This change modifies the initialization sequence, first netlink initialization, then ioctl initialization. [Release-log] N/A Change-Id: I889cea3f6fce7a1dfa9c68d822afb3f307378378 Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6248306
diff --git a/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c b/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c index 06a1114..3639df1 100755 --- a/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c +++ b/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c
@@ -776,6 +776,8 @@ mt753x_mdio_register(gsw); #endif + mt753x_nl_init(); + mt753x_swconfig_init(gsw); if (sw->post_init) @@ -812,6 +814,8 @@ mdiobus_unregister(gsw->gphy_bus); #endif + mt753x_nl_exit(); + mt753x_remove_gsw(gsw); platform_set_drvdata(pdev, NULL); @@ -842,16 +846,12 @@ INIT_LIST_HEAD(&mt753x_devs); ret = platform_driver_register(&mt753x_driver); - mt753x_nl_init(); - return ret; } module_init(mt753x_init); static void __exit mt753x_exit(void) { - mt753x_nl_exit(); - platform_driver_unregister(&mt753x_driver); } module_exit(mt753x_exit);