bridge: inherit slave devices needed_headroom

Some slave devices may have set a dev->needed_headroom value which is
different than the default one, most likely in order to prepend a
hardware descriptor in front of the Ethernet frame to send. Whenever a
new slave is added to a bridge, ensure that we update the
needed_headroom value accordingly to account for the slave
needed_headroom value.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: fd094808a06e290432fc13c09aae808aea34d2ca
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I98ecb7c53b640331c364cd5886913d26af1b7781
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
This commit is contained in:
Florian Fainelli 2013-08-27 12:03:53 +01:00 committed by Gidon Studinski
parent 76ccdc748c
commit 342b48e3e7
1 changed files with 3 additions and 0 deletions

View File

@ -382,6 +382,9 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
netdev_update_features(br->dev);
if (br->dev->needed_headroom < dev->needed_headroom)
br->dev->needed_headroom = dev->needed_headroom;
spin_lock_bh(&br->lock);
changed_addr = br_stp_recalculate_bridge_id(br);