1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
4 Copyright (C) 2006-2010 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.
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>
21 <script type='text/javascript' src='debug.js'
></script>
23 <script type='text/javascript' src='wireless.jsx?_http_id=<%
nv(http_id
); %>'
></script>
24 <script type='text/javascript'
>
26 // <% nvram("wl_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,wl_obss_coex,wl_interfmode"); %>
27 // <% wlcountries(); %>
29 hp
= features('hpamp');
30 nphy
= features('11n');
32 function verifyFields(focused
, quiet
)
34 for (var uidx
= 0; uidx
< wl_ifaces
.length
; ++uidx
) {
35 var u
= wl_unit(uidx
);
37 if (!v_range('_f_wl'+u
+'_distance', quiet
, 0, 99999)) return 0;
38 if (!v_range('_wl'+u
+'_maxassoc', quiet
, 0, 255)) return 0;
39 if (!v_range('_wl'+u
+'_bcn', quiet
, 1, 65535)) return 0;
40 if (!v_range('_wl'+u
+'_dtim', quiet
, 1, 255)) return 0;
41 if (!v_range('_wl'+u
+'_frag', quiet
, 256, 2346)) return 0;
42 if (!v_range('_wl'+u
+'_rts', quiet
, 0, 2347)) return 0;
43 if (!v_range(E('_wl'+u
+'_txpwr'), quiet
, hp
? 1 : 0, hp
? 251 : 400)) return 0;
45 var b
= E('_wl'+u
+'_wme').value
== 'off';
46 E('_wl'+u
+'_wme_no_ack').disabled
= b
;
47 E('_wl'+u
+'_wme_apsd').disabled
= b
;
58 if (!verifyFields(null, false)) return;
62 for (var uidx
= 0; uidx
< wl_ifaces
.length
; ++uidx
) {
63 var u
= wl_unit(uidx
);
65 n
= E('_f_wl'+u
+'_distance').value
* 1;
66 E('_wl'+u
+'_distance').value
= n
? n
: '';
68 E('_wl'+u
+'_country').value
= E('_wl'+u
+'_country_code').value
;
69 E('_wl'+u
+'_nmode_protection').value
= E('_wl'+u
+'_gmode_protection').value
;
73 if ((E('_wlx_hpamp').value
!= nvram
.wlx_hpamp
) || (E('_wlx_hperx').value
!= nvram
.wlx_hperx
)) {
74 fom
._service
.disabled
= 1;
75 fom
._reboot
.value
= 1;
81 E('_wlx_hpamp').disabled
= 1;
82 E('_wlx_hperx').disabled
= 1;
91 <form id='_fom' method='post' action='tomato.cgi'
>
92 <table id='container' cellspacing=
0>
93 <tr><td colspan=
2 id='header'
>
94 <div class='title'
>Tomato
</div>
95 <div class='version'
>Version <%
version(); %></div>
97 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
99 <div id='ident'
><%
ident(); %></div>
103 <input type='hidden' name='_nextpage' value='advanced-wireless.asp'
>
104 <input type='hidden' name='_nextwait' value='
10'
>
105 <input type='hidden' name='_service' value='*'
>
106 <input type='hidden' name='_reboot' value='
0'
>
108 <script type='text/javascript'
>
110 for (var uidx
= 0; uidx
< wl_ifaces
.length
; ++uidx
) {
111 var u
= wl_unit(uidx
);
113 W('<input type=\'hidden\' id=\'_wl'+u
+'_distance\' name=\'wl'+u
+'_distance\'>');
114 W('<input type=\'hidden\' id=\'_wl'+u
+'_country\' name=\'wl'+u
+'_country\'>');
115 W('<input type=\'hidden\' id=\'_wl'+u
+'_nmode_protection\' name=\'wl'+u
+'_nmode_protection\'>');
117 W('<div class=\'section-title\'>Wireless ');
118 if (wl_ifaces
.length
> 1)
119 W('(' + wl_display_ifname(uidx
) + ') ');
121 W('</div><div class=\'section\'>');
123 at
= ((nvram
['wl'+u
+'_security_mode'] != "wep") && (nvram
['wl'+u
+'_security_mode'] != "radius") && (nvram
['wl'+u
+'_security_mode'] != "disabled"));
124 createFieldTable('', [
125 { title
: 'Afterburner', name
: 'wl'+u
+'_afterburner', type
: 'select', options
: [['auto','Auto'],['on','Enable'],['off','Disable *']],
126 value
: nvram
['wl'+u
+'_afterburner'] },
127 { title
: 'AP Isolation', name
: 'wl'+u
+'_ap_isolate', type
: 'select', options
: [['0','Disable *'],['1','Enable']],
128 value
: nvram
['wl'+u
+'_ap_isolate'] },
129 { title
: 'Authentication Type', name
: 'wl'+u
+'_auth', type
: 'select',
130 options
: [['0','Auto *'],['1','Shared Key']], attrib
: at
? 'disabled' : '',
131 value
: at
? 0 : nvram
['wl'+u
+'_auth'] },
132 { title
: 'Basic Rate', name
: 'wl'+u
+'_rateset', type
: 'select', options
: [['default','Default *'],['12','1-2 Mbps'],['all','All']],
133 value
: nvram
['wl'+u
+'_rateset'] },
134 { title
: 'Beacon Interval', name
: 'wl'+u
+'_bcn', type
: 'text', maxlen
: 5, size
: 7,
135 suffix
: ' <small>(range: 1 - 65535; default: 100)</small>', value
: nvram
['wl'+u
+'_bcn'] },
136 { title
: 'CTS Protection Mode', name
: 'wl'+u
+'_gmode_protection', type
: 'select', options
: [['off','Disable *'],['auto','Auto']],
137 value
: nvram
['wl'+u
+'_gmode_protection'] },
138 { title
: 'Regulatory Mode', name
: 'wl'+u
+'_reg_mode', type
: 'select',
139 options
: [['off', 'Off *'],['d', '802.11d'],['h', '802.11h']],
140 value
: nvram
['wl'+u
+'_reg_mode'] },
141 { title
: 'Country / Region', name
: 'wl'+u
+'_country_code', type
: 'select',
142 options
: wl_countries
, value
: nvram
['wl'+u
+'_country_code'] },
143 { title
: 'Bluetooth Coexistence', name
: 'wl'+u
+'_btc_mode', type
: 'select',
144 options
: [['0', 'Disable *'],['1', 'Enable'],['2', 'Preemption']],
145 value
: nvram
['wl'+u
+'_btc_mode'] },
146 { title
: 'Distance / ACK Timing', name
: 'f_wl'+u
+'_distance', type
: 'text', maxlen
: 5, size
: 7,
147 suffix
: ' <small>meters</small> <small>(range: 0 - 99999; 0 = use default)</small>',
148 value
: (nvram
['wl'+u
+'_distance'] == '') ? '0' : nvram
['wl'+u
+'_distance'] },
149 { title
: 'DTIM Interval', name
: 'wl'+u
+'_dtim', type
: 'text', maxlen
: 3, size
: 5,
150 suffix
: ' <small>(range: 1 - 255; default: 1)</small>', value
: nvram
['wl'+u
+'_dtim'] },
151 { title
: 'Fragmentation Threshold', name
: 'wl'+u
+'_frag', type
: 'text', maxlen
: 4, size
: 6,
152 suffix
: ' <small>(range: 256 - 2346; default: 2346)</small>', value
: nvram
['wl'+u
+'_frag'] },
153 { title
: 'Frame Burst', name
: 'wl'+u
+'_frameburst', type
: 'select', options
: [['off','Disable *'],['on','Enable']],
154 value
: nvram
['wl'+u
+'_frameburst'] },
155 { title
: 'HP', hidden
: !hp
|| (uidx
> 0) },
156 { title
: 'Amplifier', indent
: 2, name
: 'wlx_hpamp' + (uidx
> 0 ? uidx
+ '' : ''), type
: 'select', options
: [['0','Disable'],['1','Enable *']],
157 value
: nvram
.wlx_hpamp
!= '0', hidden
: !hp
|| (uidx
> 0) },
158 { title
: 'Enhanced RX Sensitivity', indent
: 2, name
: 'wlx_hperx' + (uidx
> 0 ? uidx
+ '' : ''), type
: 'select', options
: [['0','Disable *'],['1','Enable']],
159 value
: nvram
.wlx_hperx
!= '0', hidden
: !hp
|| (uidx
> 0) },
160 { title
: 'Maximum Clients', name
: 'wl'+u
+'_maxassoc', type
: 'text', maxlen
: 3, size
: 5,
161 suffix
: ' <small>(range: 1 - 255; default: 128)</small>', value
: nvram
['wl'+u
+'_maxassoc'] },
162 { title
: 'Multicast Rate', name
: 'wl'+u
+'_mrate', type
: 'select',
163 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']],
164 value
: nvram
['wl'+u
+'_mrate'] },
165 { title
: 'Preamble', name
: 'wl'+u
+'_plcphdr', type
: 'select', options
: [['long','Long *'],['short','Short']],
166 value
: nvram
['wl'+u
+'_plcphdr'] },
167 { title
: '802.11n Preamble', name
: 'wl'+u
+'_mimo_preamble', type
: 'select', options
: [['auto','Auto'],['mm','Mixed Mode *'],['gf','Green Field'],['gfbcm','GF-BRCM']],
168 value
: nvram
['wl'+u
+'_mimo_preamble'], hidden
: !nphy
},
169 { title
: 'Overlapping BSS Coexistence', name
: 'wl'+u
+'_obss_coex', type
: 'select', options
: [['0','Off *'],['1','On']],
170 value
: nvram
['wl'+u
+'_obss_coex'], hidden
: !nphy
},
171 { title
: 'RTS Threshold', name
: 'wl'+u
+'_rts', type
: 'text', maxlen
: 4, size
: 6,
172 suffix
: ' <small>(range: 0 - 2347; default: 2347)</small>', value
: nvram
['wl'+u
+'_rts'] },
173 { title
: 'Receive Antenna', name
: 'wl'+u
+'_antdiv', type
: 'select', options
: [['3','Auto *'],['1','A'],['0','B']],
174 value
: nvram
['wl'+u
+'_antdiv'] },
175 { title
: 'Transmit Antenna', name
: 'wl'+u
+'_txant', type
: 'select', options
: [['3','Auto *'],['1','A'],['0','B']],
176 value
: nvram
['wl'+u
+'_txant'] },
177 { title
: 'Transmit Power', name
: 'wl'+u
+'_txpwr', type
: 'text', maxlen
: 3, size
: 5,
179 ' <small>mW (before amplification)</small> <small>(range: 1 - 251; default: 10)</small>' :
180 ' <small>mW</small> <small>(range: 0 - 400, actual max depends on Country selected; use 0 for hardware default)</small>',
181 value
: nvram
['wl'+u
+'_txpwr'] },
182 { title
: 'Transmission Rate', name
: 'wl'+u
+'_rate', type
: 'select',
183 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']],
184 value
: nvram
['wl'+u
+'_rate'] },
185 { title
: 'Interference Mitigation', name
: 'wl'+u
+'_interfmode', type
: 'select',
186 options
: [['0','None'],['1','Non-WLAN'],['2','WLAN Manual'],['3','WLAN Auto *']],
187 value
: nvram
['wl'+u
+'_interfmode'] },
188 { title
: 'WMM', name
: 'wl'+u
+'_wme', type
: 'select', options
: [['auto','Auto *'],['off','Disable'],['on','Enable']], value
: nvram
['wl'+u
+'_wme'] },
189 { title
: 'No ACK', name
: 'wl'+u
+'_wme_no_ack', indent
: 2, type
: 'select', options
: [['off','Disable *'],['on','Enable']],
190 value
: nvram
['wl'+u
+'_wme_no_ack'] },
191 { title
: 'APSD Mode', name
: 'wl'+u
+'_wme_apsd', indent
: 2, type
: 'select', options
: [['off','Disable'],['on','Enable *']],
192 value
: nvram
['wl'+u
+'_wme_apsd'] }
198 <small>The default settings are indicated with the asterisk
<b style='font-size:
1.5em'
>*
</b> symbol.
</small>
203 <tr><td id='footer' colspan=
2>
204 <span id='footer-msg'
></span>
205 <input type='button' value='Save' id='save-button' onclick='save()'
>
206 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'
>
210 <script type='text/javascript'
>verifyFields(null, 1);</script>