diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index cdd3cce2a2..21b46bcc57 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1505,4 +1505,36 @@ function discover_bridge($interface1, $interface2) { return "-1"; } +function get_wireless_modes($interface) +{ + /* return wireless modes and channels */ + if(is_interface_wireless($interface)) { + $wi = 1; + $ifconfig = "/sbin/ifconfig"; + $awk = "/usr/bin/awk"; + $chan_list = "$ifconfig $interface list chan"; + $stack_list = "$awk -F\"Channel \" '{print \$2 \"\\\n\" \$3 }'"; + $format_list = "$awk '{print \$5 \" \" \$6 \",\" \$1}'"; + + exec("$chan_list | $stack_list | sort -u | $format_list 2>&1", $interface_channels); + $interface_channel_count = count($interface_channels); + + $c = 0; + while ($c < $interface_channel_count) + { + $channel_line = explode(",", $interface_channels["$c"]); + + $wireless_mode = trim($channel_line[0]); + $wireless_channel = trim($channel_line[1]); + + if(trim($wireless_mode) != "") { + $wireless_modes["$wireless_mode"]["$c"] = $wireless_channel; + } + $c++; + } + + } + return($wireless_modes); +} + ?> \ No newline at end of file diff --git a/usr/local/www/interfaces_wlan.inc b/usr/local/www/interfaces_wlan.inc index 54539c209e..df5f913c44 100755 --- a/usr/local/www/interfaces_wlan.inc +++ b/usr/local/www/interfaces_wlan.inc @@ -78,8 +78,9 @@ function wireless_config_init() { } function wireless_config_post() { - global $optcfg, $pconfig, $input_errors; + global $optcfg, $pconfig; + $input_errors = ""; unset($input_errors); /* input validation */ @@ -138,7 +139,6 @@ function wireless_config_post() { $optcfg['wireless']['mode'] = $_POST['mode']; $optcfg['wireless']['protmode'] = $_POST['protmode']; $optcfg['wireless']['ssid'] = $_POST['ssid']; - $optcfg['wireless']['channel'] = $_POST['channel']; $optcfg['wireless']['authmode'] = $_POST['authmode']; $optcfg['wireless']['txpower'] = $_POST['txpower']; @@ -449,6 +449,21 @@ 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 +

+ +

+ Setting this to "Allow" will allow all clients in not in deny list, while "Deny" will deny all clients not in allow list. + Radius will cause allow and deny list to be searched and then query radius.
+ + */ ?> Authentication @@ -493,7 +508,4 @@ function wireless_config_print() {
Setting this option will enable 802.1x authentication. -