luci-mod-network: fix uci.remove() deleting entire radio section on wifi join
authorweicheng04 <redacted>
Fri, 10 Apr 2026 08:46:05 +0000 (16:46 +0800)
committerPaul Donald <redacted>
Fri, 10 Apr 2026 13:51:11 +0000 (15:51 +0200)
commit1655946120a4b7f7280a9e5f1f2ecbd2f4c35e45
tree0202ad96c96a4477005a2ba2cd89d8488df3ace5
parent354d1e58209f14ac0838412293fe41c2a45015a1
luci-mod-network: fix uci.remove() deleting entire radio section on wifi join

In handleJoinConfirm(), when the scanned BSS has no VHT/HT info,
uci.remove('wireless', radioDev.getName(), 'htmode') is called
intending to remove only the htmode option. However, uci.remove()
only accepts (conf, sid) and silently ignores the third parameter,
causing the entire wifi-device section to be deleted from the
rpcd session delta.

This makes the radio disappear from the Wireless Overview page
until the session delta is cleared.

Fix by using uci.unset() which correctly handles three parameters
(conf, sid, opt) to remove a single option.

Signed-off-by: Weicheng Xiao <redacted>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
git clone https://git.99rst.org/PROJECT