diff options
| -rw-r--r-- | drivers/net/8139too.c | 1 | ||||
| -rw-r--r-- | drivers/net/arm/ixp4xx_eth.c | 4 | ||||
| -rw-r--r-- | drivers/net/atlx/atl2.c | 2 | ||||
| -rw-r--r-- | drivers/net/cs89x0.c | 7 | ||||
| -rw-r--r-- | drivers/net/ehea/ehea_main.c | 2 | ||||
| -rw-r--r-- | drivers/net/fec.c | 1 | ||||
| -rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
| -rw-r--r-- | drivers/net/igb/igb_main.c | 77 | ||||
| -rw-r--r-- | drivers/net/isa-skeleton.c | 5 | ||||
| -rw-r--r-- | drivers/net/phy/phy_device.c | 4 | ||||
| -rw-r--r-- | drivers/net/plip.c | 3 | ||||
| -rw-r--r-- | drivers/net/ps3_gelic_net.c | 1 | ||||
| -rw-r--r-- | drivers/net/ps3_gelic_wireless.c | 1 | ||||
| -rw-r--r-- | drivers/net/smc91x.c | 1 | ||||
| -rw-r--r-- | drivers/net/smsc911x.c | 1 | ||||
| -rw-r--r-- | drivers/net/sunvnet.c | 2 | ||||
| -rw-r--r-- | drivers/net/usb/kaweth.c | 3 | ||||
| -rw-r--r-- | drivers/net/usb/pegasus.c | 3 | ||||
| -rw-r--r-- | drivers/net/via-rhine.c | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/main.c | 3 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 4 | ||||
| -rw-r--r-- | net/core/sock.c | 19 | ||||
| -rw-r--r-- | net/ipv4/ip_gre.c | 4 | ||||
| -rw-r--r-- | net/ipv4/ip_output.c | 1 | ||||
| -rw-r--r-- | net/ipv6/ip6_output.c | 1 | ||||
| -rw-r--r-- | net/ipv6/sit.c | 1 |
26 files changed, 97 insertions, 57 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 8ae72ec14456..0e2ba21d4441 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
| @@ -908,6 +908,7 @@ static const struct net_device_ops rtl8139_netdev_ops = { | |||
| 908 | .ndo_open = rtl8139_open, | 908 | .ndo_open = rtl8139_open, |
| 909 | .ndo_stop = rtl8139_close, | 909 | .ndo_stop = rtl8139_close, |
| 910 | .ndo_get_stats = rtl8139_get_stats, | 910 | .ndo_get_stats = rtl8139_get_stats, |
| 911 | .ndo_change_mtu = eth_change_mtu, | ||
| 911 | .ndo_validate_addr = eth_validate_addr, | 912 | .ndo_validate_addr = eth_validate_addr, |
| 912 | .ndo_set_mac_address = rtl8139_set_mac_address, | 913 | .ndo_set_mac_address = rtl8139_set_mac_address, |
| 913 | .ndo_start_xmit = rtl8139_start_xmit, | 914 | .ndo_start_xmit = rtl8139_start_xmit, |
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 6f42ad728915..3fe09876e76d 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
| @@ -1142,7 +1142,9 @@ static const struct net_device_ops ixp4xx_netdev_ops = { | |||
| 1142 | .ndo_start_xmit = eth_xmit, | 1142 | .ndo_start_xmit = eth_xmit, |
| 1143 | .ndo_set_multicast_list = eth_set_mcast_list, | 1143 | .ndo_set_multicast_list = eth_set_mcast_list, |
| 1144 | .ndo_do_ioctl = eth_ioctl, | 1144 | .ndo_do_ioctl = eth_ioctl, |
| 1145 | 1145 | .ndo_change_mtu = eth_change_mtu, | |
| 1146 | .ndo_set_mac_address = eth_mac_addr, | ||
| 1147 | .ndo_validate_addr = eth_validate_addr, | ||
| 1146 | }; | 1148 | }; |
| 1147 | 1149 | ||
| 1148 | static int __devinit eth_init_one(struct platform_device *pdev) | 1150 | static int __devinit eth_init_one(struct platform_device *pdev) |
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index c734b1983ec1..204db961029e 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
| @@ -2071,7 +2071,7 @@ static int atl2_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
| 2071 | if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE)) | 2071 | if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE)) |
| 2072 | return -EOPNOTSUPP; | 2072 | return -EOPNOTSUPP; |
| 2073 | 2073 | ||
| 2074 | if (wol->wolopts & (WAKE_MCAST|WAKE_BCAST|WAKE_MCAST)) | 2074 | if (wol->wolopts & (WAKE_UCAST | WAKE_BCAST | WAKE_MCAST)) |
| 2075 | return -EOPNOTSUPP; | 2075 | return -EOPNOTSUPP; |
| 2076 | 2076 | ||
| 2077 | /* these settings will always override what we currently have */ | 2077 | /* these settings will always override what we currently have */ |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 3eee666a9cd2..55445f980f9c 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
| @@ -1524,6 +1524,7 @@ static void net_timeout(struct net_device *dev) | |||
| 1524 | static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | 1524 | static int net_send_packet(struct sk_buff *skb, struct net_device *dev) |
| 1525 | { | 1525 | { |
| 1526 | struct net_local *lp = netdev_priv(dev); | 1526 | struct net_local *lp = netdev_priv(dev); |
| 1527 | unsigned long flags; | ||
| 1527 | 1528 | ||
| 1528 | if (net_debug > 3) { | 1529 | if (net_debug > 3) { |
| 1529 | printk("%s: sent %d byte packet of type %x\n", | 1530 | printk("%s: sent %d byte packet of type %x\n", |
| @@ -1535,7 +1536,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
| 1535 | ask the chip to start transmitting before the | 1536 | ask the chip to start transmitting before the |
| 1536 | whole packet has been completely uploaded. */ | 1537 | whole packet has been completely uploaded. */ |
| 1537 | 1538 | ||
| 1538 | spin_lock_irq(&lp->lock); | 1539 | spin_lock_irqsave(&lp->lock, flags); |
| 1539 | netif_stop_queue(dev); | 1540 | netif_stop_queue(dev); |
| 1540 | 1541 | ||
| 1541 | /* initiate a transmit sequence */ | 1542 | /* initiate a transmit sequence */ |
| @@ -1549,13 +1550,13 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
| 1549 | * we're waiting for TxOk, so return 1 and requeue this packet. | 1550 | * we're waiting for TxOk, so return 1 and requeue this packet. |
| 1550 | */ | 1551 | */ |
| 1551 | 1552 | ||
| 1552 | spin_unlock_irq(&lp->lock); | 1553 | spin_unlock_irqrestore(&lp->lock, flags); |
| 1553 | if (net_debug) printk("cs89x0: Tx buffer not free!\n"); | 1554 | if (net_debug) printk("cs89x0: Tx buffer not free!\n"); |
| 1554 | return NETDEV_TX_BUSY; | 1555 | return NETDEV_TX_BUSY; |
| 1555 | } | 1556 | } |
| 1556 | /* Write the contents of the packet */ | 1557 | /* Write the contents of the packet */ |
| 1557 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); | 1558 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); |
| 1558 | spin_unlock_irq(&lp->lock); | 1559 | spin_unlock_irqrestore(&lp->lock, flags); |
| 1559 | lp->stats.tx_bytes += skb->len; | 1560 | lp->stats.tx_bytes += skb->len; |
| 1560 | dev->trans_start = jiffies; | 1561 | dev->trans_start = jiffies; |
| 1561 | dev_kfree_skb (skb); | 1562 | dev_kfree_skb (skb); |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 147c4b088fb3..e8d46cc1bec2 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
| @@ -3080,7 +3080,9 @@ static const struct net_device_ops ehea_netdev_ops = { | |||
| 3080 | .ndo_poll_controller = ehea_netpoll, | 3080 | .ndo_poll_controller = ehea_netpoll, |
| 3081 | #endif | 3081 | #endif |
| 3082 | .ndo_get_stats = ehea_get_stats, | 3082 | .ndo_get_stats = ehea_get_stats, |
| 3083 | .ndo_change_mtu = eth_change_mtu, | ||
| 3083 | .ndo_set_mac_address = ehea_set_mac_addr, | 3084 | .ndo_set_mac_address = ehea_set_mac_addr, |
| 3085 | .ndo_validate_addr = eth_validate_addr, | ||
| 3084 | .ndo_set_multicast_list = ehea_set_multicast_list, | 3086 | .ndo_set_multicast_list = ehea_set_multicast_list, |
| 3085 | .ndo_change_mtu = ehea_change_mtu, | 3087 | .ndo_change_mtu = ehea_change_mtu, |
| 3086 | .ndo_vlan_rx_register = ehea_vlan_rx_register, | 3088 | .ndo_vlan_rx_register = ehea_vlan_rx_register, |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 0f19b743749b..d4b98074b1b7 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
| @@ -1642,6 +1642,7 @@ static const struct net_device_ops fec_netdev_ops = { | |||
| 1642 | .ndo_stop = fec_enet_close, | 1642 | .ndo_stop = fec_enet_close, |
| 1643 | .ndo_start_xmit = fec_enet_start_xmit, | 1643 | .ndo_start_xmit = fec_enet_start_xmit, |
| 1644 | .ndo_set_multicast_list = set_multicast_list, | 1644 | .ndo_set_multicast_list = set_multicast_list, |
| 1645 | .ndo_change_mtu = eth_change_mtu, | ||
| 1645 | .ndo_validate_addr = eth_validate_addr, | 1646 | .ndo_validate_addr = eth_validate_addr, |
| 1646 | .ndo_tx_timeout = fec_timeout, | 1647 | .ndo_tx_timeout = fec_timeout, |
| 1647 | .ndo_set_mac_address = fec_set_mac_address, | 1648 | .ndo_set_mac_address = fec_set_mac_address, |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 4ae1d259fced..43d813ed9f45 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
| @@ -156,6 +156,8 @@ static const struct net_device_ops gfar_netdev_ops = { | |||
| 156 | .ndo_tx_timeout = gfar_timeout, | 156 | .ndo_tx_timeout = gfar_timeout, |
| 157 | .ndo_do_ioctl = gfar_ioctl, | 157 | .ndo_do_ioctl = gfar_ioctl, |
| 158 | .ndo_vlan_rx_register = gfar_vlan_rx_register, | 158 | .ndo_vlan_rx_register = gfar_vlan_rx_register, |
| 159 | .ndo_set_mac_address = eth_mac_addr, | ||
| 160 | .ndo_validate_addr = eth_validate_addr, | ||
| 159 | #ifdef CONFIG_NET_POLL_CONTROLLER | 161 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 160 | .ndo_poll_controller = gfar_netpoll, | 162 | .ndo_poll_controller = gfar_netpoll, |
| 161 | #endif | 163 | #endif |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index be480292aba1..adb09d32625d 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
| @@ -127,14 +127,48 @@ static void igb_restore_vlan(struct igb_adapter *); | |||
| 127 | static void igb_ping_all_vfs(struct igb_adapter *); | 127 | static void igb_ping_all_vfs(struct igb_adapter *); |
| 128 | static void igb_msg_task(struct igb_adapter *); | 128 | static void igb_msg_task(struct igb_adapter *); |
| 129 | static int igb_rcv_msg_from_vf(struct igb_adapter *, u32); | 129 | static int igb_rcv_msg_from_vf(struct igb_adapter *, u32); |
| 130 | static inline void igb_set_rah_pool(struct e1000_hw *, int , int); | ||
| 131 | static void igb_set_mc_list_pools(struct igb_adapter *, int, u16); | 130 | static void igb_set_mc_list_pools(struct igb_adapter *, int, u16); |
| 132 | static void igb_vmm_control(struct igb_adapter *); | 131 | static void igb_vmm_control(struct igb_adapter *); |
| 133 | static inline void igb_set_vmolr(struct e1000_hw *, int); | ||
| 134 | static inline int igb_set_vf_rlpml(struct igb_adapter *, int, int); | ||
| 135 | static int igb_set_vf_mac(struct igb_adapter *adapter, int, unsigned char *); | 132 | static int igb_set_vf_mac(struct igb_adapter *adapter, int, unsigned char *); |
| 136 | static void igb_restore_vf_multicasts(struct igb_adapter *adapter); | 133 | static void igb_restore_vf_multicasts(struct igb_adapter *adapter); |
| 137 | 134 | ||
| 135 | static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn) | ||
| 136 | { | ||
| 137 | u32 reg_data; | ||
| 138 | |||
| 139 | reg_data = rd32(E1000_VMOLR(vfn)); | ||
| 140 | reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */ | ||
| 141 | E1000_VMOLR_ROPE | /* Accept packets matched in UTA */ | ||
| 142 | E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */ | ||
| 143 | E1000_VMOLR_AUPE | /* Accept untagged packets */ | ||
| 144 | E1000_VMOLR_STRVLAN; /* Strip vlan tags */ | ||
| 145 | wr32(E1000_VMOLR(vfn), reg_data); | ||
| 146 | } | ||
| 147 | |||
| 148 | static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size, | ||
| 149 | int vfn) | ||
| 150 | { | ||
| 151 | struct e1000_hw *hw = &adapter->hw; | ||
| 152 | u32 vmolr; | ||
| 153 | |||
| 154 | vmolr = rd32(E1000_VMOLR(vfn)); | ||
| 155 | vmolr &= ~E1000_VMOLR_RLPML_MASK; | ||
| 156 | vmolr |= size | E1000_VMOLR_LPE; | ||
| 157 | wr32(E1000_VMOLR(vfn), vmolr); | ||
| 158 | |||
| 159 | return 0; | ||
| 160 | } | ||
| 161 | |||
| 162 | static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry) | ||
| 163 | { | ||
| 164 | u32 reg_data; | ||
| 165 | |||
| 166 | reg_data = rd32(E1000_RAH(entry)); | ||
| 167 | reg_data &= ~E1000_RAH_POOL_MASK; | ||
| 168 | reg_data |= E1000_RAH_POOL_1 << pool;; | ||
| 169 | wr32(E1000_RAH(entry), reg_data); | ||
| 170 | } | ||
| 171 | |||
| 138 | #ifdef CONFIG_PM | 172 | #ifdef CONFIG_PM |
| 139 | static int igb_suspend(struct pci_dev *, pm_message_t); | 173 | static int igb_suspend(struct pci_dev *, pm_message_t); |
| 140 | static int igb_resume(struct pci_dev *); | 174 | static int igb_resume(struct pci_dev *); |
| @@ -5418,43 +5452,6 @@ static void igb_io_resume(struct pci_dev *pdev) | |||
| 5418 | igb_get_hw_control(adapter); | 5452 | igb_get_hw_control(adapter); |
| 5419 | } | 5453 | } |
| 5420 | 5454 | ||
| 5421 | static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn) | ||
| 5422 | { | ||
| 5423 | u32 reg_data; | ||
| 5424 | |||
| 5425 | reg_data = rd32(E1000_VMOLR(vfn)); | ||
| 5426 | reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */ | ||
| 5427 | E1000_VMOLR_ROPE | /* Accept packets matched in UTA */ | ||
| 5428 | E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */ | ||
| 5429 | E1000_VMOLR_AUPE | /* Accept untagged packets */ | ||
| 5430 | E1000_VMOLR_STRVLAN; /* Strip vlan tags */ | ||
| 5431 | wr32(E1000_VMOLR(vfn), reg_data); | ||
| 5432 | } | ||
| 5433 | |||
| 5434 | static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size, | ||
| 5435 | int vfn) | ||
| 5436 | { | ||
| 5437 | struct e1000_hw *hw = &adapter->hw; | ||
| 5438 | u32 vmolr; | ||
| 5439 | |||
| 5440 | vmolr = rd32(E1000_VMOLR(vfn)); | ||
| 5441 | vmolr &= ~E1000_VMOLR_RLPML_MASK; | ||
| 5442 | vmolr |= size | E1000_VMOLR_LPE; | ||
| 5443 | wr32(E1000_VMOLR(vfn), vmolr); | ||
| 5444 | |||
| 5445 | return 0; | ||
| 5446 | } | ||
| 5447 | |||
| 5448 | static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry) | ||
| 5449 | { | ||
| 5450 | u32 reg_data; | ||
| 5451 | |||
| 5452 | reg_data = rd32(E1000_RAH(entry)); | ||
| 5453 | reg_data &= ~E1000_RAH_POOL_MASK; | ||
| 5454 | reg_data |= E1000_RAH_POOL_1 << pool;; | ||
| 5455 | wr32(E1000_RAH(entry), reg_data); | ||
| 5456 | } | ||
| 5457 | |||
| 5458 | static void igb_set_mc_list_pools(struct igb_adapter *adapter, | 5455 | static void igb_set_mc_list_pools(struct igb_adapter *adapter, |
| 5459 | int entry_count, u16 total_rar_filters) | 5456 | int entry_count, u16 total_rar_filters) |
| 5460 | { | 5457 | { |
diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c index 73585fd8f29f..d12377b84358 100644 --- a/drivers/net/isa-skeleton.c +++ b/drivers/net/isa-skeleton.c | |||
| @@ -430,7 +430,8 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
| 430 | * hardware interrupt handler. Queue flow control is | 430 | * hardware interrupt handler. Queue flow control is |
| 431 | * thus managed under this lock as well. | 431 | * thus managed under this lock as well. |
| 432 | */ | 432 | */ |
| 433 | spin_lock_irq(&np->lock); | 433 | unsigned long flags; |
| 434 | spin_lock_irqsave(&np->lock, flags); | ||
| 434 | 435 | ||
| 435 | add_to_tx_ring(np, skb, length); | 436 | add_to_tx_ring(np, skb, length); |
| 436 | dev->trans_start = jiffies; | 437 | dev->trans_start = jiffies; |
| @@ -446,7 +447,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
| 446 | * is when the transmit statistics are updated. | 447 | * is when the transmit statistics are updated. |
| 447 | */ | 448 | */ |
| 448 | 449 | ||
| 449 | spin_unlock_irq(&np->lock); | 450 | spin_unlock_irqrestore(&np->lock, flags); |
| 450 | #else | 451 | #else |
| 451 | /* This is the case for older hardware which takes | 452 | /* This is the case for older hardware which takes |
| 452 | * a single transmit buffer at a time, and it is | 453 | * a single transmit buffer at a time, and it is |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index eba937c46376..b10fedd82143 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
| @@ -134,8 +134,10 @@ int phy_scan_fixups(struct phy_device *phydev) | |||
| 134 | 134 | ||
| 135 | err = fixup->run(phydev); | 135 | err = fixup->run(phydev); |
| 136 | 136 | ||
| 137 | if (err < 0) | 137 | if (err < 0) { |
| 138 | mutex_unlock(&phy_fixup_lock); | ||
| 138 | return err; | 139 | return err; |
| 140 | } | ||
| 139 | } | 141 | } |
| 140 | } | 142 | } |
| 141 | mutex_unlock(&phy_fixup_lock); | 143 | mutex_unlock(&phy_fixup_lock); |
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 7a62f781fef2..2ca8b0d84ee2 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
| @@ -270,6 +270,9 @@ static const struct net_device_ops plip_netdev_ops = { | |||
| 270 | .ndo_stop = plip_close, | 270 | .ndo_stop = plip_close, |
| 271 | .ndo_start_xmit = plip_tx_packet, | 271 | .ndo_start_xmit = plip_tx_packet, |
| 272 | .ndo_do_ioctl = plip_ioctl, | 272 | .ndo_do_ioctl = plip_ioctl, |
| 273 | .ndo_change_mtu = eth_change_mtu, | ||
| 274 | .ndo_set_mac_address = eth_mac_addr, | ||
| 275 | .ndo_validate_addr = eth_validate_addr, | ||
| 273 | }; | 276 | }; |
| 274 | 277 | ||
| 275 | /* Entry point of PLIP driver. | 278 | /* Entry point of PLIP driver. |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index d1a5fb4d6acb..a3932c9f3406 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
| @@ -1411,6 +1411,7 @@ static const struct net_device_ops gelic_netdevice_ops = { | |||
| 1411 | .ndo_set_multicast_list = gelic_net_set_multi, | 1411 | .ndo_set_multicast_list = gelic_net_set_multi, |
| 1412 | .ndo_change_mtu = gelic_net_change_mtu, | 1412 | .ndo_change_mtu = gelic_net_change_mtu, |
| 1413 | .ndo_tx_timeout = gelic_net_tx_timeout, | 1413 | .ndo_tx_timeout = gelic_net_tx_timeout, |
| 1414 | .ndo_set_mac_address = eth_mac_addr, | ||
| 1414 | .ndo_validate_addr = eth_validate_addr, | 1415 | .ndo_validate_addr = eth_validate_addr, |
| 1415 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1416 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 1416 | .ndo_poll_controller = gelic_net_poll_controller, | 1417 | .ndo_poll_controller = gelic_net_poll_controller, |
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index b6b3ca9bdb21..6932b08d746b 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
| @@ -2707,6 +2707,7 @@ static const struct net_device_ops gelic_wl_netdevice_ops = { | |||
| 2707 | .ndo_set_multicast_list = gelic_net_set_multi, | 2707 | .ndo_set_multicast_list = gelic_net_set_multi, |
| 2708 | .ndo_change_mtu = gelic_net_change_mtu, | 2708 | .ndo_change_mtu = gelic_net_change_mtu, |
| 2709 | .ndo_tx_timeout = gelic_net_tx_timeout, | 2709 | .ndo_tx_timeout = gelic_net_tx_timeout, |
| 2710 | .ndo_set_mac_address = eth_mac_addr, | ||
| 2710 | .ndo_validate_addr = eth_validate_addr, | 2711 | .ndo_validate_addr = eth_validate_addr, |
| 2711 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2712 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 2712 | .ndo_poll_controller = gelic_net_poll_controller, | 2713 | .ndo_poll_controller = gelic_net_poll_controller, |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index fdcbaf8dfa73..1c70e999cc50 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
| @@ -1774,6 +1774,7 @@ static const struct net_device_ops smc_netdev_ops = { | |||
| 1774 | .ndo_start_xmit = smc_hard_start_xmit, | 1774 | .ndo_start_xmit = smc_hard_start_xmit, |
| 1775 | .ndo_tx_timeout = smc_timeout, | 1775 | .ndo_tx_timeout = smc_timeout, |
| 1776 | .ndo_set_multicast_list = smc_set_multicast_list, | 1776 | .ndo_set_multicast_list = smc_set_multicast_list, |
| 1777 | .ndo_change_mtu = eth_change_mtu, | ||
| 1777 | .ndo_validate_addr = eth_validate_addr, | 1778 | .ndo_validate_addr = eth_validate_addr, |
| 1778 | .ndo_set_mac_address = eth_mac_addr, | 1779 | .ndo_set_mac_address = eth_mac_addr, |
| 1779 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1780 | #ifdef CONFIG_NET_POLL_CONTROLLER |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 66067f9d91c0..94b6d2658ddc 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
| @@ -1779,6 +1779,7 @@ static const struct net_device_ops smsc911x_netdev_ops = { | |||
| 1779 | .ndo_get_stats = smsc911x_get_stats, | 1779 | .ndo_get_stats = smsc911x_get_stats, |
| 1780 | .ndo_set_multicast_list = smsc911x_set_multicast_list, | 1780 | .ndo_set_multicast_list = smsc911x_set_multicast_list, |
| 1781 | .ndo_do_ioctl = smsc911x_do_ioctl, | 1781 | .ndo_do_ioctl = smsc911x_do_ioctl, |
| 1782 | .ndo_change_mtu = eth_change_mtu, | ||
| 1782 | .ndo_validate_addr = eth_validate_addr, | 1783 | .ndo_validate_addr = eth_validate_addr, |
| 1783 | .ndo_set_mac_address = smsc911x_set_mac_address, | 1784 | .ndo_set_mac_address = smsc911x_set_mac_address, |
| 1784 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1785 | #ifdef CONFIG_NET_POLL_CONTROLLER |
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c index a82fb2aca4cb..f1e5e4542c2a 100644 --- a/drivers/net/sunvnet.c +++ b/drivers/net/sunvnet.c | |||
| @@ -1016,7 +1016,9 @@ static const struct net_device_ops vnet_ops = { | |||
| 1016 | .ndo_open = vnet_open, | 1016 | .ndo_open = vnet_open, |
| 1017 | .ndo_stop = vnet_close, | 1017 | .ndo_stop = vnet_close, |
| 1018 | .ndo_set_multicast_list = vnet_set_rx_mode, | 1018 | .ndo_set_multicast_list = vnet_set_rx_mode, |
| 1019 | .ndo_change_mtu = eth_change_mtu, | ||
| 1019 | .ndo_set_mac_address = vnet_set_mac_addr, | 1020 | .ndo_set_mac_address = vnet_set_mac_addr, |
| 1021 | .ndo_validate_addr = eth_validate_addr, | ||
| 1020 | .ndo_tx_timeout = vnet_tx_timeout, | 1022 | .ndo_tx_timeout = vnet_tx_timeout, |
| 1021 | .ndo_change_mtu = vnet_change_mtu, | 1023 | .ndo_change_mtu = vnet_change_mtu, |
| 1022 | .ndo_start_xmit = vnet_start_xmit, | 1024 | .ndo_start_xmit = vnet_start_xmit, |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index e01314789718..1f9ec29fce50 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
| @@ -999,6 +999,9 @@ static const struct net_device_ops kaweth_netdev_ops = { | |||
| 999 | .ndo_tx_timeout = kaweth_tx_timeout, | 999 | .ndo_tx_timeout = kaweth_tx_timeout, |
| 1000 | .ndo_set_multicast_list = kaweth_set_rx_mode, | 1000 | .ndo_set_multicast_list = kaweth_set_rx_mode, |
| 1001 | .ndo_get_stats = kaweth_netdev_stats, | 1001 | .ndo_get_stats = kaweth_netdev_stats, |
| 1002 | .ndo_change_mtu = eth_change_mtu, | ||
| 1003 | .ndo_set_mac_address = eth_mac_addr, | ||
| 1004 | .ndo_validate_addr = eth_validate_addr, | ||
| 1002 | }; | 1005 | }; |
| 1003 | 1006 | ||
| 1004 | static int kaweth_probe( | 1007 | static int kaweth_probe( |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 73acbd244aa1..631d269ac980 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
| @@ -1493,6 +1493,9 @@ static const struct net_device_ops pegasus_netdev_ops = { | |||
| 1493 | .ndo_set_multicast_list = pegasus_set_multicast, | 1493 | .ndo_set_multicast_list = pegasus_set_multicast, |
| 1494 | .ndo_get_stats = pegasus_netdev_stats, | 1494 | .ndo_get_stats = pegasus_netdev_stats, |
| 1495 | .ndo_tx_timeout = pegasus_tx_timeout, | 1495 | .ndo_tx_timeout = pegasus_tx_timeout, |
| 1496 | .ndo_change_mtu = eth_change_mtu, | ||
| 1497 | .ndo_set_mac_address = eth_mac_addr, | ||
| 1498 | .ndo_validate_addr = eth_validate_addr, | ||
| 1496 | }; | 1499 | }; |
| 1497 | 1500 | ||
| 1498 | static struct usb_driver pegasus_driver = { | 1501 | static struct usb_driver pegasus_driver = { |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index d3489a3c4c03..88c30a58b4bd 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
| @@ -621,6 +621,7 @@ static const struct net_device_ops rhine_netdev_ops = { | |||
| 621 | .ndo_start_xmit = rhine_start_tx, | 621 | .ndo_start_xmit = rhine_start_tx, |
| 622 | .ndo_get_stats = rhine_get_stats, | 622 | .ndo_get_stats = rhine_get_stats, |
| 623 | .ndo_set_multicast_list = rhine_set_rx_mode, | 623 | .ndo_set_multicast_list = rhine_set_rx_mode, |
| 624 | .ndo_change_mtu = eth_change_mtu, | ||
| 624 | .ndo_validate_addr = eth_validate_addr, | 625 | .ndo_validate_addr = eth_validate_addr, |
| 625 | .ndo_set_mac_address = eth_mac_addr, | 626 | .ndo_set_mac_address = eth_mac_addr, |
| 626 | .ndo_do_ioctl = netdev_ioctl, | 627 | .ndo_do_ioctl = netdev_ioctl, |
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index 345593c4accb..a370e510f19f 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
| @@ -2521,6 +2521,8 @@ static const struct net_device_ops orinoco_netdev_ops = { | |||
| 2521 | .ndo_start_xmit = orinoco_xmit, | 2521 | .ndo_start_xmit = orinoco_xmit, |
| 2522 | .ndo_set_multicast_list = orinoco_set_multicast_list, | 2522 | .ndo_set_multicast_list = orinoco_set_multicast_list, |
| 2523 | .ndo_change_mtu = orinoco_change_mtu, | 2523 | .ndo_change_mtu = orinoco_change_mtu, |
| 2524 | .ndo_set_mac_address = eth_mac_addr, | ||
| 2525 | .ndo_validate_addr = eth_validate_addr, | ||
| 2524 | .ndo_tx_timeout = orinoco_tx_timeout, | 2526 | .ndo_tx_timeout = orinoco_tx_timeout, |
| 2525 | .ndo_get_stats = orinoco_get_stats, | 2527 | .ndo_get_stats = orinoco_get_stats, |
| 2526 | }; | 2528 | }; |
| @@ -2555,7 +2557,6 @@ struct net_device | |||
| 2555 | priv->wireless_data.spy_data = &priv->spy_data; | 2557 | priv->wireless_data.spy_data = &priv->spy_data; |
| 2556 | dev->wireless_data = &priv->wireless_data; | 2558 | dev->wireless_data = &priv->wireless_data; |
| 2557 | #endif | 2559 | #endif |
| 2558 | /* we use the default eth_mac_addr for setting the MAC addr */ | ||
| 2559 | 2560 | ||
| 2560 | /* Reserve space in skb for the SNAP header */ | 2561 | /* Reserve space in skb for the SNAP header */ |
| 2561 | dev->hard_header_len += ENCAPS_OVERHEAD; | 2562 | dev->hard_header_len += ENCAPS_OVERHEAD; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b47b3f039d14..f2c69a2cca17 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1342,12 +1342,12 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
| 1342 | * shifting the start of the packet by 2 bytes. Drivers should do this | 1342 | * shifting the start of the packet by 2 bytes. Drivers should do this |
| 1343 | * with: | 1343 | * with: |
| 1344 | * | 1344 | * |
| 1345 | * skb_reserve(NET_IP_ALIGN); | 1345 | * skb_reserve(skb, NET_IP_ALIGN); |
| 1346 | * | 1346 | * |
| 1347 | * The downside to this alignment of the IP header is that the DMA is now | 1347 | * The downside to this alignment of the IP header is that the DMA is now |
| 1348 | * unaligned. On some architectures the cost of an unaligned DMA is high | 1348 | * unaligned. On some architectures the cost of an unaligned DMA is high |
| 1349 | * and this cost outweighs the gains made by aligning the IP header. | 1349 | * and this cost outweighs the gains made by aligning the IP header. |
| 1350 | * | 1350 | * |
| 1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN | 1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN |
| 1352 | * to be overridden. | 1352 | * to be overridden. |
| 1353 | */ | 1353 | */ |
diff --git a/net/core/sock.c b/net/core/sock.c index 6354863b1c68..ba5d2116aea1 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
| @@ -939,8 +939,23 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, | |||
| 939 | struct kmem_cache *slab; | 939 | struct kmem_cache *slab; |
| 940 | 940 | ||
| 941 | slab = prot->slab; | 941 | slab = prot->slab; |
| 942 | if (slab != NULL) | 942 | if (slab != NULL) { |
| 943 | sk = kmem_cache_alloc(slab, priority); | 943 | sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO); |
| 944 | if (!sk) | ||
| 945 | return sk; | ||
| 946 | if (priority & __GFP_ZERO) { | ||
| 947 | /* | ||
| 948 | * caches using SLAB_DESTROY_BY_RCU should let | ||
| 949 | * sk_node.next un-modified. Special care is taken | ||
| 950 | * when initializing object to zero. | ||
| 951 | */ | ||
| 952 | if (offsetof(struct sock, sk_node.next) != 0) | ||
| 953 | memset(sk, 0, offsetof(struct sock, sk_node.next)); | ||
| 954 | memset(&sk->sk_node.pprev, 0, | ||
| 955 | prot->obj_size - offsetof(struct sock, | ||
| 956 | sk_node.pprev)); | ||
| 957 | } | ||
| 958 | } | ||
| 944 | else | 959 | else |
| 945 | sk = kmalloc(prot->obj_size, priority); | 960 | sk = kmalloc(prot->obj_size, priority); |
| 946 | 961 | ||
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 44e2a3d2359a..cb4a0f4bd5e5 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
| @@ -735,10 +735,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 735 | } | 735 | } |
| 736 | 736 | ||
| 737 | tos = tiph->tos; | 737 | tos = tiph->tos; |
| 738 | if (tos&1) { | 738 | if (tos == 1) { |
| 739 | tos = 0; | ||
| 739 | if (skb->protocol == htons(ETH_P_IP)) | 740 | if (skb->protocol == htons(ETH_P_IP)) |
| 740 | tos = old_iph->tos; | 741 | tos = old_iph->tos; |
| 741 | tos &= ~1; | ||
| 742 | } | 742 | } |
| 743 | 743 | ||
| 744 | { | 744 | { |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 247026282669..7d0821054729 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
| @@ -1243,7 +1243,6 @@ int ip_push_pending_frames(struct sock *sk) | |||
| 1243 | skb->len += tmp_skb->len; | 1243 | skb->len += tmp_skb->len; |
| 1244 | skb->data_len += tmp_skb->len; | 1244 | skb->data_len += tmp_skb->len; |
| 1245 | skb->truesize += tmp_skb->truesize; | 1245 | skb->truesize += tmp_skb->truesize; |
| 1246 | __sock_put(tmp_skb->sk); | ||
| 1247 | tmp_skb->destructor = NULL; | 1246 | tmp_skb->destructor = NULL; |
| 1248 | tmp_skb->sk = NULL; | 1247 | tmp_skb->sk = NULL; |
| 1249 | } | 1248 | } |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 7c76e3d18215..87f8419a68fd 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -1484,7 +1484,6 @@ int ip6_push_pending_frames(struct sock *sk) | |||
| 1484 | skb->len += tmp_skb->len; | 1484 | skb->len += tmp_skb->len; |
| 1485 | skb->data_len += tmp_skb->len; | 1485 | skb->data_len += tmp_skb->len; |
| 1486 | skb->truesize += tmp_skb->truesize; | 1486 | skb->truesize += tmp_skb->truesize; |
| 1487 | __sock_put(tmp_skb->sk); | ||
| 1488 | tmp_skb->destructor = NULL; | 1487 | tmp_skb->destructor = NULL; |
| 1489 | tmp_skb->sk = NULL; | 1488 | tmp_skb->sk = NULL; |
| 1490 | } | 1489 | } |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 68e52308e552..98b7327d0949 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
| @@ -1018,6 +1018,7 @@ static void ipip6_tunnel_setup(struct net_device *dev) | |||
| 1018 | dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); | 1018 | dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); |
| 1019 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); | 1019 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); |
| 1020 | dev->flags = IFF_NOARP; | 1020 | dev->flags = IFF_NOARP; |
| 1021 | dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; | ||
| 1021 | dev->iflink = 0; | 1022 | dev->iflink = 0; |
| 1022 | dev->addr_len = 4; | 1023 | dev->addr_len = 4; |
| 1023 | dev->features |= NETIF_F_NETNS_LOCAL; | 1024 | dev->features |= NETIF_F_NETNS_LOCAL; |
