diff options
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r-- | net/bridge/br_device.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index feb77ea7b58e..71773b014e0c 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -170,8 +170,11 @@ static int br_set_mac_address(struct net_device *dev, void *p) | |||
170 | return -EINVAL; | 170 | return -EINVAL; |
171 | 171 | ||
172 | spin_lock_bh(&br->lock); | 172 | spin_lock_bh(&br->lock); |
173 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); | 173 | if (compare_ether_addr(dev->dev_addr, addr->sa_data)) { |
174 | br_stp_change_bridge_id(br, addr->sa_data); | 174 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); |
175 | br_fdb_change_mac_address(br, addr->sa_data); | ||
176 | br_stp_change_bridge_id(br, addr->sa_data); | ||
177 | } | ||
175 | br->flags |= BR_SET_MAC_ADDR; | 178 | br->flags |= BR_SET_MAC_ADDR; |
176 | spin_unlock_bh(&br->lock); | 179 | spin_unlock_bh(&br->lock); |
177 | 180 | ||
@@ -186,7 +189,8 @@ static void br_getinfo(struct net_device *dev, struct ethtool_drvinfo *info) | |||
186 | strcpy(info->bus_info, "N/A"); | 189 | strcpy(info->bus_info, "N/A"); |
187 | } | 190 | } |
188 | 191 | ||
189 | static u32 br_fix_features(struct net_device *dev, u32 features) | 192 | static netdev_features_t br_fix_features(struct net_device *dev, |
193 | netdev_features_t features) | ||
190 | { | 194 | { |
191 | struct net_bridge *br = netdev_priv(dev); | 195 | struct net_bridge *br = netdev_priv(dev); |
192 | 196 | ||
@@ -341,10 +345,10 @@ void br_dev_setup(struct net_device *dev) | |||
341 | dev->priv_flags = IFF_EBRIDGE; | 345 | dev->priv_flags = IFF_EBRIDGE; |
342 | 346 | ||
343 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | | 347 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | |
344 | NETIF_F_GSO_MASK | NETIF_F_NO_CSUM | NETIF_F_LLTX | | 348 | NETIF_F_GSO_MASK | NETIF_F_HW_CSUM | NETIF_F_LLTX | |
345 | NETIF_F_NETNS_LOCAL | NETIF_F_HW_VLAN_TX; | 349 | NETIF_F_NETNS_LOCAL | NETIF_F_HW_VLAN_TX; |
346 | dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | | 350 | dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | |
347 | NETIF_F_GSO_MASK | NETIF_F_NO_CSUM | | 351 | NETIF_F_GSO_MASK | NETIF_F_HW_CSUM | |
348 | NETIF_F_HW_VLAN_TX; | 352 | NETIF_F_HW_VLAN_TX; |
349 | 353 | ||
350 | br->dev = dev; | 354 | br->dev = dev; |