OpenWrt Forum Archive

Topic: MT7620: ethtool ?

The content of this topic has been archived on 14 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I tried to use ethtool on MT7620-based routers (2 different ones), both with CC and with LEDE-trunk, without success.
Always such outputs:
root@OpenWrt:~# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes

Is there an alternative tool, _OR_ how to change duplex/speed for the interface ?

The typical MT7620 router uses the internal switch  with 10/100 PHY to drive the Ethernet cables.  To observe or change the speed or duplex on the Ethernet cables you need to control the PHY section of the switch, not the eth CPU interface. Look at swconfig rather than ethtool.

What ethtool can do depends on the kernel driver.   For some chips the kernel driver is just the minimum needed to get online and doesn't support extended settings.

Thanx a lot. Looks like wright direction, but I only get this:

root@xxx:~# swconfig dev switch0 help
switch0: mt7620(mt7620), ports: 8 (cpu @ 6), vlans: 16
     --switch
        Attribute 1 (int): enable_vlan (VLAN mode (1:enabled))
        Attribute 2 (none): apply (Activate changes in the hardware)
        Attribute 3 (none): reset (Reset the switch)
     --vlan
        Attribute 1 (int): vid (VLAN ID (0-4094))
        Attribute 2 (ports): ports (VLAN port mapping)
     --port
        Attribute 1 (int): pvid (Primary VLAN ID)
        Attribute 2 (string): link (Get port link information)

Besides still having no real idea, _how_ to modify a setting according to info from above, I do not see anything regarding 'Set port link information'.

Tried this one, but failed:
root@xxx:~# swconfig dev switch0 port 3 set link "duplex full speed 100
autoneg on"

Any suggestions ?

The discussion might have continued from here.