luci-mod-admin-full: rework wifi configuration
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / cbi / wireless_modefreq.htm
index ac14593..ebb02e4 100644 (file)
@@ -1,8 +1,9 @@
 <%+cbi/valueheader%>
 
 <script type="text/javascript">//<![CDATA[
-       var freqlist = <%= luci.http.write_json(self.freqlist) %>;
-       var hwmodes  = <%= luci.http.write_json(self.hwmodes) %>;
+       var freqlist = <%= luci.http.write_json(self.iwinfo.freqlist) %>;
+       var hwmodes  = <%= luci.http.write_json(self.iwinfo.hwmodelist or {}) %>;
+       var htmodes  = <%= luci.http.write_json(self.iwinfo.htmodelist) %>;
 
        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
                ]
        };