summaryrefslogtreecommitdiff
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-14 16:31:19 (GMT)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-14 16:31:19 (GMT)
commitab3c556de19b1888b0830ef066524884d4788131 (patch)
tree7652961084c69e00267eda767edeeac5e20aed51 /net/bridge/br_if.c
parentc4e7ac5d427a48b91752671523f39a04e63e12ff (diff)
parentcae7ca3d3de48851e929de9469397749638df779 (diff)
downloadlinux-fsl-qoriq-ab3c556de19b1888b0830ef066524884d4788131.tar.xz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPVS]: Use IP_VS_WAIT_WHILE when encessary. [NET]: Share correct feature code between bridging and bonding [ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc [IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc [WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc [DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm() [DCCP]: fix theoretical ccids_{read,write}_lock() race [XFRM]: Clean up duplicate includes in net/xfrm/ [TIPC]: Clean up duplicate includes in net/tipc/ [SUNRPC]: Clean up duplicate includes in net/sunrpc/ [PKT_SCHED]: Clean up duplicate includes in net/sched/ [IPV6]: Clean up duplicate includes in net/ipv6/ [IPV4]: Clean up duplicate includes in net/ipv4/ [ATM]: Clean up duplicate includes in net/atm/ [ATM]: Clean up duplicate includes in drivers/atm/ [IPCONFIG]: ip_auto_config fix [ATM]: fore200e_param_bs_queue() must be __devinit
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index b40dada..749f0e8 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -349,43 +349,15 @@ int br_min_mtu(const struct net_bridge *br)
void br_features_recompute(struct net_bridge *br)
{
struct net_bridge_port *p;
- unsigned long features, checksum;
+ unsigned long features;
- checksum = br->feature_mask & NETIF_F_ALL_CSUM ? NETIF_F_NO_CSUM : 0;
- features = br->feature_mask & ~NETIF_F_ALL_CSUM;
+ features = br->feature_mask;
list_for_each_entry(p, &br->port_list, list) {
- unsigned long feature = p->dev->features;
-
- /* if device needs checksumming, downgrade to hw checksumming */
- if (checksum & NETIF_F_NO_CSUM && !(feature & NETIF_F_NO_CSUM))
- checksum ^= NETIF_F_NO_CSUM | NETIF_F_HW_CSUM;
-
- /* if device can't do all checksum, downgrade to ipv4/ipv6 */
- if (checksum & NETIF_F_HW_CSUM && !(feature & NETIF_F_HW_CSUM))
- checksum ^= NETIF_F_HW_CSUM
- | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
-
- if (checksum & NETIF_F_IPV6_CSUM && !(feature & NETIF_F_IPV6_CSUM))
- checksum &= ~NETIF_F_IPV6_CSUM;
-
- if (!(feature & NETIF_F_IP_CSUM))
- checksum = 0;
-
- if (feature & NETIF_F_GSO)
- feature |= NETIF_F_GSO_SOFTWARE;
- feature |= NETIF_F_GSO;
-
- features &= feature;
+ features = netdev_compute_features(features, p->dev->features);
}
- if (!(checksum & NETIF_F_ALL_CSUM))
- features &= ~NETIF_F_SG;
- if (!(features & NETIF_F_SG))
- features &= ~NETIF_F_GSO_MASK;
-
- br->dev->features = features | checksum | NETIF_F_LLTX |
- NETIF_F_GSO_ROBUST;
+ br->dev->features = features;
}
/* called with RTNL */