summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-01-25 18:16:37 +0100
committerJo-Philipp Wich <jow@openwrt.org>2016-01-25 18:16:37 +0100
commit445ae20db8812bcff3e4c0e32859ea1d3d5fbe4b (patch)
tree2d3c0025f9674e3fac360f4e671105fdfd2c83a9 /modules/luci-mod-admin-full/luasrc
parent02a93bca500acac3d051ac6a541e70905f1934e9 (diff)
luci-mod-admin-full: only offer VHT rates which are actually supported by the driver
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc')
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua1
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/cbi/wireless_modefreq.htm13
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
index 022d4c427..e227b0874 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@ -161,6 +161,7 @@ if found_sta then
else
ch = s:taboption("general", Value, "_mode_freq", '<br />'..translate("Operating frequency"))
ch.hwmodes = hw_modes
+ ch.htmodes = iw.htmodelist
ch.freqlist = iw.freqlist
ch.template = "cbi/wireless_modefreq"
diff --git a/modules/luci-mod-admin-full/luasrc/view/cbi/wireless_modefreq.htm b/modules/luci-mod-admin-full/luasrc/view/cbi/wireless_modefreq.htm
index ac14593e7..2fb64b3c4 100644
--- a/modules/luci-mod-admin-full/luasrc/view/cbi/wireless_modefreq.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/cbi/wireless_modefreq.htm
@@ -3,6 +3,7 @@
<script type="text/javascript">//<![CDATA[
var freqlist = <%= luci.http.write_json(self.freqlist) %>;
var hwmodes = <%= luci.http.write_json(self.hwmodes) %>;
+ var htmodes = <%= luci.http.write_json(self.htmodes) %>;
var channels = {
'11g': [
@@ -31,14 +32,14 @@
'', '-', true
],
'n': [
- 'HT20', '20 MHz', true,
- 'HT40', '40 MHz', true
+ 'HT20', '20 MHz', htmodes.HT20,
+ 'HT40', '40 MHz', htmodes.HT40
],
'ac': [
- 'VHT20', '20 MHz', true,
- 'VHT40', '40 MHz', true,
- 'VHT80', '80 MHz', true,
- 'VHT160', '160 MHz', true
+ 'VHT20', '20 MHz', htmodes.VHT20,
+ 'VHT40', '40 MHz', htmodes.VHT40,
+ 'VHT80', '80 MHz', htmodes.VHT80,
+ 'VHT160', '160 MHz', htmodes.VHT160
]
};