Is there an existing issue for this?
screenshots or captures
No screenshot available. The bug is reproducible on any OpenWrt 25.12.2 device with WLAN by setting txpower to 0 dBm in LuCI under Network > Wireless.
Actual behaviour
When setting the transmit power to 0 dBm in LuCI under Network > Wireless, the dropdown displays "driver default" instead of "0 dBm (1 mW)". Setting 1 dBm works correctly and displays "1 mW".
Expected behaviour
0 dBm should display "0 dBm (1 mW)" like any other value in the list.
Steps to reproduce
- Go to Network → Wireless
- Click Edit on a radio
- Set Maximum transmit power to 0 dBm
- Save and Apply
- Reopen the edit dialog — dropdown shows "driver default" instead of "0 dBm (1 mW)"
Additional Information
ubus call system board
{
"model": "OpenWrt One",
"release": {
"version": "25.12.2",
"revision": "r32802-f505120278",
"target": "mediatek/filogic"
}
}
Root cause:
In modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js in class CBIWifiTxPowerValue:
Bug — p.dbm is a Number, UCI returns a String:
this.value(p.dbm, `${p.dbm} dBm (${p.mw} mW)`);
Fix — convert to String for correct comparison:
this.value(String(p.dbm), `${p.dbm} dBm (${p.mw} mW)`);
UCI always returns strings. The comparison "0" === 0 fails in JavaScript — so the dropdown finds no matching entry and falls back to "driver default".
Proof — console test on the wireless edit page:
document.querySelector('select[id*="txpower"]').options[1].value
'0' ← string with quotes confirmed
What browsers do you see the problem on?
No response
Relevant log output
Browser independent — the bug is in the JavaScript code, not browser specific.
Is there an existing issue for this?
screenshots or captures
No screenshot available. The bug is reproducible on any OpenWrt 25.12.2 device with WLAN by setting txpower to 0 dBm in LuCI under Network > Wireless.
Actual behaviour
When setting the transmit power to 0 dBm in LuCI under Network > Wireless, the dropdown displays "driver default" instead of "0 dBm (1 mW)". Setting 1 dBm works correctly and displays "1 mW".
Expected behaviour
0 dBm should display "0 dBm (1 mW)" like any other value in the list.
Steps to reproduce
Additional Information
ubus call system board { "model": "OpenWrt One", "release": { "version": "25.12.2", "revision": "r32802-f505120278", "target": "mediatek/filogic" } } Root cause: In modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js in class CBIWifiTxPowerValue: Bug — p.dbm is a Number, UCI returns a String: this.value(p.dbm, `${p.dbm} dBm (${p.mw} mW)`); Fix — convert to String for correct comparison: this.value(String(p.dbm), `${p.dbm} dBm (${p.mw} mW)`); UCI always returns strings. The comparison "0" === 0 fails in JavaScript — so the dropdown finds no matching entry and falls back to "driver default". Proof — console test on the wireless edit page: document.querySelector('select[id*="txpower"]').options[1].value '0' ← string with quotes confirmedWhat browsers do you see the problem on?
No response
Relevant log output
Browser independent — the bug is in the JavaScript code, not browser specific.