Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits) sctp: user perfect name for Delayed SACK Timer option net: fix can_checksum_protocol() arguments swap Revert "netlink: test for all flags of the NLM_F_DUMP composite" gianfar: Fix misleading indentation in startup_gfar() net/irda/sh_irda: return to RX mode when TX error net offloading: Do not mask out NETIF_F_HW_VLAN_TX for vlan. USB CDC NCM: tx_fixup() race condition fix ns83820: Avoid bad pointer deref in ns83820_init_one(). ipv6: Silence privacy extensions initialization bnx2x: Update bnx2x version to 1.62.00-4 bnx2x: Fix AER setting for BCM57712 bnx2x: Fix BCM84823 LED behavior bnx2x: Mark full duplex on some external PHYs bnx2x: Fix BCM8073/BCM8727 microcode loading bnx2x: LED fix for BCM8727 over BCM57712 bnx2x: Common init will be executed only once after POR bnx2x: Swap BCM8073 PHY polarity if required iwlwifi: fix valid chain reading from EEPROM ath5k: fix locking in tx_complete_poll_work ath9k_hw: do PA offset calibration only on longcal interval ...
This commit is contained in:
@@ -2001,7 +2001,7 @@ static bool can_checksum_protocol(unsigned long features, __be16 protocol)
|
||||
|
||||
static int harmonize_features(struct sk_buff *skb, __be16 protocol, int features)
|
||||
{
|
||||
if (!can_checksum_protocol(protocol, features)) {
|
||||
if (!can_checksum_protocol(features, protocol)) {
|
||||
features &= ~NETIF_F_ALL_CSUM;
|
||||
features &= ~NETIF_F_SG;
|
||||
} else if (illegal_highdma(skb->dev, skb)) {
|
||||
@@ -2023,13 +2023,13 @@ int netif_skb_features(struct sk_buff *skb)
|
||||
return harmonize_features(skb, protocol, features);
|
||||
}
|
||||
|
||||
features &= skb->dev->vlan_features;
|
||||
features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_TX);
|
||||
|
||||
if (protocol != htons(ETH_P_8021Q)) {
|
||||
return harmonize_features(skb, protocol, features);
|
||||
} else {
|
||||
features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST |
|
||||
NETIF_F_GEN_CSUM;
|
||||
NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_TX;
|
||||
return harmonize_features(skb, protocol, features);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user