luci-mod-status: fix incorrect unit for port speed

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 <qianxuuuu@qq.com>
This commit is contained in:
qianxu
2026-01-06 18:48:15 +08:00
committed by Paul Donald
parent 44c934efec
commit 64e8a43cc3
2 changed files with 2 additions and 2 deletions

View 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

View 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):