diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-09 22:42:34 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-09 22:42:34 +0200 |
commit | 43d8e8e91a67ba6ecb87621c51614d6325fde7ae (patch) | |
tree | 1a526f7908d1c485737420d8f352b8db7c7e7021 /system-linux.c | |
parent | 6103b065ee1fa7c9e3766b981cd090928683a2a6 (diff) |
fix clearing device state, trigger it on device_init()
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/system-linux.c b/system-linux.c index b823099..9f1aa9e 100644 --- a/system-linux.c +++ b/system-linux.c @@ -202,7 +202,7 @@ static int system_if_flags(const char *ifname, unsigned add, unsigned rem) /* * Clear bridge (membership) state and bring down device */ -static void system_if_clear_state(struct device *dev) +void system_if_clear_state(struct device *dev) { char buf[256]; char *bridge; @@ -236,7 +236,6 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg) { unsigned long args[4] = {}; - system_if_clear_state(bridge); if (ioctl(sock_ioctl, SIOCBRADDBR, bridge->ifname) < 0) return -1; @@ -291,7 +290,6 @@ static int system_vlan(struct device *dev, int id) int system_vlan_add(struct device *dev, int id) { - system_if_clear_state(dev); return system_vlan(dev, id); } @@ -313,7 +311,6 @@ int system_if_down(struct device *dev) int system_if_check(struct device *dev) { - system_if_clear_state(dev); device_set_present(dev, (system_if_resolve(dev) >= 0)); return 0; } |