diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2013-08-27 12:03:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-29 15:17:09 -0400 |
commit | fd094808a06e290432fc13c09aae808aea34d2ca (patch) | |
tree | 090bce6a1c8c17c703c8cd7633e818c648f5033e | |
parent | 76bfd8984430be5b19727d09f6ab5e1d7a247f8c (diff) | |
download | linux-fd094808a06e290432fc13c09aae808aea34d2ca.tar.gz linux-fd094808a06e290432fc13c09aae808aea34d2ca.tar.bz2 linux-fd094808a06e290432fc13c09aae808aea34d2ca.zip |
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>
-rw-r--r-- | net/bridge/br_if.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index aa6c9a8ba32a..c41d5fbb91d0 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -383,6 +383,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); |