[OpenWrt-Devel] Using ethtool or swconfig to change link settings for mt7620a?

Daniel Santos daniel.santos at pobox.com
Sat Jun 8 05:06:54 EDT 2019


I need to change auto-negotiate, speed and duplex for a port on my
mt7620a-based device, but I'm not quite certain that I understand the
structure here.  When using ethtool on eth0 I always get ENODEV,
apparently because priv->phy_dev is always NULL in fe_get_link_ksettings
of drivers/net/ethernet/mtk/ethtool.c.  But I'm being told that eth0 is
only an internal device between the µC and the switch hardware, so it
isn't even the one I need to change.

If this is true, then it looks like I will need to implement a
get_port_link function for struct switch_dev_ops?  Can anybody confirm
this to be the case?  Also, are there any examples aside from the
Broadcom drivers?  I have the mt7620 programmer's guide and it specifies
the registers I need to change.


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list