diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-12-21 22:00:58 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-03 16:11:03 -0500 |
commit | edb5e46fc03d0a45f2b41e3717631f7af7e9fc19 (patch) | |
tree | ede6a4e9dcdf52ff48ea2a11ac0188822b097715 /net/bridge/br_if.c | |
parent | 0e5eabac4995e128f06b90df64b93604625de6de (diff) |
[BRIDGE]: limited ethtool support
Add limited ethtool support to bridge to allow disabling
features.
Note: if underlying device does not support a feature (like checksum
offload), then the bridge device won't inherit it.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r-- | net/bridge/br_if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index e6b8bb51d613..11321197338e 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -182,6 +182,7 @@ static struct net_device *new_bridge_dev(const char *name) | |||
182 | br->bridge_id.prio[1] = 0x00; | 182 | br->bridge_id.prio[1] = 0x00; |
183 | memset(br->bridge_id.addr, 0, ETH_ALEN); | 183 | memset(br->bridge_id.addr, 0, ETH_ALEN); |
184 | 184 | ||
185 | br->feature_mask = dev->features; | ||
185 | br->stp_enabled = 0; | 186 | br->stp_enabled = 0; |
186 | br->designated_root = br->bridge_id; | 187 | br->designated_root = br->bridge_id; |
187 | br->root_path_cost = 0; | 188 | br->root_path_cost = 0; |
@@ -349,9 +350,8 @@ void br_features_recompute(struct net_bridge *br) | |||
349 | struct net_bridge_port *p; | 350 | struct net_bridge_port *p; |
350 | unsigned long features, checksum; | 351 | unsigned long features, checksum; |
351 | 352 | ||
352 | features = NETIF_F_SG | NETIF_F_FRAGLIST | 353 | features = br->feature_mask &~ NETIF_F_IP_CSUM; |
353 | | NETIF_F_HIGHDMA | NETIF_F_TSO; | 354 | checksum = br->feature_mask & NETIF_F_IP_CSUM; |
354 | checksum = NETIF_F_IP_CSUM; /* least commmon subset */ | ||
355 | 355 | ||
356 | list_for_each_entry(p, &br->port_list, list) { | 356 | list_for_each_entry(p, &br->port_list, list) { |
357 | if (!(p->dev->features | 357 | if (!(p->dev->features |