luci-mod-status: fix incorrect unit for port speed
authorqianxu <redacted>
Tue, 6 Jan 2026 10:48:15 +0000 (18:48 +0800)
committerPaul Donald <redacted>
Tue, 6 Jan 2026 13:18:51 +0000 (13:18 +0000)
The kernel reports port speeds in decimal Mbps (e.g. 1000 for Gigabit).
Currently, the interface labels this value as 'Mibit/s' (binary),
which creates a unit mismatch.

This patch updates the label to 'Mbit/s' to match the source data.

Signed-off-by: qianxu <redacted>
modules/luci-mod-status/Makefile
modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js

index ee00c1d763487c9cb128c3c6c3c9c572b25cc9bd..6b86e8472ca3aa2863ae036168e142026a2ae331 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 LUCI_TITLE:=LuCI Status Pages
 LUCI_DEPENDS:=+luci-base +libiwinfo +rpcd-mod-iwinfo
 
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_BUILD_DEPENDS:=iwinfo
 PKG_LICENSE:=Apache-2.0
 
index a4a55ce760ee4e40dae5efeb514b2f89a09d5f4d..905f1f36ddbc25ac2c4815284d81e86def0ff925 100644 (file)
@@ -212,7 +212,7 @@ function buildInterfaceMapping(zones, networks) {
 function formatSpeed(carrier, speed, duplex) {
        if ((speed > 0) && duplex) {
                var d = (duplex == 'half') ? '\u202f(H)' : '',
-                   e = E('span', { 'title': _('Speed: %d Mibit/s, Duplex: %s').format(speed, duplex) });
+                   e = E('span', { 'title': _('Speed: %d Mbit/s, Duplex: %s').format(speed, duplex) });
 
                switch (true) {
                case (speed < 1000):
git clone https://git.99rst.org/PROJECT