diff --git a/usr/local/www/interfaces_wlan.inc b/usr/local/www/interfaces_wlan.inc index 054126ced6..2e90016e3a 100755 --- a/usr/local/www/interfaces_wlan.inc +++ b/usr/local/www/interfaces_wlan.inc @@ -137,10 +137,7 @@ function wireless_config_post() { $optcfg['wireless']['ssid'] = $_POST['ssid']; $optcfg['wireless']['stationname'] = $_POST['stationname']; $optcfg['wireless']['channel'] = $_POST['channel']; - $optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] ? true : false; - $optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] ? true : false; - $optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] ? true : false; - $optcfg['wireless']['turbo']['enable'] = $_POST['turbo_enable'] ? true : false; + $optcfg['wireless']['authmode'] = $_POST['authmode']; $optcfg['wireless']['hidessid']['enable'] = $_POST['hidessid_enable'] ? true : false; $optcfg['wireless']['txpower'] = $_POST['txpower']; @@ -156,8 +153,41 @@ function wireless_config_post() { $optcfg['wireless']['wpa']['passphrase'] = $_POST['passphrase']; $optcfg['wireless']['wpa']['ieee8021x']['enable'] = $_POST['ieee8021x_enable'] ? 1 : 0; $optcfg['wireless']['wpa']['ext_wpa_sw'] = $_POST['ext_wpa_sw']; - $optcfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] ? true : false; - $optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] ? true : false; + + if($_POST['wpa_enable']) + $optcfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] = true; + else + unset($optcfg['wireless']['wpa']['enable']); + + if($_POST['wep_enable']) + $optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true; + else + unset($optcfg['wireless']['wep']['enable']); + + if($_POST['wme_enable']) + $optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] = true; + else + unset($optcfg['wireless']['wme']['enable']); + + if($_POST['pureg_enable']) + $optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] = true; + else + unset($optcfg['wireless']['pureg']['enable']); + + if($_POST['apbridge_enable']) + $optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] = true; + else + unset($optcfg['wireless']['apbridge']['enable']); + + if($_POST['turbo_enable']) + $optcfg['wireless']['turbo']['enable'] = $_POST['turbo_enable'] = true; + else + unset($optcfg['wireless']['turbo']['enable']); + + + + + $optcfg['wireless']['wep']['key'] = array(); for ($i = 1; $i <= 4; $i++) { @@ -222,13 +252,13 @@ function wireless_config_print() { 802.11g only - > + >
When operating as an access point in 802.11g mode allow only 11g-capable stations to associate (11b-only stations are not permitted to associate). Allow intra-BSS communication - > + >
When operating as an access point, enable this if you want to pass packets between wireless clients directly.
@@ -237,20 +267,20 @@ function wireless_config_print() { Enable turbo mode - > + >
Setting this option will force the card to use turbo mode.
use "ifconfig interface list channel" to list turbo capable channels. Enable WME - > + >
Setting this option will force the card to use WME (wireless QoS). Enable Hide SSID - > + >
Setting this option will force the card to NOT broadcast it's SSID
@@ -297,7 +327,7 @@ function wireless_config_print() { WEP - > + > Enable WEP @@ -335,7 +365,7 @@ function wireless_config_print() { -
WPA> + > Enable WPA

@@ -373,7 +403,7 @@ function wireless_config_print() { - - -
Enable MAC Filtering> + > Setting this option will enable the use of a mac filterlist to allow deny association based on mac address

Strict Key Regeneration> + >
Setting this option will force the AP to rekey whenever a client disassociates.
Enable IEEE802.1X> + >
Setting this option will enable 802.1x authentication.