Linksys E8450 (MT7531) - Disable Ethernet Port LEDs via MDIO

wanted to share a solution I found for anyone who wants to completely disable the Ethernet port LEDs on a Linksys E8450 (UBI) running OpenWrt.

Hardware

  • Linksys E8450 (UBI)

  • MediaTek MT7622 / MT7531 switch

Software

  • OpenWrt 25.12.4

  • Kernel 6.12.87

Background

The LuCI LED configuration allows the Power and Internet LEDs to be disabled, but there is currently no option to disable the RJ45 Ethernet port LEDs.

After some experimentation with mdio-tools, I found that the MT7531 switch exposes a register that controls the Ethernet LED behavior.

First, install the MDIO utility if it is not already installed:

apk add mdio-tools

To disable the Ethernet port LEDs at runtime:

mdio mt7530-0 mmd 0:31 0x21 0x0008

This immediately turns off the Ethernet LEDs while:

  • Link remains up

  • DHCP continues to work

  • Network traffic is unaffected

The change is not persistent. After reboot, the switch driver restores the default value (0x000b).

Making it persistent

I created the following init script:

/etc/init.d/disable-port-leds

#!/bin/sh /etc/rc.common

START=99

start() {
    sleep 2

    if command -v mdio >/dev/null 2>&1; then
        mdio mt7530-0 mmd 0:31 0x21 0x0008 >/dev/null 2>&1
        logger -t disable-port-leds "MT7531 Ethernet LEDs disabled"
    fi
}

Then:

chmod +x /etc/init.d/disable-port-leds
/etc/init.d/disable-port-leds enable

The sleep 2 is important on my system. Without the delay, the switch driver appears to overwrite the register during boot and the LEDs remain enabled.

Testing performed

Verified on my E8450:

  • Power and Internet LEDs disabled separately through LuCI.

  • mdio mt7530-0 mmd 0:31 0x21 0x0008 disables the active Ethernet port LED.

  • Ethernet connectivity is unaffected.

  • DHCP and normal traffic continue to work.

  • After reboot, the register returns to its default value (0x000b).

  • Applying the command from the init script after a short delay successfully disables the Ethernet LEDs after every boot.

I'm posting this in case it helps other users with MT7531-based devices. If anyone knows the official MediaTek documentation describing register 0x21 and its LED mode values, I'd be interested to see it. This was tested specifically on OpenWrt 25.12.4

I have updated to OpenWRT 25.12.5 and the settings have been wiped. Another note is your favorite text editor will need to be installed. For example, I used nano and you will need to install the mdio-tools package as well. I've also updated the script to show in logs if mdio is not installed. This is the new script I'm using now.

Paste in the follwing into /etc/init.d/disable-port-leds

#!/bin/sh /etc/rc.common

START=99

start() {
sleep 2

if command -v mdio >/dev/null 2>&1; then
    mdio mt7530-0 mmd 0:31 0x21 0x0008 >/dev/null 2>&1
    logger -t disable-port-leds "MT7531 Ethernet LEDs disabled"
else
    logger -t disable-port-leds "mdio command not found"
fi

}

Save it, then:

chmod +x /etc/init.d/disable-port-leds
/etc/init.d/disable-port-leds enable
/etc/init.d/disable-port-leds start

Reboot and verify the LEDs stay off.

You can check the logs with:

logread | grep disable-port-leds