diff options
Diffstat (limited to 'include')
87 files changed, 1354 insertions, 553 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 | */ | ||
| 16 | struct 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); | |||
| 59 | static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, | 59 | static 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 */ |
| 1833 | enum ieee80211_pub_actioncode { | 1843 | enum 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) |
| 12 | struct socket *macvtap_get_socket(struct file *); | 12 | struct 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 | |||
| 233 | static 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 | |||
| 231 | static inline struct team_port *team_get_port_by_index_rcu(struct team *team, | 242 | static 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 | |||
| 53 | struct in_device { | 55 | struct 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 | ||
| 327 | static 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 | |||
| 327 | static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) | 332 | static 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); | |||
| 368 | static inline ktime_t ns_to_ktime(u64 ns) | 373 | static 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 | ||
| 380 | static 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); | |||
| 237 | int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); | 238 | int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); |
| 238 | int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); | 239 | int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); |
| 239 | int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf); | 240 | int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf); |
| 240 | 241 | int 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 | ||
| 163 | enum { | 164 | enum { |
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 | }; |
| 153 | enum { /* vlan_control */ | 153 | enum { /* 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 | ||
| 211 | struct 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 | |||
| 220 | enum { | ||
| 221 | MLX4_UPD_QP_MASK_PM_STATE = 32, | ||
| 222 | MLX4_UPD_QP_MASK_VSD = 33, | ||
| 223 | }; | ||
| 224 | |||
| 225 | enum { | ||
| 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 | |||
| 209 | enum { /* param3 */ | 245 | enum { /* 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 | ||
| 33 | struct device_node; | ||
| 33 | struct mv643xx_eth_platform_data { | 34 | struct 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 | ||
| 81 | enum sock_shutdown_cmd { | 81 | enum 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 | ||
| 87 | struct socket_wq { | 87 | struct 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 | ||
| 329 | enum { | 331 | enum { |
| 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 | ||
| 335 | enum gro_result { | 338 | enum gro_result { |
| @@ -446,6 +449,32 @@ extern void __napi_complete(struct napi_struct *n); | |||
| 446 | extern void napi_complete(struct napi_struct *n); | 449 | extern 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 | */ | ||
| 458 | extern 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 | */ | ||
| 466 | extern 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 | */ | ||
| 475 | extern 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 | ||
| 1597 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1637 | extern int register_netdevice_notifier(struct notifier_block *nb); |
| 1598 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | 1638 | extern int unregister_netdevice_notifier(struct notifier_block *nb); |
| 1639 | |||
| 1640 | struct netdev_notifier_info { | ||
| 1641 | struct net_device *dev; | ||
| 1642 | }; | ||
| 1643 | |||
| 1644 | struct netdev_notifier_change_info { | ||
| 1645 | struct netdev_notifier_info info; /* must be first */ | ||
| 1646 | unsigned int flags_changed; | ||
| 1647 | }; | ||
| 1648 | |||
| 1649 | static inline void netdev_notifier_info_init(struct netdev_notifier_info *info, | ||
| 1650 | struct net_device *dev) | ||
| 1651 | { | ||
| 1652 | info->dev = dev; | ||
| 1653 | } | ||
| 1654 | |||
| 1655 | static inline struct net_device * | ||
| 1656 | netdev_notifier_info_to_dev(const struct netdev_notifier_info *info) | ||
| 1657 | { | ||
| 1658 | return info->dev; | ||
| 1659 | } | ||
| 1660 | |||
| 1661 | extern int call_netdevice_notifiers_info(unsigned long val, struct net_device *dev, | ||
| 1662 | struct netdev_notifier_info *info); | ||
| 1599 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1663 | extern 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 */ | ||
| 1848 | struct 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 | |||
| 1856 | extern 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 | ||
| 1813 | static inline void input_queue_head_incr(struct softnet_data *sd) | 1894 | static 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 | ||
| 38 | extern void netfilter_init(void); | 38 | extern 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 | ||
| 51 | extern struct sock *__netlink_kernel_create(struct net *net, int unit, | 52 | extern struct sock *__netlink_kernel_create(struct net *net, int unit, |
| @@ -84,6 +85,22 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, | |||
| 84 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); | 85 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); |
| 85 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb); | 86 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb); |
| 86 | 87 | ||
| 88 | static inline struct sk_buff * | ||
| 89 | netlink_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 | ||
| 164 | struct netlink_tap { | ||
| 165 | struct net_device *dev; | ||
| 166 | struct module *module; | ||
| 167 | struct list_head list; | ||
| 168 | }; | ||
| 169 | |||
| 170 | extern int netlink_add_tap(struct netlink_tap *nt); | ||
| 171 | extern int __netlink_remove_tap(struct netlink_tap *nt); | ||
| 172 | extern 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 |
| 56 | extern int netpoll_rx_disable(struct net_device *dev); | 56 | extern void netpoll_rx_disable(struct net_device *dev); |
| 57 | extern void netpoll_rx_enable(struct net_device *dev); | 57 | extern void netpoll_rx_enable(struct net_device *dev); |
| 58 | #else | 58 | #else |
| 59 | static inline int netpoll_rx_disable(struct net_device *dev) { return 0; } | 59 | static inline void netpoll_rx_disable(struct net_device *dev) { return; } |
| 60 | static inline void netpoll_rx_enable(struct net_device *dev) { return; } | 60 | static 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 */ |
| 54 | typedef enum { | 55 | typedef 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 | */ | ||
| 522 | static 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 | */ | ||
| 531 | static inline bool phy_is_internal(struct phy_device *phydev) | ||
| 532 | { | ||
| 533 | return phydev->is_internal; | ||
| 534 | } | ||
| 535 | |||
| 511 | struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, | 536 | struct 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); |
| 513 | struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); | 538 | struct 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); | |||
| 545 | int phy_driver_register(struct phy_driver *new_driver); | 570 | int phy_driver_register(struct phy_driver *new_driver); |
| 546 | int phy_drivers_register(struct phy_driver *new_driver, int n); | 571 | int phy_drivers_register(struct phy_driver *new_driver, int n); |
| 547 | void phy_state_machine(struct work_struct *work); | 572 | void phy_state_machine(struct work_struct *work); |
| 573 | void phy_change(struct work_struct *work); | ||
| 574 | void phy_mac_interrupt(struct phy_device *phydev, int new_link); | ||
| 548 | void phy_start_machine(struct phy_device *phydev, | 575 | void phy_start_machine(struct phy_device *phydev, |
| 549 | void (*handler)(struct net_device *)); | 576 | void (*handler)(struct net_device *)); |
| 550 | void phy_stop_machine(struct phy_device *phydev); | 577 | void 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 | |||
| 11 | struct 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 | |||
| 27 | struct 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 | |||
| 79 | void __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 | ||
| 2437 | static 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 */ |
| 1392 | static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb) | 1401 | static 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 | ||
| 1532 | static inline unsigned char *skb_inner_transport_header(const struct sk_buff | 1540 | static 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 | } |
| 1583 | static inline bool skb_transport_header_was_set(const struct sk_buff *skb) | 1591 | static 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 | ||
| 1588 | static inline unsigned char *skb_transport_header(const struct sk_buff *skb) | 1596 | static 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 | ||
| 1626 | static inline int skb_mac_header_was_set(const struct sk_buff *skb) | 1634 | static 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 | ||
| 1631 | static inline void skb_reset_mac_header(struct sk_buff *skb) | 1639 | static 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 */ | ||
| 1643 | static inline unsigned char *skb_inner_transport_header(const struct sk_buff | ||
| 1644 | *skb) | ||
| 1645 | { | ||
| 1646 | return skb->inner_transport_header; | ||
| 1647 | } | ||
| 1648 | |||
| 1649 | static inline void skb_reset_inner_transport_header(struct sk_buff *skb) | ||
| 1650 | { | ||
| 1651 | skb->inner_transport_header = skb->data; | ||
| 1652 | } | ||
| 1653 | |||
| 1654 | static 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 | |||
| 1660 | static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb) | ||
| 1661 | { | ||
| 1662 | return skb->inner_network_header; | ||
| 1663 | } | ||
| 1664 | |||
| 1665 | static inline void skb_reset_inner_network_header(struct sk_buff *skb) | ||
| 1666 | { | ||
| 1667 | skb->inner_network_header = skb->data; | ||
| 1668 | } | ||
| 1669 | |||
| 1670 | static 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 | |||
| 1676 | static inline unsigned char *skb_inner_mac_header(const struct sk_buff *skb) | ||
| 1677 | { | ||
| 1678 | return skb->inner_mac_header; | ||
| 1679 | } | ||
| 1680 | |||
| 1681 | static inline void skb_reset_inner_mac_header(struct sk_buff *skb) | ||
| 1682 | { | ||
| 1683 | skb->inner_mac_header = skb->data; | ||
| 1684 | } | ||
| 1685 | |||
| 1686 | static 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 | } | ||
| 1691 | static inline bool skb_transport_header_was_set(const struct sk_buff *skb) | ||
| 1692 | { | ||
| 1693 | return skb->transport_header != NULL; | ||
| 1694 | } | ||
| 1695 | |||
| 1696 | static inline unsigned char *skb_transport_header(const struct sk_buff *skb) | ||
| 1697 | { | ||
| 1698 | return skb->transport_header; | ||
| 1699 | } | ||
| 1700 | |||
| 1701 | static inline void skb_reset_transport_header(struct sk_buff *skb) | ||
| 1702 | { | ||
| 1703 | skb->transport_header = skb->data; | ||
| 1704 | } | ||
| 1705 | |||
| 1706 | static inline void skb_set_transport_header(struct sk_buff *skb, | ||
| 1707 | const int offset) | ||
| 1708 | { | ||
| 1709 | skb->transport_header = skb->data + offset; | ||
| 1710 | } | ||
| 1711 | |||
| 1712 | static inline unsigned char *skb_network_header(const struct sk_buff *skb) | ||
| 1713 | { | ||
| 1714 | return skb->network_header; | ||
| 1715 | } | ||
| 1716 | |||
| 1717 | static inline void skb_reset_network_header(struct sk_buff *skb) | ||
| 1718 | { | ||
| 1719 | skb->network_header = skb->data; | ||
| 1720 | } | ||
| 1721 | |||
| 1722 | static inline void skb_set_network_header(struct sk_buff *skb, const int offset) | ||
| 1723 | { | ||
| 1724 | skb->network_header = skb->data + offset; | ||
| 1725 | } | ||
| 1726 | |||
| 1727 | static inline unsigned char *skb_mac_header(const struct sk_buff *skb) | ||
| 1728 | { | ||
| 1729 | return skb->mac_header; | ||
| 1730 | } | ||
| 1731 | |||
| 1732 | static inline int skb_mac_header_was_set(const struct sk_buff *skb) | ||
| 1733 | { | ||
| 1734 | return skb->mac_header != NULL; | ||
| 1735 | } | ||
| 1736 | |||
| 1737 | static inline void skb_reset_mac_header(struct sk_buff *skb) | ||
| 1738 | { | ||
| 1739 | skb->mac_header = skb->data; | ||
| 1740 | } | ||
| 1741 | |||
| 1742 | static 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 | |||
| 1748 | static inline void skb_probe_transport_header(struct sk_buff *skb, | 1650 | static 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); |
| 2484 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | 2386 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, |
| 2485 | int shiftlen); | 2387 | int shiftlen); |
| 2388 | extern void skb_scrub_packet(struct sk_buff *skb); | ||
| 2486 | 2389 | ||
| 2487 | extern struct sk_buff *skb_segment(struct sk_buff *skb, | 2390 | extern 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 | ||
| 24 | struct 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 | |||
| 23 | struct ssb_mipscore { | 35 | struct 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 | ||
| 32 | extern void ssb_mipscore_init(struct ssb_mipscore *mcore); | 47 | extern 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 | ||
| 85 | struct stmmac_dma_cfg { | 89 | struct 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 | ||
| 64 | bool virtqueue_enable_cb(struct virtqueue *vq); | 64 | bool virtqueue_enable_cb(struct virtqueue *vq); |
| 65 | 65 | ||
| 66 | unsigned virtqueue_enable_cb_prepare(struct virtqueue *vq); | ||
| 67 | |||
| 68 | bool virtqueue_poll(struct virtqueue *vq, unsigned); | ||
| 69 | |||
| 66 | bool virtqueue_enable_cb_delayed(struct virtqueue *vq); | 70 | bool virtqueue_enable_cb_delayed(struct virtqueue *vq); |
| 67 | 71 | ||
| 68 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); | 72 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); |
diff --git a/include/net/act_api.h b/include/net/act_api.h index 06ef7e926a66..b8ffac7b6bab 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
| @@ -18,7 +18,7 @@ struct tcf_common { | |||
| 18 | struct tcf_t tcfc_tm; | 18 | struct tcf_t tcfc_tm; |
| 19 | struct gnet_stats_basic_packed tcfc_bstats; | 19 | struct gnet_stats_basic_packed tcfc_bstats; |
| 20 | struct gnet_stats_queue tcfc_qstats; | 20 | struct gnet_stats_queue tcfc_qstats; |
| 21 | struct gnet_stats_rate_est tcfc_rate_est; | 21 | struct gnet_stats_rate_est64 tcfc_rate_est; |
| 22 | spinlock_t tcfc_lock; | 22 | spinlock_t tcfc_lock; |
| 23 | struct rcu_head tcfc_rcu; | 23 | struct rcu_head tcfc_rcu; |
| 24 | }; | 24 | }; |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 21f702704f24..c7b181cb47a6 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
| @@ -86,6 +86,9 @@ extern int ipv6_dev_get_saddr(struct net *net, | |||
| 86 | const struct in6_addr *daddr, | 86 | const struct in6_addr *daddr, |
| 87 | unsigned int srcprefs, | 87 | unsigned int srcprefs, |
| 88 | struct in6_addr *saddr); | 88 | struct in6_addr *saddr); |
| 89 | extern int __ipv6_get_lladdr(struct inet6_dev *idev, | ||
| 90 | struct in6_addr *addr, | ||
| 91 | unsigned char banned_flags); | ||
| 89 | extern int ipv6_get_lladdr(struct net_device *dev, | 92 | extern int ipv6_get_lladdr(struct net_device *dev, |
| 90 | struct in6_addr *addr, | 93 | struct in6_addr *addr, |
| 91 | unsigned char banned_flags); | 94 | unsigned char banned_flags); |
| @@ -155,6 +158,7 @@ extern bool ipv6_chk_mcast_addr(struct net_device *dev, | |||
| 155 | const struct in6_addr *group, | 158 | const struct in6_addr *group, |
| 156 | const struct in6_addr *src_addr); | 159 | const struct in6_addr *src_addr); |
| 157 | 160 | ||
| 161 | extern void ipv6_mc_dad_complete(struct inet6_dev *idev); | ||
| 158 | /* | 162 | /* |
| 159 | * identify MLD packets for MLD filter exceptions | 163 | * identify MLD packets for MLD filter exceptions |
| 160 | */ | 164 | */ |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index e0512aaef4b8..3c592cf473da 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
| @@ -107,7 +107,6 @@ enum { | |||
| 107 | HCI_MGMT, | 107 | HCI_MGMT, |
| 108 | HCI_PAIRABLE, | 108 | HCI_PAIRABLE, |
| 109 | HCI_SERVICE_CACHE, | 109 | HCI_SERVICE_CACHE, |
| 110 | HCI_LINK_KEYS, | ||
| 111 | HCI_DEBUG_KEYS, | 110 | HCI_DEBUG_KEYS, |
| 112 | HCI_UNREGISTER, | 111 | HCI_UNREGISTER, |
| 113 | 112 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 7cb6d360d147..f77885ea78c2 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -117,13 +117,6 @@ struct oob_data { | |||
| 117 | u8 randomizer[16]; | 117 | u8 randomizer[16]; |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | struct le_scan_params { | ||
| 121 | u8 type; | ||
| 122 | u16 interval; | ||
| 123 | u16 window; | ||
| 124 | int timeout; | ||
| 125 | }; | ||
| 126 | |||
| 127 | #define HCI_MAX_SHORT_NAME_LENGTH 10 | 120 | #define HCI_MAX_SHORT_NAME_LENGTH 10 |
| 128 | 121 | ||
| 129 | struct amp_assoc { | 122 | struct amp_assoc { |
| @@ -283,9 +276,6 @@ struct hci_dev { | |||
| 283 | 276 | ||
| 284 | struct delayed_work le_scan_disable; | 277 | struct delayed_work le_scan_disable; |
| 285 | 278 | ||
| 286 | struct work_struct le_scan; | ||
| 287 | struct le_scan_params le_scan_params; | ||
| 288 | |||
| 289 | __s8 adv_tx_power; | 279 | __s8 adv_tx_power; |
| 290 | __u8 adv_data[HCI_MAX_AD_LENGTH]; | 280 | __u8 adv_data[HCI_MAX_AD_LENGTH]; |
| 291 | __u8 adv_data_len; | 281 | __u8 adv_data_len; |
| @@ -432,6 +422,7 @@ void hci_inquiry_cache_update_resolve(struct hci_dev *hdev, | |||
| 432 | struct inquiry_entry *ie); | 422 | struct inquiry_entry *ie); |
| 433 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, | 423 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, |
| 434 | bool name_known, bool *ssp); | 424 | bool name_known, bool *ssp); |
| 425 | void hci_inquiry_cache_flush(struct hci_dev *hdev); | ||
| 435 | 426 | ||
| 436 | /* ----- HCI Connections ----- */ | 427 | /* ----- HCI Connections ----- */ |
| 437 | enum { | 428 | enum { |
| @@ -1114,6 +1105,16 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event); | |||
| 1114 | BIT(BDADDR_LE_PUBLIC) | \ | 1105 | BIT(BDADDR_LE_PUBLIC) | \ |
| 1115 | BIT(BDADDR_LE_RANDOM)) | 1106 | BIT(BDADDR_LE_RANDOM)) |
| 1116 | 1107 | ||
| 1108 | /* These LE scan and inquiry parameters were chosen according to LE General | ||
| 1109 | * Discovery Procedure specification. | ||
| 1110 | */ | ||
| 1111 | #define DISCOV_LE_SCAN_WIN 0x12 | ||
| 1112 | #define DISCOV_LE_SCAN_INT 0x12 | ||
| 1113 | #define DISCOV_LE_TIMEOUT msecs_to_jiffies(10240) | ||
| 1114 | #define DISCOV_INTERLEAVED_TIMEOUT msecs_to_jiffies(5120) | ||
| 1115 | #define DISCOV_INTERLEAVED_INQUIRY_LEN 0x04 | ||
| 1116 | #define DISCOV_BREDR_INQUIRY_LEN 0x08 | ||
| 1117 | |||
| 1117 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); | 1118 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); |
| 1118 | int mgmt_index_added(struct hci_dev *hdev); | 1119 | int mgmt_index_added(struct hci_dev *hdev); |
| 1119 | int mgmt_index_removed(struct hci_dev *hdev); | 1120 | int mgmt_index_removed(struct hci_dev *hdev); |
| @@ -1169,10 +1170,7 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
| 1169 | u8 ssp, u8 *eir, u16 eir_len); | 1170 | u8 ssp, u8 *eir, u16 eir_len); |
| 1170 | int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1171 | int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
| 1171 | u8 addr_type, s8 rssi, u8 *name, u8 name_len); | 1172 | u8 addr_type, s8 rssi, u8 *name, u8 name_len); |
| 1172 | int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status); | ||
| 1173 | int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status); | ||
| 1174 | int mgmt_discovering(struct hci_dev *hdev, u8 discovering); | 1173 | int mgmt_discovering(struct hci_dev *hdev, u8 discovering); |
| 1175 | int mgmt_interleaved_discovery(struct hci_dev *hdev); | ||
| 1176 | int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 1174 | int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
| 1177 | int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 1175 | int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
| 1178 | bool mgmt_valid_hdev(struct hci_dev *hdev); | 1176 | bool mgmt_valid_hdev(struct hci_dev *hdev); |
| @@ -1212,11 +1210,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, | |||
| 1212 | u16 latency, u16 to_multiplier); | 1210 | u16 latency, u16 to_multiplier); |
| 1213 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], | 1211 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], |
| 1214 | __u8 ltk[16]); | 1212 | __u8 ltk[16]); |
| 1215 | int hci_do_inquiry(struct hci_dev *hdev, u8 length); | ||
| 1216 | int hci_cancel_inquiry(struct hci_dev *hdev); | ||
| 1217 | int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window, | ||
| 1218 | int timeout); | ||
| 1219 | int hci_cancel_le_scan(struct hci_dev *hdev); | ||
| 1220 | 1213 | ||
| 1221 | u8 bdaddr_to_le(u8 bdaddr_type); | 1214 | u8 bdaddr_to_le(u8 bdaddr_type); |
| 1222 | 1215 | ||
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index fb94cf13c777..1a966afbbfa8 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
| @@ -242,7 +242,7 @@ struct l2cap_conn_rsp { | |||
| 242 | #define L2CAP_CID_SIGNALING 0x0001 | 242 | #define L2CAP_CID_SIGNALING 0x0001 |
| 243 | #define L2CAP_CID_CONN_LESS 0x0002 | 243 | #define L2CAP_CID_CONN_LESS 0x0002 |
| 244 | #define L2CAP_CID_A2MP 0x0003 | 244 | #define L2CAP_CID_A2MP 0x0003 |
| 245 | #define L2CAP_CID_LE_DATA 0x0004 | 245 | #define L2CAP_CID_ATT 0x0004 |
| 246 | #define L2CAP_CID_LE_SIGNALING 0x0005 | 246 | #define L2CAP_CID_LE_SIGNALING 0x0005 |
| 247 | #define L2CAP_CID_SMP 0x0006 | 247 | #define L2CAP_CID_SMP 0x0006 |
| 248 | #define L2CAP_CID_DYN_START 0x0040 | 248 | #define L2CAP_CID_DYN_START 0x0040 |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 26b5b692c22b..7b0730aeb892 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -188,6 +188,8 @@ struct ieee80211_channel { | |||
| 188 | * when used with 802.11g (on the 2.4 GHz band); filled by the | 188 | * when used with 802.11g (on the 2.4 GHz band); filled by the |
| 189 | * core code when registering the wiphy. | 189 | * core code when registering the wiphy. |
| 190 | * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode. | 190 | * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode. |
| 191 | * @IEEE80211_RATE_SUPPORTS_5MHZ: Rate can be used in 5 MHz mode | ||
| 192 | * @IEEE80211_RATE_SUPPORTS_10MHZ: Rate can be used in 10 MHz mode | ||
| 191 | */ | 193 | */ |
| 192 | enum ieee80211_rate_flags { | 194 | enum ieee80211_rate_flags { |
| 193 | IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, | 195 | IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, |
| @@ -195,6 +197,8 @@ enum ieee80211_rate_flags { | |||
| 195 | IEEE80211_RATE_MANDATORY_B = 1<<2, | 197 | IEEE80211_RATE_MANDATORY_B = 1<<2, |
| 196 | IEEE80211_RATE_MANDATORY_G = 1<<3, | 198 | IEEE80211_RATE_MANDATORY_G = 1<<3, |
| 197 | IEEE80211_RATE_ERP_G = 1<<4, | 199 | IEEE80211_RATE_ERP_G = 1<<4, |
| 200 | IEEE80211_RATE_SUPPORTS_5MHZ = 1<<5, | ||
| 201 | IEEE80211_RATE_SUPPORTS_10MHZ = 1<<6, | ||
| 198 | }; | 202 | }; |
| 199 | 203 | ||
| 200 | /** | 204 | /** |
| @@ -433,6 +437,30 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, | |||
| 433 | u32 prohibited_flags); | 437 | u32 prohibited_flags); |
| 434 | 438 | ||
| 435 | /** | 439 | /** |
| 440 | * ieee80211_chandef_rate_flags - returns rate flags for a channel | ||
| 441 | * | ||
| 442 | * In some channel types, not all rates may be used - for example CCK | ||
| 443 | * rates may not be used in 5/10 MHz channels. | ||
| 444 | * | ||
| 445 | * @chandef: channel definition for the channel | ||
| 446 | * | ||
| 447 | * Returns: rate flags which apply for this channel | ||
| 448 | */ | ||
| 449 | static inline enum ieee80211_rate_flags | ||
| 450 | ieee80211_chandef_rate_flags(struct cfg80211_chan_def *chandef) | ||
| 451 | { | ||
| 452 | switch (chandef->width) { | ||
| 453 | case NL80211_CHAN_WIDTH_5: | ||
| 454 | return IEEE80211_RATE_SUPPORTS_5MHZ; | ||
| 455 | case NL80211_CHAN_WIDTH_10: | ||
| 456 | return IEEE80211_RATE_SUPPORTS_10MHZ; | ||
| 457 | default: | ||
| 458 | break; | ||
| 459 | } | ||
| 460 | return 0; | ||
| 461 | } | ||
| 462 | |||
| 463 | /** | ||
| 436 | * enum survey_info_flags - survey information flags | 464 | * enum survey_info_flags - survey information flags |
| 437 | * | 465 | * |
| 438 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in | 466 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in |
| @@ -753,6 +781,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy, | |||
| 753 | * @STATION_INFO_LOCAL_PM: @local_pm filled | 781 | * @STATION_INFO_LOCAL_PM: @local_pm filled |
| 754 | * @STATION_INFO_PEER_PM: @peer_pm filled | 782 | * @STATION_INFO_PEER_PM: @peer_pm filled |
| 755 | * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled | 783 | * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled |
| 784 | * @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled | ||
| 785 | * @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled | ||
| 756 | */ | 786 | */ |
| 757 | enum station_info_flags { | 787 | enum station_info_flags { |
| 758 | STATION_INFO_INACTIVE_TIME = 1<<0, | 788 | STATION_INFO_INACTIVE_TIME = 1<<0, |
| @@ -781,6 +811,8 @@ enum station_info_flags { | |||
| 781 | STATION_INFO_NONPEER_PM = 1<<23, | 811 | STATION_INFO_NONPEER_PM = 1<<23, |
| 782 | STATION_INFO_RX_BYTES64 = 1<<24, | 812 | STATION_INFO_RX_BYTES64 = 1<<24, |
| 783 | STATION_INFO_TX_BYTES64 = 1<<25, | 813 | STATION_INFO_TX_BYTES64 = 1<<25, |
| 814 | STATION_INFO_CHAIN_SIGNAL = 1<<26, | ||
| 815 | STATION_INFO_CHAIN_SIGNAL_AVG = 1<<27, | ||
| 784 | }; | 816 | }; |
| 785 | 817 | ||
| 786 | /** | 818 | /** |
| @@ -857,6 +889,8 @@ struct sta_bss_parameters { | |||
| 857 | u16 beacon_interval; | 889 | u16 beacon_interval; |
| 858 | }; | 890 | }; |
| 859 | 891 | ||
| 892 | #define IEEE80211_MAX_CHAINS 4 | ||
| 893 | |||
| 860 | /** | 894 | /** |
| 861 | * struct station_info - station information | 895 | * struct station_info - station information |
| 862 | * | 896 | * |
| @@ -874,6 +908,9 @@ struct sta_bss_parameters { | |||
| 874 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. | 908 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. |
| 875 | * @signal_avg: Average signal strength, type depends on the wiphy's signal_type. | 909 | * @signal_avg: Average signal strength, type depends on the wiphy's signal_type. |
| 876 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. | 910 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. |
| 911 | * @chains: bitmask for filled values in @chain_signal, @chain_signal_avg | ||
| 912 | * @chain_signal: per-chain signal strength of last received packet in dBm | ||
| 913 | * @chain_signal_avg: per-chain signal strength average in dBm | ||
| 877 | * @txrate: current unicast bitrate from this station | 914 | * @txrate: current unicast bitrate from this station |
| 878 | * @rxrate: current unicast bitrate to this station | 915 | * @rxrate: current unicast bitrate to this station |
| 879 | * @rx_packets: packets received from this station | 916 | * @rx_packets: packets received from this station |
| @@ -909,6 +946,11 @@ struct station_info { | |||
| 909 | u8 plink_state; | 946 | u8 plink_state; |
| 910 | s8 signal; | 947 | s8 signal; |
| 911 | s8 signal_avg; | 948 | s8 signal_avg; |
| 949 | |||
| 950 | u8 chains; | ||
| 951 | s8 chain_signal[IEEE80211_MAX_CHAINS]; | ||
| 952 | s8 chain_signal_avg[IEEE80211_MAX_CHAINS]; | ||
| 953 | |||
| 912 | struct rate_info txrate; | 954 | struct rate_info txrate; |
| 913 | struct rate_info rxrate; | 955 | struct rate_info rxrate; |
| 914 | u32 rx_packets; | 956 | u32 rx_packets; |
| @@ -947,6 +989,7 @@ struct station_info { | |||
| 947 | * @MONITOR_FLAG_CONTROL: pass control frames | 989 | * @MONITOR_FLAG_CONTROL: pass control frames |
| 948 | * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering | 990 | * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering |
| 949 | * @MONITOR_FLAG_COOK_FRAMES: report frames after processing | 991 | * @MONITOR_FLAG_COOK_FRAMES: report frames after processing |
| 992 | * @MONITOR_FLAG_ACTIVE: active monitor, ACKs frames on its MAC address | ||
| 950 | */ | 993 | */ |
| 951 | enum monitor_flags { | 994 | enum monitor_flags { |
| 952 | MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, | 995 | MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, |
| @@ -954,6 +997,7 @@ enum monitor_flags { | |||
| 954 | MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, | 997 | MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, |
| 955 | MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS, | 998 | MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS, |
| 956 | MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, | 999 | MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, |
| 1000 | MONITOR_FLAG_ACTIVE = 1<<NL80211_MNTR_FLAG_ACTIVE, | ||
| 957 | }; | 1001 | }; |
| 958 | 1002 | ||
| 959 | /** | 1003 | /** |
| @@ -1108,6 +1152,9 @@ struct bss_parameters { | |||
| 1108 | * setting for new peer links. | 1152 | * setting for new peer links. |
| 1109 | * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake | 1153 | * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake |
| 1110 | * after transmitting its beacon. | 1154 | * after transmitting its beacon. |
| 1155 | * @plink_timeout: If no tx activity is seen from a STA we've established | ||
| 1156 | * peering with for longer than this time (in seconds), then remove it | ||
| 1157 | * from the STA's list of peers. Default is 30 minutes. | ||
| 1111 | */ | 1158 | */ |
| 1112 | struct mesh_config { | 1159 | struct mesh_config { |
| 1113 | u16 dot11MeshRetryTimeout; | 1160 | u16 dot11MeshRetryTimeout; |
| @@ -1137,6 +1184,7 @@ struct mesh_config { | |||
| 1137 | u16 dot11MeshHWMPconfirmationInterval; | 1184 | u16 dot11MeshHWMPconfirmationInterval; |
| 1138 | enum nl80211_mesh_power_mode power_mode; | 1185 | enum nl80211_mesh_power_mode power_mode; |
| 1139 | u16 dot11MeshAwakeWindowDuration; | 1186 | u16 dot11MeshAwakeWindowDuration; |
| 1187 | u32 plink_timeout; | ||
| 1140 | }; | 1188 | }; |
| 1141 | 1189 | ||
| 1142 | /** | 1190 | /** |
| @@ -1147,6 +1195,7 @@ struct mesh_config { | |||
| 1147 | * @sync_method: which synchronization method to use | 1195 | * @sync_method: which synchronization method to use |
| 1148 | * @path_sel_proto: which path selection protocol to use | 1196 | * @path_sel_proto: which path selection protocol to use |
| 1149 | * @path_metric: which metric to use | 1197 | * @path_metric: which metric to use |
| 1198 | * @auth_id: which authentication method this mesh is using | ||
| 1150 | * @ie: vendor information elements (optional) | 1199 | * @ie: vendor information elements (optional) |
| 1151 | * @ie_len: length of vendor information elements | 1200 | * @ie_len: length of vendor information elements |
| 1152 | * @is_authenticated: this mesh requires authentication | 1201 | * @is_authenticated: this mesh requires authentication |
| @@ -1155,6 +1204,7 @@ struct mesh_config { | |||
| 1155 | * @dtim_period: DTIM period to use | 1204 | * @dtim_period: DTIM period to use |
| 1156 | * @beacon_interval: beacon interval to use | 1205 | * @beacon_interval: beacon interval to use |
| 1157 | * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] | 1206 | * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] |
| 1207 | * @basic_rates: basic rates to use when creating the mesh | ||
| 1158 | * | 1208 | * |
| 1159 | * These parameters are fixed when the mesh is created. | 1209 | * These parameters are fixed when the mesh is created. |
| 1160 | */ | 1210 | */ |
| @@ -1165,6 +1215,7 @@ struct mesh_setup { | |||
| 1165 | u8 sync_method; | 1215 | u8 sync_method; |
| 1166 | u8 path_sel_proto; | 1216 | u8 path_sel_proto; |
| 1167 | u8 path_metric; | 1217 | u8 path_metric; |
| 1218 | u8 auth_id; | ||
| 1168 | const u8 *ie; | 1219 | const u8 *ie; |
| 1169 | u8 ie_len; | 1220 | u8 ie_len; |
| 1170 | bool is_authenticated; | 1221 | bool is_authenticated; |
| @@ -1173,6 +1224,7 @@ struct mesh_setup { | |||
| 1173 | u8 dtim_period; | 1224 | u8 dtim_period; |
| 1174 | u16 beacon_interval; | 1225 | u16 beacon_interval; |
| 1175 | int mcast_rate[IEEE80211_NUM_BANDS]; | 1226 | int mcast_rate[IEEE80211_NUM_BANDS]; |
| 1227 | u32 basic_rates; | ||
| 1176 | }; | 1228 | }; |
| 1177 | 1229 | ||
| 1178 | /** | 1230 | /** |
| @@ -1241,6 +1293,7 @@ struct cfg80211_ssid { | |||
| 1241 | * @scan_start: time (in jiffies) when the scan started | 1293 | * @scan_start: time (in jiffies) when the scan started |
| 1242 | * @wdev: the wireless device to scan for | 1294 | * @wdev: the wireless device to scan for |
| 1243 | * @aborted: (internal) scan request was notified as aborted | 1295 | * @aborted: (internal) scan request was notified as aborted |
| 1296 | * @notified: (internal) scan request was notified as done or aborted | ||
| 1244 | * @no_cck: used to send probe requests at non CCK rate in 2GHz band | 1297 | * @no_cck: used to send probe requests at non CCK rate in 2GHz band |
| 1245 | */ | 1298 | */ |
| 1246 | struct cfg80211_scan_request { | 1299 | struct cfg80211_scan_request { |
| @@ -1258,7 +1311,7 @@ struct cfg80211_scan_request { | |||
| 1258 | /* internal */ | 1311 | /* internal */ |
| 1259 | struct wiphy *wiphy; | 1312 | struct wiphy *wiphy; |
| 1260 | unsigned long scan_start; | 1313 | unsigned long scan_start; |
| 1261 | bool aborted; | 1314 | bool aborted, notified; |
| 1262 | bool no_cck; | 1315 | bool no_cck; |
| 1263 | 1316 | ||
| 1264 | /* keep last */ | 1317 | /* keep last */ |
| @@ -1406,7 +1459,8 @@ const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); | |||
| 1406 | * This structure provides information needed to complete IEEE 802.11 | 1459 | * This structure provides information needed to complete IEEE 802.11 |
| 1407 | * authentication. | 1460 | * authentication. |
| 1408 | * | 1461 | * |
| 1409 | * @bss: The BSS to authenticate with. | 1462 | * @bss: The BSS to authenticate with, the callee must obtain a reference |
| 1463 | * to it if it needs to keep it. | ||
| 1410 | * @auth_type: Authentication type (algorithm) | 1464 | * @auth_type: Authentication type (algorithm) |
| 1411 | * @ie: Extra IEs to add to Authentication frame or %NULL | 1465 | * @ie: Extra IEs to add to Authentication frame or %NULL |
| 1412 | * @ie_len: Length of ie buffer in octets | 1466 | * @ie_len: Length of ie buffer in octets |
| @@ -1444,11 +1498,10 @@ enum cfg80211_assoc_req_flags { | |||
| 1444 | * | 1498 | * |
| 1445 | * This structure provides information needed to complete IEEE 802.11 | 1499 | * This structure provides information needed to complete IEEE 802.11 |
| 1446 | * (re)association. | 1500 | * (re)association. |
| 1447 | * @bss: The BSS to associate with. If the call is successful the driver | 1501 | * @bss: The BSS to associate with. If the call is successful the driver is |
| 1448 | * is given a reference that it must release, normally via a call to | 1502 | * given a reference that it must give back to cfg80211_send_rx_assoc() |
| 1449 | * cfg80211_send_rx_assoc(), or, if association timed out, with a | 1503 | * or to cfg80211_assoc_timeout(). To ensure proper refcounting, new |
| 1450 | * call to cfg80211_put_bss() (in addition to calling | 1504 | * association requests while already associating must be rejected. |
| 1451 | * cfg80211_send_assoc_timeout()) | ||
| 1452 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL | 1505 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL |
| 1453 | * @ie_len: Length of ie buffer in octets | 1506 | * @ie_len: Length of ie buffer in octets |
| 1454 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association | 1507 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association |
| @@ -1850,7 +1903,9 @@ struct cfg80211_update_ft_ies_params { | |||
| 1850 | * @get_mpath: get a mesh path for the given parameters | 1903 | * @get_mpath: get a mesh path for the given parameters |
| 1851 | * @dump_mpath: dump mesh path callback -- resume dump at index @idx | 1904 | * @dump_mpath: dump mesh path callback -- resume dump at index @idx |
| 1852 | * @join_mesh: join the mesh network with the specified parameters | 1905 | * @join_mesh: join the mesh network with the specified parameters |
| 1906 | * (invoked with the wireless_dev mutex held) | ||
| 1853 | * @leave_mesh: leave the current mesh network | 1907 | * @leave_mesh: leave the current mesh network |
| 1908 | * (invoked with the wireless_dev mutex held) | ||
| 1854 | * | 1909 | * |
| 1855 | * @get_mesh_config: Get the current mesh configuration | 1910 | * @get_mesh_config: Get the current mesh configuration |
| 1856 | * | 1911 | * |
| @@ -1877,20 +1932,28 @@ struct cfg80211_update_ft_ies_params { | |||
| 1877 | * the scan/scan_done bracket too. | 1932 | * the scan/scan_done bracket too. |
| 1878 | * | 1933 | * |
| 1879 | * @auth: Request to authenticate with the specified peer | 1934 | * @auth: Request to authenticate with the specified peer |
| 1935 | * (invoked with the wireless_dev mutex held) | ||
| 1880 | * @assoc: Request to (re)associate with the specified peer | 1936 | * @assoc: Request to (re)associate with the specified peer |
| 1937 | * (invoked with the wireless_dev mutex held) | ||
| 1881 | * @deauth: Request to deauthenticate from the specified peer | 1938 | * @deauth: Request to deauthenticate from the specified peer |
| 1939 | * (invoked with the wireless_dev mutex held) | ||
| 1882 | * @disassoc: Request to disassociate from the specified peer | 1940 | * @disassoc: Request to disassociate from the specified peer |
| 1941 | * (invoked with the wireless_dev mutex held) | ||
| 1883 | * | 1942 | * |
| 1884 | * @connect: Connect to the ESS with the specified parameters. When connected, | 1943 | * @connect: Connect to the ESS with the specified parameters. When connected, |
| 1885 | * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. | 1944 | * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. |
| 1886 | * If the connection fails for some reason, call cfg80211_connect_result() | 1945 | * If the connection fails for some reason, call cfg80211_connect_result() |
| 1887 | * with the status from the AP. | 1946 | * with the status from the AP. |
| 1947 | * (invoked with the wireless_dev mutex held) | ||
| 1888 | * @disconnect: Disconnect from the BSS/ESS. | 1948 | * @disconnect: Disconnect from the BSS/ESS. |
| 1949 | * (invoked with the wireless_dev mutex held) | ||
| 1889 | * | 1950 | * |
| 1890 | * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call | 1951 | * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call |
| 1891 | * cfg80211_ibss_joined(), also call that function when changing BSSID due | 1952 | * cfg80211_ibss_joined(), also call that function when changing BSSID due |
| 1892 | * to a merge. | 1953 | * to a merge. |
| 1954 | * (invoked with the wireless_dev mutex held) | ||
| 1893 | * @leave_ibss: Leave the IBSS. | 1955 | * @leave_ibss: Leave the IBSS. |
| 1956 | * (invoked with the wireless_dev mutex held) | ||
| 1894 | * | 1957 | * |
| 1895 | * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or | 1958 | * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or |
| 1896 | * MESH mode) | 1959 | * MESH mode) |
| @@ -2307,6 +2370,7 @@ struct cfg80211_ops { | |||
| 2307 | * responds to probe-requests in hardware. | 2370 | * responds to probe-requests in hardware. |
| 2308 | * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. | 2371 | * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. |
| 2309 | * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. | 2372 | * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. |
| 2373 | * @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels. | ||
| 2310 | */ | 2374 | */ |
| 2311 | enum wiphy_flags { | 2375 | enum wiphy_flags { |
| 2312 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | 2376 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), |
| @@ -2330,6 +2394,7 @@ enum wiphy_flags { | |||
| 2330 | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), | 2394 | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), |
| 2331 | WIPHY_FLAG_OFFCHAN_TX = BIT(20), | 2395 | WIPHY_FLAG_OFFCHAN_TX = BIT(20), |
| 2332 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), | 2396 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), |
| 2397 | WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), | ||
| 2333 | }; | 2398 | }; |
| 2334 | 2399 | ||
| 2335 | /** | 2400 | /** |
| @@ -2556,6 +2621,9 @@ struct wiphy_wowlan_support { | |||
| 2556 | * may request, if implemented. | 2621 | * may request, if implemented. |
| 2557 | * | 2622 | * |
| 2558 | * @wowlan: WoWLAN support information | 2623 | * @wowlan: WoWLAN support information |
| 2624 | * @wowlan_config: current WoWLAN configuration; this should usually not be | ||
| 2625 | * used since access to it is necessarily racy, use the parameter passed | ||
| 2626 | * to the suspend() operation instead. | ||
| 2559 | * | 2627 | * |
| 2560 | * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. | 2628 | * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. |
| 2561 | * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden. | 2629 | * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden. |
| @@ -2622,7 +2690,8 @@ struct wiphy { | |||
| 2622 | u32 hw_version; | 2690 | u32 hw_version; |
| 2623 | 2691 | ||
| 2624 | #ifdef CONFIG_PM | 2692 | #ifdef CONFIG_PM |
| 2625 | struct wiphy_wowlan_support wowlan; | 2693 | const struct wiphy_wowlan_support *wowlan; |
| 2694 | struct cfg80211_wowlan *wowlan_config; | ||
| 2626 | #endif | 2695 | #endif |
| 2627 | 2696 | ||
| 2628 | u16 max_remain_on_channel_duration; | 2697 | u16 max_remain_on_channel_duration; |
| @@ -2820,7 +2889,7 @@ struct cfg80211_cached_keys; | |||
| 2820 | * @current_bss: (private) Used by the internal configuration code | 2889 | * @current_bss: (private) Used by the internal configuration code |
| 2821 | * @channel: (private) Used by the internal configuration code to track | 2890 | * @channel: (private) Used by the internal configuration code to track |
| 2822 | * the user-set AP, monitor and WDS channel | 2891 | * the user-set AP, monitor and WDS channel |
| 2823 | * @preset_chan: (private) Used by the internal configuration code to | 2892 | * @preset_chandef: (private) Used by the internal configuration code to |
| 2824 | * track the channel to be used for AP later | 2893 | * track the channel to be used for AP later |
| 2825 | * @bssid: (private) Used by the internal configuration code | 2894 | * @bssid: (private) Used by the internal configuration code |
| 2826 | * @ssid: (private) Used by the internal configuration code | 2895 | * @ssid: (private) Used by the internal configuration code |
| @@ -2834,14 +2903,23 @@ struct cfg80211_cached_keys; | |||
| 2834 | * by cfg80211 on change_interface | 2903 | * by cfg80211 on change_interface |
| 2835 | * @mgmt_registrations: list of registrations for management frames | 2904 | * @mgmt_registrations: list of registrations for management frames |
| 2836 | * @mgmt_registrations_lock: lock for the list | 2905 | * @mgmt_registrations_lock: lock for the list |
| 2837 | * @mtx: mutex used to lock data in this struct | 2906 | * @mtx: mutex used to lock data in this struct, may be used by drivers |
| 2838 | * @cleanup_work: work struct used for cleanup that can't be done directly | 2907 | * and some API functions require it held |
| 2839 | * @beacon_interval: beacon interval used on this device for transmitting | 2908 | * @beacon_interval: beacon interval used on this device for transmitting |
| 2840 | * beacons, 0 when not valid | 2909 | * beacons, 0 when not valid |
| 2841 | * @address: The address for this device, valid only if @netdev is %NULL | 2910 | * @address: The address for this device, valid only if @netdev is %NULL |
| 2842 | * @p2p_started: true if this is a P2P Device that has been started | 2911 | * @p2p_started: true if this is a P2P Device that has been started |
| 2843 | * @cac_started: true if DFS channel availability check has been started | 2912 | * @cac_started: true if DFS channel availability check has been started |
| 2844 | * @cac_start_time: timestamp (jiffies) when the dfs state was entered. | 2913 | * @cac_start_time: timestamp (jiffies) when the dfs state was entered. |
| 2914 | * @ps: powersave mode is enabled | ||
| 2915 | * @ps_timeout: dynamic powersave timeout | ||
| 2916 | * @ap_unexpected_nlportid: (private) netlink port ID of application | ||
| 2917 | * registered for unexpected class 3 frames (AP mode) | ||
| 2918 | * @conn: (private) cfg80211 software SME connection state machine data | ||
| 2919 | * @connect_keys: (private) keys to set after connection is established | ||
| 2920 | * @ibss_fixed: (private) IBSS is using fixed BSSID | ||
| 2921 | * @event_list: (private) list for internal event processing | ||
| 2922 | * @event_lock: (private) lock for event list | ||
| 2845 | */ | 2923 | */ |
| 2846 | struct wireless_dev { | 2924 | struct wireless_dev { |
| 2847 | struct wiphy *wiphy; | 2925 | struct wiphy *wiphy; |
| @@ -2858,8 +2936,6 @@ struct wireless_dev { | |||
| 2858 | 2936 | ||
| 2859 | struct mutex mtx; | 2937 | struct mutex mtx; |
| 2860 | 2938 | ||
| 2861 | struct work_struct cleanup_work; | ||
| 2862 | |||
| 2863 | bool use_4addr, p2p_started; | 2939 | bool use_4addr, p2p_started; |
| 2864 | 2940 | ||
| 2865 | u8 address[ETH_ALEN] __aligned(sizeof(u16)); | 2941 | u8 address[ETH_ALEN] __aligned(sizeof(u16)); |
| @@ -2867,11 +2943,6 @@ struct wireless_dev { | |||
| 2867 | /* currently used for IBSS and SME - might be rearranged later */ | 2943 | /* currently used for IBSS and SME - might be rearranged later */ |
| 2868 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 2944 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| 2869 | u8 ssid_len, mesh_id_len, mesh_id_up_len; | 2945 | u8 ssid_len, mesh_id_len, mesh_id_up_len; |
| 2870 | enum { | ||
| 2871 | CFG80211_SME_IDLE, | ||
| 2872 | CFG80211_SME_CONNECTING, | ||
| 2873 | CFG80211_SME_CONNECTED, | ||
| 2874 | } sme_state; | ||
| 2875 | struct cfg80211_conn *conn; | 2946 | struct cfg80211_conn *conn; |
| 2876 | struct cfg80211_cached_keys *connect_keys; | 2947 | struct cfg80211_cached_keys *connect_keys; |
| 2877 | 2948 | ||
| @@ -2989,6 +3060,15 @@ struct ieee80211_rate * | |||
| 2989 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | 3060 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, |
| 2990 | u32 basic_rates, int bitrate); | 3061 | u32 basic_rates, int bitrate); |
| 2991 | 3062 | ||
| 3063 | /** | ||
| 3064 | * ieee80211_mandatory_rates - get mandatory rates for a given band | ||
| 3065 | * @sband: the band to look for rates in | ||
| 3066 | * | ||
| 3067 | * This function returns a bitmap of the mandatory rates for the given | ||
| 3068 | * band, bits are set according to the rate position in the bitrates array. | ||
| 3069 | */ | ||
| 3070 | u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband); | ||
| 3071 | |||
| 2992 | /* | 3072 | /* |
| 2993 | * Radiotap parsing functions -- for controlled injection support | 3073 | * Radiotap parsing functions -- for controlled injection support |
| 2994 | * | 3074 | * |
| @@ -3392,122 +3472,87 @@ void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | |||
| 3392 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | 3472 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); |
| 3393 | 3473 | ||
| 3394 | /** | 3474 | /** |
| 3395 | * cfg80211_send_rx_auth - notification of processed authentication | 3475 | * cfg80211_rx_mlme_mgmt - notification of processed MLME management frame |
| 3396 | * @dev: network device | 3476 | * @dev: network device |
| 3397 | * @buf: authentication frame (header + body) | 3477 | * @buf: authentication frame (header + body) |
| 3398 | * @len: length of the frame data | 3478 | * @len: length of the frame data |
| 3399 | * | 3479 | * |
| 3400 | * This function is called whenever an authentication has been processed in | 3480 | * This function is called whenever an authentication, disassociation or |
| 3401 | * station mode. The driver is required to call either this function or | 3481 | * deauthentication frame has been received and processed in station mode. |
| 3402 | * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() | 3482 | * After being asked to authenticate via cfg80211_ops::auth() the driver must |
| 3403 | * call. This function may sleep. | 3483 | * call either this function or cfg80211_auth_timeout(). |
| 3484 | * After being asked to associate via cfg80211_ops::assoc() the driver must | ||
| 3485 | * call either this function or cfg80211_auth_timeout(). | ||
| 3486 | * While connected, the driver must calls this for received and processed | ||
| 3487 | * disassociation and deauthentication frames. If the frame couldn't be used | ||
| 3488 | * because it was unprotected, the driver must call the function | ||
| 3489 | * cfg80211_rx_unprot_mlme_mgmt() instead. | ||
| 3490 | * | ||
| 3491 | * This function may sleep. The caller must hold the corresponding wdev's mutex. | ||
| 3404 | */ | 3492 | */ |
| 3405 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | 3493 | void cfg80211_rx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len); |
| 3406 | 3494 | ||
| 3407 | /** | 3495 | /** |
| 3408 | * cfg80211_send_auth_timeout - notification of timed out authentication | 3496 | * cfg80211_auth_timeout - notification of timed out authentication |
| 3409 | * @dev: network device | 3497 | * @dev: network device |
| 3410 | * @addr: The MAC address of the device with which the authentication timed out | 3498 | * @addr: The MAC address of the device with which the authentication timed out |
| 3411 | * | 3499 | * |
| 3412 | * This function may sleep. | 3500 | * This function may sleep. The caller must hold the corresponding wdev's |
| 3501 | * mutex. | ||
| 3413 | */ | 3502 | */ |
| 3414 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); | 3503 | void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr); |
| 3415 | 3504 | ||
| 3416 | /** | 3505 | /** |
| 3417 | * cfg80211_send_rx_assoc - notification of processed association | 3506 | * cfg80211_rx_assoc_resp - notification of processed association response |
| 3418 | * @dev: network device | 3507 | * @dev: network device |
| 3419 | * @bss: the BSS struct association was requested for, the struct reference | 3508 | * @bss: the BSS that association was requested with, ownership of the pointer |
| 3420 | * is owned by cfg80211 after this call | 3509 | * moves to cfg80211 in this call |
| 3421 | * @buf: (re)association response frame (header + body) | 3510 | * @buf: authentication frame (header + body) |
| 3422 | * @len: length of the frame data | 3511 | * @len: length of the frame data |
| 3423 | * | 3512 | * |
| 3424 | * This function is called whenever a (re)association response has been | 3513 | * After being asked to associate via cfg80211_ops::assoc() the driver must |
| 3425 | * processed in station mode. The driver is required to call either this | 3514 | * call either this function or cfg80211_auth_timeout(). |
| 3426 | * function or cfg80211_send_assoc_timeout() to indicate the result of | 3515 | * |
| 3427 | * cfg80211_ops::assoc() call. This function may sleep. | 3516 | * This function may sleep. The caller must hold the corresponding wdev's mutex. |
| 3428 | */ | 3517 | */ |
| 3429 | void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, | 3518 | void cfg80211_rx_assoc_resp(struct net_device *dev, |
| 3519 | struct cfg80211_bss *bss, | ||
| 3430 | const u8 *buf, size_t len); | 3520 | const u8 *buf, size_t len); |
| 3431 | 3521 | ||
| 3432 | /** | 3522 | /** |
| 3433 | * cfg80211_send_assoc_timeout - notification of timed out association | 3523 | * cfg80211_assoc_timeout - notification of timed out association |
| 3434 | * @dev: network device | 3524 | * @dev: network device |
| 3435 | * @addr: The MAC address of the device with which the association timed out | 3525 | * @bss: The BSS entry with which association timed out. |
| 3436 | * | 3526 | * |
| 3437 | * This function may sleep. | 3527 | * This function may sleep. The caller must hold the corresponding wdev's mutex. |
| 3438 | */ | 3528 | */ |
| 3439 | void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); | 3529 | void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss); |
| 3440 | 3530 | ||
| 3441 | /** | 3531 | /** |
| 3442 | * cfg80211_send_deauth - notification of processed deauthentication | 3532 | * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame |
| 3443 | * @dev: network device | 3533 | * @dev: network device |
| 3444 | * @buf: deauthentication frame (header + body) | 3534 | * @buf: 802.11 frame (header + body) |
| 3445 | * @len: length of the frame data | 3535 | * @len: length of the frame data |
| 3446 | * | 3536 | * |
| 3447 | * This function is called whenever deauthentication has been processed in | 3537 | * This function is called whenever deauthentication has been processed in |
| 3448 | * station mode. This includes both received deauthentication frames and | 3538 | * station mode. This includes both received deauthentication frames and |
| 3449 | * locally generated ones. This function may sleep. | 3539 | * locally generated ones. This function may sleep. The caller must hold the |
| 3450 | */ | 3540 | * corresponding wdev's mutex. |
| 3451 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); | ||
| 3452 | |||
| 3453 | /** | ||
| 3454 | * __cfg80211_send_deauth - notification of processed deauthentication | ||
| 3455 | * @dev: network device | ||
| 3456 | * @buf: deauthentication frame (header + body) | ||
| 3457 | * @len: length of the frame data | ||
| 3458 | * | ||
| 3459 | * Like cfg80211_send_deauth(), but doesn't take the wdev lock. | ||
| 3460 | */ | ||
| 3461 | void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); | ||
| 3462 | |||
| 3463 | /** | ||
| 3464 | * cfg80211_send_disassoc - notification of processed disassociation | ||
| 3465 | * @dev: network device | ||
| 3466 | * @buf: disassociation response frame (header + body) | ||
| 3467 | * @len: length of the frame data | ||
| 3468 | * | ||
| 3469 | * This function is called whenever disassociation has been processed in | ||
| 3470 | * station mode. This includes both received disassociation frames and locally | ||
| 3471 | * generated ones. This function may sleep. | ||
| 3472 | */ | ||
| 3473 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); | ||
| 3474 | |||
| 3475 | /** | ||
| 3476 | * __cfg80211_send_disassoc - notification of processed disassociation | ||
| 3477 | * @dev: network device | ||
| 3478 | * @buf: disassociation response frame (header + body) | ||
| 3479 | * @len: length of the frame data | ||
| 3480 | * | ||
| 3481 | * Like cfg80211_send_disassoc(), but doesn't take the wdev lock. | ||
| 3482 | */ | 3541 | */ |
| 3483 | void __cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, | 3542 | void cfg80211_tx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len); |
| 3484 | size_t len); | ||
| 3485 | 3543 | ||
| 3486 | /** | 3544 | /** |
| 3487 | * cfg80211_send_unprot_deauth - notification of unprotected deauthentication | 3545 | * cfg80211_rx_unprot_mlme_mgmt - notification of unprotected mlme mgmt frame |
| 3488 | * @dev: network device | 3546 | * @dev: network device |
| 3489 | * @buf: deauthentication frame (header + body) | 3547 | * @buf: deauthentication frame (header + body) |
| 3490 | * @len: length of the frame data | 3548 | * @len: length of the frame data |
| 3491 | * | 3549 | * |
| 3492 | * This function is called whenever a received Deauthentication frame has been | 3550 | * This function is called whenever a received deauthentication or dissassoc |
| 3493 | * dropped in station mode because of MFP being used but the Deauthentication | 3551 | * frame has been dropped in station mode because of MFP being used but the |
| 3494 | * frame was not protected. This function may sleep. | 3552 | * frame was not protected. This function may sleep. |
| 3495 | */ | 3553 | */ |
| 3496 | void cfg80211_send_unprot_deauth(struct net_device *dev, const u8 *buf, | 3554 | void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, |
| 3497 | size_t len); | 3555 | const u8 *buf, size_t len); |
| 3498 | |||
| 3499 | /** | ||
| 3500 | * cfg80211_send_unprot_disassoc - notification of unprotected disassociation | ||
| 3501 | * @dev: network device | ||
| 3502 | * @buf: disassociation frame (header + body) | ||
| 3503 | * @len: length of the frame data | ||
| 3504 | * | ||
| 3505 | * This function is called whenever a received Disassociation frame has been | ||
| 3506 | * dropped in station mode because of MFP being used but the Disassociation | ||
| 3507 | * frame was not protected. This function may sleep. | ||
| 3508 | */ | ||
| 3509 | void cfg80211_send_unprot_disassoc(struct net_device *dev, const u8 *buf, | ||
| 3510 | size_t len); | ||
| 3511 | 3556 | ||
| 3512 | /** | 3557 | /** |
| 3513 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) | 3558 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) |
| @@ -4153,6 +4198,7 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev, | |||
| 4153 | * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver. | 4198 | * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver. |
| 4154 | * | 4199 | * |
| 4155 | * @wdev: the wireless device for which critical protocol is stopped. | 4200 | * @wdev: the wireless device for which critical protocol is stopped. |
| 4201 | * @gfp: allocation flags | ||
| 4156 | * | 4202 | * |
| 4157 | * This function can be called by the driver to indicate it has reverted | 4203 | * This function can be called by the driver to indicate it has reverted |
| 4158 | * operation back to normal. One reason could be that the duration given | 4204 | * operation back to normal. One reason could be that the duration given |
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index a79b6cfb02a8..cf8439ba4d11 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
| @@ -30,7 +30,7 @@ extern int gnet_stats_copy_basic(struct gnet_dump *d, | |||
| 30 | struct gnet_stats_basic_packed *b); | 30 | struct gnet_stats_basic_packed *b); |
| 31 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, | 31 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, |
| 32 | const struct gnet_stats_basic_packed *b, | 32 | const struct gnet_stats_basic_packed *b, |
| 33 | struct gnet_stats_rate_est *r); | 33 | struct gnet_stats_rate_est64 *r); |
| 34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, | 34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, |
| 35 | struct gnet_stats_queue *q); | 35 | struct gnet_stats_queue *q); |
| 36 | extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); | 36 | extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); |
| @@ -38,13 +38,13 @@ extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); | |||
| 38 | extern int gnet_stats_finish_copy(struct gnet_dump *d); | 38 | extern int gnet_stats_finish_copy(struct gnet_dump *d); |
| 39 | 39 | ||
| 40 | extern int gen_new_estimator(struct gnet_stats_basic_packed *bstats, | 40 | extern int gen_new_estimator(struct gnet_stats_basic_packed *bstats, |
| 41 | struct gnet_stats_rate_est *rate_est, | 41 | struct gnet_stats_rate_est64 *rate_est, |
| 42 | spinlock_t *stats_lock, struct nlattr *opt); | 42 | spinlock_t *stats_lock, struct nlattr *opt); |
| 43 | extern void gen_kill_estimator(struct gnet_stats_basic_packed *bstats, | 43 | extern void gen_kill_estimator(struct gnet_stats_basic_packed *bstats, |
| 44 | struct gnet_stats_rate_est *rate_est); | 44 | struct gnet_stats_rate_est64 *rate_est); |
| 45 | extern int gen_replace_estimator(struct gnet_stats_basic_packed *bstats, | 45 | extern int gen_replace_estimator(struct gnet_stats_basic_packed *bstats, |
| 46 | struct gnet_stats_rate_est *rate_est, | 46 | struct gnet_stats_rate_est64 *rate_est, |
| 47 | spinlock_t *stats_lock, struct nlattr *opt); | 47 | spinlock_t *stats_lock, struct nlattr *opt); |
| 48 | extern bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats, | 48 | extern bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats, |
| 49 | const struct gnet_stats_rate_est *rate_est); | 49 | const struct gnet_stats_rate_est64 *rate_est); |
| 50 | #endif | 50 | #endif |
diff --git a/include/net/gre.h b/include/net/gre.h index 9f03a390c826..57e4afdf7879 100644 --- a/include/net/gre.h +++ b/include/net/gre.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #define GREPROTO_CISCO 0 | 7 | #define GREPROTO_CISCO 0 |
| 8 | #define GREPROTO_PPTP 1 | 8 | #define GREPROTO_PPTP 1 |
| 9 | #define GREPROTO_MAX 2 | 9 | #define GREPROTO_MAX 2 |
| 10 | #define GRE_IP_PROTO_MAX 2 | ||
| 10 | 11 | ||
| 11 | struct gre_protocol { | 12 | struct gre_protocol { |
| 12 | int (*handler)(struct sk_buff *skb); | 13 | int (*handler)(struct sk_buff *skb); |
| @@ -22,6 +23,36 @@ struct gre_base_hdr { | |||
| 22 | int gre_add_protocol(const struct gre_protocol *proto, u8 version); | 23 | int gre_add_protocol(const struct gre_protocol *proto, u8 version); |
| 23 | int gre_del_protocol(const struct gre_protocol *proto, u8 version); | 24 | int gre_del_protocol(const struct gre_protocol *proto, u8 version); |
| 24 | 25 | ||
| 26 | struct gre_cisco_protocol { | ||
| 27 | int (*handler)(struct sk_buff *skb, const struct tnl_ptk_info *tpi); | ||
| 28 | int (*err_handler)(struct sk_buff *skb, u32 info, | ||
| 29 | const struct tnl_ptk_info *tpi); | ||
| 30 | u8 priority; | ||
| 31 | }; | ||
| 32 | |||
| 33 | int gre_cisco_register(struct gre_cisco_protocol *proto); | ||
| 34 | int gre_cisco_unregister(struct gre_cisco_protocol *proto); | ||
| 35 | |||
| 36 | int gre_offload_init(void); | ||
| 37 | void gre_offload_exit(void); | ||
| 38 | |||
| 39 | void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi, | ||
| 40 | int hdr_len); | ||
| 41 | struct sk_buff *gre_handle_offloads(struct sk_buff *skb, bool gre_csum); | ||
| 42 | |||
| 43 | static inline int ip_gre_calc_hlen(__be16 o_flags) | ||
| 44 | { | ||
| 45 | int addend = 4; | ||
| 46 | |||
| 47 | if (o_flags&TUNNEL_CSUM) | ||
| 48 | addend += 4; | ||
| 49 | if (o_flags&TUNNEL_KEY) | ||
| 50 | addend += 4; | ||
| 51 | if (o_flags&TUNNEL_SEQ) | ||
| 52 | addend += 4; | ||
| 53 | return addend; | ||
| 54 | } | ||
| 55 | |||
| 25 | static inline __be16 gre_flags_to_tnl_flags(__be16 flags) | 56 | static inline __be16 gre_flags_to_tnl_flags(__be16 flags) |
| 26 | { | 57 | { |
| 27 | __be16 tflags = 0; | 58 | __be16 tflags = 0; |
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index c3999632e616..c6d07cb074bc 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
| @@ -269,6 +269,7 @@ enum ieee80211_radiotap_type { | |||
| 269 | #define IEEE80211_RADIOTAP_MCS_HAVE_GI 0x04 | 269 | #define IEEE80211_RADIOTAP_MCS_HAVE_GI 0x04 |
| 270 | #define IEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08 | 270 | #define IEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08 |
| 271 | #define IEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10 | 271 | #define IEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10 |
| 272 | #define IEEE80211_RADIOTAP_MCS_HAVE_STBC 0x20 | ||
| 272 | 273 | ||
| 273 | #define IEEE80211_RADIOTAP_MCS_BW_MASK 0x03 | 274 | #define IEEE80211_RADIOTAP_MCS_BW_MASK 0x03 |
| 274 | #define IEEE80211_RADIOTAP_MCS_BW_20 0 | 275 | #define IEEE80211_RADIOTAP_MCS_BW_20 0 |
| @@ -278,6 +279,12 @@ enum ieee80211_radiotap_type { | |||
| 278 | #define IEEE80211_RADIOTAP_MCS_SGI 0x04 | 279 | #define IEEE80211_RADIOTAP_MCS_SGI 0x04 |
| 279 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 | 280 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 |
| 280 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 | 281 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 |
| 282 | #define IEEE80211_RADIOTAP_MCS_STBC_MASK 0x60 | ||
| 283 | #define IEEE80211_RADIOTAP_MCS_STBC_1 1 | ||
| 284 | #define IEEE80211_RADIOTAP_MCS_STBC_2 2 | ||
| 285 | #define IEEE80211_RADIOTAP_MCS_STBC_3 3 | ||
| 286 | |||
| 287 | #define IEEE80211_RADIOTAP_MCS_STBC_SHIFT 5 | ||
| 281 | 288 | ||
| 282 | /* For IEEE80211_RADIOTAP_AMPDU_STATUS */ | 289 | /* For IEEE80211_RADIOTAP_AMPDU_STATUS */ |
| 283 | #define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 | 290 | #define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 100fb8cec17c..736b5fb95474 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
| @@ -50,7 +50,7 @@ struct inet6_ifaddr { | |||
| 50 | 50 | ||
| 51 | int state; | 51 | int state; |
| 52 | 52 | ||
| 53 | __u8 probes; | 53 | __u8 dad_probes; |
| 54 | __u8 flags; | 54 | __u8 flags; |
| 55 | 55 | ||
| 56 | __u16 scope; | 56 | __u16 scope; |
| @@ -58,7 +58,7 @@ struct inet6_ifaddr { | |||
| 58 | unsigned long cstamp; /* created timestamp */ | 58 | unsigned long cstamp; /* created timestamp */ |
| 59 | unsigned long tstamp; /* updated timestamp */ | 59 | unsigned long tstamp; /* updated timestamp */ |
| 60 | 60 | ||
| 61 | struct timer_list timer; | 61 | struct timer_list dad_timer; |
| 62 | 62 | ||
| 63 | struct inet6_dev *idev; | 63 | struct inet6_dev *idev; |
| 64 | struct rt6_info *rt; | 64 | struct rt6_info *rt; |
| @@ -74,6 +74,7 @@ struct inet6_ifaddr { | |||
| 74 | bool tokenized; | 74 | bool tokenized; |
| 75 | 75 | ||
| 76 | struct rcu_head rcu; | 76 | struct rcu_head rcu; |
| 77 | struct in6_addr peer_addr; | ||
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| 79 | struct ip6_sf_socklist { | 80 | struct ip6_sf_socklist { |
| @@ -165,6 +166,7 @@ struct inet6_dev { | |||
| 165 | struct net_device *dev; | 166 | struct net_device *dev; |
| 166 | 167 | ||
| 167 | struct list_head addr_list; | 168 | struct list_head addr_list; |
| 169 | int valid_ll_addr_cnt; | ||
| 168 | 170 | ||
| 169 | struct ifmcaddr6 *mc_list; | 171 | struct ifmcaddr6 *mc_list; |
| 170 | struct ifmcaddr6 *mc_tomb; | 172 | struct ifmcaddr6 *mc_tomb; |
| @@ -172,10 +174,12 @@ struct inet6_dev { | |||
| 172 | unsigned char mc_qrv; | 174 | unsigned char mc_qrv; |
| 173 | unsigned char mc_gq_running; | 175 | unsigned char mc_gq_running; |
| 174 | unsigned char mc_ifc_count; | 176 | unsigned char mc_ifc_count; |
| 177 | unsigned char mc_dad_count; | ||
| 175 | unsigned long mc_v1_seen; | 178 | unsigned long mc_v1_seen; |
| 176 | unsigned long mc_maxdelay; | 179 | unsigned long mc_maxdelay; |
| 177 | struct timer_list mc_gq_timer; /* general query timer */ | 180 | struct timer_list mc_gq_timer; /* general query timer */ |
| 178 | struct timer_list mc_ifc_timer; /* interface change timer */ | 181 | struct timer_list mc_ifc_timer; /* interface change timer */ |
| 182 | struct timer_list mc_dad_timer; /* dad complete mc timer */ | ||
| 179 | 183 | ||
| 180 | struct ifacaddr6 *ac_list; | 184 | struct ifacaddr6 *ac_list; |
| 181 | rwlock_t lock; | 185 | rwlock_t lock; |
| @@ -192,9 +196,12 @@ struct inet6_dev { | |||
| 192 | struct in6_addr token; | 196 | struct in6_addr token; |
| 193 | 197 | ||
| 194 | struct neigh_parms *nd_parms; | 198 | struct neigh_parms *nd_parms; |
| 195 | struct inet6_dev *next; | ||
| 196 | struct ipv6_devconf cnf; | 199 | struct ipv6_devconf cnf; |
| 197 | struct ipv6_devstat stats; | 200 | struct ipv6_devstat stats; |
| 201 | |||
| 202 | struct timer_list rs_timer; | ||
| 203 | __u8 rs_probes; | ||
| 204 | |||
| 198 | unsigned long tstamp; /* ipv6InterfaceTable update timestamp */ | 205 | unsigned long tstamp; /* ipv6InterfaceTable update timestamp */ |
| 199 | struct rcu_head rcu; | 206 | struct rcu_head rcu; |
| 200 | }; | 207 | }; |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index aab73757bc4d..3bd22795c3e2 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
| @@ -134,12 +134,14 @@ static inline int INET_ECN_set_ce(struct sk_buff *skb) | |||
| 134 | { | 134 | { |
| 135 | switch (skb->protocol) { | 135 | switch (skb->protocol) { |
| 136 | case cpu_to_be16(ETH_P_IP): | 136 | case cpu_to_be16(ETH_P_IP): |
| 137 | if (skb->network_header + sizeof(struct iphdr) <= skb->tail) | 137 | if (skb_network_header(skb) + sizeof(struct iphdr) <= |
| 138 | skb_tail_pointer(skb)) | ||
| 138 | return IP_ECN_set_ce(ip_hdr(skb)); | 139 | return IP_ECN_set_ce(ip_hdr(skb)); |
| 139 | break; | 140 | break; |
| 140 | 141 | ||
| 141 | case cpu_to_be16(ETH_P_IPV6): | 142 | case cpu_to_be16(ETH_P_IPV6): |
| 142 | if (skb->network_header + sizeof(struct ipv6hdr) <= skb->tail) | 143 | if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= |
| 144 | skb_tail_pointer(skb)) | ||
| 143 | return IP6_ECN_set_ce(ipv6_hdr(skb)); | 145 | return IP6_ECN_set_ce(ipv6_hdr(skb)); |
| 144 | break; | 146 | break; |
| 145 | } | 147 | } |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 7235ae73a1e8..b21a7f06d6a4 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | * | 32 | * |
| 33 | * @faddr - Saved first hop address | 33 | * @faddr - Saved first hop address |
| 34 | * @nexthop - Saved nexthop address in LSRR and SSRR | 34 | * @nexthop - Saved nexthop address in LSRR and SSRR |
| 35 | * @is_data - Options in __data, rather than skb | ||
| 36 | * @is_strictroute - Strict source route | 35 | * @is_strictroute - Strict source route |
| 37 | * @srr_is_hit - Packet destination addr was our one | 36 | * @srr_is_hit - Packet destination addr was our one |
| 38 | * @is_changed - IP checksum more not valid | 37 | * @is_changed - IP checksum more not valid |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index e49db91593a9..cbf2be37c91a 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
| @@ -51,11 +51,13 @@ struct rtable; | |||
| 51 | 51 | ||
| 52 | struct fib_nh_exception { | 52 | struct fib_nh_exception { |
| 53 | struct fib_nh_exception __rcu *fnhe_next; | 53 | struct fib_nh_exception __rcu *fnhe_next; |
| 54 | int fnhe_genid; | ||
| 54 | __be32 fnhe_daddr; | 55 | __be32 fnhe_daddr; |
| 55 | u32 fnhe_pmtu; | 56 | u32 fnhe_pmtu; |
| 56 | __be32 fnhe_gw; | 57 | __be32 fnhe_gw; |
| 57 | unsigned long fnhe_expires; | 58 | unsigned long fnhe_expires; |
| 58 | struct rtable __rcu *fnhe_rth; | 59 | struct rtable __rcu *fnhe_rth_input; |
| 60 | struct rtable __rcu *fnhe_rth_output; | ||
| 59 | unsigned long fnhe_stamp; | 61 | unsigned long fnhe_stamp; |
| 60 | }; | 62 | }; |
| 61 | 63 | ||
| @@ -289,7 +291,6 @@ static inline int fib_num_tclassid_users(struct net *net) | |||
| 289 | extern int ip_fib_check_default(__be32 gw, struct net_device *dev); | 291 | extern int ip_fib_check_default(__be32 gw, struct net_device *dev); |
| 290 | extern int fib_sync_down_dev(struct net_device *dev, int force); | 292 | extern int fib_sync_down_dev(struct net_device *dev, int force); |
| 291 | extern int fib_sync_down_addr(struct net *net, __be32 local); | 293 | extern int fib_sync_down_addr(struct net *net, __be32 local); |
| 292 | extern void fib_update_nh_saddrs(struct net_device *dev); | ||
| 293 | extern int fib_sync_up(struct net_device *dev); | 294 | extern int fib_sync_up(struct net_device *dev); |
| 294 | extern void fib_select_multipath(struct fib_result *res); | 295 | extern void fib_select_multipath(struct fib_result *res); |
| 295 | 296 | ||
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 09b1360e10bf..781b3cf86a2f 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h | |||
| @@ -42,6 +42,7 @@ struct ip_tunnel { | |||
| 42 | struct ip_tunnel __rcu *next; | 42 | struct ip_tunnel __rcu *next; |
| 43 | struct hlist_node hash_node; | 43 | struct hlist_node hash_node; |
| 44 | struct net_device *dev; | 44 | struct net_device *dev; |
| 45 | struct net *net; /* netns for packet i/o */ | ||
| 45 | 46 | ||
| 46 | int err_count; /* Number of arrived ICMP errors */ | 47 | int err_count; /* Number of arrived ICMP errors */ |
| 47 | unsigned long err_time; /* Time when the last ICMP error | 48 | unsigned long err_time; /* Time when the last ICMP error |
| @@ -73,6 +74,7 @@ struct ip_tunnel { | |||
| 73 | #define TUNNEL_REC __cpu_to_be16(0x20) | 74 | #define TUNNEL_REC __cpu_to_be16(0x20) |
| 74 | #define TUNNEL_VERSION __cpu_to_be16(0x40) | 75 | #define TUNNEL_VERSION __cpu_to_be16(0x40) |
| 75 | #define TUNNEL_NO_KEY __cpu_to_be16(0x80) | 76 | #define TUNNEL_NO_KEY __cpu_to_be16(0x80) |
| 77 | #define TUNNEL_DONT_FRAGMENT __cpu_to_be16(0x0100) | ||
| 76 | 78 | ||
| 77 | struct tnl_ptk_info { | 79 | struct tnl_ptk_info { |
| 78 | __be16 flags; | 80 | __be16 flags; |
| @@ -92,6 +94,8 @@ struct ip_tunnel_net { | |||
| 92 | struct net_device *fb_tunnel_dev; | 94 | struct net_device *fb_tunnel_dev; |
| 93 | }; | 95 | }; |
| 94 | 96 | ||
| 97 | #ifdef CONFIG_INET | ||
| 98 | |||
| 95 | int ip_tunnel_init(struct net_device *dev); | 99 | int ip_tunnel_init(struct net_device *dev); |
| 96 | void ip_tunnel_uninit(struct net_device *dev); | 100 | void ip_tunnel_uninit(struct net_device *dev); |
| 97 | void ip_tunnel_dellink(struct net_device *dev, struct list_head *head); | 101 | void ip_tunnel_dellink(struct net_device *dev, struct list_head *head); |
| @@ -101,7 +105,7 @@ int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id, | |||
| 101 | void ip_tunnel_delete_net(struct ip_tunnel_net *itn); | 105 | void ip_tunnel_delete_net(struct ip_tunnel_net *itn); |
| 102 | 106 | ||
| 103 | void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, | 107 | void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, |
| 104 | const struct iphdr *tnl_params); | 108 | const struct iphdr *tnl_params, const u8 protocol); |
| 105 | int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd); | 109 | int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd); |
| 106 | int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu); | 110 | int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu); |
| 107 | 111 | ||
| @@ -155,23 +159,31 @@ static inline void tunnel_ip_select_ident(struct sk_buff *skb, | |||
| 155 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); | 159 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); |
| 156 | } | 160 | } |
| 157 | 161 | ||
| 158 | static inline void iptunnel_xmit(struct sk_buff *skb, struct net_device *dev) | 162 | int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto); |
| 159 | { | 163 | int iptunnel_xmit(struct net *net, struct rtable *rt, |
| 160 | int err; | 164 | struct sk_buff *skb, |
| 161 | int pkt_len = skb->len - skb_transport_offset(skb); | 165 | __be32 src, __be32 dst, __u8 proto, |
| 162 | struct pcpu_tstats *tstats = this_cpu_ptr(dev->tstats); | 166 | __u8 tos, __u8 ttl, __be16 df); |
| 163 | 167 | ||
| 164 | nf_reset(skb); | 168 | static inline void iptunnel_xmit_stats(int err, |
| 169 | struct net_device_stats *err_stats, | ||
| 170 | struct pcpu_tstats __percpu *stats) | ||
| 171 | { | ||
| 172 | if (err > 0) { | ||
| 173 | struct pcpu_tstats *tstats = this_cpu_ptr(stats); | ||
| 165 | 174 | ||
| 166 | err = ip_local_out(skb); | ||
| 167 | if (likely(net_xmit_eval(err) == 0)) { | ||
| 168 | u64_stats_update_begin(&tstats->syncp); | 175 | u64_stats_update_begin(&tstats->syncp); |
| 169 | tstats->tx_bytes += pkt_len; | 176 | tstats->tx_bytes += err; |
| 170 | tstats->tx_packets++; | 177 | tstats->tx_packets++; |
| 171 | u64_stats_update_end(&tstats->syncp); | 178 | u64_stats_update_end(&tstats->syncp); |
| 179 | } else if (err < 0) { | ||
| 180 | err_stats->tx_errors++; | ||
| 181 | err_stats->tx_aborted_errors++; | ||
| 172 | } else { | 182 | } else { |
| 173 | dev->stats.tx_errors++; | 183 | err_stats->tx_dropped++; |
| 174 | dev->stats.tx_aborted_errors++; | ||
| 175 | } | 184 | } |
| 176 | } | 185 | } |
| 186 | |||
| 187 | #endif /* CONFIG_INET */ | ||
| 188 | |||
| 177 | #endif /* __NET_IP_TUNNELS_H */ | 189 | #endif /* __NET_IP_TUNNELS_H */ |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 4c062ccff9aa..f0d70f066f3d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -197,31 +197,6 @@ ip_vs_fill_iph_skb(int af, const struct sk_buff *skb, struct ip_vs_iphdr *iphdr) | |||
| 197 | } | 197 | } |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | /* This function is a faster version of ip_vs_fill_iph_skb(). | ||
| 201 | * Where we only populate {s,d}addr (and avoid calling ipv6_find_hdr()). | ||
| 202 | * This is used by the some of the ip_vs_*_schedule() functions. | ||
| 203 | * (Mostly done to avoid ABI breakage of external schedulers) | ||
| 204 | */ | ||
| 205 | static inline void | ||
| 206 | ip_vs_fill_iph_addr_only(int af, const struct sk_buff *skb, | ||
| 207 | struct ip_vs_iphdr *iphdr) | ||
| 208 | { | ||
| 209 | #ifdef CONFIG_IP_VS_IPV6 | ||
| 210 | if (af == AF_INET6) { | ||
| 211 | const struct ipv6hdr *iph = | ||
| 212 | (struct ipv6hdr *)skb_network_header(skb); | ||
| 213 | iphdr->saddr.in6 = iph->saddr; | ||
| 214 | iphdr->daddr.in6 = iph->daddr; | ||
| 215 | } else | ||
| 216 | #endif | ||
| 217 | { | ||
| 218 | const struct iphdr *iph = | ||
| 219 | (struct iphdr *)skb_network_header(skb); | ||
| 220 | iphdr->saddr.ip = iph->saddr; | ||
| 221 | iphdr->daddr.ip = iph->daddr; | ||
| 222 | } | ||
| 223 | } | ||
| 224 | |||
| 225 | static inline void ip_vs_addr_copy(int af, union nf_inet_addr *dst, | 200 | static inline void ip_vs_addr_copy(int af, union nf_inet_addr *dst, |
| 226 | const union nf_inet_addr *src) | 201 | const union nf_inet_addr *src) |
| 227 | { | 202 | { |
| @@ -405,17 +380,18 @@ enum { | |||
| 405 | */ | 380 | */ |
| 406 | enum ip_vs_sctp_states { | 381 | enum ip_vs_sctp_states { |
| 407 | IP_VS_SCTP_S_NONE, | 382 | IP_VS_SCTP_S_NONE, |
| 408 | IP_VS_SCTP_S_INIT_CLI, | 383 | IP_VS_SCTP_S_INIT1, |
| 409 | IP_VS_SCTP_S_INIT_SER, | 384 | IP_VS_SCTP_S_INIT, |
| 410 | IP_VS_SCTP_S_INIT_ACK_CLI, | 385 | IP_VS_SCTP_S_COOKIE_SENT, |
| 411 | IP_VS_SCTP_S_INIT_ACK_SER, | 386 | IP_VS_SCTP_S_COOKIE_REPLIED, |
| 412 | IP_VS_SCTP_S_ECHO_CLI, | 387 | IP_VS_SCTP_S_COOKIE_WAIT, |
| 413 | IP_VS_SCTP_S_ECHO_SER, | 388 | IP_VS_SCTP_S_COOKIE, |
| 389 | IP_VS_SCTP_S_COOKIE_ECHOED, | ||
| 414 | IP_VS_SCTP_S_ESTABLISHED, | 390 | IP_VS_SCTP_S_ESTABLISHED, |
| 415 | IP_VS_SCTP_S_SHUT_CLI, | 391 | IP_VS_SCTP_S_SHUTDOWN_SENT, |
| 416 | IP_VS_SCTP_S_SHUT_SER, | 392 | IP_VS_SCTP_S_SHUTDOWN_RECEIVED, |
| 417 | IP_VS_SCTP_S_SHUT_ACK_CLI, | 393 | IP_VS_SCTP_S_SHUTDOWN_ACK_SENT, |
| 418 | IP_VS_SCTP_S_SHUT_ACK_SER, | 394 | IP_VS_SCTP_S_REJECTED, |
| 419 | IP_VS_SCTP_S_CLOSED, | 395 | IP_VS_SCTP_S_CLOSED, |
| 420 | IP_VS_SCTP_S_LAST | 396 | IP_VS_SCTP_S_LAST |
| 421 | }; | 397 | }; |
| @@ -814,7 +790,8 @@ struct ip_vs_scheduler { | |||
| 814 | 790 | ||
| 815 | /* selecting a server from the given service */ | 791 | /* selecting a server from the given service */ |
| 816 | struct ip_vs_dest* (*schedule)(struct ip_vs_service *svc, | 792 | struct ip_vs_dest* (*schedule)(struct ip_vs_service *svc, |
| 817 | const struct sk_buff *skb); | 793 | const struct sk_buff *skb, |
| 794 | struct ip_vs_iphdr *iph); | ||
| 818 | }; | 795 | }; |
| 819 | 796 | ||
| 820 | /* The persistence engine object */ | 797 | /* The persistence engine object */ |
| @@ -905,7 +882,7 @@ struct ip_vs_app { | |||
| 905 | struct ipvs_master_sync_state { | 882 | struct ipvs_master_sync_state { |
| 906 | struct list_head sync_queue; | 883 | struct list_head sync_queue; |
| 907 | struct ip_vs_sync_buff *sync_buff; | 884 | struct ip_vs_sync_buff *sync_buff; |
| 908 | int sync_queue_len; | 885 | unsigned long sync_queue_len; |
| 909 | unsigned int sync_queue_delay; | 886 | unsigned int sync_queue_delay; |
| 910 | struct task_struct *master_thread; | 887 | struct task_struct *master_thread; |
| 911 | struct delayed_work master_wakeup_work; | 888 | struct delayed_work master_wakeup_work; |
| @@ -998,10 +975,13 @@ struct netns_ipvs { | |||
| 998 | int sysctl_snat_reroute; | 975 | int sysctl_snat_reroute; |
| 999 | int sysctl_sync_ver; | 976 | int sysctl_sync_ver; |
| 1000 | int sysctl_sync_ports; | 977 | int sysctl_sync_ports; |
| 1001 | int sysctl_sync_qlen_max; | 978 | int sysctl_sync_persist_mode; |
| 979 | unsigned long sysctl_sync_qlen_max; | ||
| 1002 | int sysctl_sync_sock_size; | 980 | int sysctl_sync_sock_size; |
| 1003 | int sysctl_cache_bypass; | 981 | int sysctl_cache_bypass; |
| 1004 | int sysctl_expire_nodest_conn; | 982 | int sysctl_expire_nodest_conn; |
| 983 | int sysctl_sloppy_tcp; | ||
| 984 | int sysctl_sloppy_sctp; | ||
| 1005 | int sysctl_expire_quiescent_template; | 985 | int sysctl_expire_quiescent_template; |
| 1006 | int sysctl_sync_threshold[2]; | 986 | int sysctl_sync_threshold[2]; |
| 1007 | unsigned int sysctl_sync_refresh_period; | 987 | unsigned int sysctl_sync_refresh_period; |
| @@ -1044,6 +1024,8 @@ struct netns_ipvs { | |||
| 1044 | #define DEFAULT_SYNC_THRESHOLD 3 | 1024 | #define DEFAULT_SYNC_THRESHOLD 3 |
| 1045 | #define DEFAULT_SYNC_PERIOD 50 | 1025 | #define DEFAULT_SYNC_PERIOD 50 |
| 1046 | #define DEFAULT_SYNC_VER 1 | 1026 | #define DEFAULT_SYNC_VER 1 |
| 1027 | #define DEFAULT_SLOPPY_TCP 0 | ||
| 1028 | #define DEFAULT_SLOPPY_SCTP 0 | ||
| 1047 | #define DEFAULT_SYNC_REFRESH_PERIOD (0U * HZ) | 1029 | #define DEFAULT_SYNC_REFRESH_PERIOD (0U * HZ) |
| 1048 | #define DEFAULT_SYNC_RETRIES 0 | 1030 | #define DEFAULT_SYNC_RETRIES 0 |
| 1049 | #define IPVS_SYNC_WAKEUP_RATE 8 | 1031 | #define IPVS_SYNC_WAKEUP_RATE 8 |
| @@ -1080,12 +1062,27 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs) | |||
| 1080 | return ipvs->sysctl_sync_ver; | 1062 | return ipvs->sysctl_sync_ver; |
| 1081 | } | 1063 | } |
| 1082 | 1064 | ||
| 1065 | static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs) | ||
| 1066 | { | ||
| 1067 | return ipvs->sysctl_sloppy_tcp; | ||
| 1068 | } | ||
| 1069 | |||
| 1070 | static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs) | ||
| 1071 | { | ||
| 1072 | return ipvs->sysctl_sloppy_sctp; | ||
| 1073 | } | ||
| 1074 | |||
| 1083 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) | 1075 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) |
| 1084 | { | 1076 | { |
| 1085 | return ACCESS_ONCE(ipvs->sysctl_sync_ports); | 1077 | return ACCESS_ONCE(ipvs->sysctl_sync_ports); |
| 1086 | } | 1078 | } |
| 1087 | 1079 | ||
| 1088 | static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | 1080 | static inline int sysctl_sync_persist_mode(struct netns_ipvs *ipvs) |
| 1081 | { | ||
| 1082 | return ipvs->sysctl_sync_persist_mode; | ||
| 1083 | } | ||
| 1084 | |||
| 1085 | static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | ||
| 1089 | { | 1086 | { |
| 1090 | return ipvs->sysctl_sync_qlen_max; | 1087 | return ipvs->sysctl_sync_qlen_max; |
| 1091 | } | 1088 | } |
| @@ -1133,12 +1130,27 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs) | |||
| 1133 | return DEFAULT_SYNC_VER; | 1130 | return DEFAULT_SYNC_VER; |
| 1134 | } | 1131 | } |
| 1135 | 1132 | ||
| 1133 | static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs) | ||
| 1134 | { | ||
| 1135 | return DEFAULT_SLOPPY_TCP; | ||
| 1136 | } | ||
| 1137 | |||
| 1138 | static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs) | ||
| 1139 | { | ||
| 1140 | return DEFAULT_SLOPPY_SCTP; | ||
| 1141 | } | ||
| 1142 | |||
| 1136 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) | 1143 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) |
| 1137 | { | 1144 | { |
| 1138 | return 1; | 1145 | return 1; |
| 1139 | } | 1146 | } |
| 1140 | 1147 | ||
| 1141 | static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | 1148 | static inline int sysctl_sync_persist_mode(struct netns_ipvs *ipvs) |
| 1149 | { | ||
| 1150 | return 0; | ||
| 1151 | } | ||
| 1152 | |||
| 1153 | static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | ||
| 1142 | { | 1154 | { |
| 1143 | return IPVS_SYNC_QLEN_MAX; | 1155 | return IPVS_SYNC_QLEN_MAX; |
| 1144 | } | 1156 | } |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 0810aa57c780..5fe564985171 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -260,6 +260,12 @@ static inline void fl6_sock_release(struct ip6_flowlabel *fl) | |||
| 260 | 260 | ||
| 261 | extern void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); | 261 | extern void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); |
| 262 | 262 | ||
| 263 | int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, | ||
| 264 | struct icmp6hdr *thdr, int len); | ||
| 265 | |||
| 266 | struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb, | ||
| 267 | struct sock *sk, struct flowi6 *fl6); | ||
| 268 | |||
| 263 | extern int ip6_ra_control(struct sock *sk, int sel); | 269 | extern int ip6_ra_control(struct sock *sk, int sel); |
| 264 | 270 | ||
| 265 | extern int ipv6_parse_hopopts(struct sk_buff *skb); | 271 | extern int ipv6_parse_hopopts(struct sk_buff *skb); |
| @@ -853,8 +859,8 @@ static inline int snmp6_unregister_dev(struct inet6_dev *idev) { return 0; } | |||
| 853 | #endif | 859 | #endif |
| 854 | 860 | ||
| 855 | #ifdef CONFIG_SYSCTL | 861 | #ifdef CONFIG_SYSCTL |
| 856 | extern ctl_table ipv6_route_table_template[]; | 862 | extern struct ctl_table ipv6_route_table_template[]; |
| 857 | extern ctl_table ipv6_icmp_table_template[]; | 863 | extern struct ctl_table ipv6_icmp_table_template[]; |
| 858 | 864 | ||
| 859 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); | 865 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); |
| 860 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); | 866 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); |
diff --git a/include/net/ll_poll.h b/include/net/ll_poll.h new file mode 100644 index 000000000000..76f034087743 --- /dev/null +++ b/include/net/ll_poll.h | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | /* | ||
| 2 | * Low Latency Sockets | ||
| 3 | * Copyright(c) 2013 Intel Corporation. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms and conditions of the GNU General Public License, | ||
| 7 | * version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along with | ||
| 15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 17 | * | ||
| 18 | * Author: Eliezer Tamir | ||
| 19 | * | ||
| 20 | * Contact Information: | ||
| 21 | * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef _LINUX_NET_LL_POLL_H | ||
| 25 | #define _LINUX_NET_LL_POLL_H | ||
| 26 | |||
| 27 | #include <linux/netdevice.h> | ||
| 28 | #include <net/ip.h> | ||
| 29 | |||
| 30 | #ifdef CONFIG_NET_LL_RX_POLL | ||
| 31 | |||
| 32 | struct napi_struct; | ||
| 33 | extern unsigned int sysctl_net_ll_read __read_mostly; | ||
| 34 | extern unsigned int sysctl_net_ll_poll __read_mostly; | ||
| 35 | |||
| 36 | /* return values from ndo_ll_poll */ | ||
| 37 | #define LL_FLUSH_FAILED -1 | ||
| 38 | #define LL_FLUSH_BUSY -2 | ||
| 39 | |||
| 40 | static inline bool net_busy_loop_on(void) | ||
| 41 | { | ||
| 42 | return sysctl_net_ll_poll; | ||
| 43 | } | ||
| 44 | |||
| 45 | /* a wrapper to make debug_smp_processor_id() happy | ||
| 46 | * we can use sched_clock() because we don't care much about precision | ||
| 47 | * we only care that the average is bounded | ||
| 48 | */ | ||
| 49 | #ifdef CONFIG_DEBUG_PREEMPT | ||
| 50 | static inline u64 busy_loop_us_clock(void) | ||
| 51 | { | ||
| 52 | u64 rc; | ||
| 53 | |||
| 54 | preempt_disable_notrace(); | ||
| 55 | rc = sched_clock(); | ||
| 56 | preempt_enable_no_resched_notrace(); | ||
| 57 | |||
| 58 | return rc >> 10; | ||
| 59 | } | ||
| 60 | #else /* CONFIG_DEBUG_PREEMPT */ | ||
| 61 | static inline u64 busy_loop_us_clock(void) | ||
| 62 | { | ||
| 63 | return sched_clock() >> 10; | ||
| 64 | } | ||
| 65 | #endif /* CONFIG_DEBUG_PREEMPT */ | ||
| 66 | |||
| 67 | static inline unsigned long sk_busy_loop_end_time(struct sock *sk) | ||
| 68 | { | ||
| 69 | return busy_loop_us_clock() + ACCESS_ONCE(sk->sk_ll_usec); | ||
| 70 | } | ||
| 71 | |||
| 72 | /* in poll/select we use the global sysctl_net_ll_poll value */ | ||
| 73 | static inline unsigned long busy_loop_end_time(void) | ||
| 74 | { | ||
| 75 | return busy_loop_us_clock() + ACCESS_ONCE(sysctl_net_ll_poll); | ||
| 76 | } | ||
| 77 | |||
| 78 | static inline bool sk_can_busy_loop(struct sock *sk) | ||
| 79 | { | ||
| 80 | return sk->sk_ll_usec && sk->sk_napi_id && | ||
| 81 | !need_resched() && !signal_pending(current); | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | static inline bool busy_loop_timeout(unsigned long end_time) | ||
| 86 | { | ||
| 87 | unsigned long now = busy_loop_us_clock(); | ||
| 88 | |||
| 89 | return time_after(now, end_time); | ||
| 90 | } | ||
| 91 | |||
| 92 | /* when used in sock_poll() nonblock is known at compile time to be true | ||
| 93 | * so the loop and end_time will be optimized out | ||
| 94 | */ | ||
| 95 | static inline bool sk_busy_loop(struct sock *sk, int nonblock) | ||
| 96 | { | ||
| 97 | unsigned long end_time = !nonblock ? sk_busy_loop_end_time(sk) : 0; | ||
| 98 | const struct net_device_ops *ops; | ||
| 99 | struct napi_struct *napi; | ||
| 100 | int rc = false; | ||
| 101 | |||
| 102 | /* | ||
| 103 | * rcu read lock for napi hash | ||
| 104 | * bh so we don't race with net_rx_action | ||
| 105 | */ | ||
| 106 | rcu_read_lock_bh(); | ||
| 107 | |||
| 108 | napi = napi_by_id(sk->sk_napi_id); | ||
| 109 | if (!napi) | ||
| 110 | goto out; | ||
| 111 | |||
| 112 | ops = napi->dev->netdev_ops; | ||
| 113 | if (!ops->ndo_ll_poll) | ||
| 114 | goto out; | ||
| 115 | |||
| 116 | do { | ||
| 117 | rc = ops->ndo_ll_poll(napi); | ||
| 118 | |||
| 119 | if (rc == LL_FLUSH_FAILED) | ||
| 120 | break; /* permanent failure */ | ||
| 121 | |||
| 122 | if (rc > 0) | ||
| 123 | /* local bh are disabled so it is ok to use _BH */ | ||
| 124 | NET_ADD_STATS_BH(sock_net(sk), | ||
| 125 | LINUX_MIB_LOWLATENCYRXPACKETS, rc); | ||
| 126 | |||
| 127 | } while (!nonblock && skb_queue_empty(&sk->sk_receive_queue) && | ||
| 128 | !need_resched() && !busy_loop_timeout(end_time)); | ||
| 129 | |||
| 130 | rc = !skb_queue_empty(&sk->sk_receive_queue); | ||
| 131 | out: | ||
| 132 | rcu_read_unlock_bh(); | ||
| 133 | return rc; | ||
| 134 | } | ||
| 135 | |||
| 136 | /* used in the NIC receive handler to mark the skb */ | ||
| 137 | static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) | ||
| 138 | { | ||
| 139 | skb->napi_id = napi->napi_id; | ||
| 140 | } | ||
| 141 | |||
| 142 | /* used in the protocol hanlder to propagate the napi_id to the socket */ | ||
| 143 | static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) | ||
| 144 | { | ||
| 145 | sk->sk_napi_id = skb->napi_id; | ||
| 146 | } | ||
| 147 | |||
| 148 | #else /* CONFIG_NET_LL_RX_POLL */ | ||
| 149 | static inline unsigned long net_busy_loop_on(void) | ||
| 150 | { | ||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | |||
| 154 | static inline unsigned long busy_loop_end_time(void) | ||
| 155 | { | ||
| 156 | return 0; | ||
| 157 | } | ||
| 158 | |||
| 159 | static inline bool sk_can_busy_loop(struct sock *sk) | ||
| 160 | { | ||
| 161 | return false; | ||
| 162 | } | ||
| 163 | |||
| 164 | static inline bool sk_busy_poll(struct sock *sk, int nonblock) | ||
| 165 | { | ||
| 166 | return false; | ||
| 167 | } | ||
| 168 | |||
| 169 | static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) | ||
| 170 | { | ||
| 171 | } | ||
| 172 | |||
| 173 | static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) | ||
| 174 | { | ||
| 175 | } | ||
| 176 | |||
| 177 | static inline bool busy_loop_timeout(unsigned long end_time) | ||
| 178 | { | ||
| 179 | return true; | ||
| 180 | } | ||
| 181 | |||
| 182 | #endif /* CONFIG_NET_LL_RX_POLL */ | ||
| 183 | #endif /* _LINUX_NET_LL_POLL_H */ | ||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 885898a40d13..5b7a3dadadde 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -217,8 +217,8 @@ struct ieee80211_chanctx_conf { | |||
| 217 | * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface | 217 | * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface |
| 218 | * @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS) | 218 | * @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS) |
| 219 | * changed (currently only in P2P client mode, GO mode will be later) | 219 | * changed (currently only in P2P client mode, GO mode will be later) |
| 220 | * @BSS_CHANGED_DTIM_PERIOD: the DTIM period value was changed (set when | 220 | * @BSS_CHANGED_BEACON_INFO: Data from the AP's beacon became available: |
| 221 | * it becomes valid, managed mode only) | 221 | * currently dtim_period only is under consideration. |
| 222 | * @BSS_CHANGED_BANDWIDTH: The bandwidth used by this interface changed, | 222 | * @BSS_CHANGED_BANDWIDTH: The bandwidth used by this interface changed, |
| 223 | * note that this is only called when it changes after the channel | 223 | * note that this is only called when it changes after the channel |
| 224 | * context had been assigned. | 224 | * context had been assigned. |
| @@ -244,7 +244,7 @@ enum ieee80211_bss_change { | |||
| 244 | BSS_CHANGED_PS = 1<<17, | 244 | BSS_CHANGED_PS = 1<<17, |
| 245 | BSS_CHANGED_TXPOWER = 1<<18, | 245 | BSS_CHANGED_TXPOWER = 1<<18, |
| 246 | BSS_CHANGED_P2P_PS = 1<<19, | 246 | BSS_CHANGED_P2P_PS = 1<<19, |
| 247 | BSS_CHANGED_DTIM_PERIOD = 1<<20, | 247 | BSS_CHANGED_BEACON_INFO = 1<<20, |
| 248 | BSS_CHANGED_BANDWIDTH = 1<<21, | 248 | BSS_CHANGED_BANDWIDTH = 1<<21, |
| 249 | 249 | ||
| 250 | /* when adding here, make sure to change ieee80211_reconfig */ | 250 | /* when adding here, make sure to change ieee80211_reconfig */ |
| @@ -288,7 +288,7 @@ enum ieee80211_rssi_event { | |||
| 288 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag | 288 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag |
| 289 | * @dtim_period: num of beacons before the next DTIM, for beaconing, | 289 | * @dtim_period: num of beacons before the next DTIM, for beaconing, |
| 290 | * valid in station mode only if after the driver was notified | 290 | * valid in station mode only if after the driver was notified |
| 291 | * with the %BSS_CHANGED_DTIM_PERIOD flag, will be non-zero then. | 291 | * with the %BSS_CHANGED_BEACON_INFO flag, will be non-zero then. |
| 292 | * @sync_tsf: last beacon's/probe response's TSF timestamp (could be old | 292 | * @sync_tsf: last beacon's/probe response's TSF timestamp (could be old |
| 293 | * as it may have been received during scanning long ago). If the | 293 | * as it may have been received during scanning long ago). If the |
| 294 | * HW flag %IEEE80211_HW_TIMING_BEACON_ONLY is set, then this can | 294 | * HW flag %IEEE80211_HW_TIMING_BEACON_ONLY is set, then this can |
| @@ -305,6 +305,7 @@ enum ieee80211_rssi_event { | |||
| 305 | * @basic_rates: bitmap of basic rates, each bit stands for an | 305 | * @basic_rates: bitmap of basic rates, each bit stands for an |
| 306 | * index into the rate table configured by the driver in | 306 | * index into the rate table configured by the driver in |
| 307 | * the current band. | 307 | * the current band. |
| 308 | * @beacon_rate: associated AP's beacon TX rate | ||
| 308 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) | 309 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) |
| 309 | * @bssid: The BSSID for this BSS | 310 | * @bssid: The BSSID for this BSS |
| 310 | * @enable_beacon: whether beaconing should be enabled or not | 311 | * @enable_beacon: whether beaconing should be enabled or not |
| @@ -352,6 +353,7 @@ struct ieee80211_bss_conf { | |||
| 352 | u32 sync_device_ts; | 353 | u32 sync_device_ts; |
| 353 | u8 sync_dtim_count; | 354 | u8 sync_dtim_count; |
| 354 | u32 basic_rates; | 355 | u32 basic_rates; |
| 356 | struct ieee80211_rate *beacon_rate; | ||
| 355 | int mcast_rate[IEEE80211_NUM_BANDS]; | 357 | int mcast_rate[IEEE80211_NUM_BANDS]; |
| 356 | u16 ht_operation_mode; | 358 | u16 ht_operation_mode; |
| 357 | s32 cqm_rssi_thold; | 359 | s32 cqm_rssi_thold; |
| @@ -460,6 +462,8 @@ struct ieee80211_bss_conf { | |||
| 460 | * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it | 462 | * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it |
| 461 | * would be fragmented by size (this is optional, only used for | 463 | * would be fragmented by size (this is optional, only used for |
| 462 | * monitor injection). | 464 | * monitor injection). |
| 465 | * @IEEE80211_TX_CTL_PS_RESPONSE: This frame is a response to a poll | ||
| 466 | * frame (PS-Poll or uAPSD). | ||
| 463 | * | 467 | * |
| 464 | * Note: If you have to add new flags to the enumeration, then don't | 468 | * Note: If you have to add new flags to the enumeration, then don't |
| 465 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. | 469 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. |
| @@ -495,6 +499,7 @@ enum mac80211_tx_control_flags { | |||
| 495 | IEEE80211_TX_STATUS_EOSP = BIT(28), | 499 | IEEE80211_TX_STATUS_EOSP = BIT(28), |
| 496 | IEEE80211_TX_CTL_USE_MINRATE = BIT(29), | 500 | IEEE80211_TX_CTL_USE_MINRATE = BIT(29), |
| 497 | IEEE80211_TX_CTL_DONTFRAG = BIT(30), | 501 | IEEE80211_TX_CTL_DONTFRAG = BIT(30), |
| 502 | IEEE80211_TX_CTL_PS_RESPONSE = BIT(31), | ||
| 498 | }; | 503 | }; |
| 499 | 504 | ||
| 500 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | 505 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 |
| @@ -805,6 +810,7 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
| 805 | * on this subframe | 810 | * on this subframe |
| 806 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC | 811 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC |
| 807 | * is stored in the @ampdu_delimiter_crc field) | 812 | * is stored in the @ampdu_delimiter_crc field) |
| 813 | * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 | ||
| 808 | */ | 814 | */ |
| 809 | enum mac80211_rx_flags { | 815 | enum mac80211_rx_flags { |
| 810 | RX_FLAG_MMIC_ERROR = BIT(0), | 816 | RX_FLAG_MMIC_ERROR = BIT(0), |
| @@ -832,8 +838,11 @@ enum mac80211_rx_flags { | |||
| 832 | RX_FLAG_80MHZ = BIT(23), | 838 | RX_FLAG_80MHZ = BIT(23), |
| 833 | RX_FLAG_80P80MHZ = BIT(24), | 839 | RX_FLAG_80P80MHZ = BIT(24), |
| 834 | RX_FLAG_160MHZ = BIT(25), | 840 | RX_FLAG_160MHZ = BIT(25), |
| 841 | RX_FLAG_STBC_MASK = BIT(26) | BIT(27), | ||
| 835 | }; | 842 | }; |
| 836 | 843 | ||
| 844 | #define RX_FLAG_STBC_SHIFT 26 | ||
| 845 | |||
| 837 | /** | 846 | /** |
| 838 | * struct ieee80211_rx_status - receive status | 847 | * struct ieee80211_rx_status - receive status |
| 839 | * | 848 | * |
| @@ -850,6 +859,10 @@ enum mac80211_rx_flags { | |||
| 850 | * @signal: signal strength when receiving this frame, either in dBm, in dB or | 859 | * @signal: signal strength when receiving this frame, either in dBm, in dB or |
| 851 | * unspecified depending on the hardware capabilities flags | 860 | * unspecified depending on the hardware capabilities flags |
| 852 | * @IEEE80211_HW_SIGNAL_* | 861 | * @IEEE80211_HW_SIGNAL_* |
| 862 | * @chains: bitmask of receive chains for which separate signal strength | ||
| 863 | * values were filled. | ||
| 864 | * @chain_signal: per-chain signal strength, in dBm (unlike @signal, doesn't | ||
| 865 | * support dB or unspecified units) | ||
| 853 | * @antenna: antenna used | 866 | * @antenna: antenna used |
| 854 | * @rate_idx: index of data rate into band's supported rates or MCS index if | 867 | * @rate_idx: index of data rate into band's supported rates or MCS index if |
| 855 | * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) | 868 | * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) |
| @@ -881,6 +894,8 @@ struct ieee80211_rx_status { | |||
| 881 | u8 band; | 894 | u8 band; |
| 882 | u8 antenna; | 895 | u8 antenna; |
| 883 | s8 signal; | 896 | s8 signal; |
| 897 | u8 chains; | ||
| 898 | s8 chain_signal[IEEE80211_MAX_CHAINS]; | ||
| 884 | u8 ampdu_delimiter_crc; | 899 | u8 ampdu_delimiter_crc; |
| 885 | u8 vendor_radiotap_align; | 900 | u8 vendor_radiotap_align; |
| 886 | u8 vendor_radiotap_oui[3]; | 901 | u8 vendor_radiotap_oui[3]; |
| @@ -1235,7 +1250,7 @@ enum ieee80211_sta_rx_bandwidth { | |||
| 1235 | * struct ieee80211_sta_rates - station rate selection table | 1250 | * struct ieee80211_sta_rates - station rate selection table |
| 1236 | * | 1251 | * |
| 1237 | * @rcu_head: RCU head used for freeing the table on update | 1252 | * @rcu_head: RCU head used for freeing the table on update |
| 1238 | * @rates: transmit rates/flags to be used by default. | 1253 | * @rate: transmit rates/flags to be used by default. |
| 1239 | * Overriding entries per-packet is possible by using cb tx control. | 1254 | * Overriding entries per-packet is possible by using cb tx control. |
| 1240 | */ | 1255 | */ |
| 1241 | struct ieee80211_sta_rates { | 1256 | struct ieee80211_sta_rates { |
| @@ -1276,7 +1291,7 @@ struct ieee80211_sta_rates { | |||
| 1276 | * notifications and capabilities. The value is only valid after | 1291 | * notifications and capabilities. The value is only valid after |
| 1277 | * the station moves to associated state. | 1292 | * the station moves to associated state. |
| 1278 | * @smps_mode: current SMPS mode (off, static or dynamic) | 1293 | * @smps_mode: current SMPS mode (off, static or dynamic) |
| 1279 | * @tx_rates: rate control selection table | 1294 | * @rates: rate control selection table |
| 1280 | */ | 1295 | */ |
| 1281 | struct ieee80211_sta { | 1296 | struct ieee80211_sta { |
| 1282 | u32 supp_rates[IEEE80211_NUM_BANDS]; | 1297 | u32 supp_rates[IEEE80211_NUM_BANDS]; |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 745bf741e029..949d77528f2f 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
| @@ -230,7 +230,7 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | |||
| 230 | void __user *buffer, | 230 | void __user *buffer, |
| 231 | size_t *lenp, | 231 | size_t *lenp, |
| 232 | loff_t *ppos); | 232 | loff_t *ppos); |
| 233 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, | 233 | int ndisc_ifinfo_sysctl_strategy(struct ctl_table *ctl, |
| 234 | void __user *oldval, size_t __user *oldlenp, | 234 | void __user *oldval, size_t __user *oldlenp, |
| 235 | void __user *newval, size_t newlen); | 235 | void __user *newval, size_t newlen); |
| 236 | #endif | 236 | #endif |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index b17697827482..84e37b1ca9e1 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -115,9 +115,12 @@ struct net { | |||
| 115 | #ifdef CONFIG_XFRM | 115 | #ifdef CONFIG_XFRM |
| 116 | struct netns_xfrm xfrm; | 116 | struct netns_xfrm xfrm; |
| 117 | #endif | 117 | #endif |
| 118 | #if IS_ENABLED(CONFIG_IP_VS) | ||
| 118 | struct netns_ipvs *ipvs; | 119 | struct netns_ipvs *ipvs; |
| 120 | #endif | ||
| 119 | struct sock *diag_nlsk; | 121 | struct sock *diag_nlsk; |
| 120 | atomic_t rt_genid; | 122 | atomic_t rt_genid; |
| 123 | atomic_t fnhe_genid; | ||
| 121 | }; | 124 | }; |
| 122 | 125 | ||
| 123 | /* | 126 | /* |
| @@ -340,4 +343,14 @@ static inline void rt_genid_bump(struct net *net) | |||
| 340 | atomic_inc(&net->rt_genid); | 343 | atomic_inc(&net->rt_genid); |
| 341 | } | 344 | } |
| 342 | 345 | ||
| 346 | static inline int fnhe_genid(struct net *net) | ||
| 347 | { | ||
| 348 | return atomic_read(&net->fnhe_genid); | ||
| 349 | } | ||
| 350 | |||
| 351 | static inline void fnhe_genid_bump(struct net *net) | ||
| 352 | { | ||
| 353 | atomic_inc(&net->fnhe_genid); | ||
| 354 | } | ||
| 355 | |||
| 343 | #endif /* __NET_NET_NAMESPACE_H */ | 356 | #endif /* __NET_NET_NAMESPACE_H */ |
diff --git a/include/net/netfilter/xt_rateest.h b/include/net/netfilter/xt_rateest.h index 5a2978d1cb22..495c71f66e7e 100644 --- a/include/net/netfilter/xt_rateest.h +++ b/include/net/netfilter/xt_rateest.h | |||
| @@ -6,7 +6,7 @@ struct xt_rateest { | |||
| 6 | struct gnet_stats_basic_packed bstats; | 6 | struct gnet_stats_basic_packed bstats; |
| 7 | spinlock_t lock; | 7 | spinlock_t lock; |
| 8 | /* keep rstats and lock on same cache line to speedup xt_rateest_mt() */ | 8 | /* keep rstats and lock on same cache line to speedup xt_rateest_mt() */ |
| 9 | struct gnet_stats_rate_est rstats; | 9 | struct gnet_stats_rate_est64 rstats; |
| 10 | 10 | ||
| 11 | /* following fields not accessed in hot path */ | 11 | /* following fields not accessed in hot path */ |
| 12 | struct hlist_node list; | 12 | struct hlist_node list; |
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h index c24060ee411e..02fe40f8c8fd 100644 --- a/include/net/netns/x_tables.h +++ b/include/net/netns/x_tables.h | |||
| @@ -15,5 +15,11 @@ struct netns_xt { | |||
| 15 | struct ebt_table *frame_filter; | 15 | struct ebt_table *frame_filter; |
| 16 | struct ebt_table *frame_nat; | 16 | struct ebt_table *frame_nat; |
| 17 | #endif | 17 | #endif |
| 18 | #if IS_ENABLED(CONFIG_IP_NF_TARGET_ULOG) | ||
| 19 | bool ulog_warn_deprecated; | ||
| 20 | #endif | ||
| 21 | #if IS_ENABLED(CONFIG_BRIDGE_EBT_ULOG) | ||
| 22 | bool ebt_ulog_warn_deprecated; | ||
| 23 | #endif | ||
| 18 | }; | 24 | }; |
| 19 | #endif | 25 | #endif |
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index b87a1692b086..0af851c3b038 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
| @@ -59,8 +59,10 @@ struct nfc_hci_ops { | |||
| 59 | struct nfc_target *target); | 59 | struct nfc_target *target); |
| 60 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, | 60 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, |
| 61 | struct sk_buff *skb); | 61 | struct sk_buff *skb); |
| 62 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | 62 | int (*fw_upload)(struct nfc_hci_dev *hdev, const char *firmware_name); |
| 63 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | 63 | int (*discover_se)(struct nfc_hci_dev *dev); |
| 64 | int (*enable_se)(struct nfc_hci_dev *dev, u32 se_idx); | ||
| 65 | int (*disable_se)(struct nfc_hci_dev *dev, u32 se_idx); | ||
| 64 | }; | 66 | }; |
| 65 | 67 | ||
| 66 | /* Pipes */ | 68 | /* Pipes */ |
| @@ -152,7 +154,6 @@ struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, | |||
| 152 | struct nfc_hci_init_data *init_data, | 154 | struct nfc_hci_init_data *init_data, |
| 153 | unsigned long quirks, | 155 | unsigned long quirks, |
| 154 | u32 protocols, | 156 | u32 protocols, |
| 155 | u32 supported_se, | ||
| 156 | const char *llc_name, | 157 | const char *llc_name, |
| 157 | int tx_headroom, | 158 | int tx_headroom, |
| 158 | int tx_tailroom, | 159 | int tx_tailroom, |
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index 5bc0c460edc0..99fc1f3a392a 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | * NFC Controller (NFCC) and a Device Host (DH). | 3 | * NFC Controller (NFCC) and a Device Host (DH). |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2011 Texas Instruments, Inc. | 5 | * Copyright (C) 2011 Texas Instruments, Inc. |
| 6 | * Copyright (C) 2013 Intel Corporation. All rights reserved. | ||
| 6 | * | 7 | * |
| 7 | * Written by Ilan Elias <ilane@ti.com> | 8 | * Written by Ilan Elias <ilane@ti.com> |
| 8 | * | 9 | * |
| @@ -66,7 +67,7 @@ struct nci_dev; | |||
| 66 | struct nci_ops { | 67 | struct nci_ops { |
| 67 | int (*open)(struct nci_dev *ndev); | 68 | int (*open)(struct nci_dev *ndev); |
| 68 | int (*close)(struct nci_dev *ndev); | 69 | int (*close)(struct nci_dev *ndev); |
| 69 | int (*send)(struct sk_buff *skb); | 70 | int (*send)(struct nci_dev *ndev, struct sk_buff *skb); |
| 70 | }; | 71 | }; |
| 71 | 72 | ||
| 72 | #define NCI_MAX_SUPPORTED_RF_INTERFACES 4 | 73 | #define NCI_MAX_SUPPORTED_RF_INTERFACES 4 |
| @@ -147,13 +148,12 @@ struct nci_dev { | |||
| 147 | /* ----- NCI Devices ----- */ | 148 | /* ----- NCI Devices ----- */ |
| 148 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, | 149 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, |
| 149 | __u32 supported_protocols, | 150 | __u32 supported_protocols, |
| 150 | __u32 supported_se, | ||
| 151 | int tx_headroom, | 151 | int tx_headroom, |
| 152 | int tx_tailroom); | 152 | int tx_tailroom); |
| 153 | void nci_free_device(struct nci_dev *ndev); | 153 | void nci_free_device(struct nci_dev *ndev); |
| 154 | int nci_register_device(struct nci_dev *ndev); | 154 | int nci_register_device(struct nci_dev *ndev); |
| 155 | void nci_unregister_device(struct nci_dev *ndev); | 155 | void nci_unregister_device(struct nci_dev *ndev); |
| 156 | int nci_recv_frame(struct sk_buff *skb); | 156 | int nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb); |
| 157 | 157 | ||
| 158 | static inline struct sk_buff *nci_skb_alloc(struct nci_dev *ndev, | 158 | static inline struct sk_buff *nci_skb_alloc(struct nci_dev *ndev, |
| 159 | unsigned int len, | 159 | unsigned int len, |
| @@ -202,4 +202,56 @@ void nci_req_complete(struct nci_dev *ndev, int result); | |||
| 202 | /* ----- NCI status code ----- */ | 202 | /* ----- NCI status code ----- */ |
| 203 | int nci_to_errno(__u8 code); | 203 | int nci_to_errno(__u8 code); |
| 204 | 204 | ||
| 205 | /* ----- NCI over SPI acknowledge modes ----- */ | ||
| 206 | #define NCI_SPI_CRC_DISABLED 0x00 | ||
| 207 | #define NCI_SPI_CRC_ENABLED 0x01 | ||
| 208 | |||
| 209 | /* ----- NCI SPI structures ----- */ | ||
| 210 | struct nci_spi_dev; | ||
| 211 | |||
| 212 | struct nci_spi_ops { | ||
| 213 | int (*open)(struct nci_spi_dev *ndev); | ||
| 214 | int (*close)(struct nci_spi_dev *ndev); | ||
| 215 | void (*assert_int)(struct nci_spi_dev *ndev); | ||
| 216 | void (*deassert_int)(struct nci_spi_dev *ndev); | ||
| 217 | }; | ||
| 218 | |||
| 219 | struct nci_spi_dev { | ||
| 220 | struct nci_dev *nci_dev; | ||
| 221 | struct spi_device *spi; | ||
| 222 | struct nci_spi_ops *ops; | ||
| 223 | |||
| 224 | unsigned int xfer_udelay; /* microseconds delay between | ||
| 225 | transactions */ | ||
| 226 | u8 acknowledge_mode; | ||
| 227 | |||
| 228 | struct completion req_completion; | ||
| 229 | u8 req_result; | ||
| 230 | |||
| 231 | void *driver_data; | ||
| 232 | }; | ||
| 233 | |||
| 234 | /* ----- NCI SPI Devices ----- */ | ||
| 235 | struct nci_spi_dev *nci_spi_allocate_device(struct spi_device *spi, | ||
| 236 | struct nci_spi_ops *ops, | ||
| 237 | u32 supported_protocols, | ||
| 238 | u32 supported_se, | ||
| 239 | u8 acknowledge_mode, | ||
| 240 | unsigned int delay); | ||
| 241 | void nci_spi_free_device(struct nci_spi_dev *ndev); | ||
| 242 | int nci_spi_register_device(struct nci_spi_dev *ndev); | ||
| 243 | void nci_spi_unregister_device(struct nci_spi_dev *ndev); | ||
| 244 | int nci_spi_recv_frame(struct nci_spi_dev *ndev); | ||
| 245 | |||
| 246 | static inline void nci_spi_set_drvdata(struct nci_spi_dev *ndev, | ||
| 247 | void *data) | ||
| 248 | { | ||
| 249 | ndev->driver_data = data; | ||
| 250 | } | ||
| 251 | |||
| 252 | static inline void *nci_spi_get_drvdata(struct nci_spi_dev *ndev) | ||
| 253 | { | ||
| 254 | return ndev->driver_data; | ||
| 255 | } | ||
| 256 | |||
| 205 | #endif /* __NCI_CORE_H */ | 257 | #endif /* __NCI_CORE_H */ |
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 5eb80bb3cbb2..0e353f1658bb 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
| @@ -68,8 +68,12 @@ struct nfc_ops { | |||
| 68 | void *cb_context); | 68 | void *cb_context); |
| 69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); | 69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); |
| 70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); | 70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); |
| 71 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | 71 | int (*fw_upload)(struct nfc_dev *dev, const char *firmware_name); |
| 72 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | 72 | |
| 73 | /* Secure Element API */ | ||
| 74 | int (*discover_se)(struct nfc_dev *dev); | ||
| 75 | int (*enable_se)(struct nfc_dev *dev, u32 se_idx); | ||
| 76 | int (*disable_se)(struct nfc_dev *dev, u32 se_idx); | ||
| 73 | }; | 77 | }; |
| 74 | 78 | ||
| 75 | #define NFC_TARGET_IDX_ANY -1 | 79 | #define NFC_TARGET_IDX_ANY -1 |
| @@ -83,6 +87,8 @@ struct nfc_target { | |||
| 83 | u8 sel_res; | 87 | u8 sel_res; |
| 84 | u8 nfcid1_len; | 88 | u8 nfcid1_len; |
| 85 | u8 nfcid1[NFC_NFCID1_MAXSIZE]; | 89 | u8 nfcid1[NFC_NFCID1_MAXSIZE]; |
| 90 | u8 nfcid2_len; | ||
| 91 | u8 nfcid2[NFC_NFCID2_MAXSIZE]; | ||
| 86 | u8 sensb_res_len; | 92 | u8 sensb_res_len; |
| 87 | u8 sensb_res[NFC_SENSB_RES_MAXSIZE]; | 93 | u8 sensb_res[NFC_SENSB_RES_MAXSIZE]; |
| 88 | u8 sensf_res_len; | 94 | u8 sensf_res_len; |
| @@ -91,6 +97,23 @@ struct nfc_target { | |||
| 91 | u8 logical_idx; | 97 | u8 logical_idx; |
| 92 | }; | 98 | }; |
| 93 | 99 | ||
| 100 | /** | ||
| 101 | * nfc_se - A structure for NFC accessible secure elements. | ||
| 102 | * | ||
| 103 | * @idx: The secure element index. User space will enable or | ||
| 104 | * disable a secure element by its index. | ||
| 105 | * @type: The secure element type. It can be SE_UICC or | ||
| 106 | * SE_EMBEDDED. | ||
| 107 | * @state: The secure element state, either enabled or disabled. | ||
| 108 | * | ||
| 109 | */ | ||
| 110 | struct nfc_se { | ||
| 111 | struct list_head list; | ||
| 112 | u32 idx; | ||
| 113 | u16 type; | ||
| 114 | u16 state; | ||
| 115 | }; | ||
| 116 | |||
| 94 | struct nfc_genl_data { | 117 | struct nfc_genl_data { |
| 95 | u32 poll_req_portid; | 118 | u32 poll_req_portid; |
| 96 | struct mutex genl_data_mutex; | 119 | struct mutex genl_data_mutex; |
| @@ -104,6 +127,7 @@ struct nfc_dev { | |||
| 104 | int targets_generation; | 127 | int targets_generation; |
| 105 | struct device dev; | 128 | struct device dev; |
| 106 | bool dev_up; | 129 | bool dev_up; |
| 130 | bool fw_upload_in_progress; | ||
| 107 | u8 rf_mode; | 131 | u8 rf_mode; |
| 108 | bool polling; | 132 | bool polling; |
| 109 | struct nfc_target *active_target; | 133 | struct nfc_target *active_target; |
| @@ -111,8 +135,7 @@ struct nfc_dev { | |||
| 111 | struct nfc_genl_data genl_data; | 135 | struct nfc_genl_data genl_data; |
| 112 | u32 supported_protocols; | 136 | u32 supported_protocols; |
| 113 | 137 | ||
| 114 | u32 supported_se; | 138 | struct list_head secure_elements; |
| 115 | u32 active_se; | ||
| 116 | 139 | ||
| 117 | int tx_headroom; | 140 | int tx_headroom; |
| 118 | int tx_tailroom; | 141 | int tx_tailroom; |
| @@ -132,7 +155,6 @@ extern struct class nfc_class; | |||
| 132 | 155 | ||
| 133 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, | 156 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, |
| 134 | u32 supported_protocols, | 157 | u32 supported_protocols, |
| 135 | u32 supported_se, | ||
| 136 | int tx_headroom, | 158 | int tx_headroom, |
| 137 | int tx_tailroom); | 159 | int tx_tailroom); |
| 138 | 160 | ||
| @@ -216,4 +238,7 @@ int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb); | |||
| 216 | 238 | ||
| 217 | void nfc_driver_failure(struct nfc_dev *dev, int err); | 239 | void nfc_driver_failure(struct nfc_dev *dev, int err); |
| 218 | 240 | ||
| 241 | int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type); | ||
| 242 | int nfc_remove_se(struct nfc_dev *dev, u32 se_idx); | ||
| 243 | |||
| 219 | #endif /* __NET_NFC_H */ | 244 | #endif /* __NET_NFC_H */ |
diff --git a/include/net/ping.h b/include/net/ping.h index 682b5ae9af51..5db0224b73ac 100644 --- a/include/net/ping.h +++ b/include/net/ping.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #ifndef _PING_H | 13 | #ifndef _PING_H |
| 14 | #define _PING_H | 14 | #define _PING_H |
| 15 | 15 | ||
| 16 | #include <net/icmp.h> | ||
| 16 | #include <net/netns/hash.h> | 17 | #include <net/netns/hash.h> |
| 17 | 18 | ||
| 18 | /* PING_HTABLE_SIZE must be power of 2 */ | 19 | /* PING_HTABLE_SIZE must be power of 2 */ |
| @@ -28,6 +29,18 @@ | |||
| 28 | */ | 29 | */ |
| 29 | #define GID_T_MAX (((gid_t)~0U) >> 1) | 30 | #define GID_T_MAX (((gid_t)~0U) >> 1) |
| 30 | 31 | ||
| 32 | /* Compatibility glue so we can support IPv6 when it's compiled as a module */ | ||
| 33 | struct pingv6_ops { | ||
| 34 | int (*ipv6_recv_error)(struct sock *sk, struct msghdr *msg, int len); | ||
| 35 | int (*ip6_datagram_recv_ctl)(struct sock *sk, struct msghdr *msg, | ||
| 36 | struct sk_buff *skb); | ||
| 37 | int (*icmpv6_err_convert)(u8 type, u8 code, int *err); | ||
| 38 | void (*ipv6_icmp_error)(struct sock *sk, struct sk_buff *skb, int err, | ||
| 39 | __be16 port, u32 info, u8 *payload); | ||
| 40 | int (*ipv6_chk_addr)(struct net *net, const struct in6_addr *addr, | ||
| 41 | const struct net_device *dev, int strict); | ||
| 42 | }; | ||
| 43 | |||
| 31 | struct ping_table { | 44 | struct ping_table { |
| 32 | struct hlist_nulls_head hash[PING_HTABLE_SIZE]; | 45 | struct hlist_nulls_head hash[PING_HTABLE_SIZE]; |
| 33 | rwlock_t lock; | 46 | rwlock_t lock; |
| @@ -36,20 +49,66 @@ struct ping_table { | |||
| 36 | struct ping_iter_state { | 49 | struct ping_iter_state { |
| 37 | struct seq_net_private p; | 50 | struct seq_net_private p; |
| 38 | int bucket; | 51 | int bucket; |
| 52 | sa_family_t family; | ||
| 39 | }; | 53 | }; |
| 40 | 54 | ||
| 41 | extern struct proto ping_prot; | 55 | extern struct proto ping_prot; |
| 56 | extern struct ping_table ping_table; | ||
| 57 | #if IS_ENABLED(CONFIG_IPV6) | ||
| 58 | extern struct pingv6_ops pingv6_ops; | ||
| 59 | #endif | ||
| 60 | |||
| 61 | struct pingfakehdr { | ||
| 62 | struct icmphdr icmph; | ||
| 63 | struct iovec *iov; | ||
| 64 | sa_family_t family; | ||
| 65 | __wsum wcheck; | ||
| 66 | }; | ||
| 67 | |||
| 68 | int ping_get_port(struct sock *sk, unsigned short ident); | ||
| 69 | void ping_hash(struct sock *sk); | ||
| 70 | void ping_unhash(struct sock *sk); | ||
| 42 | 71 | ||
| 72 | int ping_init_sock(struct sock *sk); | ||
| 73 | void ping_close(struct sock *sk, long timeout); | ||
| 74 | int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len); | ||
| 75 | void ping_err(struct sk_buff *skb, int offset, u32 info); | ||
| 76 | int ping_getfrag(void *from, char *to, int offset, int fraglen, int odd, | ||
| 77 | struct sk_buff *); | ||
| 43 | 78 | ||
| 44 | extern void ping_rcv(struct sk_buff *); | 79 | int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
| 45 | extern void ping_err(struct sk_buff *, u32 info); | 80 | size_t len, int noblock, int flags, int *addr_len); |
| 81 | int ping_common_sendmsg(int family, struct msghdr *msg, size_t len, | ||
| 82 | void *user_icmph, size_t icmph_len); | ||
| 83 | int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | ||
| 84 | size_t len); | ||
| 85 | int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | ||
| 86 | size_t len); | ||
| 87 | int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); | ||
| 88 | void ping_rcv(struct sk_buff *skb); | ||
| 46 | 89 | ||
| 47 | #ifdef CONFIG_PROC_FS | 90 | #ifdef CONFIG_PROC_FS |
| 91 | struct ping_seq_afinfo { | ||
| 92 | char *name; | ||
| 93 | sa_family_t family; | ||
| 94 | const struct file_operations *seq_fops; | ||
| 95 | const struct seq_operations seq_ops; | ||
| 96 | }; | ||
| 97 | |||
| 98 | extern const struct file_operations ping_seq_fops; | ||
| 99 | |||
| 100 | void *ping_seq_start(struct seq_file *seq, loff_t *pos, sa_family_t family); | ||
| 101 | void *ping_seq_next(struct seq_file *seq, void *v, loff_t *pos); | ||
| 102 | void ping_seq_stop(struct seq_file *seq, void *v); | ||
| 103 | int ping_proc_register(struct net *net, struct ping_seq_afinfo *afinfo); | ||
| 104 | void ping_proc_unregister(struct net *net, struct ping_seq_afinfo *afinfo); | ||
| 105 | |||
| 48 | extern int __init ping_proc_init(void); | 106 | extern int __init ping_proc_init(void); |
| 49 | extern void ping_proc_exit(void); | 107 | extern void ping_proc_exit(void); |
| 50 | #endif | 108 | #endif |
| 51 | 109 | ||
| 52 | void __init ping_init(void); | 110 | void __init ping_init(void); |
| 53 | 111 | int __init pingv6_init(void); | |
| 112 | void pingv6_exit(void); | ||
| 54 | 113 | ||
| 55 | #endif /* _PING_H */ | 114 | #endif /* _PING_H */ |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index e7f4e21cc3e1..6eab63363e59 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -58,14 +58,12 @@ struct Qdisc { | |||
| 58 | * multiqueue device. | 58 | * multiqueue device. |
| 59 | */ | 59 | */ |
| 60 | #define TCQ_F_WARN_NONWC (1 << 16) | 60 | #define TCQ_F_WARN_NONWC (1 << 16) |
| 61 | int padded; | 61 | u32 limit; |
| 62 | const struct Qdisc_ops *ops; | 62 | const struct Qdisc_ops *ops; |
| 63 | struct qdisc_size_table __rcu *stab; | 63 | struct qdisc_size_table __rcu *stab; |
| 64 | struct list_head list; | 64 | struct list_head list; |
| 65 | u32 handle; | 65 | u32 handle; |
| 66 | u32 parent; | 66 | u32 parent; |
| 67 | atomic_t refcnt; | ||
| 68 | struct gnet_stats_rate_est rate_est; | ||
| 69 | int (*reshape_fail)(struct sk_buff *skb, | 67 | int (*reshape_fail)(struct sk_buff *skb, |
| 70 | struct Qdisc *q); | 68 | struct Qdisc *q); |
| 71 | 69 | ||
| @@ -76,8 +74,9 @@ struct Qdisc { | |||
| 76 | */ | 74 | */ |
| 77 | struct Qdisc *__parent; | 75 | struct Qdisc *__parent; |
| 78 | struct netdev_queue *dev_queue; | 76 | struct netdev_queue *dev_queue; |
| 79 | struct Qdisc *next_sched; | ||
| 80 | 77 | ||
| 78 | struct gnet_stats_rate_est64 rate_est; | ||
| 79 | struct Qdisc *next_sched; | ||
| 81 | struct sk_buff *gso_skb; | 80 | struct sk_buff *gso_skb; |
| 82 | /* | 81 | /* |
| 83 | * For performance sake on SMP, we put highly modified fields at the end | 82 | * For performance sake on SMP, we put highly modified fields at the end |
| @@ -88,8 +87,10 @@ struct Qdisc { | |||
| 88 | unsigned int __state; | 87 | unsigned int __state; |
| 89 | struct gnet_stats_queue qstats; | 88 | struct gnet_stats_queue qstats; |
| 90 | struct rcu_head rcu_head; | 89 | struct rcu_head rcu_head; |
| 91 | spinlock_t busylock; | 90 | int padded; |
| 92 | u32 limit; | 91 | atomic_t refcnt; |
| 92 | |||
| 93 | spinlock_t busylock ____cacheline_aligned_in_smp; | ||
| 93 | }; | 94 | }; |
| 94 | 95 | ||
| 95 | static inline bool qdisc_is_running(const struct Qdisc *qdisc) | 96 | static inline bool qdisc_is_running(const struct Qdisc *qdisc) |
| @@ -679,7 +680,7 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask, | |||
| 679 | #endif | 680 | #endif |
| 680 | 681 | ||
| 681 | struct psched_ratecfg { | 682 | struct psched_ratecfg { |
| 682 | u64 rate_bps; | 683 | u64 rate_bytes_ps; /* bytes per second */ |
| 683 | u32 mult; | 684 | u32 mult; |
| 684 | u16 overhead; | 685 | u16 overhead; |
| 685 | u8 shift; | 686 | u8 shift; |
| @@ -697,7 +698,7 @@ static inline void psched_ratecfg_getrate(struct tc_ratespec *res, | |||
| 697 | const struct psched_ratecfg *r) | 698 | const struct psched_ratecfg *r) |
| 698 | { | 699 | { |
| 699 | memset(res, 0, sizeof(*res)); | 700 | memset(res, 0, sizeof(*res)); |
| 700 | res->rate = r->rate_bps >> 3; | 701 | res->rate = r->rate_bytes_ps; |
| 701 | res->overhead = r->overhead; | 702 | res->overhead = r->overhead; |
| 702 | } | 703 | } |
| 703 | 704 | ||
diff --git a/include/net/sctp/checksum.h b/include/net/sctp/checksum.h index 5a2110d3176d..0cb08e6fb6df 100644 --- a/include/net/sctp/checksum.h +++ b/include/net/sctp/checksum.h | |||
| @@ -42,6 +42,9 @@ | |||
| 42 | * be incorporated into the next SCTP release. | 42 | * be incorporated into the next SCTP release. |
| 43 | */ | 43 | */ |
| 44 | 44 | ||
| 45 | #ifndef __sctp_checksum_h__ | ||
| 46 | #define __sctp_checksum_h__ | ||
| 47 | |||
| 45 | #include <linux/types.h> | 48 | #include <linux/types.h> |
| 46 | #include <net/sctp/sctp.h> | 49 | #include <net/sctp/sctp.h> |
| 47 | #include <linux/crc32c.h> | 50 | #include <linux/crc32c.h> |
| @@ -81,3 +84,5 @@ static inline __le32 sctp_end_cksum(__u32 crc32) | |||
| 81 | { | 84 | { |
| 82 | return cpu_to_le32(~crc32); | 85 | return cpu_to_le32(~crc32); |
| 83 | } | 86 | } |
| 87 | |||
| 88 | #endif /* __sctp_checksum_h__ */ | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index cd89510eab2a..d8e37ecea691 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
| @@ -83,30 +83,12 @@ | |||
| 83 | #include <net/sctp/structs.h> | 83 | #include <net/sctp/structs.h> |
| 84 | #include <net/sctp/constants.h> | 84 | #include <net/sctp/constants.h> |
| 85 | 85 | ||
| 86 | |||
| 87 | /* Set SCTP_DEBUG flag via config if not already set. */ | ||
| 88 | #ifndef SCTP_DEBUG | ||
| 89 | #ifdef CONFIG_SCTP_DBG_MSG | ||
| 90 | #define SCTP_DEBUG 1 | ||
| 91 | #else | ||
| 92 | #define SCTP_DEBUG 0 | ||
| 93 | #endif /* CONFIG_SCTP_DBG */ | ||
| 94 | #endif /* SCTP_DEBUG */ | ||
| 95 | |||
| 96 | #ifdef CONFIG_IP_SCTP_MODULE | 86 | #ifdef CONFIG_IP_SCTP_MODULE |
| 97 | #define SCTP_PROTOSW_FLAG 0 | 87 | #define SCTP_PROTOSW_FLAG 0 |
| 98 | #else /* static! */ | 88 | #else /* static! */ |
| 99 | #define SCTP_PROTOSW_FLAG INET_PROTOSW_PERMANENT | 89 | #define SCTP_PROTOSW_FLAG INET_PROTOSW_PERMANENT |
| 100 | #endif | 90 | #endif |
| 101 | 91 | ||
| 102 | |||
| 103 | /* Certain internal static functions need to be exported when | ||
| 104 | * compiled into the test frame. | ||
| 105 | */ | ||
| 106 | #ifndef SCTP_STATIC | ||
| 107 | #define SCTP_STATIC static | ||
| 108 | #endif | ||
| 109 | |||
| 110 | /* | 92 | /* |
| 111 | * Function declarations. | 93 | * Function declarations. |
| 112 | */ | 94 | */ |
| @@ -196,11 +178,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly; | |||
| 196 | * Section: Macros, externs, and inlines | 178 | * Section: Macros, externs, and inlines |
| 197 | */ | 179 | */ |
| 198 | 180 | ||
| 199 | |||
| 200 | #ifdef TEST_FRAME | ||
| 201 | #include <test_frame.h> | ||
| 202 | #else | ||
| 203 | |||
| 204 | /* spin lock wrappers. */ | 181 | /* spin lock wrappers. */ |
| 205 | #define sctp_spin_lock_irqsave(lock, flags) spin_lock_irqsave(lock, flags) | 182 | #define sctp_spin_lock_irqsave(lock, flags) spin_lock_irqsave(lock, flags) |
| 206 | #define sctp_spin_unlock_irqrestore(lock, flags) \ | 183 | #define sctp_spin_unlock_irqrestore(lock, flags) \ |
| @@ -226,8 +203,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly; | |||
| 226 | #define SCTP_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)->sctp.sctp_statistics, field) | 203 | #define SCTP_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)->sctp.sctp_statistics, field) |
| 227 | #define SCTP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->sctp.sctp_statistics, field) | 204 | #define SCTP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->sctp.sctp_statistics, field) |
| 228 | 205 | ||
| 229 | #endif /* !TEST_FRAME */ | ||
| 230 | |||
| 231 | /* sctp mib definitions */ | 206 | /* sctp mib definitions */ |
| 232 | enum { | 207 | enum { |
| 233 | SCTP_MIB_NUM = 0, | 208 | SCTP_MIB_NUM = 0, |
| @@ -285,61 +260,6 @@ static inline void sctp_max_rto(struct sctp_association *asoc, | |||
| 285 | } | 260 | } |
| 286 | } | 261 | } |
| 287 | 262 | ||
| 288 | /* Print debugging messages. */ | ||
| 289 | #if SCTP_DEBUG | ||
| 290 | extern int sctp_debug_flag; | ||
| 291 | #define SCTP_DEBUG_PRINTK(fmt, args...) \ | ||
| 292 | do { \ | ||
| 293 | if (sctp_debug_flag) \ | ||
| 294 | printk(KERN_DEBUG pr_fmt(fmt), ##args); \ | ||
| 295 | } while (0) | ||
| 296 | #define SCTP_DEBUG_PRINTK_CONT(fmt, args...) \ | ||
| 297 | do { \ | ||
| 298 | if (sctp_debug_flag) \ | ||
| 299 | pr_cont(fmt, ##args); \ | ||
| 300 | } while (0) | ||
| 301 | #define SCTP_DEBUG_PRINTK_IPADDR(fmt_lead, fmt_trail, \ | ||
| 302 | args_lead, addr, args_trail...) \ | ||
| 303 | do { \ | ||
| 304 | const union sctp_addr *_addr = (addr); \ | ||
| 305 | if (sctp_debug_flag) { \ | ||
| 306 | if (_addr->sa.sa_family == AF_INET6) { \ | ||
| 307 | printk(KERN_DEBUG \ | ||
| 308 | pr_fmt(fmt_lead "%pI6" fmt_trail), \ | ||
| 309 | args_lead, \ | ||
| 310 | &_addr->v6.sin6_addr, \ | ||
| 311 | args_trail); \ | ||
| 312 | } else { \ | ||
| 313 | printk(KERN_DEBUG \ | ||
| 314 | pr_fmt(fmt_lead "%pI4" fmt_trail), \ | ||
| 315 | args_lead, \ | ||
| 316 | &_addr->v4.sin_addr.s_addr, \ | ||
| 317 | args_trail); \ | ||
| 318 | } \ | ||
| 319 | } \ | ||
| 320 | } while (0) | ||
| 321 | #define SCTP_ENABLE_DEBUG { sctp_debug_flag = 1; } | ||
| 322 | #define SCTP_DISABLE_DEBUG { sctp_debug_flag = 0; } | ||
| 323 | |||
| 324 | #define SCTP_ASSERT(expr, str, func) \ | ||
| 325 | if (!(expr)) { \ | ||
| 326 | SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \ | ||
| 327 | str, (#expr), __FILE__, __func__, __LINE__); \ | ||
| 328 | func; \ | ||
| 329 | } | ||
| 330 | |||
| 331 | #else /* SCTP_DEBUG */ | ||
| 332 | |||
| 333 | #define SCTP_DEBUG_PRINTK(whatever...) | ||
| 334 | #define SCTP_DEBUG_PRINTK_CONT(fmt, args...) | ||
| 335 | #define SCTP_DEBUG_PRINTK_IPADDR(whatever...) | ||
| 336 | #define SCTP_ENABLE_DEBUG | ||
| 337 | #define SCTP_DISABLE_DEBUG | ||
| 338 | #define SCTP_ASSERT(expr, str, func) | ||
| 339 | |||
| 340 | #endif /* SCTP_DEBUG */ | ||
| 341 | |||
| 342 | |||
| 343 | /* | 263 | /* |
| 344 | * Macros for keeping a global reference of object allocations. | 264 | * Macros for keeping a global reference of object allocations. |
| 345 | */ | 265 | */ |
| @@ -575,27 +495,6 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\ | |||
| 575 | /* Round an int up to the next multiple of 4. */ | 495 | /* Round an int up to the next multiple of 4. */ |
| 576 | #define WORD_ROUND(s) (((s)+3)&~3) | 496 | #define WORD_ROUND(s) (((s)+3)&~3) |
| 577 | 497 | ||
| 578 | /* Make a new instance of type. */ | ||
| 579 | #define t_new(type, flags) kzalloc(sizeof(type), flags) | ||
| 580 | |||
| 581 | /* Compare two timevals. */ | ||
| 582 | #define tv_lt(s, t) \ | ||
| 583 | (s.tv_sec < t.tv_sec || (s.tv_sec == t.tv_sec && s.tv_usec < t.tv_usec)) | ||
| 584 | |||
| 585 | /* Add tv1 to tv2. */ | ||
| 586 | #define TIMEVAL_ADD(tv1, tv2) \ | ||
| 587 | ({ \ | ||
| 588 | suseconds_t usecs = (tv2).tv_usec + (tv1).tv_usec; \ | ||
| 589 | time_t secs = (tv2).tv_sec + (tv1).tv_sec; \ | ||
| 590 | \ | ||
| 591 | if (usecs >= 1000000) { \ | ||
| 592 | usecs -= 1000000; \ | ||
| 593 | secs++; \ | ||
| 594 | } \ | ||
| 595 | (tv2).tv_sec = secs; \ | ||
| 596 | (tv2).tv_usec = usecs; \ | ||
| 597 | }) | ||
| 598 | |||
| 599 | /* External references. */ | 498 | /* External references. */ |
| 600 | 499 | ||
| 601 | extern struct proto sctp_prot; | 500 | extern struct proto sctp_prot; |
| @@ -633,16 +532,6 @@ static inline int param_type2af(__be16 type) | |||
| 633 | } | 532 | } |
| 634 | } | 533 | } |
| 635 | 534 | ||
| 636 | /* Perform some sanity checks. */ | ||
| 637 | static inline int sctp_sanity_check(void) | ||
| 638 | { | ||
| 639 | SCTP_ASSERT(sizeof(struct sctp_ulpevent) <= | ||
| 640 | sizeof(((struct sk_buff *)0)->cb), | ||
| 641 | "SCTP: ulpevent does not fit in skb!\n", return 0); | ||
| 642 | |||
| 643 | return 1; | ||
| 644 | } | ||
| 645 | |||
| 646 | /* Warning: The following hash functions assume a power of two 'size'. */ | 535 | /* Warning: The following hash functions assume a power of two 'size'. */ |
| 647 | /* This is the hash function for the SCTP port hash table. */ | 536 | /* This is the hash function for the SCTP port hash table. */ |
| 648 | static inline int sctp_phashfn(struct net *net, __u16 lport) | 537 | static inline int sctp_phashfn(struct net *net, __u16 lport) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 1bd4c4144fe8..e745c92a1532 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -54,7 +54,7 @@ | |||
| 54 | #ifndef __sctp_structs_h__ | 54 | #ifndef __sctp_structs_h__ |
| 55 | #define __sctp_structs_h__ | 55 | #define __sctp_structs_h__ |
| 56 | 56 | ||
| 57 | #include <linux/time.h> /* We get struct timespec. */ | 57 | #include <linux/ktime.h> |
| 58 | #include <linux/socket.h> /* linux/in.h needs this!! */ | 58 | #include <linux/socket.h> /* linux/in.h needs this!! */ |
| 59 | #include <linux/in.h> /* We get struct sockaddr_in. */ | 59 | #include <linux/in.h> /* We get struct sockaddr_in. */ |
| 60 | #include <linux/in6.h> /* We get struct in6_addr */ | 60 | #include <linux/in6.h> /* We get struct in6_addr */ |
| @@ -284,7 +284,7 @@ struct sctp_cookie { | |||
| 284 | __u32 peer_ttag; | 284 | __u32 peer_ttag; |
| 285 | 285 | ||
| 286 | /* When does this cookie expire? */ | 286 | /* When does this cookie expire? */ |
| 287 | struct timeval expiration; | 287 | ktime_t expiration; |
| 288 | 288 | ||
| 289 | /* Number of inbound/outbound streams which are set | 289 | /* Number of inbound/outbound streams which are set |
| 290 | * and negotiated during the INIT process. | 290 | * and negotiated during the INIT process. |
| @@ -1537,7 +1537,7 @@ struct sctp_association { | |||
| 1537 | sctp_state_t state; | 1537 | sctp_state_t state; |
| 1538 | 1538 | ||
| 1539 | /* The cookie life I award for any cookie. */ | 1539 | /* The cookie life I award for any cookie. */ |
| 1540 | struct timeval cookie_life; | 1540 | ktime_t cookie_life; |
| 1541 | 1541 | ||
| 1542 | /* Overall : The overall association error count. | 1542 | /* Overall : The overall association error count. |
| 1543 | * Error Count : [Clear this any time I get something.] | 1543 | * Error Count : [Clear this any time I get something.] |
diff --git a/include/net/sock.h b/include/net/sock.h index 66772cf8c3c5..95a5a2c6925a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -229,6 +229,8 @@ struct cg_proto; | |||
| 229 | * @sk_omem_alloc: "o" is "option" or "other" | 229 | * @sk_omem_alloc: "o" is "option" or "other" |
| 230 | * @sk_wmem_queued: persistent queue size | 230 | * @sk_wmem_queued: persistent queue size |
| 231 | * @sk_forward_alloc: space allocated forward | 231 | * @sk_forward_alloc: space allocated forward |
| 232 | * @sk_napi_id: id of the last napi context to receive data for sk | ||
| 233 | * @sk_ll_usec: usecs to busypoll when there is no data | ||
| 232 | * @sk_allocation: allocation mode | 234 | * @sk_allocation: allocation mode |
| 233 | * @sk_sndbuf: size of send buffer in bytes | 235 | * @sk_sndbuf: size of send buffer in bytes |
| 234 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, | 236 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, |
| @@ -325,6 +327,10 @@ struct sock { | |||
| 325 | #ifdef CONFIG_RPS | 327 | #ifdef CONFIG_RPS |
| 326 | __u32 sk_rxhash; | 328 | __u32 sk_rxhash; |
| 327 | #endif | 329 | #endif |
| 330 | #ifdef CONFIG_NET_LL_RX_POLL | ||
| 331 | unsigned int sk_napi_id; | ||
| 332 | unsigned int sk_ll_usec; | ||
| 333 | #endif | ||
| 328 | atomic_t sk_drops; | 334 | atomic_t sk_drops; |
| 329 | int sk_rcvbuf; | 335 | int sk_rcvbuf; |
| 330 | 336 | ||
| @@ -2041,18 +2047,21 @@ static inline void sk_wake_async(struct sock *sk, int how, int band) | |||
| 2041 | sock_wake_async(sk->sk_socket, how, band); | 2047 | sock_wake_async(sk->sk_socket, how, band); |
| 2042 | } | 2048 | } |
| 2043 | 2049 | ||
| 2044 | #define SOCK_MIN_SNDBUF 2048 | 2050 | /* Since sk_{r,w}mem_alloc sums skb->truesize, even a small frame might |
| 2045 | /* | 2051 | * need sizeof(sk_buff) + MTU + padding, unless net driver perform copybreak. |
| 2046 | * Since sk_rmem_alloc sums skb->truesize, even a small frame might need | 2052 | * Note: for send buffers, TCP works better if we can build two skbs at |
| 2047 | * sizeof(sk_buff) + MTU + padding, unless net driver perform copybreak | 2053 | * minimum. |
| 2048 | */ | 2054 | */ |
| 2049 | #define SOCK_MIN_RCVBUF (2048 + sizeof(struct sk_buff)) | 2055 | #define TCP_SKB_MIN_TRUESIZE (2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))) |
| 2056 | |||
| 2057 | #define SOCK_MIN_SNDBUF (TCP_SKB_MIN_TRUESIZE * 2) | ||
| 2058 | #define SOCK_MIN_RCVBUF TCP_SKB_MIN_TRUESIZE | ||
| 2050 | 2059 | ||
| 2051 | static inline void sk_stream_moderate_sndbuf(struct sock *sk) | 2060 | static inline void sk_stream_moderate_sndbuf(struct sock *sk) |
| 2052 | { | 2061 | { |
| 2053 | if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) { | 2062 | if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) { |
| 2054 | sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued >> 1); | 2063 | sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued >> 1); |
| 2055 | sk->sk_sndbuf = max(sk->sk_sndbuf, SOCK_MIN_SNDBUF); | 2064 | sk->sk_sndbuf = max_t(u32, sk->sk_sndbuf, SOCK_MIN_SNDBUF); |
| 2056 | } | 2065 | } |
| 2057 | } | 2066 | } |
| 2058 | 2067 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 5bba80fbd1d9..d1980054ec75 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -61,9 +61,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
| 61 | */ | 61 | */ |
| 62 | #define MAX_TCP_WINDOW 32767U | 62 | #define MAX_TCP_WINDOW 32767U |
| 63 | 63 | ||
| 64 | /* Offer an initial receive window of 10 mss. */ | ||
| 65 | #define TCP_DEFAULT_INIT_RCVWND 10 | ||
| 66 | |||
| 67 | /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ | 64 | /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ |
| 68 | #define TCP_MIN_MSS 88U | 65 | #define TCP_MIN_MSS 88U |
| 69 | 66 | ||
| @@ -1047,6 +1044,8 @@ static inline void tcp_sack_reset(struct tcp_options_received *rx_opt) | |||
| 1047 | rx_opt->num_sacks = 0; | 1044 | rx_opt->num_sacks = 0; |
| 1048 | } | 1045 | } |
| 1049 | 1046 | ||
| 1047 | extern u32 tcp_default_init_rwnd(u32 mss); | ||
| 1048 | |||
| 1050 | /* Determine a window scaling and initial window to offer. */ | 1049 | /* Determine a window scaling and initial window to offer. */ |
| 1051 | extern void tcp_select_initial_window(int __space, __u32 mss, | 1050 | extern void tcp_select_initial_window(int __space, __u32 mss, |
| 1052 | __u32 *rcv_wnd, __u32 *window_clamp, | 1051 | __u32 *rcv_wnd, __u32 *window_clamp, |
| @@ -1193,7 +1192,6 @@ static inline void tcp_mib_init(struct net *net) | |||
| 1193 | static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp) | 1192 | static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp) |
| 1194 | { | 1193 | { |
| 1195 | tp->lost_skb_hint = NULL; | 1194 | tp->lost_skb_hint = NULL; |
| 1196 | tp->scoreboard_skb_hint = NULL; | ||
| 1197 | } | 1195 | } |
| 1198 | 1196 | ||
| 1199 | static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp) | 1197 | static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp) |
| @@ -1284,11 +1282,13 @@ static inline struct tcp_md5sig_key *tcp_md5_do_lookup(struct sock *sk, | |||
| 1284 | #define tcp_twsk_md5_key(twsk) NULL | 1282 | #define tcp_twsk_md5_key(twsk) NULL |
| 1285 | #endif | 1283 | #endif |
| 1286 | 1284 | ||
| 1287 | extern struct tcp_md5sig_pool __percpu *tcp_alloc_md5sig_pool(struct sock *); | 1285 | extern bool tcp_alloc_md5sig_pool(void); |
| 1288 | extern void tcp_free_md5sig_pool(void); | ||
| 1289 | 1286 | ||
| 1290 | extern struct tcp_md5sig_pool *tcp_get_md5sig_pool(void); | 1287 | extern struct tcp_md5sig_pool *tcp_get_md5sig_pool(void); |
| 1291 | extern void tcp_put_md5sig_pool(void); | 1288 | static inline void tcp_put_md5sig_pool(void) |
| 1289 | { | ||
| 1290 | local_bh_enable(); | ||
| 1291 | } | ||
| 1292 | 1292 | ||
| 1293 | extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, const struct tcphdr *); | 1293 | extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, const struct tcphdr *); |
| 1294 | extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff *, | 1294 | extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff *, |
| @@ -1319,9 +1319,9 @@ void tcp_fastopen_cookie_gen(__be32 addr, struct tcp_fastopen_cookie *foc); | |||
| 1319 | 1319 | ||
| 1320 | /* Fastopen key context */ | 1320 | /* Fastopen key context */ |
| 1321 | struct tcp_fastopen_context { | 1321 | struct tcp_fastopen_context { |
| 1322 | struct crypto_cipher __rcu *tfm; | 1322 | struct crypto_cipher *tfm; |
| 1323 | __u8 key[TCP_FASTOPEN_KEY_LENGTH]; | 1323 | __u8 key[TCP_FASTOPEN_KEY_LENGTH]; |
| 1324 | struct rcu_head rcu; | 1324 | struct rcu_head rcu; |
| 1325 | }; | 1325 | }; |
| 1326 | 1326 | ||
| 1327 | /* write queue abstraction */ | 1327 | /* write queue abstraction */ |
| @@ -1540,15 +1540,14 @@ extern struct request_sock_ops tcp6_request_sock_ops; | |||
| 1540 | 1540 | ||
| 1541 | extern void tcp_v4_destroy_sock(struct sock *sk); | 1541 | extern void tcp_v4_destroy_sock(struct sock *sk); |
| 1542 | 1542 | ||
| 1543 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | ||
| 1544 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, | 1543 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, |
| 1545 | netdev_features_t features); | 1544 | netdev_features_t features); |
| 1546 | extern struct sk_buff **tcp_gro_receive(struct sk_buff **head, | 1545 | extern struct sk_buff **tcp_gro_receive(struct sk_buff **head, |
| 1547 | struct sk_buff *skb); | 1546 | struct sk_buff *skb); |
| 1548 | extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head, | ||
| 1549 | struct sk_buff *skb); | ||
| 1550 | extern int tcp_gro_complete(struct sk_buff *skb); | 1547 | extern int tcp_gro_complete(struct sk_buff *skb); |
| 1551 | extern int tcp4_gro_complete(struct sk_buff *skb); | 1548 | |
| 1549 | extern void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, | ||
| 1550 | __be32 daddr); | ||
| 1552 | 1551 | ||
| 1553 | #ifdef CONFIG_PROC_FS | 1552 | #ifdef CONFIG_PROC_FS |
| 1554 | extern int tcp4_proc_init(void); | 1553 | extern int tcp4_proc_init(void); |
| @@ -1583,6 +1582,8 @@ struct tcp_request_sock_ops { | |||
| 1583 | #endif | 1582 | #endif |
| 1584 | }; | 1583 | }; |
| 1585 | 1584 | ||
| 1585 | extern int tcpv4_offload_init(void); | ||
| 1586 | |||
| 1586 | extern void tcp_v4_init(void); | 1587 | extern void tcp_v4_init(void); |
| 1587 | extern void tcp_init(void); | 1588 | extern void tcp_init(void); |
| 1588 | 1589 | ||
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 938b7fd11204..48660e50ae90 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
| @@ -3,56 +3,57 @@ | |||
| 3 | 3 | ||
| 4 | #include <net/checksum.h> | 4 | #include <net/checksum.h> |
| 5 | 5 | ||
| 6 | /* | 6 | /* IPv6 transport protocols */ |
| 7 | * IPv6 transport protocols | ||
| 8 | */ | ||
| 9 | |||
| 10 | extern struct proto rawv6_prot; | 7 | extern struct proto rawv6_prot; |
| 11 | extern struct proto udpv6_prot; | 8 | extern struct proto udpv6_prot; |
| 12 | extern struct proto udplitev6_prot; | 9 | extern struct proto udplitev6_prot; |
| 13 | extern struct proto tcpv6_prot; | 10 | extern struct proto tcpv6_prot; |
| 11 | extern struct proto pingv6_prot; | ||
| 14 | 12 | ||
| 15 | struct flowi6; | 13 | struct flowi6; |
| 16 | 14 | ||
| 17 | /* extension headers */ | 15 | /* extension headers */ |
| 18 | extern int ipv6_exthdrs_init(void); | 16 | int ipv6_exthdrs_init(void); |
| 19 | extern void ipv6_exthdrs_exit(void); | 17 | void ipv6_exthdrs_exit(void); |
| 20 | extern int ipv6_frag_init(void); | 18 | int ipv6_frag_init(void); |
| 21 | extern void ipv6_frag_exit(void); | 19 | void ipv6_frag_exit(void); |
| 22 | 20 | ||
| 23 | /* transport protocols */ | 21 | /* transport protocols */ |
| 24 | extern int rawv6_init(void); | 22 | int pingv6_init(void); |
| 25 | extern void rawv6_exit(void); | 23 | void pingv6_exit(void); |
| 26 | extern int udpv6_init(void); | 24 | int rawv6_init(void); |
| 27 | extern void udpv6_exit(void); | 25 | void rawv6_exit(void); |
| 28 | extern int udplitev6_init(void); | 26 | int udpv6_init(void); |
| 29 | extern void udplitev6_exit(void); | 27 | void udpv6_exit(void); |
| 30 | extern int tcpv6_init(void); | 28 | int udplitev6_init(void); |
| 31 | extern void tcpv6_exit(void); | 29 | void udplitev6_exit(void); |
| 32 | 30 | int tcpv6_init(void); | |
| 33 | extern int udpv6_connect(struct sock *sk, | 31 | void tcpv6_exit(void); |
| 34 | struct sockaddr *uaddr, | 32 | |
| 35 | int addr_len); | 33 | int udpv6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
| 36 | 34 | ||
| 37 | extern int ip6_datagram_recv_ctl(struct sock *sk, | 35 | int ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg, |
| 38 | struct msghdr *msg, | 36 | struct sk_buff *skb); |
| 39 | struct sk_buff *skb); | 37 | |
| 40 | 38 | int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg, | |
| 41 | extern int ip6_datagram_send_ctl(struct net *net, | 39 | struct flowi6 *fl6, struct ipv6_txoptions *opt, |
| 42 | struct sock *sk, | 40 | int *hlimit, int *tclass, int *dontfrag); |
| 43 | struct msghdr *msg, | 41 | |
| 44 | struct flowi6 *fl6, | 42 | void ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, |
| 45 | struct ipv6_txoptions *opt, | 43 | __u16 srcp, __u16 destp, int bucket); |
| 46 | int *hlimit, int *tclass, | 44 | |
| 47 | int *dontfrag); | 45 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) |
| 48 | 46 | ||
| 49 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) | 47 | /* address family specific functions */ |
| 50 | |||
| 51 | /* | ||
| 52 | * address family specific functions | ||
| 53 | */ | ||
| 54 | extern const struct inet_connection_sock_af_ops ipv4_specific; | 48 | extern const struct inet_connection_sock_af_ops ipv4_specific; |
| 55 | 49 | ||
| 56 | extern void inet6_destroy_sock(struct sock *sk); | 50 | void inet6_destroy_sock(struct sock *sk); |
| 51 | |||
| 52 | #define IPV6_SEQ_DGRAM_HEADER \ | ||
| 53 | " sl " \ | ||
| 54 | "local_address " \ | ||
| 55 | "remote_address " \ | ||
| 56 | "st tx_queue rx_queue tr tm->when retrnsmt" \ | ||
| 57 | " uid timeout inode ref pointer drops\n" | ||
| 57 | 58 | ||
| 58 | #endif | 59 | #endif |
diff --git a/include/net/udp.h b/include/net/udp.h index 065f379c6503..74c10ec5e74f 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
| @@ -181,12 +181,15 @@ extern int udp_get_port(struct sock *sk, unsigned short snum, | |||
| 181 | extern void udp_err(struct sk_buff *, u32); | 181 | extern void udp_err(struct sk_buff *, u32); |
| 182 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | 182 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
| 183 | struct msghdr *msg, size_t len); | 183 | struct msghdr *msg, size_t len); |
| 184 | extern int udp_push_pending_frames(struct sock *sk); | ||
| 184 | extern void udp_flush_pending_frames(struct sock *sk); | 185 | extern void udp_flush_pending_frames(struct sock *sk); |
| 185 | extern int udp_rcv(struct sk_buff *skb); | 186 | extern int udp_rcv(struct sk_buff *skb); |
| 186 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 187 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
| 187 | extern int udp_disconnect(struct sock *sk, int flags); | 188 | extern int udp_disconnect(struct sock *sk, int flags); |
| 188 | extern unsigned int udp_poll(struct file *file, struct socket *sock, | 189 | extern unsigned int udp_poll(struct file *file, struct socket *sock, |
| 189 | poll_table *wait); | 190 | poll_table *wait); |
| 191 | extern struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | ||
| 192 | netdev_features_t features); | ||
| 190 | extern int udp_lib_getsockopt(struct sock *sk, int level, int optname, | 193 | extern int udp_lib_getsockopt(struct sock *sk, int level, int optname, |
| 191 | char __user *optval, int __user *optlen); | 194 | char __user *optval, int __user *optlen); |
| 192 | extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, | 195 | extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, |
| @@ -262,11 +265,10 @@ extern int udp4_proc_init(void); | |||
| 262 | extern void udp4_proc_exit(void); | 265 | extern void udp4_proc_exit(void); |
| 263 | #endif | 266 | #endif |
| 264 | 267 | ||
| 268 | extern int udpv4_offload_init(void); | ||
| 269 | |||
| 265 | extern void udp_init(void); | 270 | extern void udp_init(void); |
| 266 | 271 | ||
| 267 | extern int udp4_ufo_send_check(struct sk_buff *skb); | ||
| 268 | extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, | ||
| 269 | netdev_features_t features); | ||
| 270 | extern void udp_encap_enable(void); | 272 | extern void udp_encap_enable(void); |
| 271 | #if IS_ENABLED(CONFIG_IPV6) | 273 | #if IS_ENABLED(CONFIG_IPV6) |
| 272 | extern void udpv6_encap_enable(void); | 274 | extern void udpv6_encap_enable(void); |
diff --git a/include/uapi/asm-generic/poll.h b/include/uapi/asm-generic/poll.h index 9ce7f44aebd2..a9694982689f 100644 --- a/include/uapi/asm-generic/poll.h +++ b/include/uapi/asm-generic/poll.h | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | 30 | ||
| 31 | #define POLLFREE 0x4000 /* currently only for epoll */ | 31 | #define POLLFREE 0x4000 /* currently only for epoll */ |
| 32 | 32 | ||
| 33 | #define POLL_BUSY_LOOP 0x8000 | ||
| 34 | |||
| 33 | struct pollfd { | 35 | struct pollfd { |
| 34 | int fd; | 36 | int fd; |
| 35 | short events; | 37 | short events; |
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index c5d2e3a1cf68..ca3a20d772ac 100644 --- a/include/uapi/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h | |||
| @@ -76,4 +76,6 @@ | |||
| 76 | 76 | ||
| 77 | #define SO_SELECT_ERR_QUEUE 45 | 77 | #define SO_SELECT_ERR_QUEUE 45 |
| 78 | 78 | ||
| 79 | #define SO_LL 46 | ||
| 80 | |||
| 79 | #endif /* __ASM_GENERIC_SOCKET_H */ | 81 | #endif /* __ASM_GENERIC_SOCKET_H */ |
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 0c9b44871df0..38dbafaa5341 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
| @@ -993,8 +993,8 @@ enum ethtool_sfeatures_retval_bits { | |||
| 993 | #define PORT_OTHER 0xff | 993 | #define PORT_OTHER 0xff |
| 994 | 994 | ||
| 995 | /* Which transceiver to use. */ | 995 | /* Which transceiver to use. */ |
| 996 | #define XCVR_INTERNAL 0x00 | 996 | #define XCVR_INTERNAL 0x00 /* PHY and MAC are in the same package */ |
| 997 | #define XCVR_EXTERNAL 0x01 | 997 | #define XCVR_EXTERNAL 0x01 /* PHY and MAC are in different packages */ |
| 998 | #define XCVR_DUMMY1 0x02 | 998 | #define XCVR_DUMMY1 0x02 |
| 999 | #define XCVR_DUMMY2 0x03 | 999 | #define XCVR_DUMMY2 0x03 |
| 1000 | #define XCVR_DUMMY3 0x04 | 1000 | #define XCVR_DUMMY3 0x04 |
diff --git a/include/uapi/linux/gen_stats.h b/include/uapi/linux/gen_stats.h index 552c8a0a12d1..6487317ea619 100644 --- a/include/uapi/linux/gen_stats.h +++ b/include/uapi/linux/gen_stats.h | |||
| @@ -9,6 +9,7 @@ enum { | |||
| 9 | TCA_STATS_RATE_EST, | 9 | TCA_STATS_RATE_EST, |
| 10 | TCA_STATS_QUEUE, | 10 | TCA_STATS_QUEUE, |
| 11 | TCA_STATS_APP, | 11 | TCA_STATS_APP, |
| 12 | TCA_STATS_RATE_EST64, | ||
| 12 | __TCA_STATS_MAX, | 13 | __TCA_STATS_MAX, |
| 13 | }; | 14 | }; |
| 14 | #define TCA_STATS_MAX (__TCA_STATS_MAX - 1) | 15 | #define TCA_STATS_MAX (__TCA_STATS_MAX - 1) |
| @@ -38,6 +39,16 @@ struct gnet_stats_rate_est { | |||
| 38 | }; | 39 | }; |
| 39 | 40 | ||
| 40 | /** | 41 | /** |
| 42 | * struct gnet_stats_rate_est64 - rate estimator | ||
| 43 | * @bps: current byte rate | ||
| 44 | * @pps: current packet rate | ||
| 45 | */ | ||
| 46 | struct gnet_stats_rate_est64 { | ||
| 47 | __u64 bps; | ||
| 48 | __u64 pps; | ||
| 49 | }; | ||
| 50 | |||
| 51 | /** | ||
| 41 | * struct gnet_stats_queue - queuing statistics | 52 | * struct gnet_stats_queue - queuing statistics |
| 42 | * @qlen: queue length | 53 | * @qlen: queue length |
| 43 | * @backlog: backlog size of queue | 54 | * @backlog: backlog size of queue |
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index 82c7d1bdadeb..d7fea3496f32 100644 --- a/include/uapi/linux/if_arp.h +++ b/include/uapi/linux/if_arp.h | |||
| @@ -93,6 +93,7 @@ | |||
| 93 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ | 93 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ |
| 94 | #define ARPHRD_CAIF 822 /* CAIF media type */ | 94 | #define ARPHRD_CAIF 822 /* CAIF media type */ |
| 95 | #define ARPHRD_IP6GRE 823 /* GRE over IPv6 */ | 95 | #define ARPHRD_IP6GRE 823 /* GRE over IPv6 */ |
| 96 | #define ARPHRD_NETLINK 824 /* Netlink header */ | ||
| 96 | 97 | ||
| 97 | #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ | 98 | #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ |
| 98 | #define ARPHRD_NONE 0xFFFE /* zero header length */ | 99 | #define ARPHRD_NONE 0xFFFE /* zero header length */ |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index b05823cae784..03f6170ab337 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
| @@ -221,6 +221,8 @@ enum { | |||
| 221 | IFLA_BRPORT_GUARD, /* bpdu guard */ | 221 | IFLA_BRPORT_GUARD, /* bpdu guard */ |
| 222 | IFLA_BRPORT_PROTECT, /* root port protection */ | 222 | IFLA_BRPORT_PROTECT, /* root port protection */ |
| 223 | IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */ | 223 | IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */ |
| 224 | IFLA_BRPORT_LEARNING, /* mac learning */ | ||
| 225 | IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */ | ||
| 224 | __IFLA_BRPORT_MAX | 226 | __IFLA_BRPORT_MAX |
| 225 | }; | 227 | }; |
| 226 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | 228 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) |
| @@ -336,6 +338,7 @@ enum { | |||
| 336 | IFLA_VF_VLAN, | 338 | IFLA_VF_VLAN, |
| 337 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | 339 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ |
| 338 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ | 340 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ |
| 341 | IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ | ||
| 339 | __IFLA_VF_MAX, | 342 | __IFLA_VF_MAX, |
| 340 | }; | 343 | }; |
| 341 | 344 | ||
| @@ -362,6 +365,18 @@ struct ifla_vf_spoofchk { | |||
| 362 | __u32 setting; | 365 | __u32 setting; |
| 363 | }; | 366 | }; |
| 364 | 367 | ||
| 368 | enum { | ||
| 369 | IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ | ||
| 370 | IFLA_VF_LINK_STATE_ENABLE, /* link always up */ | ||
| 371 | IFLA_VF_LINK_STATE_DISABLE, /* link always down */ | ||
| 372 | __IFLA_VF_LINK_STATE_MAX, | ||
| 373 | }; | ||
| 374 | |||
| 375 | struct ifla_vf_link_state { | ||
| 376 | __u32 vf; | ||
| 377 | __u32 link_state; | ||
| 378 | }; | ||
| 379 | |||
| 365 | /* VF ports management section | 380 | /* VF ports management section |
| 366 | * | 381 | * |
| 367 | * Nested layout of set/get msg is: | 382 | * Nested layout of set/get msg is: |
diff --git a/include/uapi/linux/if_pppox.h b/include/uapi/linux/if_pppox.h index 0b46fd57c8f6..e36a4aecd311 100644 --- a/include/uapi/linux/if_pppox.h +++ b/include/uapi/linux/if_pppox.h | |||
| @@ -135,11 +135,11 @@ struct pppoe_tag { | |||
| 135 | 135 | ||
| 136 | struct pppoe_hdr { | 136 | struct pppoe_hdr { |
| 137 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 137 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| 138 | __u8 ver : 4; | ||
| 139 | __u8 type : 4; | 138 | __u8 type : 4; |
| 139 | __u8 ver : 4; | ||
| 140 | #elif defined(__BIG_ENDIAN_BITFIELD) | 140 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 141 | __u8 type : 4; | ||
| 142 | __u8 ver : 4; | 141 | __u8 ver : 4; |
| 142 | __u8 type : 4; | ||
| 143 | #else | 143 | #else |
| 144 | #error "Please fix <asm/byteorder.h>" | 144 | #error "Please fix <asm/byteorder.h>" |
| 145 | #endif | 145 | #endif |
diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h index 2835b85fd46d..82334f88967e 100644 --- a/include/uapi/linux/if_tun.h +++ b/include/uapi/linux/if_tun.h | |||
| @@ -68,6 +68,8 @@ | |||
| 68 | #define IFF_MULTI_QUEUE 0x0100 | 68 | #define IFF_MULTI_QUEUE 0x0100 |
| 69 | #define IFF_ATTACH_QUEUE 0x0200 | 69 | #define IFF_ATTACH_QUEUE 0x0200 |
| 70 | #define IFF_DETACH_QUEUE 0x0400 | 70 | #define IFF_DETACH_QUEUE 0x0400 |
| 71 | /* read-only flag */ | ||
| 72 | #define IFF_PERSIST 0x0800 | ||
| 71 | 73 | ||
| 72 | /* Features for GSO (TUNSETOFFLOAD). */ | 74 | /* Features for GSO (TUNSETOFFLOAD). */ |
| 73 | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ | 75 | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ |
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h index a24537725e80..29458223d044 100644 --- a/include/uapi/linux/ip_vs.h +++ b/include/uapi/linux/ip_vs.h | |||
| @@ -20,6 +20,12 @@ | |||
| 20 | #define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */ | 20 | #define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */ |
| 21 | #define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */ | 21 | #define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */ |
| 22 | #define IP_VS_SVC_F_ONEPACKET 0x0004 /* one-packet scheduling */ | 22 | #define IP_VS_SVC_F_ONEPACKET 0x0004 /* one-packet scheduling */ |
| 23 | #define IP_VS_SVC_F_SCHED1 0x0008 /* scheduler flag 1 */ | ||
| 24 | #define IP_VS_SVC_F_SCHED2 0x0010 /* scheduler flag 2 */ | ||
| 25 | #define IP_VS_SVC_F_SCHED3 0x0020 /* scheduler flag 3 */ | ||
| 26 | |||
| 27 | #define IP_VS_SVC_F_SCHED_SH_FALLBACK IP_VS_SVC_F_SCHED1 /* SH fallback */ | ||
| 28 | #define IP_VS_SVC_F_SCHED_SH_PORT IP_VS_SVC_F_SCHED2 /* SH use port */ | ||
| 23 | 29 | ||
| 24 | /* | 30 | /* |
| 25 | * Destination Server Flags | 31 | * Destination Server Flags |
diff --git a/include/uapi/linux/netfilter/nfnetlink_queue.h b/include/uapi/linux/netfilter/nfnetlink_queue.h index a2308ae5a73d..3a9b92147339 100644 --- a/include/uapi/linux/netfilter/nfnetlink_queue.h +++ b/include/uapi/linux/netfilter/nfnetlink_queue.h | |||
| @@ -105,5 +105,7 @@ enum nfqnl_attr_config { | |||
| 105 | #define NFQA_SKB_CSUMNOTREADY (1 << 0) | 105 | #define NFQA_SKB_CSUMNOTREADY (1 << 0) |
| 106 | /* packet is GSO (i.e., exceeds device mtu) */ | 106 | /* packet is GSO (i.e., exceeds device mtu) */ |
| 107 | #define NFQA_SKB_GSO (1 << 1) | 107 | #define NFQA_SKB_GSO (1 << 1) |
| 108 | /* csum not validated (incoming device doesn't support hw checksum, etc.) */ | ||
| 109 | #define NFQA_SKB_CSUM_NOTVERIFIED (1 << 2) | ||
| 108 | 110 | ||
| 109 | #endif /* _NFNETLINK_QUEUE_H */ | 111 | #endif /* _NFNETLINK_QUEUE_H */ |
diff --git a/include/uapi/linux/netfilter/xt_socket.h b/include/uapi/linux/netfilter/xt_socket.h index 26d7217bd4f1..6315e2ac3474 100644 --- a/include/uapi/linux/netfilter/xt_socket.h +++ b/include/uapi/linux/netfilter/xt_socket.h | |||
| @@ -5,10 +5,17 @@ | |||
| 5 | 5 | ||
| 6 | enum { | 6 | enum { |
| 7 | XT_SOCKET_TRANSPARENT = 1 << 0, | 7 | XT_SOCKET_TRANSPARENT = 1 << 0, |
| 8 | XT_SOCKET_NOWILDCARD = 1 << 1, | ||
| 8 | }; | 9 | }; |
| 9 | 10 | ||
| 10 | struct xt_socket_mtinfo1 { | 11 | struct xt_socket_mtinfo1 { |
| 11 | __u8 flags; | 12 | __u8 flags; |
| 12 | }; | 13 | }; |
| 14 | #define XT_SOCKET_FLAGS_V1 XT_SOCKET_TRANSPARENT | ||
| 15 | |||
| 16 | struct xt_socket_mtinfo2 { | ||
| 17 | __u8 flags; | ||
| 18 | }; | ||
| 19 | #define XT_SOCKET_FLAGS_V2 (XT_SOCKET_TRANSPARENT | XT_SOCKET_NOWILDCARD) | ||
| 13 | 20 | ||
| 14 | #endif /* _XT_SOCKET_H */ | 21 | #endif /* _XT_SOCKET_H */ |
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 7c6f627a717d..caed0f324d5f 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h | |||
| @@ -69,6 +69,8 @@ | |||
| 69 | * starting a poll from a device which has a secure element enabled means | 69 | * starting a poll from a device which has a secure element enabled means |
| 70 | * we want to do SE based card emulation. | 70 | * we want to do SE based card emulation. |
| 71 | * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element. | 71 | * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element. |
| 72 | * @NFC_CMD_FW_UPLOAD: Request to Load/flash firmware, or event to inform that | ||
| 73 | * some firmware was loaded | ||
| 72 | */ | 74 | */ |
| 73 | enum nfc_commands { | 75 | enum nfc_commands { |
| 74 | NFC_CMD_UNSPEC, | 76 | NFC_CMD_UNSPEC, |
| @@ -92,6 +94,9 @@ enum nfc_commands { | |||
| 92 | NFC_CMD_DISABLE_SE, | 94 | NFC_CMD_DISABLE_SE, |
| 93 | NFC_CMD_LLC_SDREQ, | 95 | NFC_CMD_LLC_SDREQ, |
| 94 | NFC_EVENT_LLC_SDRES, | 96 | NFC_EVENT_LLC_SDRES, |
| 97 | NFC_CMD_FW_UPLOAD, | ||
| 98 | NFC_EVENT_SE_ADDED, | ||
| 99 | NFC_EVENT_SE_REMOVED, | ||
| 95 | /* private: internal use only */ | 100 | /* private: internal use only */ |
| 96 | __NFC_CMD_AFTER_LAST | 101 | __NFC_CMD_AFTER_LAST |
| 97 | }; | 102 | }; |
| @@ -121,6 +126,9 @@ enum nfc_commands { | |||
| 121 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter | 126 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter |
| 122 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter | 127 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter |
| 123 | * @NFC_ATTR_SE: Available Secure Elements | 128 | * @NFC_ATTR_SE: Available Secure Elements |
| 129 | * @NFC_ATTR_FIRMWARE_NAME: Free format firmware version | ||
| 130 | * @NFC_ATTR_SE_INDEX: Secure element index | ||
| 131 | * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED) | ||
| 124 | */ | 132 | */ |
| 125 | enum nfc_attrs { | 133 | enum nfc_attrs { |
| 126 | NFC_ATTR_UNSPEC, | 134 | NFC_ATTR_UNSPEC, |
| @@ -143,6 +151,9 @@ enum nfc_attrs { | |||
| 143 | NFC_ATTR_LLC_PARAM_MIUX, | 151 | NFC_ATTR_LLC_PARAM_MIUX, |
| 144 | NFC_ATTR_SE, | 152 | NFC_ATTR_SE, |
| 145 | NFC_ATTR_LLC_SDP, | 153 | NFC_ATTR_LLC_SDP, |
| 154 | NFC_ATTR_FIRMWARE_NAME, | ||
| 155 | NFC_ATTR_SE_INDEX, | ||
| 156 | NFC_ATTR_SE_TYPE, | ||
| 146 | /* private: internal use only */ | 157 | /* private: internal use only */ |
| 147 | __NFC_ATTR_AFTER_LAST | 158 | __NFC_ATTR_AFTER_LAST |
| 148 | }; | 159 | }; |
| @@ -159,9 +170,12 @@ enum nfc_sdp_attr { | |||
| 159 | 170 | ||
| 160 | #define NFC_DEVICE_NAME_MAXSIZE 8 | 171 | #define NFC_DEVICE_NAME_MAXSIZE 8 |
| 161 | #define NFC_NFCID1_MAXSIZE 10 | 172 | #define NFC_NFCID1_MAXSIZE 10 |
| 173 | #define NFC_NFCID2_MAXSIZE 8 | ||
| 174 | #define NFC_NFCID3_MAXSIZE 10 | ||
| 162 | #define NFC_SENSB_RES_MAXSIZE 12 | 175 | #define NFC_SENSB_RES_MAXSIZE 12 |
| 163 | #define NFC_SENSF_RES_MAXSIZE 18 | 176 | #define NFC_SENSF_RES_MAXSIZE 18 |
| 164 | #define NFC_GB_MAXSIZE 48 | 177 | #define NFC_GB_MAXSIZE 48 |
| 178 | #define NFC_FIRMWARE_NAME_MAXSIZE 32 | ||
| 165 | 179 | ||
| 166 | /* NFC protocols */ | 180 | /* NFC protocols */ |
| 167 | #define NFC_PROTO_JEWEL 1 | 181 | #define NFC_PROTO_JEWEL 1 |
| @@ -191,10 +205,12 @@ enum nfc_sdp_attr { | |||
| 191 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) | 205 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) |
| 192 | 206 | ||
| 193 | /* NFC Secure Elements */ | 207 | /* NFC Secure Elements */ |
| 194 | #define NFC_SE_NONE 0x0 | ||
| 195 | #define NFC_SE_UICC 0x1 | 208 | #define NFC_SE_UICC 0x1 |
| 196 | #define NFC_SE_EMBEDDED 0x2 | 209 | #define NFC_SE_EMBEDDED 0x2 |
| 197 | 210 | ||
| 211 | #define NFC_SE_DISABLED 0x0 | ||
| 212 | #define NFC_SE_ENABLED 0x1 | ||
| 213 | |||
| 198 | struct sockaddr_nfc { | 214 | struct sockaddr_nfc { |
| 199 | sa_family_t sa_family; | 215 | sa_family_t sa_family; |
| 200 | __u32 dev_idx; | 216 | __u32 dev_idx; |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index d1e48b5e348f..861e5eba3953 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | 29 | ||
| 30 | #define NL80211_GENL_NAME "nl80211" | ||
| 31 | |||
| 30 | /** | 32 | /** |
| 31 | * DOC: Station handling | 33 | * DOC: Station handling |
| 32 | * | 34 | * |
| @@ -1429,6 +1431,11 @@ enum nl80211_commands { | |||
| 1429 | * @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which | 1431 | * @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which |
| 1430 | * the connection should have increased reliability (u16). | 1432 | * the connection should have increased reliability (u16). |
| 1431 | * | 1433 | * |
| 1434 | * @NL80211_ATTR_PEER_AID: Association ID for the peer TDLS station (u16). | ||
| 1435 | * This is similar to @NL80211_ATTR_STA_AID but with a difference of being | ||
| 1436 | * allowed to be used with the first @NL80211_CMD_SET_STATION command to | ||
| 1437 | * update a TDLS peer STA entry. | ||
| 1438 | * | ||
| 1432 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1439 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1433 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1440 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1434 | */ | 1441 | */ |
| @@ -1727,6 +1734,8 @@ enum nl80211_attrs { | |||
| 1727 | NL80211_ATTR_CRIT_PROT_ID, | 1734 | NL80211_ATTR_CRIT_PROT_ID, |
| 1728 | NL80211_ATTR_MAX_CRIT_PROT_DURATION, | 1735 | NL80211_ATTR_MAX_CRIT_PROT_DURATION, |
| 1729 | 1736 | ||
| 1737 | NL80211_ATTR_PEER_AID, | ||
| 1738 | |||
| 1730 | /* add attributes here, update the policy in nl80211.c */ | 1739 | /* add attributes here, update the policy in nl80211.c */ |
| 1731 | 1740 | ||
| 1732 | __NL80211_ATTR_AFTER_LAST, | 1741 | __NL80211_ATTR_AFTER_LAST, |
| @@ -1991,6 +2000,10 @@ enum nl80211_sta_bss_param { | |||
| 1991 | * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode | 2000 | * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode |
| 1992 | * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards | 2001 | * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards |
| 1993 | * non-peer STA | 2002 | * non-peer STA |
| 2003 | * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU | ||
| 2004 | * Contains a nested array of signal strength attributes (u8, dBm) | ||
| 2005 | * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average | ||
| 2006 | * Same format as NL80211_STA_INFO_CHAIN_SIGNAL. | ||
| 1994 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 2007 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 1995 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 2008 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
| 1996 | */ | 2009 | */ |
| @@ -2020,6 +2033,8 @@ enum nl80211_sta_info { | |||
| 2020 | NL80211_STA_INFO_NONPEER_PM, | 2033 | NL80211_STA_INFO_NONPEER_PM, |
| 2021 | NL80211_STA_INFO_RX_BYTES64, | 2034 | NL80211_STA_INFO_RX_BYTES64, |
| 2022 | NL80211_STA_INFO_TX_BYTES64, | 2035 | NL80211_STA_INFO_TX_BYTES64, |
| 2036 | NL80211_STA_INFO_CHAIN_SIGNAL, | ||
| 2037 | NL80211_STA_INFO_CHAIN_SIGNAL_AVG, | ||
| 2023 | 2038 | ||
| 2024 | /* keep last */ | 2039 | /* keep last */ |
| 2025 | __NL80211_STA_INFO_AFTER_LAST, | 2040 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -2413,6 +2428,8 @@ enum nl80211_survey_info { | |||
| 2413 | * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering | 2428 | * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering |
| 2414 | * @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing. | 2429 | * @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing. |
| 2415 | * overrides all other flags. | 2430 | * overrides all other flags. |
| 2431 | * @NL80211_MNTR_FLAG_ACTIVE: use the configured MAC address | ||
| 2432 | * and ACK incoming unicast packets. | ||
| 2416 | * | 2433 | * |
| 2417 | * @__NL80211_MNTR_FLAG_AFTER_LAST: internal use | 2434 | * @__NL80211_MNTR_FLAG_AFTER_LAST: internal use |
| 2418 | * @NL80211_MNTR_FLAG_MAX: highest possible monitor flag | 2435 | * @NL80211_MNTR_FLAG_MAX: highest possible monitor flag |
| @@ -2424,6 +2441,7 @@ enum nl80211_mntr_flags { | |||
| 2424 | NL80211_MNTR_FLAG_CONTROL, | 2441 | NL80211_MNTR_FLAG_CONTROL, |
| 2425 | NL80211_MNTR_FLAG_OTHER_BSS, | 2442 | NL80211_MNTR_FLAG_OTHER_BSS, |
| 2426 | NL80211_MNTR_FLAG_COOK_FRAMES, | 2443 | NL80211_MNTR_FLAG_COOK_FRAMES, |
| 2444 | NL80211_MNTR_FLAG_ACTIVE, | ||
| 2427 | 2445 | ||
| 2428 | /* keep last */ | 2446 | /* keep last */ |
| 2429 | __NL80211_MNTR_FLAG_AFTER_LAST, | 2447 | __NL80211_MNTR_FLAG_AFTER_LAST, |
| @@ -2559,6 +2577,10 @@ enum nl80211_mesh_power_mode { | |||
| 2559 | * | 2577 | * |
| 2560 | * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs) | 2578 | * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs) |
| 2561 | * | 2579 | * |
| 2580 | * @NL80211_MESHCONF_PLINK_TIMEOUT: If no tx activity is seen from a STA we've | ||
| 2581 | * established peering with for longer than this time (in seconds), then | ||
| 2582 | * remove it from the STA's list of peers. Default is 30 minutes. | ||
| 2583 | * | ||
| 2562 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 2584 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
| 2563 | */ | 2585 | */ |
| 2564 | enum nl80211_meshconf_params { | 2586 | enum nl80211_meshconf_params { |
| @@ -2590,6 +2612,7 @@ enum nl80211_meshconf_params { | |||
| 2590 | NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, | 2612 | NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, |
| 2591 | NL80211_MESHCONF_POWER_MODE, | 2613 | NL80211_MESHCONF_POWER_MODE, |
| 2592 | NL80211_MESHCONF_AWAKE_WINDOW, | 2614 | NL80211_MESHCONF_AWAKE_WINDOW, |
| 2615 | NL80211_MESHCONF_PLINK_TIMEOUT, | ||
| 2593 | 2616 | ||
| 2594 | /* keep last */ | 2617 | /* keep last */ |
| 2595 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 2618 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
| @@ -2637,6 +2660,10 @@ enum nl80211_meshconf_params { | |||
| 2637 | * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will | 2660 | * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will |
| 2638 | * implement an MPM which handles peer allocation and state. | 2661 | * implement an MPM which handles peer allocation and state. |
| 2639 | * | 2662 | * |
| 2663 | * @NL80211_MESH_SETUP_AUTH_PROTOCOL: Inform the kernel of the authentication | ||
| 2664 | * method (u8, as defined in IEEE 8.4.2.100.6, e.g. 0x1 for SAE). | ||
| 2665 | * Default is no authentication method required. | ||
| 2666 | * | ||
| 2640 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | 2667 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number |
| 2641 | * | 2668 | * |
| 2642 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | 2669 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use |
| @@ -2650,6 +2677,7 @@ enum nl80211_mesh_setup_params { | |||
| 2650 | NL80211_MESH_SETUP_USERSPACE_AMPE, | 2677 | NL80211_MESH_SETUP_USERSPACE_AMPE, |
| 2651 | NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, | 2678 | NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, |
| 2652 | NL80211_MESH_SETUP_USERSPACE_MPM, | 2679 | NL80211_MESH_SETUP_USERSPACE_MPM, |
| 2680 | NL80211_MESH_SETUP_AUTH_PROTOCOL, | ||
| 2653 | 2681 | ||
| 2654 | /* keep last */ | 2682 | /* keep last */ |
| 2655 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, | 2683 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, |
| @@ -2730,6 +2758,8 @@ enum nl80211_channel_type { | |||
| 2730 | * and %NL80211_ATTR_CENTER_FREQ2 attributes must be provided as well | 2758 | * and %NL80211_ATTR_CENTER_FREQ2 attributes must be provided as well |
| 2731 | * @NL80211_CHAN_WIDTH_160: 160 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 | 2759 | * @NL80211_CHAN_WIDTH_160: 160 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 |
| 2732 | * attribute must be provided as well | 2760 | * attribute must be provided as well |
| 2761 | * @NL80211_CHAN_WIDTH_5: 5 MHz OFDM channel | ||
| 2762 | * @NL80211_CHAN_WIDTH_10: 10 MHz OFDM channel | ||
| 2733 | */ | 2763 | */ |
| 2734 | enum nl80211_chan_width { | 2764 | enum nl80211_chan_width { |
| 2735 | NL80211_CHAN_WIDTH_20_NOHT, | 2765 | NL80211_CHAN_WIDTH_20_NOHT, |
| @@ -2738,6 +2768,8 @@ enum nl80211_chan_width { | |||
| 2738 | NL80211_CHAN_WIDTH_80, | 2768 | NL80211_CHAN_WIDTH_80, |
| 2739 | NL80211_CHAN_WIDTH_80P80, | 2769 | NL80211_CHAN_WIDTH_80P80, |
| 2740 | NL80211_CHAN_WIDTH_160, | 2770 | NL80211_CHAN_WIDTH_160, |
| 2771 | NL80211_CHAN_WIDTH_5, | ||
| 2772 | NL80211_CHAN_WIDTH_10, | ||
| 2741 | }; | 2773 | }; |
| 2742 | 2774 | ||
| 2743 | /** | 2775 | /** |
| @@ -3556,6 +3588,10 @@ enum nl80211_ap_sme_features { | |||
| 3556 | * Peering Management entity which may be implemented by registering for | 3588 | * Peering Management entity which may be implemented by registering for |
| 3557 | * beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is | 3589 | * beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is |
| 3558 | * still generated by the driver. | 3590 | * still generated by the driver. |
| 3591 | * @NL80211_FEATURE_ACTIVE_MONITOR: This driver supports an active monitor | ||
| 3592 | * interface. An active monitor interface behaves like a normal monitor | ||
| 3593 | * interface, but gets added to the driver. It ensures that incoming | ||
| 3594 | * unicast packets directed at the configured interface address get ACKed. | ||
| 3559 | */ | 3595 | */ |
| 3560 | enum nl80211_feature_flags { | 3596 | enum nl80211_feature_flags { |
| 3561 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 3597 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
| @@ -3575,6 +3611,7 @@ enum nl80211_feature_flags { | |||
| 3575 | NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, | 3611 | NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, |
| 3576 | NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, | 3612 | NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, |
| 3577 | NL80211_FEATURE_USERSPACE_MPM = 1 << 16, | 3613 | NL80211_FEATURE_USERSPACE_MPM = 1 << 16, |
| 3614 | NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17, | ||
| 3578 | }; | 3615 | }; |
| 3579 | 3616 | ||
| 3580 | /** | 3617 | /** |
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 405918dd7b3f..c55efaaa9bb4 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -164,6 +164,7 @@ enum ovs_vport_type { | |||
| 164 | OVS_VPORT_TYPE_UNSPEC, | 164 | OVS_VPORT_TYPE_UNSPEC, |
| 165 | OVS_VPORT_TYPE_NETDEV, /* network device */ | 165 | OVS_VPORT_TYPE_NETDEV, /* network device */ |
| 166 | OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ | 166 | OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ |
| 167 | OVS_VPORT_TYPE_GRE, /* GRE tunnel. */ | ||
| 167 | __OVS_VPORT_TYPE_MAX | 168 | __OVS_VPORT_TYPE_MAX |
| 168 | }; | 169 | }; |
| 169 | 170 | ||
| @@ -192,7 +193,6 @@ enum ovs_vport_type { | |||
| 192 | * optional; if not specified a free port number is automatically selected. | 193 | * optional; if not specified a free port number is automatically selected. |
| 193 | * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type | 194 | * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type |
| 194 | * of vport. | 195 | * of vport. |
| 195 | * and other attributes are ignored. | ||
| 196 | * | 196 | * |
| 197 | * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to | 197 | * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to |
| 198 | * look up the vport to operate on; otherwise dp_idx from the &struct | 198 | * look up the vport to operate on; otherwise dp_idx from the &struct |
| @@ -247,11 +247,29 @@ enum ovs_key_attr { | |||
| 247 | OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */ | 247 | OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */ |
| 248 | OVS_KEY_ATTR_ND, /* struct ovs_key_nd */ | 248 | OVS_KEY_ATTR_ND, /* struct ovs_key_nd */ |
| 249 | OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ | 249 | OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ |
| 250 | OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ | ||
| 251 | |||
| 252 | #ifdef __KERNEL__ | ||
| 253 | OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ | ||
| 254 | #endif | ||
| 250 | __OVS_KEY_ATTR_MAX | 255 | __OVS_KEY_ATTR_MAX |
| 251 | }; | 256 | }; |
| 252 | 257 | ||
| 253 | #define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1) | 258 | #define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1) |
| 254 | 259 | ||
| 260 | enum ovs_tunnel_key_attr { | ||
| 261 | OVS_TUNNEL_KEY_ATTR_ID, /* be64 Tunnel ID */ | ||
| 262 | OVS_TUNNEL_KEY_ATTR_IPV4_SRC, /* be32 src IP address. */ | ||
| 263 | OVS_TUNNEL_KEY_ATTR_IPV4_DST, /* be32 dst IP address. */ | ||
| 264 | OVS_TUNNEL_KEY_ATTR_TOS, /* u8 Tunnel IP ToS. */ | ||
| 265 | OVS_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */ | ||
| 266 | OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */ | ||
| 267 | OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ | ||
| 268 | __OVS_TUNNEL_KEY_ATTR_MAX | ||
| 269 | }; | ||
| 270 | |||
| 271 | #define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1) | ||
| 272 | |||
| 255 | /** | 273 | /** |
| 256 | * enum ovs_frag_type - IPv4 and IPv6 fragment type | 274 | * enum ovs_frag_type - IPv4 and IPv6 fragment type |
| 257 | * @OVS_FRAG_TYPE_NONE: Packet is not a fragment. | 275 | * @OVS_FRAG_TYPE_NONE: Packet is not a fragment. |
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 7a2144e1afae..eb0f1a554d7b 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h | |||
| @@ -386,6 +386,8 @@ enum { | |||
| 386 | #define RTAX_RTO_MIN RTAX_RTO_MIN | 386 | #define RTAX_RTO_MIN RTAX_RTO_MIN |
| 387 | RTAX_INITRWND, | 387 | RTAX_INITRWND, |
| 388 | #define RTAX_INITRWND RTAX_INITRWND | 388 | #define RTAX_INITRWND RTAX_INITRWND |
| 389 | RTAX_QUICKACK, | ||
| 390 | #define RTAX_QUICKACK RTAX_QUICKACK | ||
| 389 | __RTAX_MAX | 391 | __RTAX_MAX |
| 390 | }; | 392 | }; |
| 391 | 393 | ||
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h index df2e8b4f9c03..af0a674cc677 100644 --- a/include/uapi/linux/snmp.h +++ b/include/uapi/linux/snmp.h | |||
| @@ -253,6 +253,7 @@ enum | |||
| 253 | LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ | 253 | LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ |
| 254 | LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ | 254 | LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ |
| 255 | LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */ | 255 | LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */ |
| 256 | LINUX_MIB_LOWLATENCYRXPACKETS, /* LowLatencyRxPackets */ | ||
| 256 | __LINUX_MIB_MAX | 257 | __LINUX_MIB_MAX |
| 257 | }; | 258 | }; |
| 258 | 259 | ||
| @@ -287,6 +288,7 @@ enum | |||
| 287 | LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */ | 288 | LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */ |
| 288 | LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/ | 289 | LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/ |
| 289 | LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */ | 290 | LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */ |
| 291 | LINUX_MIB_XFRMACQUIREERROR, /* XfrmAcquireError */ | ||
| 290 | __LINUX_MIB_XFRMMAX | 292 | __LINUX_MIB_XFRMMAX |
| 291 | }; | 293 | }; |
| 292 | 294 | ||
diff --git a/include/uapi/linux/tipc.h b/include/uapi/linux/tipc.h index f2d90091cc20..852373d27dbb 100644 --- a/include/uapi/linux/tipc.h +++ b/include/uapi/linux/tipc.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/linux/tipc.h: Include file for TIPC socket interface | 2 | * include/uapi/linux/tipc.h: Header for TIPC socket interface |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2003-2006, Ericsson AB | 4 | * Copyright (c) 2003-2006, Ericsson AB |
| 5 | * Copyright (c) 2005, 2010-2011, Wind River Systems | 5 | * Copyright (c) 2005, 2010-2011, Wind River Systems |
diff --git a/include/uapi/linux/tipc_config.h b/include/uapi/linux/tipc_config.h index 0b1e3f218a36..6b0bff09b3a7 100644 --- a/include/uapi/linux/tipc_config.h +++ b/include/uapi/linux/tipc_config.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/linux/tipc_config.h: Include file for TIPC configuration interface | 2 | * include/uapi/linux/tipc_config.h: Header for TIPC configuration interface |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2003-2006, Ericsson AB | 4 | * Copyright (c) 2003-2006, Ericsson AB |
| 5 | * Copyright (c) 2005-2007, 2010-2011, Wind River Systems | 5 | * Copyright (c) 2005-2007, 2010-2011, Wind River Systems |
diff --git a/include/xen/interface/io/netif.h b/include/xen/interface/io/netif.h index 3ef3fe05ee99..eb262e3324d2 100644 --- a/include/xen/interface/io/netif.h +++ b/include/xen/interface/io/netif.h | |||
| @@ -38,6 +38,18 @@ | |||
| 38 | * that it cannot safely queue packets (as it may not be kicked to send them). | 38 | * that it cannot safely queue packets (as it may not be kicked to send them). |
| 39 | */ | 39 | */ |
| 40 | 40 | ||
| 41 | /* | ||
| 42 | * "feature-split-event-channels" is introduced to separate guest TX | ||
| 43 | * and RX notificaion. Backend either doesn't support this feature or | ||
| 44 | * advertise it via xenstore as 0 (disabled) or 1 (enabled). | ||
| 45 | * | ||
| 46 | * To make use of this feature, frontend should allocate two event | ||
| 47 | * channels for TX and RX, advertise them to backend as | ||
| 48 | * "event-channel-tx" and "event-channel-rx" respectively. If frontend | ||
| 49 | * doesn't want to use this feature, it just writes "event-channel" | ||
| 50 | * node as before. | ||
| 51 | */ | ||
| 52 | |||
| 41 | /* | 53 | /* |
| 42 | * This is the 'wire' format for packets: | 54 | * This is the 'wire' format for packets: |
| 43 | * Request 1: xen_netif_tx_request -- XEN_NETTXF_* (any flags) | 55 | * Request 1: xen_netif_tx_request -- XEN_NETTXF_* (any flags) |
