From 7f7695fe9fb98b5aedbb20ec6deedd028fcd95e7 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 5 Jun 2005 00:51:06 +0000 Subject: Correctly enable hostap on wi type cards --- etc/inc/interfaces.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'etc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 5947c64..d6d7cfc 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -323,6 +323,7 @@ function interfaces_wireless_configure($if, $wlcfg) { " ssid " . escapeshellarg($wlcfg['ssid']) . " channel " . escapeshellarg($wlcfg['channel']) . " "; + /* XXX: apparent not everything likes this little blurb */ //if ($wlcfg['stationname']) // $ifcargs .= "stationname " . escapeshellarg($wlcfg['stationname']) . " "; @@ -343,15 +344,12 @@ function interfaces_wireless_configure($if, $wlcfg) { switch ($wlcfg['mode']) { case 'hostap': - if (strstr($if, "wi")) - $ifcargs .= "mediaopt ibss mediaopt hostap "; - else if (strstr($if, "ath")) - $ifcargs .= "mediaopt hostap "; + $ifcargs .= "mediaopt hostap "; break; case 'ibss': case 'IBSS': if (strstr($if, "wi")) - $ifcargs .= "mediaopt hostap mediaopt ibss "; + $ifcargs .= "mediaopt ibss "; else if (strstr($if, "an")) $ifcargs .= "mediaopt adhoc "; else if (strstr($if, "ath")) @@ -360,7 +358,7 @@ function interfaces_wireless_configure($if, $wlcfg) { case 'bss': case 'BSS': if (strstr($if, "wi")) - $ifcargs .= "mediaopt hostap mediaopt ibss "; + $ifcargs .= "mediaopt ibss "; else if (strstr($if, "an")) $ifcargs .= "mediaopt adhoc "; else if (strstr($if, "ath")) @@ -370,6 +368,10 @@ function interfaces_wireless_configure($if, $wlcfg) { $ifcargs .= "up"; + unmute_kernel_msgs(); + + echo "ifconfig {$ifcargs}"; + mwexec("/sbin/ifconfig " . $ifcargs); return 0; -- cgit v1.1