Skip to content

Commit

Permalink
bridge: inherit slave devices needed_headroom
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Aug 29, 2013
1 parent 76bfd89 commit fd09480
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fd09480

Please sign in to comment.