luci-mod-admin-full: only offer VHT rates which are actually supported by the driver
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 25 Jan 2016 17:16:37 +0000 (18:16 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 25 Jan 2016 17:16:37 +0000 (18:16 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
modules/luci-mod-admin-full/luasrc/view/cbi/wireless_modefreq.htm

index 022d4c4..e227b08 100644 (file)
@@ -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"
 
index ac14593..2fb64b3 100644 (file)
@@ -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': [
                        '', '-', 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
                ]
        };