diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2011-01-25 01:34:37 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2011-01-25 01:34:37 -0700 |
commit | 5357f386829278a7b88765727013f912f99baa1a (patch) | |
tree | 22279d75a8313b7921cc2e432d822c43130f1ef9 /etc/inc | |
parent | 5691915776174b9ffeb6d87c616dc0a0dab2fe27 (diff) | |
download | pfsense-5357f386829278a7b88765727013f912f99baa1a.zip pfsense-5357f386829278a7b88765727013f912f99baa1a.tar.gz |
Remove extra call to get_real_interface.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/interfaces.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 3bdfb15..e3af3c4 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -3521,10 +3521,9 @@ function get_wireless_modes($interface) { /* return wireless modes and channels */ $wireless_modes = array(); - $wlif = get_real_interface($interface); + $cloned_interface = get_real_interface($interface); - if($wlif != NULL && is_interface_wireless($wlif)) { - $cloned_interface = get_real_interface($interface); + if($cloned_interface && is_interface_wireless($cloned_interface)) { $chan_list = "/sbin/ifconfig {$cloned_interface} list chan"; $stack_list = "/usr/bin/awk -F\"Channel \" '{ gsub(/\\*/, \" \"); print \$2 \"\\\n\" \$3 }'"; $format_list = "/usr/bin/awk '{print \$5 \" \" \$6 \",\" \$1}'"; @@ -3567,10 +3566,9 @@ function get_wireless_modes($interface) { function get_wireless_channel_info($interface) { $wireless_channels = array(); - $wlif = get_real_interface($interface); + $cloned_interface = get_real_interface($interface); - if($wlif != NULL && is_interface_wireless($wlif)) { - $cloned_interface = get_real_interface($interface); + if($cloned_interface && is_interface_wireless($cloned_interface)) { $chan_list = "/sbin/ifconfig {$cloned_interface} list txpower"; $stack_list = "/usr/bin/awk -F\"Channel \" '{ gsub(/\\*/, \" \"); print \$2 \"\\\n\" \$3 }'"; $format_list = "/usr/bin/awk '{print \$1 \",\" \$3 \" \" \$4 \",\" \$5 \",\" \$7}'"; |