bridge: use dev->addr_assign_type to see if user change mac
authorJiri Pirko <jiri@resnulli.us>
Sun, 10 Feb 2013 11:41:01 +0000 (11:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Feb 2013 19:16:26 +0000 (14:16 -0500)
And remove no longer used br->flags.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_device.c
net/bridge/br_private.h
net/bridge/br_stp_if.c

index e1bc090bc00acb160ead451894cf045b59ba386e..ba6fb2d6094072a608ad8d2168be7a75f6dddcf8 100644 (file)
@@ -176,7 +176,6 @@ static int br_set_mac_address(struct net_device *dev, void *p)
                br_fdb_change_mac_address(br, addr->sa_data);
                br_stp_change_bridge_id(br, addr->sa_data);
        }
-       br->flags |= BR_SET_MAC_ADDR;
        spin_unlock_bh(&br->lock);
 
        return 0;
index 711094aed41a29f967cf925c1863f569dff023d0..06e85d9c05aaa8da827c75009a77c80a6a2a8ec2 100644 (file)
@@ -197,9 +197,6 @@ struct net_bridge
        bool                            nf_call_ip6tables;
        bool                            nf_call_arptables;
 #endif
-       unsigned long                   flags;
-#define BR_SET_MAC_ADDR                0x00000001
-
        u16                             group_fwd_mask;
 
        /* STP */
index 7b5197c7de1324a59a8563a1632652ec25403159..0bdb4ebd362b7818229bb50f13d25f7e1181dcad 100644 (file)
@@ -216,7 +216,7 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br)
        struct net_bridge_port *p;
 
        /* user has chosen a value so keep it */
-       if (br->flags & BR_SET_MAC_ADDR)
+       if (br->dev->addr_assign_type == NET_ADDR_SET)
                return false;
 
        list_for_each_entry(p, &br->port_list, list) {