summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-12-21 19:00:58 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 13:11:03 -0800
commitedb5e46fc03d0a45f2b41e3717631f7af7e9fc19 (patch)
treeede6a4e9dcdf52ff48ea2a11ac0188822b097715 /net/bridge/br_if.c
parent0e5eabac4995e128f06b90df64b93604625de6de (diff)
downloadlinux-edb5e46fc03d0a45f2b41e3717631f7af7e9fc19.tar.bz2
[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.c6
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)
br->bridge_id.prio[1] = 0x00;
memset(br->bridge_id.addr, 0, ETH_ALEN);
+ br->feature_mask = dev->features;
br->stp_enabled = 0;
br->designated_root = br->bridge_id;
br->root_path_cost = 0;
@@ -349,9 +350,8 @@ void br_features_recompute(struct net_bridge *br)
struct net_bridge_port *p;
unsigned long features, checksum;
- features = NETIF_F_SG | NETIF_F_FRAGLIST
- | NETIF_F_HIGHDMA | NETIF_F_TSO;
- checksum = NETIF_F_IP_CSUM; /* least commmon subset */
+ features = br->feature_mask &~ NETIF_F_IP_CSUM;
+ checksum = br->feature_mask & NETIF_F_IP_CSUM;
list_for_each_entry(p, &br->port_list, list) {
if (!(p->dev->features