diff options
Diffstat (limited to 'etc/inc/interfaces.inc')
-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 "; |