diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-06-03 21:40:48 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-06-03 21:40:48 +0000 |
commit | c0489a1be3d00e81a0c9bd11b38531d54f4ff234 (patch) | |
tree | d0458adb79250175b45588421537b778b054324f /etc | |
parent | 8bb295317ffa5049c65bca32807ac7da134fbfeb (diff) | |
download | pfsense-c0489a1be3d00e81a0c9bd11b38531d54f4ff234.zip pfsense-c0489a1be3d00e81a0c9bd11b38531d54f4ff234.tar.gz |
Correctly bring up hostap mode
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 70e45c7..c8216d5 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -323,8 +323,8 @@ function interfaces_wireless_configure($if, $wlcfg) { " ssid " . escapeshellarg($wlcfg['ssid']) . " channel " . escapeshellarg($wlcfg['channel']) . " "; - if ($wlcfg['stationname']) - $ifcargs .= "stationname " . escapeshellarg($wlcfg['stationname']) . " "; + //if ($wlcfg['stationname']) + // $ifcargs .= "stationname " . escapeshellarg($wlcfg['stationname']) . " "; if (isset($wlcfg['wep']['enable']) && is_array($wlcfg['wep']['key'])) { $ifcargs .= "wepmode on "; @@ -344,27 +344,35 @@ function interfaces_wireless_configure($if, $wlcfg) { switch ($wlcfg['mode']) { case 'hostap': if (strstr($if, "wi")) - $ifcargs .= "-mediaopt ibss mediaopt hostap "; + $ifcargs .= "mediaopt ibss mediaopt hostap "; + else if (strstr($if, "ath")) + $ifcargs .= "mediaopt hostap "; break; case 'ibss': case 'IBSS': if (strstr($if, "wi")) - $ifcargs .= "-mediaopt hostap mediaopt ibss "; + $ifcargs .= "mediaopt hostap mediaopt ibss "; else if (strstr($if, "an")) $ifcargs .= "mediaopt adhoc "; + else if (strstr($if, "ath")) + $ifcargs .= "mediaopt hostap "; break; case 'bss': case 'BSS': if (strstr($if, "wi")) - $ifcargs .= "-mediaopt hostap -mediaopt ibss "; + $ifcargs .= "mediaopt hostap mediaopt ibss "; else if (strstr($if, "an")) - $ifcargs .= "-mediaopt adhoc "; + $ifcargs .= "mediaopt adhoc "; + else if (strstr($if, "ath")) + $ifcargs .= "mediaopt hostap "; break; } $ifcargs .= "up"; + unmute_kernel_msgs(); mwexec("/sbin/ifconfig " . $ifcargs); + echo "Executing ifconifg {$ifcargs}\n"; return 0; } |