interface: do not set l3_dev along with main_dev anymore
authorFelix Fietkau <nbd@openwrt.org>
Fri, 2 May 2014 17:03:48 +0000 (19:03 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 2 May 2014 17:03:51 +0000 (19:03 +0200)
Made unnecessary by recent fixes to l3_dev handling

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface.c

index 684fd22d03bb422b7565ec1553c32e1884fccf5d..f474246e155df405162ab60e67e77c66ec0c2839 100644 (file)
@@ -775,15 +775,11 @@ interface_set_l3_dev(struct interface *iface, struct device *dev)
 void
 interface_set_main_dev(struct interface *iface, struct device *dev)
 {
-       bool set_l3 = (!dev || iface->main_dev.dev == iface->l3_dev.dev);
        bool claimed = iface->l3_dev.claimed;
 
        if (iface->main_dev.dev == dev)
                return;
 
-       if (set_l3)
-               interface_set_l3_dev(iface, dev);
-
        device_add_user(&iface->main_dev, dev);
        if (!dev) {
                interface_set_link_state(iface, false);