diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-30 21:54:52 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-30 21:54:52 +0000 |
commit | 9b6be82e59046b169f319c447c64f93361ed2a0f (patch) | |
tree | 186928cd0829d736eb9bdd093f917ee5ae63ba7b | |
parent | 878f2719536378c3b55cd5359dc05a2584a8ccf5 (diff) | |
download | pfsense-9b6be82e59046b169f319c447c64f93361ed2a0f.zip pfsense-9b6be82e59046b169f319c447c64f93361ed2a0f.tar.gz |
Use wireless_regex global to deterimine if an interface supports hostap
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 0c13314..3b94989 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -390,21 +390,21 @@ function interfaces_wireless_configure($if, $wlcfg) { $ifcargs .= "wepmode off "; } - if (strstr($if, "ath")) { + if (preg_match($g['wireless_regex'], $if)) { if ($wlcfg['standard']) $ifcargs .= "mode {$wlcfg['standard']} "; } switch ($wlcfg['mode']) { case 'hostap': - if (strstr($if, "ath")) + if (preg_match($g['wireless_regex'], $if)) $ifcargs .= "-mediaopt adhoc mediaopt hostap "; else if (strstr($if, "wi")) $ifcargs .= "-mediaopt ibss mediaopt hostap "; break; case 'ibss': case 'IBSS': - if (strstr($if, "ath")) + if (preg_match($g['wireless_regex'], $if)) $ifcargs .= "-mediaopt hostap mediaopt adhoc "; else if (strstr($if, "wi")) $ifcargs .= "-mediaopt hostap mediaopt ibss "; @@ -413,7 +413,7 @@ function interfaces_wireless_configure($if, $wlcfg) { break; case 'bss': case 'BSS': - if (strstr($if, "ath")) + if (preg_match($g['wireless_regex'], $if)) $ifcargs .= "-mediaopt hostap -mediaopt adhoc "; else if (strstr($if, "wi")) $ifcargs .= "-mediaopt hostap -mediaopt ibss "; |