Hello,
We are using on Apalis i.MX8 with customize image reference to multimedia image using Yocto project.
We are trying to get and set network speed on both the ethernet ports eth0 and eth1.
We are able to get the ethernet speed using “ethtool” command.
root@apalis-imx8-07107218:~# ethtool eth0
Settings for eth0:
** Supported ports: [ TP MII ]**
** Supported link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Supported pause frame use: Symmetric**
** Supports auto-negotiation: Yes**
** Supported FEC modes: Not reported**
** Advertised link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Advertised pause frame use: Symmetric**
** Advertised auto-negotiation: Yes**
** Advertised FEC modes: Not reported**
** Link partner advertised link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Link partner advertised pause frame use: Symmetric Receive-only**
** Link partner advertised auto-negotiation: Yes**
** Link partner advertised FEC modes: Not reported**
** Speed: 100Mb/s**
** Duplex: Full**
** Port: MII**
** PHYAD: 1**
** Transceiver: internal**
** Auto-negotiation: on**
** Supports Wake-on: d**
** Wake-on: d**
** Link detected: yes**
For setting the ethernet speed we are using below command:
**ethtool -s eth0 speed 10 duplex half autoneg off**
This command is setting the speed as 10 Mbps
root@apalis-imx8-07107218:~# ethtool eth0 **
Settings for eth0:
** Supported ports: [ TP MII ]
** Supported link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Supported pause frame use: Symmetric**
** Supports auto-negotiation: Yes**
** Supported FEC modes: Not reported**
** Advertised link modes: 10baseT/Half **
** Advertised pause frame use: Symmetric**
** Advertised auto-negotiation: No**
** Advertised FEC modes: Not reported**
** Speed: 10Mb/s**
** Duplex: Half**
** Port: MII**
** PHYAD: 1**
** Transceiver: internal**
** Auto-negotiation: off**
** Supports Wake-on: d**
** Wake-on: d**
** Link detected: yes**
root@apalis-imx8-07107218:~#
But after reboot, the ethernet speed is reset to previous value (100 Mbps).
Is there any other way to set the ethernet speed permanently and retain is even after reboot using command?