summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2022-11-26 13:30:26 +0100
committerAndre Heider <a.heider@gmail.com>2023-01-23 14:51:28 +0100
commiteead21c5abff36839d5b9922eb06b61ffb44d77c (patch)
tree06600986703b38f4b64b4ffb0ee5138127e67dd2 /modules/luci-mod-network/htdocs/luci-static/resources
parent05f2901ffb4e4972999d9587a03e532863320f22 (diff)
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 <a.heider@gmail.com>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js6
1 files 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)