Preliminary N-mode support (single band only)
[tomato.git] / release / src / router / www / advanced-wireless.asp
blobdda0d7a0ddffedbe852f88cbbec1d56e79a4206f
1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
2 <!--
3 Tomato GUI
4 Copyright (C) 2006-2009 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
7 For use with Tomato Firmware only.
8 No part of this file may be used without permission.
9 -->
10 <html>
11 <head>
12 <meta http-equiv='content-type' content='text/html;charset=utf-8'>
13 <meta name='robots' content='noindex,nofollow'>
14 <title>[<% ident(); %>] Advanced: Wireless</title>
15 <link rel='stylesheet' type='text/css' href='tomato.css'>
16 <link rel='stylesheet' type='text/css' href='color.css'>
17 <script type='text/javascript' src='tomato.js'></script>
19 <!-- / / / -->
21 <script type='text/javascript' src='debug.js'></script>
23 <script type='text/javascript'>
25 /* REMOVE-BEGIN
26 !!TB - Added wl_reg_mode, wl_country, wl_country_code, wl_btc_mode
27 REMOVE-END */
28 // <% nvram("security_mode,wl_afterburner,wl_antdiv,wl_ap_isolate,wl_auth,wl_bcn,wl_dtim,wl_frag,wl_frameburst,wl_gmode_protection,wl_plcphdr,wl_rate,wl_rateset,wl_rts,wl_txant,wl_wme,wl_wme_no_ack,wl_wme_apsd,wl_txpwr,wl_mrate,t_features,wl_distance,wl_maxassoc,wlx_hpamp,wlx_hperx,wl_reg_mode,wl_country_code,wl_country,wl_btc_mode,wl_mimo_preamble"); %>
30 hp = features('hpamp');
31 nphy = features('11n');
33 function verifyFields(focused, quiet)
35 if (!v_range('_f_distance', quiet, 0, 99999)) return 0;
36 if (!v_range('_wl_maxassoc', quiet, 0, 255)) return 0;
37 if (!v_range('_wl_bcn', quiet, 1, 65535)) return 0;
38 if (!v_range('_wl_dtim', quiet, 1, 255)) return 0;
39 if (!v_range('_wl_frag', quiet, 256, 2346)) return 0;
40 if (!v_range('_wl_rts', quiet, 0, 2347)) return 0;
41 if (!v_range(E('_wl_txpwr'), quiet, 1, 251)) return 0;
43 E('_wl_wme_no_ack').disabled = E('_wl_wme').selectedIndex != 1;
44 E('_wl_wme_apsd').disabled = E('_wl_wme').selectedIndex != 1;
45 return 1;
48 function save()
50 var fom;
51 var n;
53 if (!verifyFields(null, false)) return;
55 fom = E('_fom');
56 n = fom._f_distance.value * 1;
57 fom.wl_distance.value = n ? n : '';
59 if (hp) {
60 if ((fom.wlx_hpamp.value != nvram.wlx_hpamp) || (fom.wlx_hperx.value != nvram.wlx_hperx)) {
61 fom._service.disabled = 1;
62 fom._reboot.value = 1;
63 form.submit(fom, 0);
64 return;
67 else {
68 fom.wlx_hpamp.disabled = 1;
69 fom.wlx_hperx.disabled = 1;
72 fom.wl_country.value = fom._wl_country_code.value;
73 fom.wl_nmode_protection.value = fom._wl_gmode_protection.value;
75 form.submit(fom, 1);
77 </script>
79 </head>
80 <body>
81 <form id='_fom' method='post' action='tomato.cgi'>
82 <table id='container' cellspacing=0>
83 <tr><td colspan=2 id='header'>
84 <div class='title'>Tomato</div>
85 <div class='version'>Version <% version(); %></div>
86 </td></tr>
87 <tr id='body'><td id='navi'><script type='text/javascript'>navi()</script></td>
88 <td id='content'>
89 <div id='ident'><% ident(); %></div>
91 <!-- / / / -->
93 <input type='hidden' name='_nextpage' value='advanced-wireless.asp'>
94 <input type='hidden' name='_nextwait' value='10'>
95 <input type='hidden' name='_service' value='*'>
96 <input type='hidden' name='_reboot' value='0'>
98 <input type='hidden' name='wl_distance'>
99 <input type='hidden' name='wl_country'>
100 <input type='hidden' name='wl_nmode_protection'>
102 <div class='section-title'>Settings</div>
103 <div class='section'>
104 <script type='text/javascript'>
105 at = ((nvram.security_mode != "wep") && (nvram.security_mode != "radius") && (nvram.security_mode != "disabled"));
106 createFieldTable('', [
107 { title: 'Afterburner', name: 'wl_afterburner', type: 'select', options: [['auto','Auto'],['on','Enable'],['off','Disable *']],
108 value: nvram.wl_afterburner },
109 { title: 'AP Isolation', name: 'wl_ap_isolate', type: 'select', options: [['0','Disable *'],['1','Enable']],
110 value: nvram.wl_ap_isolate },
111 { title: 'Authentication Type', name: 'wl_auth', type: 'select',
112 options: [['0','Auto *'],['1','Shared Key']], attrib: at ? 'disabled' : '',
113 value: at ? 0 : nvram.wl_auth },
114 { title: 'Basic Rate', name: 'wl_rateset', type: 'select', options: [['default','Default *'],['12','1-2 Mbps'],['all','All']],
115 value: nvram.wl_rateset },
116 { title: 'Beacon Interval', name: 'wl_bcn', type: 'text', maxlen: 5, size: 7,
117 suffix: ' <small>(range: 1 - 65535; default: 100)</small>', value: nvram.wl_bcn },
118 { title: 'CTS Protection Mode', name: 'wl_gmode_protection', type: 'select', options: [['off','Disable *'],['auto','Auto']],
119 value: nvram.wl_gmode_protection },
120 /* REMOVE-BEGIN
121 !!TB - Added wl_reg_mode, wl_country, wl_btc_mode
122 REMOVE-END */
123 { title: 'Regulatory Mode', name: 'wl_reg_mode', type: 'select',
124 options: [['off', 'Off *'],['d', '802.11d'],['h', '802.11h']],
125 value: nvram.wl_reg_mode },
126 { title: 'Country / Region', name: 'wl_country_code', type: 'select',
127 options: [['CN','China'],['DE','Europe'],['IL','Israel'],['JP','Japan'],['JO','Jordan'],['SG','Singapore'],['TW','Taiwan'],['TH','Thailand'],['US','U.S. / Americas, FCC'],['AU','Worldwide']],
128 value: nvram.wl_country_code },
129 { title: 'Bluetooth Coexistence', name: 'wl_btc_mode', type: 'select',
130 options: [['0', 'Disable *'],['1', 'Enable'],['2', 'Preemption']],
131 value: nvram.wl_btc_mode },
132 { title: 'Distance / ACK Timing', name: 'f_distance', type: 'text', maxlen: 5, size: 7,
133 suffix: ' <small>meters</small>&nbsp;&nbsp;<small>(range: 0 - 99999; 0 = use default)</small>',
134 value: (nvram.wl_distance == '') ? '0' : nvram.wl_distance },
135 { title: 'DTIM Interval', name: 'wl_dtim', type: 'text', maxlen: 3, size: 5,
136 suffix: ' <small>(range: 1 - 255; default: 1)</small>', value: nvram.wl_dtim },
137 { title: 'Fragmentation Threshold', name: 'wl_frag', type: 'text', maxlen: 4, size: 6,
138 suffix: ' <small>(range: 256 - 2346; default: 2346)</small>', value: nvram.wl_frag },
139 { title: 'Frame Burst', name: 'wl_frameburst', type: 'select', options: [['off','Disable *'],['on','Enable']],
140 value: nvram.wl_frameburst },
141 { title: 'HP', hidden: !hp },
142 { title: 'Amplifier', indent: 2, name: 'wlx_hpamp', type: 'select', options: [['0','Disable'],['1','Enable *']],
143 value: nvram.wlx_hpamp != '0', hidden: !hp },
144 { title: 'Enhanced RX Sensitivity', indent: 2, name: 'wlx_hperx', type: 'select', options: [['0','Disable *'],['1','Enable']],
145 value: nvram.wlx_hperx != '0', hidden: !hp },
146 { title: 'Maximum Clients', name: 'wl_maxassoc', type: 'text', maxlen: 3, size: 5,
147 suffix: ' <small>(range: 1 - 255; default: 128)</small>', value: nvram.wl_maxassoc },
148 { title: 'Multicast Rate', name: 'wl_mrate', type: 'select',
149 options: [['0','Auto *'],['1000000','1 Mbps'],['2000000','2 Mbps'],['5500000','5.5 Mbps'],['6000000','6 Mbps'],['9000000','9 Mbps'],['11000000','11 Mbps'],['12000000','12 Mbps'],['18000000','18 Mbps'],['24000000','24 Mbps'],['36000000','36 Mbps'],['48000000','48 Mbps'],['54000000','54 Mbps']],
150 value: nvram.wl_mrate },
151 { title: 'Preamble', name: 'wl_plcphdr', type: 'select', options: [['long','Long *'],['short','Short']],
152 value: nvram.wl_plcphdr },
153 { title: '802.11n Preamble', name: 'wl_mimo_preamble', type: 'select', options: [['auto','Auto'],['mm','Mixed Mode *'],['gf','Green Field'],['gfbcm','GF-BRCM']],
154 value: nvram.wl_mimo_preamble, hidden: !nphy },
155 { title: 'RTS Threshold', name: 'wl_rts', type: 'text', maxlen: 4, size: 6,
156 suffix: ' <small>(range: 0 - 2347; default: 2347)</small>', value: nvram.wl_rts },
157 { title: 'Receive Antenna', name: 'wl_antdiv', type: 'select', options: [['3','Auto *'],['1','A'],['0','B']],
158 value: nvram.wl_antdiv },
159 { title: 'Transmit Antenna', name: 'wl_txant', type: 'select', options: [['3','Auto *'],['1','A'],['0','B']],
160 value: nvram.wl_txant },
161 { title: 'Transmit Power', name: 'wl_txpwr', type: 'text', maxlen: 3, size: 5,
162 suffix: hp ?
163 ' <small>mW (before amplification)</small>&nbsp;&nbsp;<small>(range: 1 - 251; default: 10)</small>' :
164 ' <small>mW</small>&nbsp;&nbsp;<small>(range: 1 - 251, actual max depends on Country selected; default: 42)</small>',
165 value: nvram.wl_txpwr },
166 { title: 'Transmission Rate', name: 'wl_rate', type: 'select',
167 options: [['0','Auto *'],['1000000','1 Mbps'],['2000000','2 Mbps'],['5500000','5.5 Mbps'],['6000000','6 Mbps'],['9000000','9 Mbps'],['11000000','11 Mbps'],['12000000','12 Mbps'],['18000000','18 Mbps'],['24000000','24 Mbps'],['36000000','36 Mbps'],['48000000','48 Mbps'],['54000000','54 Mbps']],
168 value: nvram.wl_rate },
169 { title: 'WMM', name: 'wl_wme', type: 'select', options: [['off','Disable *'],['on','Enable']], value: nvram.wl_wme },
170 { title: 'No ACK', name: 'wl_wme_no_ack', indent: 2, type: 'select', options: [['off','Disable *'],['on','Enable']],
171 value: nvram.wl_wme_no_ack },
172 { title: 'APSD Mode', name: 'wl_wme_apsd', indent: 2, type: 'select', options: [['off','Disable'],['on','Enable *']],
173 value: nvram.wl_wme_apsd }
175 </script>
176 </div>
177 <small>The default settings are indicated with the asterisk <b style='font-size: 1.5em'>*</b> symbol.</small>
179 <!-- / / / -->
181 </td></tr>
182 <tr><td id='footer' colspan=2>
183 <span id='footer-msg'></span>
184 <input type='button' value='Save' id='save-button' onclick='save()'>
185 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'>
186 </td></tr>
187 </table>
188 </form>
189 <script type='text/javascript'>verifyFields(null, 1);</script>
190 </body>
191 </html>