luci-mod-network: implement checks for mesh capabilities
authorPaul Donald <[email protected]>
Mon, 3 Nov 2025 21:32:33 +0000 (22:32 +0100)
committerPaul Donald <[email protected]>
Mon, 3 Nov 2025 21:46:43 +0000 (22:46 +0100)
802.11s i.e. mesh mode value is now gated behind a check for the capability.

Signed-off-by: Paul Donald <[email protected]>
(cherry picked from commit 13f9f6f010decfd0016beb659978b4b8d4895a1c)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js

index cfe5e02b3064ad95e51b0fa2980ad38dc06e182f..6a5a029e5aa55136a7cd5a73d86a849ebdea50c0 100644 (file)
@@ -962,6 +962,7 @@ return view.extend({
                s.addModalOptions = function(s) {
                        return network.getWifiNetwork(s.section).then(function(radioNet) {
                                const hwtype = uci.get('wireless', radioNet.getWifiDeviceName(), 'type');
+                               const have_mesh = L.hasSystemFeature('hostapd', 'mesh') || L.hasSystemFeature('wpasupplicant', 'mesh');
                                let o, ss;
 
                                o = s.option(form.SectionValue, '_device', form.NamedSection, radioNet.getWifiDeviceName(), 'wifi-device', _('Device Configuration'));
@@ -1130,7 +1131,7 @@ return view.extend({
                                        const mode = ss.children[0];
                                        const bssid = ss.children[5];
 
-                                       mode.value('mesh', '802.11s');
+                                       if (have_mesh) mode.value('mesh', '802.11s');
                                        mode.value('ahdemo', _('Pseudo Ad-Hoc (ahdemo)'));
                                        mode.value('monitor', _('Monitor'));