From eead21c5abff36839d5b9922eb06b61ffb44d77c Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 26 Nov 2022 13:30:26 +0100 Subject: [PATCH] luci-mod-network: don't offer unsupported wireless hwmodes This prevents offering e.g. 'Legacy' on ac/n only radios or ax if hostapd wasn't compiled with ax support. Signed-off-by: Andre Heider --- .../htdocs/luci-static/resources/view/network/wireless.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index bdeaecf8a9..e9b0fa4160 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -343,10 +343,10 @@ var CBIWifiFrequencyValue = form.Value.extend({ .reduce(function(o, v) { o[v] = true; return o }, {}); this.modes = [ - '', 'Legacy', true, + '', 'Legacy', hwmodelist.a || hwmodelist.b || hwmodelist.g, 'n', 'N', hwmodelist.n, - 'ac', 'AC', hwmodelist.ac, - 'ax', 'AX', hwmodelist.ax + 'ac', 'AC', L.hasSystemFeature('hostapd', '11ac') && hwmodelist.ac, + 'ax', 'AX', L.hasSystemFeature('hostapd', '11ax') && hwmodelist.ax ]; var htmodelist = L.toArray(data[0] ? data[0].getHTModes() : null) -- 2.30.2