diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-20 22:32:10 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-20 22:32:10 +0000 |
commit | d0440f75a1db35bbd45ab34bb368c03645c4956a (patch) | |
tree | 0e998fbc4af1c363aaa9422af895b6a53eabcbaf /usr/local/www/interfaces_wlan.inc | |
parent | 69b7db07b6c69f0c5f084568ae52268a4f166eea (diff) | |
download | pfsense-d0440f75a1db35bbd45ab34bb368c03645c4956a.zip pfsense-d0440f75a1db35bbd45ab34bb368c03645c4956a.tar.gz |
Import m0n0wall's 1.2b7 latest wireless changes.
Diffstat (limited to 'usr/local/www/interfaces_wlan.inc')
-rwxr-xr-x | usr/local/www/interfaces_wlan.inc | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/usr/local/www/interfaces_wlan.inc b/usr/local/www/interfaces_wlan.inc index 9b3c41c..0faf3da 100755 --- a/usr/local/www/interfaces_wlan.inc +++ b/usr/local/www/interfaces_wlan.inc @@ -3,7 +3,7 @@ interfaces_wlan.inc part of m0n0wall (http://m0n0.ch/wall) - Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. + Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -28,9 +28,12 @@ POSSIBILITY OF SUCH DAMAGE. */ +$wlchannels = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,42,44,48,50,52,56,58,60,64,149,152,153,157,160,161,165); + function wireless_config_init() { global $optcfg, $pconfig; + $pconfig['standard'] = $optcfg['wireless']['standard']; $pconfig['mode'] = $optcfg['wireless']['mode']; $pconfig['ssid'] = $optcfg['wireless']['ssid']; $pconfig['stationname'] = $optcfg['wireless']['stationname']; @@ -70,6 +73,7 @@ function wireless_config_post() { if (!$input_errors) { + $optcfg['wireless']['standard'] = $_POST['standard']; $optcfg['wireless']['mode'] = $_POST['mode']; $optcfg['wireless']['ssid'] = $_POST['ssid']; $optcfg['wireless']['stationname'] = $_POST['stationname']; @@ -92,7 +96,7 @@ function wireless_config_post() { } function wireless_config_print() { - global $optcfg, $pconfig; + global $optcfg, $pconfig, $wlchannels; ?> <tr> <td colspan="2" valign="top" height="16"></td> @@ -100,12 +104,26 @@ function wireless_config_print() { <tr> <td colspan="2" valign="top" class="listtopic">Wireless configuration</td> </tr> + <?php if (strstr($optcfg['if'], "ath")): ?> + <tr> + <td valign="top" class="vncellreq">Standard</td> + <td class="vtable"><select name="standard" class="formfld" id="standard"> + <?php + $standards = array("11b" => "802.11b", "11g" => "802.11g", "11a" => "802.11a"); + foreach ($standards as $sn => $sv): ?> + <option value="<?=$sn;?>" <?php if ($sn == $pconfig['standard']) echo "selected";?>> + <?=$sv;?> + </option> + <?php endforeach; ?> + </select></td> + </tr> + <?php endif; ?> <tr> <td valign="top" class="vncellreq">Mode</td> - <td class="vtable"> <select name="mode" class="formfld" id="mode"> + <td class="vtable"><select name="mode" class="formfld" id="mode"> <?php $opts = array(); - if (strstr($optcfg['if'], "wi")) + if (strstr($optcfg['if'], "wi") || strstr($optcfg['if'], "ath")) $opts[] = "hostap"; $opts[] = "BSS"; $opts[] = "IBSS"; @@ -121,19 +139,21 @@ function wireless_config_print() { </tr> <tr> <td valign="top" class="vncellreq">SSID</td> - <td class="vtable"><input name="ssid" type="text" class="formfld" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']);?>"> + <td class="vtable"><?=$mandfldhtml;?><input name="ssid" type="text" class="formfld" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']);?>"> </td> </tr> <tr> <td valign="top" class="vncellreq">Channel</td> <td class="vtable"><select name="channel" class="formfld" id="channel"> + <option <?php if ($pconfig['channel'] == 0) echo "selected";?> value="0">Auto</option> <?php - for ($i = 0; $i <= 14; $i++): ?> - <option <?php if ($i == $pconfig['channel']) echo "selected";?>> - <? echo($i==0 ? "Auto" : $i) ?> + foreach ($wlchannels as $channel): ?> + <option <?php if ($channel == $pconfig['channel']) echo "selected";?> value="<?=$channel;?>"> + <?=$channel;?> </option> - <?php endfor; ?> - </select></td> + <?php endforeach; ?> + </select> <br> + Note: Not all channels may be supported by your card</td> </tr> <tr> <td valign="top" class="vncell">Station name</td> @@ -144,8 +164,8 @@ function wireless_config_print() { <tr> <td valign="top" class="vncell">WEP</td> <td class="vtable"> <input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <?php if ($pconfig['wep_enable']) echo "checked"; ?>> - <strong>Enable WEP</strong><br> - <table border="0" cellspacing="0" cellpadding="0"> + <strong>Enable WEP</strong> + <table border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td> </td> |