hostapd: add a workaround for driver issues in various android devices with texas...
[openwrt.git] / package / swconfig / files / switch.sh
index 7078b2e..18d5fbd 100644 (file)
@@ -2,8 +2,10 @@
 # Copyright (C) 2009 OpenWrt.org
 
 setup_switch_dev() {
-       ifconfig "$1" 0.0.0.0
-       swconfig dev "$1" load network
+       config_get name "$1" name
+       name="${name:-$1}"
+       [ -d "/sys/class/net/$name" ] && ifconfig "$name" up
+       swconfig dev "$name" load network
 }
 
 setup_switch() {
This page took 0.023163 seconds and 4 git commands to generate.