aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 21:24:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 21:24:39 -0400
commit496322bc91e35007ed754184dcd447a02b6dd685 (patch)
treef5298d0a74c0a6e65c0e98050b594b8d020904c1 /include/linux
parent2e17c5a97e231f3cb426f4b7895eab5be5c5442e (diff)
parent56e0ef527b184b3de2d7f88c6190812b2b2ac6bf (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "This is a re-do of the net-next pull request for the current merge window. The only difference from the one I made the other day is that this has Eliezer's interface renames and the timeout handling changes made based upon your feedback, as well as a few bug fixes that have trickeled in. Highlights: 1) Low latency device polling, eliminating the cost of interrupt handling and context switches. Allows direct polling of a network device from socket operations, such as recvmsg() and poll(). Currently ixgbe, mlx4, and bnx2x support this feature. Full high level description, performance numbers, and design in commit 0a4db187a999 ("Merge branch 'll_poll'") From Eliezer Tamir. 2) With the routing cache removed, ip_check_mc_rcu() gets exercised more than ever before in the case where we have lots of multicast addresses. Use a hash table instead of a simple linked list, from Eric Dumazet. 3) Add driver for Atheros CQA98xx 802.11ac wireless devices, from Bartosz Markowski, Janusz Dziedzic, Kalle Valo, Marek Kwaczynski, Marek Puzyniak, Michal Kazior, and Sujith Manoharan. 4) Support reporting the TUN device persist flag to userspace, from Pavel Emelyanov. 5) Allow controlling network device VF link state using netlink, from Rony Efraim. 6) Support GRE tunneling in openvswitch, from Pravin B Shelar. 7) Adjust SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF for modern times, from Daniel Borkmann and Eric Dumazet. 8) Allow controlling of TCP quickack behavior on a per-route basis, from Cong Wang. 9) Several bug fixes and improvements to vxlan from Stephen Hemminger, Pravin B Shelar, and Mike Rapoport. In particular, support receiving on multiple UDP ports. 10) Major cleanups, particular in the area of debugging and cookie lifetime handline, to the SCTP protocol code. From Daniel Borkmann. 11) Allow packets to cross network namespaces when traversing tunnel devices. From Nicolas Dichtel. 12) Allow monitoring netlink traffic via AF_PACKET sockets, in a manner akin to how we monitor real network traffic via ptype_all. From Daniel Borkmann. 13) Several bug fixes and improvements for the new alx device driver, from Johannes Berg. 14) Fix scalability issues in the netem packet scheduler's time queue, by using an rbtree. From Eric Dumazet. 15) Several bug fixes in TCP loss recovery handling, from Yuchung Cheng. 16) Add support for GSO segmentation of MPLS packets, from Simon Horman. 17) Make network notifiers have a real data type for the opaque pointer that's passed into them. Use this to properly handle network device flag changes in arp_netdev_event(). From Jiri Pirko and Timo Teräs. 18) Convert several drivers over to module_pci_driver(), from Peter Huewe. 19) tcp_fixup_rcvbuf() can loop 500 times over loopback, just use a O(1) calculation instead. From Eric Dumazet. 20) Support setting of explicit tunnel peer addresses in ipv6, just like ipv4. From Nicolas Dichtel. 21) Protect x86 BPF JIT against spraying attacks, from Eric Dumazet. 22) Prevent a single high rate flow from overruning an individual cpu during RX packet processing via selective flow shedding. From Willem de Bruijn. 23) Don't use spinlocks in TCP md5 signing fast paths, from Eric Dumazet. 24) Don't just drop GSO packets which are above the TBF scheduler's burst limit, chop them up so they are in-bounds instead. Also from Eric Dumazet. 25) VLAN offloads are missed when configured on top of a bridge, fix from Vlad Yasevich. 26) Support IPV6 in ping sockets. From Lorenzo Colitti. 27) Receive flow steering targets should be updated at poll() time too, from David Majnemer. 28) Fix several corner case regressions in PMTU/redirect handling due to the routing cache removal, from Timo Teräs. 29) We have to be mindful of ipv4 mapped ipv6 sockets in upd_v6_push_pending_frames(). From Hannes Frederic Sowa. 30) Fix L2TP sequence number handling bugs, from James Chapman." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1214 commits) drivers/net: caif: fix wrong rtnl_is_locked() usage drivers/net: enic: release rtnl_lock on error-path vhost-net: fix use-after-free in vhost_net_flush net: mv643xx_eth: do not use port number as platform device id net: sctp: confirm route during forward progress virtio_net: fix race in RX VQ processing virtio: support unlocked queue poll net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit Documentation: Fix references to defunct linux-net@vger.kernel.org net/fs: change busy poll time accounting net: rename low latency sockets functions to busy poll bridge: fix some kernel warning in multicast timer sfc: Fix memory leak when discarding scattered packets sit: fix tunnel update via netlink dt:net:stmmac: Add dt specific phy reset callback support. dt:net:stmmac: Add support to dwmac version 3.610 and 3.710 dt:net:stmmac: Allocate platform data only if its NULL. net:stmmac: fix memleak in the open method ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available net: ipv6: fix wrong ping_v6_sendmsg return value ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bcma/bcma.h1
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h55
-rw-r--r--include/linux/can/platform/flexcan.h20
-rw-r--r--include/linux/filter.h4
-rw-r--r--include/linux/ieee80211.h10
-rw-r--r--include/linux/if_link.h1
-rw-r--r--include/linux/if_macvlan.h12
-rw-r--r--include/linux/if_team.h11
-rw-r--r--include/linux/if_vlan.h2
-rw-r--r--include/linux/igmp.h1
-rw-r--r--include/linux/inetdevice.h5
-rw-r--r--include/linux/jiffies.h4
-rw-r--r--include/linux/ktime.h13
-rw-r--r--include/linux/marvell_phy.h2
-rw-r--r--include/linux/mlx4/cmd.h3
-rw-r--r--include/linux/mlx4/device.h3
-rw-r--r--include/linux/mlx4/qp.h36
-rw-r--r--include/linux/mv643xx_eth.h2
-rw-r--r--include/linux/net.h6
-rw-r--r--include/linux/netdev_features.h4
-rw-r--r--include/linux/netdevice.h85
-rw-r--r--include/linux/netfilter.h2
-rw-r--r--include/linux/netlink.h27
-rw-r--r--include/linux/netpoll.h4
-rw-r--r--include/linux/phy.h27
-rw-r--r--include/linux/platform_data/brcmfmac-sdio.h5
-rw-r--r--include/linux/platform_data/net-cw1200.h81
-rw-r--r--include/linux/sched.h9
-rw-r--r--include/linux/skbuff.h137
-rw-r--r--include/linux/ssb/ssb_driver_mips.h15
-rw-r--r--include/linux/ssb/ssb_regs.h1
-rw-r--r--include/linux/stmmac.h4
-rw-r--r--include/linux/tcp.h1
-rw-r--r--include/linux/virtio.h4
34 files changed, 441 insertions, 156 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 2e34db82a643..622fc505d3e1 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -144,6 +144,7 @@ struct bcma_host_ops {
144 144
145/* Chip IDs of PCIe devices */ 145/* Chip IDs of PCIe devices */
146#define BCMA_CHIP_ID_BCM4313 0x4313 146#define BCMA_CHIP_ID_BCM4313 0x4313
147#define BCMA_CHIP_ID_BCM43142 43142
147#define BCMA_CHIP_ID_BCM43224 43224 148#define BCMA_CHIP_ID_BCM43224 43224
148#define BCMA_PKG_ID_BCM43224_FAB_CSM 0x8 149#define BCMA_PKG_ID_BCM43224_FAB_CSM 0x8
149#define BCMA_PKG_ID_BCM43224_FAB_SMIC 0xa 150#define BCMA_PKG_ID_BCM43224_FAB_SMIC 0xa
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index b8b09eac60a4..c49e1a159e6e 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -330,6 +330,8 @@
330#define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */ 330#define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */
331#define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */ 331#define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */
332#define BCMA_CC_PMU_STAT 0x0608 /* PMU status */ 332#define BCMA_CC_PMU_STAT 0x0608 /* PMU status */
333#define BCMA_CC_PMU_STAT_EXT_LPO_AVAIL 0x00000100
334#define BCMA_CC_PMU_STAT_WDRESET 0x00000080
333#define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */ 335#define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */
334#define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */ 336#define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */
335#define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */ 337#define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */
@@ -355,6 +357,11 @@
355#define BCMA_CC_REGCTL_DATA 0x065C 357#define BCMA_CC_REGCTL_DATA 0x065C
356#define BCMA_CC_PLLCTL_ADDR 0x0660 358#define BCMA_CC_PLLCTL_ADDR 0x0660
357#define BCMA_CC_PLLCTL_DATA 0x0664 359#define BCMA_CC_PLLCTL_DATA 0x0664
360#define BCMA_CC_PMU_STRAPOPT 0x0668 /* (corerev >= 28) */
361#define BCMA_CC_PMU_XTAL_FREQ 0x066C /* (pmurev >= 10) */
362#define BCMA_CC_PMU_XTAL_FREQ_ILPCTL_MASK 0x00001FFF
363#define BCMA_CC_PMU_XTAL_FREQ_MEASURE_MASK 0x80000000
364#define BCMA_CC_PMU_XTAL_FREQ_MEASURE_SHIFT 31
358#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ 365#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */
359/* NAND flash MLC controller registers (corerev >= 38) */ 366/* NAND flash MLC controller registers (corerev >= 38) */
360#define BCMA_CC_NAND_REVISION 0x0C00 367#define BCMA_CC_NAND_REVISION 0x0C00
@@ -435,6 +442,23 @@
435#define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_MASK 0x00000007 442#define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_MASK 0x00000007
436#define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_SHIFT 0 443#define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_SHIFT 0
437 444
445/* PMU rev 15 */
446#define BCMA_CC_PMU15_PLL_PLLCTL0 0
447#define BCMA_CC_PMU15_PLL_PC0_CLKSEL_MASK 0x00000003
448#define BCMA_CC_PMU15_PLL_PC0_CLKSEL_SHIFT 0
449#define BCMA_CC_PMU15_PLL_PC0_FREQTGT_MASK 0x003FFFFC
450#define BCMA_CC_PMU15_PLL_PC0_FREQTGT_SHIFT 2
451#define BCMA_CC_PMU15_PLL_PC0_PRESCALE_MASK 0x00C00000
452#define BCMA_CC_PMU15_PLL_PC0_PRESCALE_SHIFT 22
453#define BCMA_CC_PMU15_PLL_PC0_KPCTRL_MASK 0x07000000
454#define BCMA_CC_PMU15_PLL_PC0_KPCTRL_SHIFT 24
455#define BCMA_CC_PMU15_PLL_PC0_FCNTCTRL_MASK 0x38000000
456#define BCMA_CC_PMU15_PLL_PC0_FCNTCTRL_SHIFT 27
457#define BCMA_CC_PMU15_PLL_PC0_FDCMODE_MASK 0x40000000
458#define BCMA_CC_PMU15_PLL_PC0_FDCMODE_SHIFT 30
459#define BCMA_CC_PMU15_PLL_PC0_CTRLBIAS_MASK 0x80000000
460#define BCMA_CC_PMU15_PLL_PC0_CTRLBIAS_SHIFT 31
461
438/* ALP clock on pre-PMU chips */ 462/* ALP clock on pre-PMU chips */
439#define BCMA_CC_PMU_ALP_CLOCK 20000000 463#define BCMA_CC_PMU_ALP_CLOCK 20000000
440/* HT clock for systems with PMU-enabled chipcommon */ 464/* HT clock for systems with PMU-enabled chipcommon */
@@ -507,6 +531,37 @@
507#define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18) 531#define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18)
508#define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19) 532#define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19)
509 533
534#define BCMA_RES_4314_LPLDO_PU BIT(0)
535#define BCMA_RES_4314_PMU_SLEEP_DIS BIT(1)
536#define BCMA_RES_4314_PMU_BG_PU BIT(2)
537#define BCMA_RES_4314_CBUCK_LPOM_PU BIT(3)
538#define BCMA_RES_4314_CBUCK_PFM_PU BIT(4)
539#define BCMA_RES_4314_CLDO_PU BIT(5)
540#define BCMA_RES_4314_LPLDO2_LVM BIT(6)
541#define BCMA_RES_4314_WL_PMU_PU BIT(7)
542#define BCMA_RES_4314_LNLDO_PU BIT(8)
543#define BCMA_RES_4314_LDO3P3_PU BIT(9)
544#define BCMA_RES_4314_OTP_PU BIT(10)
545#define BCMA_RES_4314_XTAL_PU BIT(11)
546#define BCMA_RES_4314_WL_PWRSW_PU BIT(12)
547#define BCMA_RES_4314_LQ_AVAIL BIT(13)
548#define BCMA_RES_4314_LOGIC_RET BIT(14)
549#define BCMA_RES_4314_MEM_SLEEP BIT(15)
550#define BCMA_RES_4314_MACPHY_RET BIT(16)
551#define BCMA_RES_4314_WL_CORE_READY BIT(17)
552#define BCMA_RES_4314_ILP_REQ BIT(18)
553#define BCMA_RES_4314_ALP_AVAIL BIT(19)
554#define BCMA_RES_4314_MISC_PWRSW_PU BIT(20)
555#define BCMA_RES_4314_SYNTH_PWRSW_PU BIT(21)
556#define BCMA_RES_4314_RX_PWRSW_PU BIT(22)
557#define BCMA_RES_4314_RADIO_PU BIT(23)
558#define BCMA_RES_4314_VCO_LDO_PU BIT(24)
559#define BCMA_RES_4314_AFE_LDO_PU BIT(25)
560#define BCMA_RES_4314_RX_LDO_PU BIT(26)
561#define BCMA_RES_4314_TX_LDO_PU BIT(27)
562#define BCMA_RES_4314_HT_AVAIL BIT(28)
563#define BCMA_RES_4314_MACPHY_CLK_AVAIL BIT(29)
564
510/* Data for the PMU, if available. 565/* Data for the PMU, if available.
511 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) 566 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
512 */ 567 */
diff --git a/include/linux/can/platform/flexcan.h b/include/linux/can/platform/flexcan.h
deleted file mode 100644
index 72b713ab57e9..000000000000
--- a/include/linux/can/platform/flexcan.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * Copyright (C) 2010 Marc Kleine-Budde <kernel@pengutronix.de>
3 *
4 * This file is released under the GPLv2
5 *
6 */
7
8#ifndef __CAN_PLATFORM_FLEXCAN_H
9#define __CAN_PLATFORM_FLEXCAN_H
10
11/**
12 * struct flexcan_platform_data - flex CAN controller platform data
13 * @transceiver_enable: - called to power on/off the transceiver
14 *
15 */
16struct flexcan_platform_data {
17 void (*transceiver_switch)(int enable);
18};
19
20#endif /* __CAN_PLATFORM_FLEXCAN_H */
diff --git a/include/linux/filter.h b/include/linux/filter.h
index f65f5a69db8f..a6ac84871d6d 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -59,10 +59,10 @@ extern void bpf_jit_free(struct sk_filter *fp);
59static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, 59static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen,
60 u32 pass, void *image) 60 u32 pass, void *image)
61{ 61{
62 pr_err("flen=%u proglen=%u pass=%u image=%p\n", 62 pr_err("flen=%u proglen=%u pass=%u image=%pK\n",
63 flen, proglen, pass, image); 63 flen, proglen, pass, image);
64 if (image) 64 if (image)
65 print_hex_dump(KERN_ERR, "JIT code: ", DUMP_PREFIX_ADDRESS, 65 print_hex_dump(KERN_ERR, "JIT code: ", DUMP_PREFIX_OFFSET,
66 16, 1, image, proglen, false); 66 16, 1, image, proglen, false);
67} 67}
68#define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) 68#define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 06b0ed0154a4..b0dc87a2a376 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -146,6 +146,7 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
146#define IEEE80211_MAX_RTS_THRESHOLD 2353 146#define IEEE80211_MAX_RTS_THRESHOLD 2353
147#define IEEE80211_MAX_AID 2007 147#define IEEE80211_MAX_AID 2007
148#define IEEE80211_MAX_TIM_LEN 251 148#define IEEE80211_MAX_TIM_LEN 251
149#define IEEE80211_MAX_MESH_PEERINGS 63
149/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section 150/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
150 6.2.1.1.2. 151 6.2.1.1.2.
151 152
@@ -1829,6 +1830,15 @@ enum ieee80211_key_len {
1829 WLAN_KEY_LEN_AES_CMAC = 16, 1830 WLAN_KEY_LEN_AES_CMAC = 16,
1830}; 1831};
1831 1832
1833#define IEEE80211_WEP_IV_LEN 4
1834#define IEEE80211_WEP_ICV_LEN 4
1835#define IEEE80211_CCMP_HDR_LEN 8
1836#define IEEE80211_CCMP_MIC_LEN 8
1837#define IEEE80211_CCMP_PN_LEN 6
1838#define IEEE80211_TKIP_IV_LEN 8
1839#define IEEE80211_TKIP_ICV_LEN 4
1840#define IEEE80211_CMAC_PN_LEN 6
1841
1832/* Public action codes */ 1842/* Public action codes */
1833enum ieee80211_pub_actioncode { 1843enum ieee80211_pub_actioncode {
1834 WLAN_PUB_ACTION_EXT_CHANSW_ANN = 4, 1844 WLAN_PUB_ACTION_EXT_CHANSW_ANN = 4,
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index c3f817c3eb45..a86784dec3d3 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -12,5 +12,6 @@ struct ifla_vf_info {
12 __u32 qos; 12 __u32 qos;
13 __u32 tx_rate; 13 __u32 tx_rate;
14 __u32 spoofchk; 14 __u32 spoofchk;
15 __u32 linkstate;
15}; 16};
16#endif /* _LINUX_IF_LINK_H */ 17#endif /* _LINUX_IF_LINK_H */
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index 84dde1dd1da4..ddd33fd5904d 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -8,7 +8,7 @@
8#include <net/netlink.h> 8#include <net/netlink.h>
9#include <linux/u64_stats_sync.h> 9#include <linux/u64_stats_sync.h>
10 10
11#if defined(CONFIG_MACVTAP) || defined(CONFIG_MACVTAP_MODULE) 11#if IS_ENABLED(CONFIG_MACVTAP)
12struct socket *macvtap_get_socket(struct file *); 12struct socket *macvtap_get_socket(struct file *);
13#else 13#else
14#include <linux/err.h> 14#include <linux/err.h>
@@ -50,7 +50,7 @@ struct macvlan_pcpu_stats {
50 * Maximum times a macvtap device can be opened. This can be used to 50 * Maximum times a macvtap device can be opened. This can be used to
51 * configure the number of receive queue, e.g. for multiqueue virtio. 51 * configure the number of receive queue, e.g. for multiqueue virtio.
52 */ 52 */
53#define MAX_MACVTAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16) 53#define MAX_MACVTAP_QUEUES 16
54 54
55#define MACVLAN_MC_FILTER_BITS 8 55#define MACVLAN_MC_FILTER_BITS 8
56#define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS) 56#define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS)
@@ -65,12 +65,18 @@ struct macvlan_dev {
65 65
66 DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); 66 DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ);
67 67
68 netdev_features_t set_features;
68 enum macvlan_mode mode; 69 enum macvlan_mode mode;
69 u16 flags; 70 u16 flags;
70 int (*receive)(struct sk_buff *skb); 71 int (*receive)(struct sk_buff *skb);
71 int (*forward)(struct net_device *dev, struct sk_buff *skb); 72 int (*forward)(struct net_device *dev, struct sk_buff *skb);
72 struct macvtap_queue *taps[MAX_MACVTAP_QUEUES]; 73 /* This array tracks active taps. */
74 struct macvtap_queue __rcu *taps[MAX_MACVTAP_QUEUES];
75 /* This list tracks all taps (both enabled and disabled) */
76 struct list_head queue_list;
73 int numvtaps; 77 int numvtaps;
78 int numqueues;
79 netdev_features_t tap_features;
74 int minor; 80 int minor;
75}; 81};
76 82
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 16fae6436d0e..f6156f91eb1c 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -69,6 +69,7 @@ struct team_port {
69 s32 priority; /* lower number ~ higher priority */ 69 s32 priority; /* lower number ~ higher priority */
70 u16 queue_id; 70 u16 queue_id;
71 struct list_head qom_list; /* node in queue override mapping list */ 71 struct list_head qom_list; /* node in queue override mapping list */
72 struct rcu_head rcu;
72 long mode_priv[0]; 73 long mode_priv[0];
73}; 74};
74 75
@@ -228,6 +229,16 @@ static inline struct team_port *team_get_port_by_index(struct team *team,
228 return port; 229 return port;
229 return NULL; 230 return NULL;
230} 231}
232
233static inline int team_num_to_port_index(struct team *team, int num)
234{
235 int en_port_count = ACCESS_ONCE(team->en_port_count);
236
237 if (unlikely(!en_port_count))
238 return 0;
239 return num % en_port_count;
240}
241
231static inline struct team_port *team_get_port_by_index_rcu(struct team *team, 242static inline struct team_port *team_get_port_by_index_rcu(struct team *team,
232 int port_index) 243 int port_index)
233{ 244{
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 637fa71de0c7..cdcbafa9b39a 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -243,8 +243,6 @@ static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
243 return skb; 243 return skb;
244} 244}
245 245
246#define HAVE_VLAN_PUT_TAG
247
248/** 246/**
249 * vlan_put_tag - inserts VLAN tag according to device features 247 * vlan_put_tag - inserts VLAN tag according to device features
250 * @skb: skbuff to tag 248 * @skb: skbuff to tag
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index 7f2bf1518480..e3362b5f13e8 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -84,6 +84,7 @@ struct ip_mc_list {
84 struct ip_mc_list *next; 84 struct ip_mc_list *next;
85 struct ip_mc_list __rcu *next_rcu; 85 struct ip_mc_list __rcu *next_rcu;
86 }; 86 };
87 struct ip_mc_list __rcu *next_hash;
87 struct timer_list timer; 88 struct timer_list timer;
88 int users; 89 int users;
89 atomic_t refcnt; 90 atomic_t refcnt;
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index ea1e3b863890..b99cd23f3474 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -50,12 +50,17 @@ struct ipv4_devconf {
50 DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); 50 DECLARE_BITMAP(state, IPV4_DEVCONF_MAX);
51}; 51};
52 52
53#define MC_HASH_SZ_LOG 9
54
53struct in_device { 55struct in_device {
54 struct net_device *dev; 56 struct net_device *dev;
55 atomic_t refcnt; 57 atomic_t refcnt;
56 int dead; 58 int dead;
57 struct in_ifaddr *ifa_list; /* IP ifaddr chain */ 59 struct in_ifaddr *ifa_list; /* IP ifaddr chain */
60
58 struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */ 61 struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */
62 struct ip_mc_list __rcu * __rcu *mc_hash;
63
59 int mc_count; /* Number of installed mcasts */ 64 int mc_count; /* Number of installed mcasts */
60 spinlock_t mc_tomb_lock; 65 spinlock_t mc_tomb_lock;
61 struct ip_mc_list *mc_tomb; 66 struct ip_mc_list *mc_tomb;
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 8fb8edf12417..97ba4e78a37e 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -139,6 +139,10 @@ static inline u64 get_jiffies_64(void)
139 ((__s64)(a) - (__s64)(b) >= 0)) 139 ((__s64)(a) - (__s64)(b) >= 0))
140#define time_before_eq64(a,b) time_after_eq64(b,a) 140#define time_before_eq64(a,b) time_after_eq64(b,a)
141 141
142#define time_in_range64(a, b, c) \
143 (time_after_eq64(a, b) && \
144 time_before_eq64(a, c))
145
142/* 146/*
143 * These four macros compare jiffies and 'a' for convenience. 147 * These four macros compare jiffies and 'a' for convenience.
144 */ 148 */
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index fc66b301b648..debf208b7611 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -324,6 +324,11 @@ static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec)
324 return ktime_add_ns(kt, usec * NSEC_PER_USEC); 324 return ktime_add_ns(kt, usec * NSEC_PER_USEC);
325} 325}
326 326
327static inline ktime_t ktime_add_ms(const ktime_t kt, const u64 msec)
328{
329 return ktime_add_ns(kt, msec * NSEC_PER_MSEC);
330}
331
327static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) 332static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec)
328{ 333{
329 return ktime_sub_ns(kt, usec * NSEC_PER_USEC); 334 return ktime_sub_ns(kt, usec * NSEC_PER_USEC);
@@ -368,7 +373,15 @@ extern void ktime_get_ts(struct timespec *ts);
368static inline ktime_t ns_to_ktime(u64 ns) 373static inline ktime_t ns_to_ktime(u64 ns)
369{ 374{
370 static const ktime_t ktime_zero = { .tv64 = 0 }; 375 static const ktime_t ktime_zero = { .tv64 = 0 };
376
371 return ktime_add_ns(ktime_zero, ns); 377 return ktime_add_ns(ktime_zero, ns);
372} 378}
373 379
380static inline ktime_t ms_to_ktime(u64 ms)
381{
382 static const ktime_t ktime_zero = { .tv64 = 0 };
383
384 return ktime_add_ms(ktime_zero, ms);
385}
386
374#endif 387#endif
diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h
index dd3c34ebca9a..8e9a029e093d 100644
--- a/include/linux/marvell_phy.h
+++ b/include/linux/marvell_phy.h
@@ -14,6 +14,8 @@
14#define MARVELL_PHY_ID_88E1149R 0x01410e50 14#define MARVELL_PHY_ID_88E1149R 0x01410e50
15#define MARVELL_PHY_ID_88E1240 0x01410e30 15#define MARVELL_PHY_ID_88E1240 0x01410e30
16#define MARVELL_PHY_ID_88E1318S 0x01410e90 16#define MARVELL_PHY_ID_88E1318S 0x01410e90
17#define MARVELL_PHY_ID_88E1116R 0x01410e40
18#define MARVELL_PHY_ID_88E1510 0x01410dd0
17 19
18/* struct phy_device dev_flags definitions */ 20/* struct phy_device dev_flags definitions */
19#define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 21#define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index adf6e0648f20..bb1c8096a7eb 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -111,6 +111,7 @@ enum {
111 MLX4_CMD_INIT2INIT_QP = 0x2d, 111 MLX4_CMD_INIT2INIT_QP = 0x2d,
112 MLX4_CMD_SUSPEND_QP = 0x32, 112 MLX4_CMD_SUSPEND_QP = 0x32,
113 MLX4_CMD_UNSUSPEND_QP = 0x33, 113 MLX4_CMD_UNSUSPEND_QP = 0x33,
114 MLX4_CMD_UPDATE_QP = 0x61,
114 /* special QP and management commands */ 115 /* special QP and management commands */
115 MLX4_CMD_CONF_SPECIAL_QP = 0x23, 116 MLX4_CMD_CONF_SPECIAL_QP = 0x23,
116 MLX4_CMD_MAD_IFC = 0x24, 117 MLX4_CMD_MAD_IFC = 0x24,
@@ -237,7 +238,7 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac);
237int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); 238int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos);
238int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); 239int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting);
239int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf); 240int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf);
240 241int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state);
241 242
242#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) 243#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8)
243 244
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index a51b0134ce18..52c23a892bab 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -157,7 +157,8 @@ enum {
157 MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN = 1LL << 4, 157 MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN = 1LL << 4,
158 MLX4_DEV_CAP_FLAG2_TS = 1LL << 5, 158 MLX4_DEV_CAP_FLAG2_TS = 1LL << 5,
159 MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6, 159 MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6,
160 MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7 160 MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7,
161 MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8
161}; 162};
162 163
163enum { 164enum {
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index 352eec9df1b8..262deac02c9e 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -152,6 +152,8 @@ enum { /* fl */
152}; 152};
153enum { /* vlan_control */ 153enum { /* vlan_control */
154 MLX4_VLAN_CTRL_ETH_TX_BLOCK_TAGGED = 1 << 6, 154 MLX4_VLAN_CTRL_ETH_TX_BLOCK_TAGGED = 1 << 6,
155 MLX4_VLAN_CTRL_ETH_TX_BLOCK_PRIO_TAGGED = 1 << 5, /* 802.1p priority tag */
156 MLX4_VLAN_CTRL_ETH_TX_BLOCK_UNTAGGED = 1 << 4,
155 MLX4_VLAN_CTRL_ETH_RX_BLOCK_TAGGED = 1 << 2, 157 MLX4_VLAN_CTRL_ETH_RX_BLOCK_TAGGED = 1 << 2,
156 MLX4_VLAN_CTRL_ETH_RX_BLOCK_PRIO_TAGGED = 1 << 1, /* 802.1p priority tag */ 158 MLX4_VLAN_CTRL_ETH_RX_BLOCK_PRIO_TAGGED = 1 << 1, /* 802.1p priority tag */
157 MLX4_VLAN_CTRL_ETH_RX_BLOCK_UNTAGGED = 1 << 0 159 MLX4_VLAN_CTRL_ETH_RX_BLOCK_UNTAGGED = 1 << 0
@@ -206,6 +208,40 @@ struct mlx4_qp_context {
206 u32 reserved5[10]; 208 u32 reserved5[10];
207}; 209};
208 210
211struct mlx4_update_qp_context {
212 __be64 qp_mask;
213 __be64 primary_addr_path_mask;
214 __be64 secondary_addr_path_mask;
215 u64 reserved1;
216 struct mlx4_qp_context qp_context;
217 u64 reserved2[58];
218};
219
220enum {
221 MLX4_UPD_QP_MASK_PM_STATE = 32,
222 MLX4_UPD_QP_MASK_VSD = 33,
223};
224
225enum {
226 MLX4_UPD_QP_PATH_MASK_PKEY_INDEX = 0 + 32,
227 MLX4_UPD_QP_PATH_MASK_FSM = 1 + 32,
228 MLX4_UPD_QP_PATH_MASK_MAC_INDEX = 2 + 32,
229 MLX4_UPD_QP_PATH_MASK_FVL = 3 + 32,
230 MLX4_UPD_QP_PATH_MASK_CV = 4 + 32,
231 MLX4_UPD_QP_PATH_MASK_VLAN_INDEX = 5 + 32,
232 MLX4_UPD_QP_PATH_MASK_ETH_HIDE_CQE_VLAN = 6 + 32,
233 MLX4_UPD_QP_PATH_MASK_ETH_TX_BLOCK_UNTAGGED = 7 + 32,
234 MLX4_UPD_QP_PATH_MASK_ETH_TX_BLOCK_1P = 8 + 32,
235 MLX4_UPD_QP_PATH_MASK_ETH_TX_BLOCK_TAGGED = 9 + 32,
236 MLX4_UPD_QP_PATH_MASK_ETH_RX_BLOCK_UNTAGGED = 10 + 32,
237 MLX4_UPD_QP_PATH_MASK_ETH_RX_BLOCK_1P = 11 + 32,
238 MLX4_UPD_QP_PATH_MASK_ETH_RX_BLOCK_TAGGED = 12 + 32,
239 MLX4_UPD_QP_PATH_MASK_FEUP = 13 + 32,
240 MLX4_UPD_QP_PATH_MASK_SCHED_QUEUE = 14 + 32,
241 MLX4_UPD_QP_PATH_MASK_IF_COUNTER_INDEX = 15 + 32,
242 MLX4_UPD_QP_PATH_MASK_FVL_RX = 16 + 32,
243};
244
209enum { /* param3 */ 245enum { /* param3 */
210 MLX4_STRIP_VLAN = 1 << 30 246 MLX4_STRIP_VLAN = 1 << 30
211}; 247};
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h
index 141d395bbb5f..6e8215b15998 100644
--- a/include/linux/mv643xx_eth.h
+++ b/include/linux/mv643xx_eth.h
@@ -30,6 +30,7 @@ struct mv643xx_eth_shared_platform_data {
30#define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x)) 30#define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x))
31#define MV643XX_ETH_PHY_NONE 0xff 31#define MV643XX_ETH_PHY_NONE 0xff
32 32
33struct device_node;
33struct mv643xx_eth_platform_data { 34struct mv643xx_eth_platform_data {
34 /* 35 /*
35 * Pointer back to our parent instance, and our port number. 36 * Pointer back to our parent instance, and our port number.
@@ -41,6 +42,7 @@ struct mv643xx_eth_platform_data {
41 * Whether a PHY is present, and if yes, at which address. 42 * Whether a PHY is present, and if yes, at which address.
42 */ 43 */
43 int phy_addr; 44 int phy_addr;
45 struct device_node *phy_node;
44 46
45 /* 47 /*
46 * Use this MAC address if it is valid, overriding the 48 * Use this MAC address if it is valid, overriding the
diff --git a/include/linux/net.h b/include/linux/net.h
index 99c9f0c103c2..4f27575ce1d6 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -79,9 +79,9 @@ enum sock_type {
79#endif /* ARCH_HAS_SOCKET_TYPES */ 79#endif /* ARCH_HAS_SOCKET_TYPES */
80 80
81enum sock_shutdown_cmd { 81enum sock_shutdown_cmd {
82 SHUT_RD = 0, 82 SHUT_RD,
83 SHUT_WR = 1, 83 SHUT_WR,
84 SHUT_RDWR = 2, 84 SHUT_RDWR,
85}; 85};
86 86
87struct socket_wq { 87struct socket_wq {
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 09906b7ca47d..a2a89a5c7be5 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -43,8 +43,9 @@ enum {
43 NETIF_F_FSO_BIT, /* ... FCoE segmentation */ 43 NETIF_F_FSO_BIT, /* ... FCoE segmentation */
44 NETIF_F_GSO_GRE_BIT, /* ... GRE with TSO */ 44 NETIF_F_GSO_GRE_BIT, /* ... GRE with TSO */
45 NETIF_F_GSO_UDP_TUNNEL_BIT, /* ... UDP TUNNEL with TSO */ 45 NETIF_F_GSO_UDP_TUNNEL_BIT, /* ... UDP TUNNEL with TSO */
46 NETIF_F_GSO_MPLS_BIT, /* ... MPLS segmentation */
46 /**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */ 47 /**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */
47 NETIF_F_GSO_UDP_TUNNEL_BIT, 48 NETIF_F_GSO_MPLS_BIT,
48 49
49 NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */ 50 NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */
50 NETIF_F_SCTP_CSUM_BIT, /* SCTP checksum offload */ 51 NETIF_F_SCTP_CSUM_BIT, /* SCTP checksum offload */
@@ -107,6 +108,7 @@ enum {
107#define NETIF_F_RXALL __NETIF_F(RXALL) 108#define NETIF_F_RXALL __NETIF_F(RXALL)
108#define NETIF_F_GSO_GRE __NETIF_F(GSO_GRE) 109#define NETIF_F_GSO_GRE __NETIF_F(GSO_GRE)
109#define NETIF_F_GSO_UDP_TUNNEL __NETIF_F(GSO_UDP_TUNNEL) 110#define NETIF_F_GSO_UDP_TUNNEL __NETIF_F(GSO_UDP_TUNNEL)
111#define NETIF_F_GSO_MPLS __NETIF_F(GSO_MPLS)
110#define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER) 112#define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER)
111#define NETIF_F_HW_VLAN_STAG_RX __NETIF_F(HW_VLAN_STAG_RX) 113#define NETIF_F_HW_VLAN_STAG_RX __NETIF_F(HW_VLAN_STAG_RX)
112#define NETIF_F_HW_VLAN_STAG_TX __NETIF_F(HW_VLAN_STAG_TX) 114#define NETIF_F_HW_VLAN_STAG_TX __NETIF_F(HW_VLAN_STAG_TX)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 96e4c21e15e0..bb82871b8494 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -324,12 +324,15 @@ struct napi_struct {
324 struct sk_buff *gro_list; 324 struct sk_buff *gro_list;
325 struct sk_buff *skb; 325 struct sk_buff *skb;
326 struct list_head dev_list; 326 struct list_head dev_list;
327 struct hlist_node napi_hash_node;
328 unsigned int napi_id;
327}; 329};
328 330
329enum { 331enum {
330 NAPI_STATE_SCHED, /* Poll is scheduled */ 332 NAPI_STATE_SCHED, /* Poll is scheduled */
331 NAPI_STATE_DISABLE, /* Disable pending */ 333 NAPI_STATE_DISABLE, /* Disable pending */
332 NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ 334 NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */
335 NAPI_STATE_HASHED, /* In NAPI hash */
333}; 336};
334 337
335enum gro_result { 338enum gro_result {
@@ -446,6 +449,32 @@ extern void __napi_complete(struct napi_struct *n);
446extern void napi_complete(struct napi_struct *n); 449extern void napi_complete(struct napi_struct *n);
447 450
448/** 451/**
452 * napi_by_id - lookup a NAPI by napi_id
453 * @napi_id: hashed napi_id
454 *
455 * lookup @napi_id in napi_hash table
456 * must be called under rcu_read_lock()
457 */
458extern struct napi_struct *napi_by_id(unsigned int napi_id);
459
460/**
461 * napi_hash_add - add a NAPI to global hashtable
462 * @napi: napi context
463 *
464 * generate a new napi_id and store a @napi under it in napi_hash
465 */
466extern void napi_hash_add(struct napi_struct *napi);
467
468/**
469 * napi_hash_del - remove a NAPI from global table
470 * @napi: napi context
471 *
472 * Warning: caller must observe rcu grace period
473 * before freeing memory containing @napi
474 */
475extern void napi_hash_del(struct napi_struct *napi);
476
477/**
449 * napi_disable - prevent NAPI from scheduling 478 * napi_disable - prevent NAPI from scheduling
450 * @n: napi context 479 * @n: napi context
451 * 480 *
@@ -800,6 +829,7 @@ struct netdev_fcoe_hbainfo {
800 * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); 829 * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
801 * int (*ndo_get_vf_config)(struct net_device *dev, 830 * int (*ndo_get_vf_config)(struct net_device *dev,
802 * int vf, struct ifla_vf_info *ivf); 831 * int vf, struct ifla_vf_info *ivf);
832 * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state);
803 * int (*ndo_set_vf_port)(struct net_device *dev, int vf, 833 * int (*ndo_set_vf_port)(struct net_device *dev, int vf,
804 * struct nlattr *port[]); 834 * struct nlattr *port[]);
805 * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); 835 * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb);
@@ -943,6 +973,9 @@ struct net_device_ops {
943 gfp_t gfp); 973 gfp_t gfp);
944 void (*ndo_netpoll_cleanup)(struct net_device *dev); 974 void (*ndo_netpoll_cleanup)(struct net_device *dev);
945#endif 975#endif
976#ifdef CONFIG_NET_LL_RX_POLL
977 int (*ndo_ll_poll)(struct napi_struct *dev);
978#endif
946 int (*ndo_set_vf_mac)(struct net_device *dev, 979 int (*ndo_set_vf_mac)(struct net_device *dev,
947 int queue, u8 *mac); 980 int queue, u8 *mac);
948 int (*ndo_set_vf_vlan)(struct net_device *dev, 981 int (*ndo_set_vf_vlan)(struct net_device *dev,
@@ -954,6 +987,8 @@ struct net_device_ops {
954 int (*ndo_get_vf_config)(struct net_device *dev, 987 int (*ndo_get_vf_config)(struct net_device *dev,
955 int vf, 988 int vf,
956 struct ifla_vf_info *ivf); 989 struct ifla_vf_info *ivf);
990 int (*ndo_set_vf_link_state)(struct net_device *dev,
991 int vf, int link_state);
957 int (*ndo_set_vf_port)(struct net_device *dev, 992 int (*ndo_set_vf_port)(struct net_device *dev,
958 int vf, 993 int vf,
959 struct nlattr *port[]); 994 struct nlattr *port[]);
@@ -1088,6 +1123,8 @@ struct net_device {
1088 * need to set them appropriately. 1123 * need to set them appropriately.
1089 */ 1124 */
1090 netdev_features_t hw_enc_features; 1125 netdev_features_t hw_enc_features;
1126 /* mask of fetures inheritable by MPLS */
1127 netdev_features_t mpls_features;
1091 1128
1092 /* Interface index. Unique device identifier */ 1129 /* Interface index. Unique device identifier */
1093 int ifindex; 1130 int ifindex;
@@ -1140,8 +1177,10 @@ struct net_device {
1140 unsigned char addr_assign_type; /* hw address assignment type */ 1177 unsigned char addr_assign_type; /* hw address assignment type */
1141 unsigned char addr_len; /* hardware address length */ 1178 unsigned char addr_len; /* hardware address length */
1142 unsigned char neigh_priv_len; 1179 unsigned char neigh_priv_len;
1143 unsigned short dev_id; /* for shared network cards */ 1180 unsigned short dev_id; /* Used to differentiate devices
1144 1181 * that share the same link
1182 * layer address
1183 */
1145 spinlock_t addr_list_lock; 1184 spinlock_t addr_list_lock;
1146 struct netdev_hw_addr_list uc; /* Unicast mac addresses */ 1185 struct netdev_hw_addr_list uc; /* Unicast mac addresses */
1147 struct netdev_hw_addr_list mc; /* Multicast mac addresses */ 1186 struct netdev_hw_addr_list mc; /* Multicast mac addresses */
@@ -1593,9 +1632,34 @@ struct packet_offload {
1593#define NETDEV_RELEASE 0x0012 1632#define NETDEV_RELEASE 0x0012
1594#define NETDEV_NOTIFY_PEERS 0x0013 1633#define NETDEV_NOTIFY_PEERS 0x0013
1595#define NETDEV_JOIN 0x0014 1634#define NETDEV_JOIN 0x0014
1635#define NETDEV_CHANGEUPPER 0x0015
1596 1636
1597extern int register_netdevice_notifier(struct notifier_block *nb); 1637extern int register_netdevice_notifier(struct notifier_block *nb);
1598extern int unregister_netdevice_notifier(struct notifier_block *nb); 1638extern int unregister_netdevice_notifier(struct notifier_block *nb);
1639
1640struct netdev_notifier_info {
1641 struct net_device *dev;
1642};
1643
1644struct netdev_notifier_change_info {
1645 struct netdev_notifier_info info; /* must be first */
1646 unsigned int flags_changed;
1647};
1648
1649static inline void netdev_notifier_info_init(struct netdev_notifier_info *info,
1650 struct net_device *dev)
1651{
1652 info->dev = dev;
1653}
1654
1655static inline struct net_device *
1656netdev_notifier_info_to_dev(const struct netdev_notifier_info *info)
1657{
1658 return info->dev;
1659}
1660
1661extern int call_netdevice_notifiers_info(unsigned long val, struct net_device *dev,
1662 struct netdev_notifier_info *info);
1599extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); 1663extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1600 1664
1601 1665
@@ -1779,6 +1843,19 @@ static inline int unregister_gifconf(unsigned int family)
1779 return register_gifconf(family, NULL); 1843 return register_gifconf(family, NULL);
1780} 1844}
1781 1845
1846#ifdef CONFIG_NET_FLOW_LIMIT
1847#define FLOW_LIMIT_HISTORY (1 << 7) /* must be ^2 and !overflow buckets */
1848struct sd_flow_limit {
1849 u64 count;
1850 unsigned int num_buckets;
1851 unsigned int history_head;
1852 u16 history[FLOW_LIMIT_HISTORY];
1853 u8 buckets[];
1854};
1855
1856extern int netdev_flow_limit_table_len;
1857#endif /* CONFIG_NET_FLOW_LIMIT */
1858
1782/* 1859/*
1783 * Incoming packets are placed on per-cpu queues 1860 * Incoming packets are placed on per-cpu queues
1784 */ 1861 */
@@ -1808,6 +1885,10 @@ struct softnet_data {
1808 unsigned int dropped; 1885 unsigned int dropped;
1809 struct sk_buff_head input_pkt_queue; 1886 struct sk_buff_head input_pkt_queue;
1810 struct napi_struct backlog; 1887 struct napi_struct backlog;
1888
1889#ifdef CONFIG_NET_FLOW_LIMIT
1890 struct sd_flow_limit __rcu *flow_limit;
1891#endif
1811}; 1892};
1812 1893
1813static inline void input_queue_head_incr(struct softnet_data *sd) 1894static inline void input_queue_head_incr(struct softnet_data *sd)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 0060fde3160e..de70f7b45b68 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -35,7 +35,7 @@ static inline void nf_inet_addr_mask(const union nf_inet_addr *a1,
35 result->all[3] = a1->all[3] & mask->all[3]; 35 result->all[3] = a1->all[3] & mask->all[3];
36} 36}
37 37
38extern void netfilter_init(void); 38extern int netfilter_init(void);
39 39
40/* Largest hook number + 1 */ 40/* Largest hook number + 1 */
41#define NF_MAX_HOOKS 8 41#define NF_MAX_HOOKS 8
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 6358da5eeee8..7a6c396a263b 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -46,6 +46,7 @@ struct netlink_kernel_cfg {
46 void (*input)(struct sk_buff *skb); 46 void (*input)(struct sk_buff *skb);
47 struct mutex *cb_mutex; 47 struct mutex *cb_mutex;
48 void (*bind)(int group); 48 void (*bind)(int group);
49 bool (*compare)(struct net *net, struct sock *sk);
49}; 50};
50 51
51extern struct sock *__netlink_kernel_create(struct net *net, int unit, 52extern struct sock *__netlink_kernel_create(struct net *net, int unit,
@@ -84,6 +85,22 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
84void netlink_detachskb(struct sock *sk, struct sk_buff *skb); 85void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
85int netlink_sendskb(struct sock *sk, struct sk_buff *skb); 86int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
86 87
88static inline struct sk_buff *
89netlink_skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
90{
91 struct sk_buff *nskb;
92
93 nskb = skb_clone(skb, gfp_mask);
94 if (!nskb)
95 return NULL;
96
97 /* This is a large skb, set destructor callback to release head */
98 if (is_vmalloc_addr(skb->head))
99 nskb->destructor = skb->destructor;
100
101 return nskb;
102}
103
87/* 104/*
88 * skb should fit one page. This choice is good for headerless malloc. 105 * skb should fit one page. This choice is good for headerless malloc.
89 * But we should limit to 8K so that userspace does not have to 106 * But we should limit to 8K so that userspace does not have to
@@ -144,4 +161,14 @@ static inline int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
144 return __netlink_dump_start(ssk, skb, nlh, control); 161 return __netlink_dump_start(ssk, skb, nlh, control);
145} 162}
146 163
164struct netlink_tap {
165 struct net_device *dev;
166 struct module *module;
167 struct list_head list;
168};
169
170extern int netlink_add_tap(struct netlink_tap *nt);
171extern int __netlink_remove_tap(struct netlink_tap *nt);
172extern int netlink_remove_tap(struct netlink_tap *nt);
173
147#endif /* __LINUX_NETLINK_H */ 174#endif /* __LINUX_NETLINK_H */
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index fa2cb76a7029..f3c7c24bec1c 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -53,10 +53,10 @@ struct netpoll_info {
53}; 53};
54 54
55#ifdef CONFIG_NETPOLL 55#ifdef CONFIG_NETPOLL
56extern int netpoll_rx_disable(struct net_device *dev); 56extern void netpoll_rx_disable(struct net_device *dev);
57extern void netpoll_rx_enable(struct net_device *dev); 57extern void netpoll_rx_enable(struct net_device *dev);
58#else 58#else
59static inline int netpoll_rx_disable(struct net_device *dev) { return 0; } 59static inline void netpoll_rx_disable(struct net_device *dev) { return; }
60static inline void netpoll_rx_enable(struct net_device *dev) { return; } 60static inline void netpoll_rx_enable(struct net_device *dev) { return; }
61#endif 61#endif
62 62
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 9e11039dd7a3..64ab823f7b74 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -49,6 +49,7 @@
49 49
50#define PHY_HAS_INTERRUPT 0x00000001 50#define PHY_HAS_INTERRUPT 0x00000001
51#define PHY_HAS_MAGICANEG 0x00000002 51#define PHY_HAS_MAGICANEG 0x00000002
52#define PHY_IS_INTERNAL 0x00000004
52 53
53/* Interface Mode definitions */ 54/* Interface Mode definitions */
54typedef enum { 55typedef enum {
@@ -57,6 +58,7 @@ typedef enum {
57 PHY_INTERFACE_MODE_GMII, 58 PHY_INTERFACE_MODE_GMII,
58 PHY_INTERFACE_MODE_SGMII, 59 PHY_INTERFACE_MODE_SGMII,
59 PHY_INTERFACE_MODE_TBI, 60 PHY_INTERFACE_MODE_TBI,
61 PHY_INTERFACE_MODE_REVMII,
60 PHY_INTERFACE_MODE_RMII, 62 PHY_INTERFACE_MODE_RMII,
61 PHY_INTERFACE_MODE_RGMII, 63 PHY_INTERFACE_MODE_RGMII,
62 PHY_INTERFACE_MODE_RGMII_ID, 64 PHY_INTERFACE_MODE_RGMII_ID,
@@ -261,6 +263,7 @@ struct phy_c45_device_ids {
261 * phy_id: UID for this device found during discovery 263 * phy_id: UID for this device found during discovery
262 * c45_ids: 802.3-c45 Device Identifers if is_c45. 264 * c45_ids: 802.3-c45 Device Identifers if is_c45.
263 * is_c45: Set to true if this phy uses clause 45 addressing. 265 * is_c45: Set to true if this phy uses clause 45 addressing.
266 * is_internal: Set to true if this phy is internal to a MAC.
264 * state: state of the PHY for management purposes 267 * state: state of the PHY for management purposes
265 * dev_flags: Device-specific flags used by the PHY driver. 268 * dev_flags: Device-specific flags used by the PHY driver.
266 * addr: Bus address of PHY 269 * addr: Bus address of PHY
@@ -298,6 +301,7 @@ struct phy_device {
298 301
299 struct phy_c45_device_ids c45_ids; 302 struct phy_c45_device_ids c45_ids;
300 bool is_c45; 303 bool is_c45;
304 bool is_internal;
301 305
302 enum phy_state state; 306 enum phy_state state;
303 307
@@ -508,6 +512,27 @@ static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val)
508 return mdiobus_write(phydev->bus, phydev->addr, regnum, val); 512 return mdiobus_write(phydev->bus, phydev->addr, regnum, val);
509} 513}
510 514
515/**
516 * phy_interrupt_is_valid - Convenience function for testing a given PHY irq
517 * @phydev: the phy_device struct
518 *
519 * NOTE: must be kept in sync with addition/removal of PHY_POLL and
520 * PHY_IGNORE_INTERRUPT
521 */
522static inline bool phy_interrupt_is_valid(struct phy_device *phydev)
523{
524 return phydev->irq != PHY_POLL && phydev->irq != PHY_IGNORE_INTERRUPT;
525}
526
527/**
528 * phy_is_internal - Convenience function for testing if a PHY is internal
529 * @phydev: the phy_device struct
530 */
531static inline bool phy_is_internal(struct phy_device *phydev)
532{
533 return phydev->is_internal;
534}
535
511struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, 536struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
512 bool is_c45, struct phy_c45_device_ids *c45_ids); 537 bool is_c45, struct phy_c45_device_ids *c45_ids);
513struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); 538struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
@@ -545,6 +570,8 @@ void phy_drivers_unregister(struct phy_driver *drv, int n);
545int phy_driver_register(struct phy_driver *new_driver); 570int phy_driver_register(struct phy_driver *new_driver);
546int phy_drivers_register(struct phy_driver *new_driver, int n); 571int phy_drivers_register(struct phy_driver *new_driver, int n);
547void phy_state_machine(struct work_struct *work); 572void phy_state_machine(struct work_struct *work);
573void phy_change(struct work_struct *work);
574void phy_mac_interrupt(struct phy_device *phydev, int new_link);
548void phy_start_machine(struct phy_device *phydev, 575void phy_start_machine(struct phy_device *phydev,
549 void (*handler)(struct net_device *)); 576 void (*handler)(struct net_device *));
550void phy_stop_machine(struct phy_device *phydev); 577void phy_stop_machine(struct phy_device *phydev);
diff --git a/include/linux/platform_data/brcmfmac-sdio.h b/include/linux/platform_data/brcmfmac-sdio.h
index 1ade657d5fc1..b7174998c24a 100644
--- a/include/linux/platform_data/brcmfmac-sdio.h
+++ b/include/linux/platform_data/brcmfmac-sdio.h
@@ -90,6 +90,10 @@ void __init brcmfmac_init_pdata(void)
90 * oob_irq_nr, oob_irq_flags: the OOB interrupt information. The values are 90 * oob_irq_nr, oob_irq_flags: the OOB interrupt information. The values are
91 * used for registering the irq using request_irq function. 91 * used for registering the irq using request_irq function.
92 * 92 *
93 * broken_sg_support: flag for broken sg list support of SDIO host controller.
94 * Set this to true if the SDIO host controller has higher align requirement
95 * than 32 bytes for each scatterlist item.
96 *
93 * power_on: This function is called by the brcmfmac when the module gets 97 * power_on: This function is called by the brcmfmac when the module gets
94 * loaded. This can be particularly useful for low power devices. The platform 98 * loaded. This can be particularly useful for low power devices. The platform
95 * spcific routine may for example decide to power up the complete device. 99 * spcific routine may for example decide to power up the complete device.
@@ -116,6 +120,7 @@ struct brcmfmac_sdio_platform_data {
116 bool oob_irq_supported; 120 bool oob_irq_supported;
117 unsigned int oob_irq_nr; 121 unsigned int oob_irq_nr;
118 unsigned long oob_irq_flags; 122 unsigned long oob_irq_flags;
123 bool broken_sg_support;
119 void (*power_on)(void); 124 void (*power_on)(void);
120 void (*power_off)(void); 125 void (*power_off)(void);
121 void (*reset)(void); 126 void (*reset)(void);
diff --git a/include/linux/platform_data/net-cw1200.h b/include/linux/platform_data/net-cw1200.h
new file mode 100644
index 000000000000..c6fbc3ce4ab0
--- /dev/null
+++ b/include/linux/platform_data/net-cw1200.h
@@ -0,0 +1,81 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2011
3 *
4 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#ifndef CW1200_PLAT_H_INCLUDED
9#define CW1200_PLAT_H_INCLUDED
10
11struct cw1200_platform_data_spi {
12 u8 spi_bits_per_word; /* REQUIRED */
13 u16 ref_clk; /* REQUIRED (in KHz) */
14
15 /* All others are optional */
16 bool have_5ghz;
17 int reset; /* GPIO to RSTn signal (0 disables) */
18 int powerup; /* GPIO to POWERUP signal (0 disables) */
19 int (*power_ctrl)(const struct cw1200_platform_data_spi *pdata,
20 bool enable); /* Control 3v3 / 1v8 supply */
21 int (*clk_ctrl)(const struct cw1200_platform_data_spi *pdata,
22 bool enable); /* Control CLK32K */
23 const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
24 const char *sdd_file; /* if NULL, will use default for detected hw type */
25};
26
27struct cw1200_platform_data_sdio {
28 u16 ref_clk; /* REQUIRED (in KHz) */
29
30 /* All others are optional */
31 bool have_5ghz;
32 bool no_nptb; /* SDIO hardware does not support non-power-of-2-blocksizes */
33 int reset; /* GPIO to RSTn signal (0 disables) */
34 int powerup; /* GPIO to POWERUP signal (0 disables) */
35 int irq; /* IRQ line or 0 to use SDIO IRQ */
36 int (*power_ctrl)(const struct cw1200_platform_data_sdio *pdata,
37 bool enable); /* Control 3v3 / 1v8 supply */
38 int (*clk_ctrl)(const struct cw1200_platform_data_sdio *pdata,
39 bool enable); /* Control CLK32K */
40 const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
41 const char *sdd_file; /* if NULL, will use default for detected hw type */
42};
43
44
45/* An example of SPI support in your board setup file:
46
47 static struct cw1200_platform_data_spi cw1200_platform_data = {
48 .ref_clk = 38400,
49 .spi_bits_per_word = 16,
50 .reset = GPIO_RF_RESET,
51 .powerup = GPIO_RF_POWERUP,
52 .macaddr = wifi_mac_addr,
53 .sdd_file = "sdd_sagrad_1091_1098.bin",
54 };
55 static struct spi_board_info myboard_spi_devices[] __initdata = {
56 {
57 .modalias = "cw1200_wlan_spi",
58 .max_speed_hz = 52000000,
59 .bus_num = 0,
60 .irq = WIFI_IRQ,
61 .platform_data = &cw1200_platform_data,
62 .chip_select = 0,
63 },
64 };
65
66 */
67
68/* An example of SDIO support in your board setup file:
69
70 static struct cw1200_platform_data_sdio my_cw1200_platform_data = {
71 .ref_clk = 38400,
72 .have_5ghz = false,
73 .sdd_file = "sdd_myplatform.bin",
74 };
75 cw1200_sdio_set_platform_data(&my_cw1200_platform_data);
76
77 */
78
79void __init cw1200_sdio_set_platform_data(struct cw1200_platform_data_sdio *pdata);
80
81#endif /* CW1200_PLAT_H_INCLUDED */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 75324d8157e3..f99d57e0ae47 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2434,6 +2434,15 @@ extern int __cond_resched_softirq(void);
2434 __cond_resched_softirq(); \ 2434 __cond_resched_softirq(); \
2435}) 2435})
2436 2436
2437static inline void cond_resched_rcu(void)
2438{
2439#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU)
2440 rcu_read_unlock();
2441 cond_resched();
2442 rcu_read_lock();
2443#endif
2444}
2445
2437/* 2446/*
2438 * Does a critical section need to be broken due to another 2447 * Does a critical section need to be broken due to another
2439 * task waiting?: (technically does not depend on CONFIG_PREEMPT, 2448 * task waiting?: (technically does not depend on CONFIG_PREEMPT,
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index dec1748cd002..5afefa01a13c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -319,6 +319,8 @@ enum {
319 SKB_GSO_GRE = 1 << 6, 319 SKB_GSO_GRE = 1 << 6,
320 320
321 SKB_GSO_UDP_TUNNEL = 1 << 7, 321 SKB_GSO_UDP_TUNNEL = 1 << 7,
322
323 SKB_GSO_MPLS = 1 << 8,
322}; 324};
323 325
324#if BITS_PER_LONG > 32 326#if BITS_PER_LONG > 32
@@ -384,11 +386,13 @@ typedef unsigned char *sk_buff_data_t;
384 * @no_fcs: Request NIC to treat last 4 bytes as Ethernet FCS 386 * @no_fcs: Request NIC to treat last 4 bytes as Ethernet FCS
385 * @dma_cookie: a cookie to one of several possible DMA operations 387 * @dma_cookie: a cookie to one of several possible DMA operations
386 * done by skb DMA functions 388 * done by skb DMA functions
389 * @napi_id: id of the NAPI struct this skb came from
387 * @secmark: security marking 390 * @secmark: security marking
388 * @mark: Generic packet mark 391 * @mark: Generic packet mark
389 * @dropcount: total number of sk_receive_queue overflows 392 * @dropcount: total number of sk_receive_queue overflows
390 * @vlan_proto: vlan encapsulation protocol 393 * @vlan_proto: vlan encapsulation protocol
391 * @vlan_tci: vlan tag control information 394 * @vlan_tci: vlan tag control information
395 * @inner_protocol: Protocol (encapsulation)
392 * @inner_transport_header: Inner transport layer header (encapsulation) 396 * @inner_transport_header: Inner transport layer header (encapsulation)
393 * @inner_network_header: Network layer header (encapsulation) 397 * @inner_network_header: Network layer header (encapsulation)
394 * @inner_mac_header: Link layer header (encapsulation) 398 * @inner_mac_header: Link layer header (encapsulation)
@@ -497,8 +501,11 @@ struct sk_buff {
497 /* 7/9 bit hole (depending on ndisc_nodetype presence) */ 501 /* 7/9 bit hole (depending on ndisc_nodetype presence) */
498 kmemcheck_bitfield_end(flags2); 502 kmemcheck_bitfield_end(flags2);
499 503
500#ifdef CONFIG_NET_DMA 504#if defined CONFIG_NET_DMA || defined CONFIG_NET_LL_RX_POLL
501 dma_cookie_t dma_cookie; 505 union {
506 unsigned int napi_id;
507 dma_cookie_t dma_cookie;
508 };
502#endif 509#endif
503#ifdef CONFIG_NETWORK_SECMARK 510#ifdef CONFIG_NETWORK_SECMARK
504 __u32 secmark; 511 __u32 secmark;
@@ -509,12 +516,13 @@ struct sk_buff {
509 __u32 reserved_tailroom; 516 __u32 reserved_tailroom;
510 }; 517 };
511 518
512 sk_buff_data_t inner_transport_header; 519 __be16 inner_protocol;
513 sk_buff_data_t inner_network_header; 520 __u16 inner_transport_header;
514 sk_buff_data_t inner_mac_header; 521 __u16 inner_network_header;
515 sk_buff_data_t transport_header; 522 __u16 inner_mac_header;
516 sk_buff_data_t network_header; 523 __u16 transport_header;
517 sk_buff_data_t mac_header; 524 __u16 network_header;
525 __u16 mac_header;
518 /* These elements must be at the end, see alloc_skb() for details. */ 526 /* These elements must be at the end, see alloc_skb() for details. */
519 sk_buff_data_t tail; 527 sk_buff_data_t tail;
520 sk_buff_data_t end; 528 sk_buff_data_t end;
@@ -1388,6 +1396,7 @@ static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset)
1388 skb_reset_tail_pointer(skb); 1396 skb_reset_tail_pointer(skb);
1389 skb->tail += offset; 1397 skb->tail += offset;
1390} 1398}
1399
1391#else /* NET_SKBUFF_DATA_USES_OFFSET */ 1400#else /* NET_SKBUFF_DATA_USES_OFFSET */
1392static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb) 1401static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
1393{ 1402{
@@ -1528,7 +1537,6 @@ static inline void skb_reset_mac_len(struct sk_buff *skb)
1528 skb->mac_len = skb->network_header - skb->mac_header; 1537 skb->mac_len = skb->network_header - skb->mac_header;
1529} 1538}
1530 1539
1531#ifdef NET_SKBUFF_DATA_USES_OFFSET
1532static inline unsigned char *skb_inner_transport_header(const struct sk_buff 1540static inline unsigned char *skb_inner_transport_header(const struct sk_buff
1533 *skb) 1541 *skb)
1534{ 1542{
@@ -1582,7 +1590,7 @@ static inline void skb_set_inner_mac_header(struct sk_buff *skb,
1582} 1590}
1583static inline bool skb_transport_header_was_set(const struct sk_buff *skb) 1591static inline bool skb_transport_header_was_set(const struct sk_buff *skb)
1584{ 1592{
1585 return skb->transport_header != ~0U; 1593 return skb->transport_header != (typeof(skb->transport_header))~0U;
1586} 1594}
1587 1595
1588static inline unsigned char *skb_transport_header(const struct sk_buff *skb) 1596static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
@@ -1625,7 +1633,7 @@ static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
1625 1633
1626static inline int skb_mac_header_was_set(const struct sk_buff *skb) 1634static inline int skb_mac_header_was_set(const struct sk_buff *skb)
1627{ 1635{
1628 return skb->mac_header != ~0U; 1636 return skb->mac_header != (typeof(skb->mac_header))~0U;
1629} 1637}
1630 1638
1631static inline void skb_reset_mac_header(struct sk_buff *skb) 1639static inline void skb_reset_mac_header(struct sk_buff *skb)
@@ -1639,112 +1647,6 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
1639 skb->mac_header += offset; 1647 skb->mac_header += offset;
1640} 1648}
1641 1649
1642#else /* NET_SKBUFF_DATA_USES_OFFSET */
1643static inline unsigned char *skb_inner_transport_header(const struct sk_buff
1644 *skb)
1645{
1646 return skb->inner_transport_header;
1647}
1648
1649static inline void skb_reset_inner_transport_header(struct sk_buff *skb)
1650{
1651 skb->inner_transport_header = skb->data;
1652}
1653
1654static inline void skb_set_inner_transport_header(struct sk_buff *skb,
1655 const int offset)
1656{
1657 skb->inner_transport_header = skb->data + offset;
1658}
1659
1660static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb)
1661{
1662 return skb->inner_network_header;
1663}
1664
1665static inline void skb_reset_inner_network_header(struct sk_buff *skb)
1666{
1667 skb->inner_network_header = skb->data;
1668}
1669
1670static inline void skb_set_inner_network_header(struct sk_buff *skb,
1671 const int offset)
1672{
1673 skb->inner_network_header = skb->data + offset;
1674}
1675
1676static inline unsigned char *skb_inner_mac_header(const struct sk_buff *skb)
1677{
1678 return skb->inner_mac_header;
1679}
1680
1681static inline void skb_reset_inner_mac_header(struct sk_buff *skb)
1682{
1683 skb->inner_mac_header = skb->data;
1684}
1685
1686static inline void skb_set_inner_mac_header(struct sk_buff *skb,
1687 const int offset)
1688{
1689 skb->inner_mac_header = skb->data + offset;
1690}
1691static inline bool skb_transport_header_was_set(const struct sk_buff *skb)
1692{
1693 return skb->transport_header != NULL;
1694}
1695
1696static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
1697{
1698 return skb->transport_header;
1699}
1700
1701static inline void skb_reset_transport_header(struct sk_buff *skb)
1702{
1703 skb->transport_header = skb->data;
1704}
1705
1706static inline void skb_set_transport_header(struct sk_buff *skb,
1707 const int offset)
1708{
1709 skb->transport_header = skb->data + offset;
1710}
1711
1712static inline unsigned char *skb_network_header(const struct sk_buff *skb)
1713{
1714 return skb->network_header;
1715}
1716
1717static inline void skb_reset_network_header(struct sk_buff *skb)
1718{
1719 skb->network_header = skb->data;
1720}
1721
1722static inline void skb_set_network_header(struct sk_buff *skb, const int offset)
1723{
1724 skb->network_header = skb->data + offset;
1725}
1726
1727static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
1728{
1729 return skb->mac_header;
1730}
1731
1732static inline int skb_mac_header_was_set(const struct sk_buff *skb)
1733{
1734 return skb->mac_header != NULL;
1735}
1736
1737static inline void skb_reset_mac_header(struct sk_buff *skb)
1738{
1739 skb->mac_header = skb->data;
1740}
1741
1742static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
1743{
1744 skb->mac_header = skb->data + offset;
1745}
1746#endif /* NET_SKBUFF_DATA_USES_OFFSET */
1747
1748static inline void skb_probe_transport_header(struct sk_buff *skb, 1650static inline void skb_probe_transport_header(struct sk_buff *skb,
1749 const int offset_hint) 1651 const int offset_hint)
1750{ 1652{
@@ -2483,6 +2385,7 @@ extern void skb_split(struct sk_buff *skb,
2483 struct sk_buff *skb1, const u32 len); 2385 struct sk_buff *skb1, const u32 len);
2484extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, 2386extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb,
2485 int shiftlen); 2387 int shiftlen);
2388extern void skb_scrub_packet(struct sk_buff *skb);
2486 2389
2487extern struct sk_buff *skb_segment(struct sk_buff *skb, 2390extern struct sk_buff *skb_segment(struct sk_buff *skb,
2488 netdev_features_t features); 2391 netdev_features_t features);
diff --git a/include/linux/ssb/ssb_driver_mips.h b/include/linux/ssb/ssb_driver_mips.h
index afe79d40a99e..6535e4718fde 100644
--- a/include/linux/ssb/ssb_driver_mips.h
+++ b/include/linux/ssb/ssb_driver_mips.h
@@ -20,6 +20,18 @@ struct ssb_pflash {
20 u32 window_size; 20 u32 window_size;
21}; 21};
22 22
23#ifdef CONFIG_SSB_SFLASH
24struct ssb_sflash {
25 bool present;
26 u32 window;
27 u32 blocksize;
28 u16 numblocks;
29 u32 size;
30
31 void *priv;
32};
33#endif
34
23struct ssb_mipscore { 35struct ssb_mipscore {
24 struct ssb_device *dev; 36 struct ssb_device *dev;
25 37
@@ -27,6 +39,9 @@ struct ssb_mipscore {
27 struct ssb_serial_port serial_ports[4]; 39 struct ssb_serial_port serial_ports[4];
28 40
29 struct ssb_pflash pflash; 41 struct ssb_pflash pflash;
42#ifdef CONFIG_SSB_SFLASH
43 struct ssb_sflash sflash;
44#endif
30}; 45};
31 46
32extern void ssb_mipscore_init(struct ssb_mipscore *mcore); 47extern void ssb_mipscore_init(struct ssb_mipscore *mcore);
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index 3a7256955b10..f9f931c89e3e 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -172,6 +172,7 @@
172#define SSB_SPROMSIZE_WORDS_R4 220 172#define SSB_SPROMSIZE_WORDS_R4 220
173#define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16)) 173#define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16))
174#define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16)) 174#define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16))
175#define SSB_SPROMSIZE_WORDS_R10 230
175#define SSB_SPROM_BASE1 0x1000 176#define SSB_SPROM_BASE1 0x1000
176#define SSB_SPROM_BASE31 0x0800 177#define SSB_SPROM_BASE31 0x0800
177#define SSB_SPROM_REVISION 0x007E 178#define SSB_SPROM_REVISION 0x007E
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index c1b3ed3fb787..9e495d31516e 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -80,6 +80,10 @@ struct stmmac_mdio_bus_data {
80 unsigned int phy_mask; 80 unsigned int phy_mask;
81 int *irqs; 81 int *irqs;
82 int probed_phy_irq; 82 int probed_phy_irq;
83#ifdef CONFIG_OF
84 int reset_gpio, active_low;
85 u32 delays[3];
86#endif
83}; 87};
84 88
85struct stmmac_dma_cfg { 89struct stmmac_dma_cfg {
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 5adbc33d1ab3..472120b4fac5 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -246,7 +246,6 @@ struct tcp_sock {
246 246
247 /* from STCP, retrans queue hinting */ 247 /* from STCP, retrans queue hinting */
248 struct sk_buff* lost_skb_hint; 248 struct sk_buff* lost_skb_hint;
249 struct sk_buff *scoreboard_skb_hint;
250 struct sk_buff *retransmit_skb_hint; 249 struct sk_buff *retransmit_skb_hint;
251 250
252 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ 251 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index e94c75ded111..36d36cc89329 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -63,6 +63,10 @@ void virtqueue_disable_cb(struct virtqueue *vq);
63 63
64bool virtqueue_enable_cb(struct virtqueue *vq); 64bool virtqueue_enable_cb(struct virtqueue *vq);
65 65
66unsigned virtqueue_enable_cb_prepare(struct virtqueue *vq);
67
68bool virtqueue_poll(struct virtqueue *vq, unsigned);
69
66bool virtqueue_enable_cb_delayed(struct virtqueue *vq); 70bool virtqueue_enable_cb_delayed(struct virtqueue *vq);
67 71
68void *virtqueue_detach_unused_buf(struct virtqueue *vq); 72void *virtqueue_detach_unused_buf(struct virtqueue *vq);