diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-03 09:28:30 -0400 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-03 09:34:51 -0400 |
| commit | ace1fe1231bdfffd60b5e703aa5b7283fbf98dbd (patch) | |
| tree | 06c7492a8f3cc65f916768616ca24c6bc7171761 /include | |
| parent | ce9f3f31efb88841e4df98794b13dbac8c4901da (diff) | |
| parent | a2dc375e12334b3d8f787a48b2fb6172ccfb80ae (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
This merges (3f509c6 netfilter: nf_nat_sip: fix incorrect handling
of EBUSY for RTCP expectation) to Patrick McHardy's IPv6 NAT changes.
Diffstat (limited to 'include')
31 files changed, 443 insertions, 70 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index a1a0386e016..ced362533e3 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -166,8 +166,6 @@ struct drm_display_mode { | |||
| 166 | int crtc_vsync_start; | 166 | int crtc_vsync_start; |
| 167 | int crtc_vsync_end; | 167 | int crtc_vsync_end; |
| 168 | int crtc_vtotal; | 168 | int crtc_vtotal; |
| 169 | int crtc_hadjusted; | ||
| 170 | int crtc_vadjusted; | ||
| 171 | 169 | ||
| 172 | /* Driver private mode info */ | 170 | /* Driver private mode info */ |
| 173 | int private_size; | 171 | int private_size; |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 3fb8bbafe5e..6ba45d2b99d 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -515,6 +515,26 @@ struct bcma_pflash { | |||
| 515 | u32 window_size; | 515 | u32 window_size; |
| 516 | }; | 516 | }; |
| 517 | 517 | ||
| 518 | #ifdef CONFIG_BCMA_SFLASH | ||
| 519 | struct bcma_sflash { | ||
| 520 | bool present; | ||
| 521 | u32 window; | ||
| 522 | u32 blocksize; | ||
| 523 | u16 numblocks; | ||
| 524 | u32 size; | ||
| 525 | }; | ||
| 526 | #endif | ||
| 527 | |||
| 528 | #ifdef CONFIG_BCMA_NFLASH | ||
| 529 | struct mtd_info; | ||
| 530 | |||
| 531 | struct bcma_nflash { | ||
| 532 | bool present; | ||
| 533 | |||
| 534 | struct mtd_info *mtd; | ||
| 535 | }; | ||
| 536 | #endif | ||
| 537 | |||
| 518 | struct bcma_serial_port { | 538 | struct bcma_serial_port { |
| 519 | void *regs; | 539 | void *regs; |
| 520 | unsigned long clockspeed; | 540 | unsigned long clockspeed; |
| @@ -535,6 +555,12 @@ struct bcma_drv_cc { | |||
| 535 | struct bcma_chipcommon_pmu pmu; | 555 | struct bcma_chipcommon_pmu pmu; |
| 536 | #ifdef CONFIG_BCMA_DRIVER_MIPS | 556 | #ifdef CONFIG_BCMA_DRIVER_MIPS |
| 537 | struct bcma_pflash pflash; | 557 | struct bcma_pflash pflash; |
| 558 | #ifdef CONFIG_BCMA_SFLASH | ||
| 559 | struct bcma_sflash sflash; | ||
| 560 | #endif | ||
| 561 | #ifdef CONFIG_BCMA_NFLASH | ||
| 562 | struct bcma_nflash nflash; | ||
| 563 | #endif | ||
| 538 | 564 | ||
| 539 | int nr_serial_ports; | 565 | int nr_serial_ports; |
| 540 | struct bcma_serial_port serial_ports[4]; | 566 | struct bcma_serial_port serial_ports[4]; |
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h index a393e82bf7b..6c9cb93ae3d 100644 --- a/include/linux/bcma/bcma_regs.h +++ b/include/linux/bcma/bcma_regs.h | |||
| @@ -85,4 +85,6 @@ | |||
| 85 | * (2 ZettaBytes), high 32 bits | 85 | * (2 ZettaBytes), high 32 bits |
| 86 | */ | 86 | */ |
| 87 | 87 | ||
| 88 | #define BCMA_SFLASH 0x1c000000 | ||
| 89 | |||
| 88 | #endif /* LINUX_BCMA_REGS_H_ */ | 90 | #endif /* LINUX_BCMA_REGS_H_ */ |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a810987cb80..e6ff12dd717 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
| @@ -74,8 +74,6 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) | |||
| 74 | /* found in socket.c */ | 74 | /* found in socket.c */ |
| 75 | extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); | 75 | extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); |
| 76 | 76 | ||
| 77 | struct vlan_info; | ||
| 78 | |||
| 79 | static inline int is_vlan_dev(struct net_device *dev) | 77 | static inline int is_vlan_dev(struct net_device *dev) |
| 80 | { | 78 | { |
| 81 | return dev->priv_flags & IFF_802_1Q_VLAN; | 79 | return dev->priv_flags & IFF_802_1Q_VLAN; |
| @@ -101,6 +99,8 @@ extern int vlan_vids_add_by_dev(struct net_device *dev, | |||
| 101 | const struct net_device *by_dev); | 99 | const struct net_device *by_dev); |
| 102 | extern void vlan_vids_del_by_dev(struct net_device *dev, | 100 | extern void vlan_vids_del_by_dev(struct net_device *dev, |
| 103 | const struct net_device *by_dev); | 101 | const struct net_device *by_dev); |
| 102 | |||
| 103 | extern bool vlan_uses_dev(const struct net_device *dev); | ||
| 104 | #else | 104 | #else |
| 105 | static inline struct net_device * | 105 | static inline struct net_device * |
| 106 | __vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id) | 106 | __vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id) |
| @@ -151,6 +151,11 @@ static inline void vlan_vids_del_by_dev(struct net_device *dev, | |||
| 151 | const struct net_device *by_dev) | 151 | const struct net_device *by_dev) |
| 152 | { | 152 | { |
| 153 | } | 153 | } |
| 154 | |||
| 155 | static inline bool vlan_uses_dev(const struct net_device *dev) | ||
| 156 | { | ||
| 157 | return false; | ||
| 158 | } | ||
| 154 | #endif | 159 | #endif |
| 155 | 160 | ||
| 156 | /** | 161 | /** |
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index f1362b5447f..e788c186ed3 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
| @@ -159,6 +159,7 @@ struct inet_diag_handler { | |||
| 159 | struct inet_connection_sock; | 159 | struct inet_connection_sock; |
| 160 | int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, | 160 | int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, |
| 161 | struct sk_buff *skb, struct inet_diag_req_v2 *req, | 161 | struct sk_buff *skb, struct inet_diag_req_v2 *req, |
| 162 | struct user_namespace *user_ns, | ||
| 162 | u32 pid, u32 seq, u16 nlmsg_flags, | 163 | u32 pid, u32 seq, u16 nlmsg_flags, |
| 163 | const struct nlmsghdr *unlh); | 164 | const struct nlmsghdr *unlh); |
| 164 | void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb, | 165 | void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb, |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 9c07dcebded..65af6887872 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/bug.h> | 18 | #include <linux/bug.h> |
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/mutex.h> | ||
| 21 | 22 | ||
| 22 | struct kref { | 23 | struct kref { |
| 23 | atomic_t refcount; | 24 | atomic_t refcount; |
| @@ -93,4 +94,21 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref) | |||
| 93 | { | 94 | { |
| 94 | return kref_sub(kref, 1, release); | 95 | return kref_sub(kref, 1, release); |
| 95 | } | 96 | } |
| 97 | |||
| 98 | static inline int kref_put_mutex(struct kref *kref, | ||
| 99 | void (*release)(struct kref *kref), | ||
| 100 | struct mutex *lock) | ||
| 101 | { | ||
| 102 | WARN_ON(release == NULL); | ||
| 103 | if (unlikely(!atomic_add_unless(&kref->refcount, -1, 1))) { | ||
| 104 | mutex_lock(lock); | ||
| 105 | if (unlikely(!atomic_dec_and_test(&kref->refcount))) { | ||
| 106 | mutex_unlock(lock); | ||
| 107 | return 0; | ||
| 108 | } | ||
| 109 | release(kref); | ||
| 110 | return 1; | ||
| 111 | } | ||
| 112 | return 0; | ||
| 113 | } | ||
| 96 | #endif /* _KREF_H_ */ | 114 | #endif /* _KREF_H_ */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9ad7fa8c10e..ccac82e6160 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2227,6 +2227,7 @@ static inline void dev_hold(struct net_device *dev) | |||
| 2227 | * kind of lower layer not just hardware media. | 2227 | * kind of lower layer not just hardware media. |
| 2228 | */ | 2228 | */ |
| 2229 | 2229 | ||
| 2230 | extern void linkwatch_init_dev(struct net_device *dev); | ||
| 2230 | extern void linkwatch_fire_event(struct net_device *dev); | 2231 | extern void linkwatch_fire_event(struct net_device *dev); |
| 2231 | extern void linkwatch_forget_dev(struct net_device *dev); | 2232 | extern void linkwatch_forget_dev(struct net_device *dev); |
| 2232 | 2233 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index f74dd133788..c9fdde2bc73 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -165,6 +165,7 @@ struct netlink_skb_parms { | |||
| 165 | struct ucred creds; /* Skb credentials */ | 165 | struct ucred creds; /* Skb credentials */ |
| 166 | __u32 pid; | 166 | __u32 pid; |
| 167 | __u32 dst_group; | 167 | __u32 dst_group; |
| 168 | struct sock *ssk; | ||
| 168 | }; | 169 | }; |
| 169 | 170 | ||
| 170 | #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) | 171 | #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 880805774f9..92ce5783b70 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -69,6 +69,7 @@ struct nfs_pageio_descriptor { | |||
| 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; | 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; |
| 70 | struct pnfs_layout_segment *pg_lseg; | 70 | struct pnfs_layout_segment *pg_lseg; |
| 71 | struct nfs_direct_req *pg_dreq; | 71 | struct nfs_direct_req *pg_dreq; |
| 72 | void *pg_layout_private; | ||
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 75 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 00485e08439..ac7c8ae254f 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -1248,6 +1248,7 @@ struct nfs_pgio_header { | |||
| 1248 | void (*release) (struct nfs_pgio_header *hdr); | 1248 | void (*release) (struct nfs_pgio_header *hdr); |
| 1249 | const struct nfs_pgio_completion_ops *completion_ops; | 1249 | const struct nfs_pgio_completion_ops *completion_ops; |
| 1250 | struct nfs_direct_req *dreq; | 1250 | struct nfs_direct_req *dreq; |
| 1251 | void *layout_private; | ||
| 1251 | spinlock_t lock; | 1252 | spinlock_t lock; |
| 1252 | /* fields protected by lock */ | 1253 | /* fields protected by lock */ |
| 1253 | int pnfs_error; | 1254 | int pnfs_error; |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2f387880640..45841627934 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -565,6 +565,14 @@ | |||
| 565 | * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with | 565 | * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with |
| 566 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. | 566 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. |
| 567 | * | 567 | * |
| 568 | * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by | ||
| 569 | * its %NL80211_ATTR_WDEV identifier. It must have been created with | ||
| 570 | * %NL80211_CMD_NEW_INTERFACE previously. After it has been started, the | ||
| 571 | * P2P Device can be used for P2P operations, e.g. remain-on-channel and | ||
| 572 | * public action frame TX. | ||
| 573 | * @NL80211_CMD_STOP_P2P_DEVICE: Stop the given P2P Device, identified by | ||
| 574 | * its %NL80211_ATTR_WDEV identifier. | ||
| 575 | * | ||
| 568 | * @NL80211_CMD_MAX: highest used command number | 576 | * @NL80211_CMD_MAX: highest used command number |
| 569 | * @__NL80211_CMD_AFTER_LAST: internal use | 577 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 570 | */ | 578 | */ |
| @@ -708,6 +716,9 @@ enum nl80211_commands { | |||
| 708 | 716 | ||
| 709 | NL80211_CMD_CH_SWITCH_NOTIFY, | 717 | NL80211_CMD_CH_SWITCH_NOTIFY, |
| 710 | 718 | ||
| 719 | NL80211_CMD_START_P2P_DEVICE, | ||
| 720 | NL80211_CMD_STOP_P2P_DEVICE, | ||
| 721 | |||
| 711 | /* add new commands above here */ | 722 | /* add new commands above here */ |
| 712 | 723 | ||
| 713 | /* used to define NL80211_CMD_MAX below */ | 724 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1575,6 +1586,10 @@ enum nl80211_attrs { | |||
| 1575 | * @NL80211_IFTYPE_MESH_POINT: mesh point | 1586 | * @NL80211_IFTYPE_MESH_POINT: mesh point |
| 1576 | * @NL80211_IFTYPE_P2P_CLIENT: P2P client | 1587 | * @NL80211_IFTYPE_P2P_CLIENT: P2P client |
| 1577 | * @NL80211_IFTYPE_P2P_GO: P2P group owner | 1588 | * @NL80211_IFTYPE_P2P_GO: P2P group owner |
| 1589 | * @NL80211_IFTYPE_P2P_DEVICE: P2P device interface type, this is not a netdev | ||
| 1590 | * and therefore can't be created in the normal ways, use the | ||
| 1591 | * %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE | ||
| 1592 | * commands to create and destroy one | ||
| 1578 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined | 1593 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined |
| 1579 | * @NUM_NL80211_IFTYPES: number of defined interface types | 1594 | * @NUM_NL80211_IFTYPES: number of defined interface types |
| 1580 | * | 1595 | * |
| @@ -1593,6 +1608,7 @@ enum nl80211_iftype { | |||
| 1593 | NL80211_IFTYPE_MESH_POINT, | 1608 | NL80211_IFTYPE_MESH_POINT, |
| 1594 | NL80211_IFTYPE_P2P_CLIENT, | 1609 | NL80211_IFTYPE_P2P_CLIENT, |
| 1595 | NL80211_IFTYPE_P2P_GO, | 1610 | NL80211_IFTYPE_P2P_GO, |
| 1611 | NL80211_IFTYPE_P2P_DEVICE, | ||
| 1596 | 1612 | ||
| 1597 | /* keep last */ | 1613 | /* keep last */ |
| 1598 | NUM_NL80211_IFTYPES, | 1614 | NUM_NL80211_IFTYPES, |
| @@ -2994,12 +3010,18 @@ enum nl80211_ap_sme_features { | |||
| 2994 | * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested | 3010 | * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested |
| 2995 | * to work properly to suppport receiving regulatory hints from | 3011 | * to work properly to suppport receiving regulatory hints from |
| 2996 | * cellular base stations. | 3012 | * cellular base stations. |
| 3013 | * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: If this is set, an active | ||
| 3014 | * P2P Device (%NL80211_IFTYPE_P2P_DEVICE) requires its own channel | ||
| 3015 | * in the interface combinations, even when it's only used for scan | ||
| 3016 | * and remain-on-channel. This could be due to, for example, the | ||
| 3017 | * remain-on-channel implementation requiring a channel context. | ||
| 2997 | */ | 3018 | */ |
| 2998 | enum nl80211_feature_flags { | 3019 | enum nl80211_feature_flags { |
| 2999 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 3020 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
| 3000 | NL80211_FEATURE_HT_IBSS = 1 << 1, | 3021 | NL80211_FEATURE_HT_IBSS = 1 << 1, |
| 3001 | NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, | 3022 | NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, |
| 3002 | NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, | 3023 | NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, |
| 3024 | NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 1 << 4, | ||
| 3003 | }; | 3025 | }; |
| 3004 | 3026 | ||
| 3005 | /** | 3027 | /** |
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h index 912c27a0f7e..6ef49b803ef 100644 --- a/include/linux/of_mdio.h +++ b/include/linux/of_mdio.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/phy.h> | 12 | #include <linux/phy.h> |
| 13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
| 14 | 14 | ||
| 15 | #ifdef CONFIG_OF | ||
| 15 | extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); | 16 | extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); |
| 16 | extern struct phy_device *of_phy_find_device(struct device_node *phy_np); | 17 | extern struct phy_device *of_phy_find_device(struct device_node *phy_np); |
| 17 | extern struct phy_device *of_phy_connect(struct net_device *dev, | 18 | extern struct phy_device *of_phy_connect(struct net_device *dev, |
| @@ -24,4 +25,36 @@ extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, | |||
| 24 | 25 | ||
| 25 | extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); | 26 | extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); |
| 26 | 27 | ||
| 28 | #else /* CONFIG_OF */ | ||
| 29 | int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) | ||
| 30 | { | ||
| 31 | return -ENOSYS; | ||
| 32 | } | ||
| 33 | |||
| 34 | struct phy_device *of_phy_find_device(struct device_node *phy_np) | ||
| 35 | { | ||
| 36 | return NULL; | ||
| 37 | } | ||
| 38 | |||
| 39 | struct phy_device *of_phy_connect(struct net_device *dev, | ||
| 40 | struct device_node *phy_np, | ||
| 41 | void (*hndlr)(struct net_device *), | ||
| 42 | u32 flags, phy_interface_t iface) | ||
| 43 | { | ||
| 44 | return NULL; | ||
| 45 | } | ||
| 46 | |||
| 47 | struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, | ||
| 48 | void (*hndlr)(struct net_device *), | ||
| 49 | phy_interface_t iface) | ||
| 50 | { | ||
| 51 | return NULL; | ||
| 52 | } | ||
| 53 | |||
| 54 | struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) | ||
| 55 | { | ||
| 56 | return NULL; | ||
| 57 | } | ||
| 58 | #endif /* CONFIG_OF */ | ||
| 59 | |||
| 27 | #endif /* __LINUX_OF_MDIO_H */ | 60 | #endif /* __LINUX_OF_MDIO_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fc352607734..6b4565c440c 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2149,7 +2149,7 @@ | |||
| 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 | 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 |
| 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 | 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 |
| 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa | 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa |
| 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16ab | 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16a4 |
| 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac | 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac |
| 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad | 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad |
| 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae | 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 6fdf02737e9..0ec590bb361 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -354,6 +354,37 @@ static inline bool rfkill_blocked(struct rfkill *rfkill) | |||
| 354 | } | 354 | } |
| 355 | #endif /* RFKILL || RFKILL_MODULE */ | 355 | #endif /* RFKILL || RFKILL_MODULE */ |
| 356 | 356 | ||
| 357 | |||
| 358 | #ifdef CONFIG_RFKILL_LEDS | ||
| 359 | /** | ||
| 360 | * rfkill_get_led_trigger_name - Get the LED trigger name for the button's LED. | ||
| 361 | * This function might return a NULL pointer if registering of the | ||
| 362 | * LED trigger failed. Use this as "default_trigger" for the LED. | ||
| 363 | */ | ||
| 364 | const char *rfkill_get_led_trigger_name(struct rfkill *rfkill); | ||
| 365 | |||
| 366 | /** | ||
| 367 | * rfkill_set_led_trigger_name -- set the LED trigger name | ||
| 368 | * @rfkill: rfkill struct | ||
| 369 | * @name: LED trigger name | ||
| 370 | * | ||
| 371 | * This function sets the LED trigger name of the radio LED | ||
| 372 | * trigger that rfkill creates. It is optional, but if called | ||
| 373 | * must be called before rfkill_register() to be effective. | ||
| 374 | */ | ||
| 375 | void rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name); | ||
| 376 | #else | ||
| 377 | static inline const char *rfkill_get_led_trigger_name(struct rfkill *rfkill) | ||
| 378 | { | ||
| 379 | return NULL; | ||
| 380 | } | ||
| 381 | |||
| 382 | static inline void | ||
| 383 | rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name) | ||
| 384 | { | ||
| 385 | } | ||
| 386 | #endif | ||
| 387 | |||
| 357 | #endif /* __KERNEL__ */ | 388 | #endif /* __KERNEL__ */ |
| 358 | 389 | ||
| 359 | #endif /* RFKILL_H */ | 390 | #endif /* RFKILL_H */ |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 83c44eefe69..68a04a343ca 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -13,6 +13,7 @@ struct file; | |||
| 13 | struct path; | 13 | struct path; |
| 14 | struct inode; | 14 | struct inode; |
| 15 | struct dentry; | 15 | struct dentry; |
| 16 | struct user_namespace; | ||
| 16 | 17 | ||
| 17 | struct seq_file { | 18 | struct seq_file { |
| 18 | char *buf; | 19 | char *buf; |
| @@ -25,6 +26,9 @@ struct seq_file { | |||
| 25 | struct mutex lock; | 26 | struct mutex lock; |
| 26 | const struct seq_operations *op; | 27 | const struct seq_operations *op; |
| 27 | int poll_event; | 28 | int poll_event; |
| 29 | #ifdef CONFIG_USER_NS | ||
| 30 | struct user_namespace *user_ns; | ||
| 31 | #endif | ||
| 28 | void *private; | 32 | void *private; |
| 29 | }; | 33 | }; |
| 30 | 34 | ||
| @@ -128,6 +132,16 @@ int seq_put_decimal_ull(struct seq_file *m, char delimiter, | |||
| 128 | int seq_put_decimal_ll(struct seq_file *m, char delimiter, | 132 | int seq_put_decimal_ll(struct seq_file *m, char delimiter, |
| 129 | long long num); | 133 | long long num); |
| 130 | 134 | ||
| 135 | static inline struct user_namespace *seq_user_ns(struct seq_file *seq) | ||
| 136 | { | ||
| 137 | #ifdef CONFIG_USER_NS | ||
| 138 | return seq->user_ns; | ||
| 139 | #else | ||
| 140 | extern struct user_namespace init_user_ns; | ||
| 141 | return &init_user_ns; | ||
| 142 | #endif | ||
| 143 | } | ||
| 144 | |||
| 131 | #define SEQ_START_TOKEN ((void *)1) | 145 | #define SEQ_START_TOKEN ((void *)1) |
| 132 | /* | 146 | /* |
| 133 | * Helpers for iteration over list_head-s in seq_files | 147 | * Helpers for iteration over list_head-s in seq_files |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index ad6e3a6bf9f..fdfba235f9f 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
| @@ -241,6 +241,10 @@ enum | |||
| 241 | LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */ | 241 | LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */ |
| 242 | LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */ | 242 | LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */ |
| 243 | LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */ | 243 | LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */ |
| 244 | LINUX_MIB_TCPFASTOPENPASSIVE, /* TCPFastOpenPassive*/ | ||
| 245 | LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */ | ||
| 246 | LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ | ||
| 247 | LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ | ||
| 244 | __LINUX_MIB_MAX | 248 | __LINUX_MIB_MAX |
| 245 | }; | 249 | }; |
| 246 | 250 | ||
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index b69bdb1e08b..a1547ea3920 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
| @@ -76,7 +76,6 @@ | |||
| 76 | /* Platfrom data for platform device structure's platform_data field */ | 76 | /* Platfrom data for platform device structure's platform_data field */ |
| 77 | 77 | ||
| 78 | struct stmmac_mdio_bus_data { | 78 | struct stmmac_mdio_bus_data { |
| 79 | int bus_id; | ||
| 80 | int (*phy_reset)(void *priv); | 79 | int (*phy_reset)(void *priv); |
| 81 | unsigned int phy_mask; | 80 | unsigned int phy_mask; |
| 82 | int *irqs; | 81 | int *irqs; |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index eb125a4c30b..ae46df59062 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -110,6 +110,7 @@ enum { | |||
| 110 | #define TCP_REPAIR_QUEUE 20 | 110 | #define TCP_REPAIR_QUEUE 20 |
| 111 | #define TCP_QUEUE_SEQ 21 | 111 | #define TCP_QUEUE_SEQ 21 |
| 112 | #define TCP_REPAIR_OPTIONS 22 | 112 | #define TCP_REPAIR_OPTIONS 22 |
| 113 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ | ||
| 113 | 114 | ||
| 114 | struct tcp_repair_opt { | 115 | struct tcp_repair_opt { |
| 115 | __u32 opt_code; | 116 | __u32 opt_code; |
| @@ -246,6 +247,7 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb) | |||
| 246 | /* TCP Fast Open */ | 247 | /* TCP Fast Open */ |
| 247 | #define TCP_FASTOPEN_COOKIE_MIN 4 /* Min Fast Open Cookie size in bytes */ | 248 | #define TCP_FASTOPEN_COOKIE_MIN 4 /* Min Fast Open Cookie size in bytes */ |
| 248 | #define TCP_FASTOPEN_COOKIE_MAX 16 /* Max Fast Open Cookie size in bytes */ | 249 | #define TCP_FASTOPEN_COOKIE_MAX 16 /* Max Fast Open Cookie size in bytes */ |
| 250 | #define TCP_FASTOPEN_COOKIE_SIZE 8 /* the size employed by this impl. */ | ||
| 249 | 251 | ||
| 250 | /* TCP Fast Open Cookie as stored in memory */ | 252 | /* TCP Fast Open Cookie as stored in memory */ |
| 251 | struct tcp_fastopen_cookie { | 253 | struct tcp_fastopen_cookie { |
| @@ -312,9 +314,14 @@ struct tcp_request_sock { | |||
| 312 | /* Only used by TCP MD5 Signature so far. */ | 314 | /* Only used by TCP MD5 Signature so far. */ |
| 313 | const struct tcp_request_sock_ops *af_specific; | 315 | const struct tcp_request_sock_ops *af_specific; |
| 314 | #endif | 316 | #endif |
| 317 | struct sock *listener; /* needed for TFO */ | ||
| 315 | u32 rcv_isn; | 318 | u32 rcv_isn; |
| 316 | u32 snt_isn; | 319 | u32 snt_isn; |
| 317 | u32 snt_synack; /* synack sent time */ | 320 | u32 snt_synack; /* synack sent time */ |
| 321 | u32 rcv_nxt; /* the ack # by SYNACK. For | ||
| 322 | * FastOpen it's the seq# | ||
| 323 | * after data-in-SYN. | ||
| 324 | */ | ||
| 318 | }; | 325 | }; |
| 319 | 326 | ||
| 320 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | 327 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) |
| @@ -505,14 +512,18 @@ struct tcp_sock { | |||
| 505 | struct tcp_md5sig_info __rcu *md5sig_info; | 512 | struct tcp_md5sig_info __rcu *md5sig_info; |
| 506 | #endif | 513 | #endif |
| 507 | 514 | ||
| 508 | /* TCP fastopen related information */ | ||
| 509 | struct tcp_fastopen_request *fastopen_req; | ||
| 510 | |||
| 511 | /* When the cookie options are generated and exchanged, then this | 515 | /* When the cookie options are generated and exchanged, then this |
| 512 | * object holds a reference to them (cookie_values->kref). Also | 516 | * object holds a reference to them (cookie_values->kref). Also |
| 513 | * contains related tcp_cookie_transactions fields. | 517 | * contains related tcp_cookie_transactions fields. |
| 514 | */ | 518 | */ |
| 515 | struct tcp_cookie_values *cookie_values; | 519 | struct tcp_cookie_values *cookie_values; |
| 520 | |||
| 521 | /* TCP fastopen related information */ | ||
| 522 | struct tcp_fastopen_request *fastopen_req; | ||
| 523 | /* fastopen_rsk points to request_sock that resulted in this big | ||
| 524 | * socket. Used to retransmit SYNACKs etc. | ||
| 525 | */ | ||
| 526 | struct request_sock *fastopen_rsk; | ||
| 516 | }; | 527 | }; |
| 517 | 528 | ||
| 518 | enum tsq_flags { | 529 | enum tsq_flags { |
| @@ -552,6 +563,34 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) | |||
| 552 | return (struct tcp_timewait_sock *)sk; | 563 | return (struct tcp_timewait_sock *)sk; |
| 553 | } | 564 | } |
| 554 | 565 | ||
| 566 | static inline bool tcp_passive_fastopen(const struct sock *sk) | ||
| 567 | { | ||
| 568 | return (sk->sk_state == TCP_SYN_RECV && | ||
| 569 | tcp_sk(sk)->fastopen_rsk != NULL); | ||
| 570 | } | ||
| 571 | |||
| 572 | static inline bool fastopen_cookie_present(struct tcp_fastopen_cookie *foc) | ||
| 573 | { | ||
| 574 | return foc->len != -1; | ||
| 575 | } | ||
| 576 | |||
| 577 | static inline int fastopen_init_queue(struct sock *sk, int backlog) | ||
| 578 | { | ||
| 579 | struct request_sock_queue *queue = | ||
| 580 | &inet_csk(sk)->icsk_accept_queue; | ||
| 581 | |||
| 582 | if (queue->fastopenq == NULL) { | ||
| 583 | queue->fastopenq = kzalloc( | ||
| 584 | sizeof(struct fastopen_queue), | ||
| 585 | sk->sk_allocation); | ||
| 586 | if (queue->fastopenq == NULL) | ||
| 587 | return -ENOMEM; | ||
| 588 | spin_lock_init(&queue->fastopenq->lock); | ||
| 589 | } | ||
| 590 | queue->fastopenq->max_qlen = backlog; | ||
| 591 | return 0; | ||
| 592 | } | ||
| 593 | |||
| 555 | #endif /* __KERNEL__ */ | 594 | #endif /* __KERNEL__ */ |
| 556 | 595 | ||
| 557 | #endif /* _LINUX_TCP_H */ | 596 | #endif /* _LINUX_TCP_H */ |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 5d2352154cf..53539acbd81 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
| @@ -157,7 +157,7 @@ enum { | |||
| 157 | typedef struct ax25_uid_assoc { | 157 | typedef struct ax25_uid_assoc { |
| 158 | struct hlist_node uid_node; | 158 | struct hlist_node uid_node; |
| 159 | atomic_t refcount; | 159 | atomic_t refcount; |
| 160 | uid_t uid; | 160 | kuid_t uid; |
| 161 | ax25_address call; | 161 | ax25_address call; |
| 162 | } ax25_uid_assoc; | 162 | } ax25_uid_assoc; |
| 163 | 163 | ||
| @@ -434,7 +434,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
| 434 | 434 | ||
| 435 | /* ax25_uid.c */ | 435 | /* ax25_uid.c */ |
| 436 | extern int ax25_uid_policy; | 436 | extern int ax25_uid_policy; |
| 437 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); | 437 | extern ax25_uid_assoc *ax25_findbyuid(kuid_t); |
| 438 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 438 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
| 439 | extern const struct file_operations ax25_uid_fops; | 439 | extern const struct file_operations ax25_uid_fops; |
| 440 | extern void ax25_uid_free(void); | 440 | extern void ax25_uid_free(void); |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3d254e10ff3..ba2e6160fad 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -1439,7 +1439,8 @@ struct cfg80211_gtk_rekey_data { | |||
| 1439 | * @add_virtual_intf: create a new virtual interface with the given name, | 1439 | * @add_virtual_intf: create a new virtual interface with the given name, |
| 1440 | * must set the struct wireless_dev's iftype. Beware: You must create | 1440 | * must set the struct wireless_dev's iftype. Beware: You must create |
| 1441 | * the new netdev in the wiphy's network namespace! Returns the struct | 1441 | * the new netdev in the wiphy's network namespace! Returns the struct |
| 1442 | * wireless_dev, or an ERR_PTR. | 1442 | * wireless_dev, or an ERR_PTR. For P2P device wdevs, the driver must |
| 1443 | * also set the address member in the wdev. | ||
| 1443 | * | 1444 | * |
| 1444 | * @del_virtual_intf: remove the virtual interface | 1445 | * @del_virtual_intf: remove the virtual interface |
| 1445 | * | 1446 | * |
| @@ -1618,6 +1619,9 @@ struct cfg80211_gtk_rekey_data { | |||
| 1618 | * @get_channel: Get the current operating channel for the virtual interface. | 1619 | * @get_channel: Get the current operating channel for the virtual interface. |
| 1619 | * For monitor interfaces, it should return %NULL unless there's a single | 1620 | * For monitor interfaces, it should return %NULL unless there's a single |
| 1620 | * current monitoring channel. | 1621 | * current monitoring channel. |
| 1622 | * | ||
| 1623 | * @start_p2p_device: Start the given P2P device. | ||
| 1624 | * @stop_p2p_device: Stop the given P2P device. | ||
| 1621 | */ | 1625 | */ |
| 1622 | struct cfg80211_ops { | 1626 | struct cfg80211_ops { |
| 1623 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 1627 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
| @@ -1834,6 +1838,11 @@ struct cfg80211_ops { | |||
| 1834 | (*get_channel)(struct wiphy *wiphy, | 1838 | (*get_channel)(struct wiphy *wiphy, |
| 1835 | struct wireless_dev *wdev, | 1839 | struct wireless_dev *wdev, |
| 1836 | enum nl80211_channel_type *type); | 1840 | enum nl80211_channel_type *type); |
| 1841 | |||
| 1842 | int (*start_p2p_device)(struct wiphy *wiphy, | ||
| 1843 | struct wireless_dev *wdev); | ||
| 1844 | void (*stop_p2p_device)(struct wiphy *wiphy, | ||
| 1845 | struct wireless_dev *wdev); | ||
| 1837 | }; | 1846 | }; |
| 1838 | 1847 | ||
| 1839 | /* | 1848 | /* |
| @@ -2397,6 +2406,8 @@ struct cfg80211_cached_keys; | |||
| 2397 | * @cleanup_work: work struct used for cleanup that can't be done directly | 2406 | * @cleanup_work: work struct used for cleanup that can't be done directly |
| 2398 | * @beacon_interval: beacon interval used on this device for transmitting | 2407 | * @beacon_interval: beacon interval used on this device for transmitting |
| 2399 | * beacons, 0 when not valid | 2408 | * beacons, 0 when not valid |
| 2409 | * @address: The address for this device, valid only if @netdev is %NULL | ||
| 2410 | * @p2p_started: true if this is a P2P Device that has been started | ||
| 2400 | */ | 2411 | */ |
| 2401 | struct wireless_dev { | 2412 | struct wireless_dev { |
| 2402 | struct wiphy *wiphy; | 2413 | struct wiphy *wiphy; |
| @@ -2415,7 +2426,9 @@ struct wireless_dev { | |||
| 2415 | 2426 | ||
| 2416 | struct work_struct cleanup_work; | 2427 | struct work_struct cleanup_work; |
| 2417 | 2428 | ||
| 2418 | bool use_4addr; | 2429 | bool use_4addr, p2p_started; |
| 2430 | |||
| 2431 | u8 address[ETH_ALEN] __aligned(sizeof(u16)); | ||
| 2419 | 2432 | ||
| 2420 | /* currently used for IBSS and SME - might be rearranged later */ | 2433 | /* currently used for IBSS and SME - might be rearranged later */ |
| 2421 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 2434 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| @@ -2463,6 +2476,13 @@ struct wireless_dev { | |||
| 2463 | #endif | 2476 | #endif |
| 2464 | }; | 2477 | }; |
| 2465 | 2478 | ||
| 2479 | static inline u8 *wdev_address(struct wireless_dev *wdev) | ||
| 2480 | { | ||
| 2481 | if (wdev->netdev) | ||
| 2482 | return wdev->netdev->dev_addr; | ||
| 2483 | return wdev->address; | ||
| 2484 | } | ||
| 2485 | |||
| 2466 | /** | 2486 | /** |
| 2467 | * wdev_priv - return wiphy priv from wireless_dev | 2487 | * wdev_priv - return wiphy priv from wireless_dev |
| 2468 | * | 2488 | * |
| @@ -3530,6 +3550,22 @@ void cfg80211_ch_switch_notify(struct net_device *dev, int freq, | |||
| 3530 | */ | 3550 | */ |
| 3531 | u32 cfg80211_calculate_bitrate(struct rate_info *rate); | 3551 | u32 cfg80211_calculate_bitrate(struct rate_info *rate); |
| 3532 | 3552 | ||
| 3553 | /** | ||
| 3554 | * cfg80211_unregister_wdev - remove the given wdev | ||
| 3555 | * @wdev: struct wireless_dev to remove | ||
| 3556 | * | ||
| 3557 | * Call this function only for wdevs that have no netdev assigned, | ||
| 3558 | * e.g. P2P Devices. It removes the device from the list so that | ||
| 3559 | * it can no longer be used. It is necessary to call this function | ||
| 3560 | * even when cfg80211 requests the removal of the interface by | ||
| 3561 | * calling the del_virtual_intf() callback. The function must also | ||
| 3562 | * be called when the driver wishes to unregister the wdev, e.g. | ||
| 3563 | * when the device is unbound from the driver. | ||
| 3564 | * | ||
| 3565 | * Requires the RTNL to be held. | ||
| 3566 | */ | ||
| 3567 | void cfg80211_unregister_wdev(struct wireless_dev *wdev); | ||
| 3568 | |||
| 3533 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ | 3569 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ |
| 3534 | 3570 | ||
| 3535 | /* wiphy_printk helpers, similar to dev_printk */ | 3571 | /* wiphy_printk helpers, similar to dev_printk */ |
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 71392545d0a..7f0df133d11 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
| @@ -183,6 +183,9 @@ struct ieee80211_radiotap_header { | |||
| 183 | * Contains a bitmap of known fields/flags, the flags, and | 183 | * Contains a bitmap of known fields/flags, the flags, and |
| 184 | * the MCS index. | 184 | * the MCS index. |
| 185 | * | 185 | * |
| 186 | * IEEE80211_RADIOTAP_AMPDU_STATUS u32, u16, u8, u8 unitless | ||
| 187 | * | ||
| 188 | * Contains the AMPDU information for the subframe. | ||
| 186 | */ | 189 | */ |
| 187 | enum ieee80211_radiotap_type { | 190 | enum ieee80211_radiotap_type { |
| 188 | IEEE80211_RADIOTAP_TSFT = 0, | 191 | IEEE80211_RADIOTAP_TSFT = 0, |
| @@ -205,6 +208,7 @@ enum ieee80211_radiotap_type { | |||
| 205 | IEEE80211_RADIOTAP_DATA_RETRIES = 17, | 208 | IEEE80211_RADIOTAP_DATA_RETRIES = 17, |
| 206 | 209 | ||
| 207 | IEEE80211_RADIOTAP_MCS = 19, | 210 | IEEE80211_RADIOTAP_MCS = 19, |
| 211 | IEEE80211_RADIOTAP_AMPDU_STATUS = 20, | ||
| 208 | 212 | ||
| 209 | /* valid in every it_present bitmap, even vendor namespaces */ | 213 | /* valid in every it_present bitmap, even vendor namespaces */ |
| 210 | IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29, | 214 | IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29, |
| @@ -270,6 +274,13 @@ enum ieee80211_radiotap_type { | |||
| 270 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 | 274 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 |
| 271 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 | 275 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 |
| 272 | 276 | ||
| 277 | /* For IEEE80211_RADIOTAP_AMPDU_STATUS */ | ||
| 278 | #define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 | ||
| 279 | #define IEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN 0x0002 | ||
| 280 | #define IEEE80211_RADIOTAP_AMPDU_LAST_KNOWN 0x0004 | ||
| 281 | #define IEEE80211_RADIOTAP_AMPDU_IS_LAST 0x0008 | ||
| 282 | #define IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_ERR 0x0010 | ||
| 283 | #define IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_KNOWN 0x0020 | ||
| 273 | 284 | ||
| 274 | /* helpers */ | 285 | /* helpers */ |
| 275 | static inline int ieee80211_get_radiotap_len(unsigned char *data) | 286 | static inline int ieee80211_get_radiotap_len(unsigned char *data) |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6d01fb00ff2..9bed5d48340 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -223,7 +223,10 @@ struct ip6_flowlabel { | |||
| 223 | struct ipv6_txoptions *opt; | 223 | struct ipv6_txoptions *opt; |
| 224 | unsigned long linger; | 224 | unsigned long linger; |
| 225 | u8 share; | 225 | u8 share; |
| 226 | u32 owner; | 226 | union { |
| 227 | struct pid *pid; | ||
| 228 | kuid_t uid; | ||
| 229 | } owner; | ||
| 227 | unsigned long lastuse; | 230 | unsigned long lastuse; |
| 228 | unsigned long expires; | 231 | unsigned long expires; |
| 229 | struct net *fl_net; | 232 | struct net *fl_net; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index bb86aa6f98d..71f8262fc1d 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -171,6 +171,7 @@ struct ieee80211_low_level_stats { | |||
| 171 | * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface. | 171 | * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface. |
| 172 | * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) | 172 | * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) |
| 173 | * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) | 173 | * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) |
| 174 | * @BSS_CHANGED_PS: PS changed for this BSS (STA mode) | ||
| 174 | */ | 175 | */ |
| 175 | enum ieee80211_bss_change { | 176 | enum ieee80211_bss_change { |
| 176 | BSS_CHANGED_ASSOC = 1<<0, | 177 | BSS_CHANGED_ASSOC = 1<<0, |
| @@ -190,6 +191,7 @@ enum ieee80211_bss_change { | |||
| 190 | BSS_CHANGED_IDLE = 1<<14, | 191 | BSS_CHANGED_IDLE = 1<<14, |
| 191 | BSS_CHANGED_SSID = 1<<15, | 192 | BSS_CHANGED_SSID = 1<<15, |
| 192 | BSS_CHANGED_AP_PROBE_RESP = 1<<16, | 193 | BSS_CHANGED_AP_PROBE_RESP = 1<<16, |
| 194 | BSS_CHANGED_PS = 1<<17, | ||
| 193 | 195 | ||
| 194 | /* when adding here, make sure to change ieee80211_reconfig */ | 196 | /* when adding here, make sure to change ieee80211_reconfig */ |
| 195 | }; | 197 | }; |
| @@ -266,6 +268,8 @@ enum ieee80211_rssi_event { | |||
| 266 | * @idle: This interface is idle. There's also a global idle flag in the | 268 | * @idle: This interface is idle. There's also a global idle flag in the |
| 267 | * hardware config which may be more appropriate depending on what | 269 | * hardware config which may be more appropriate depending on what |
| 268 | * your driver/device needs to do. | 270 | * your driver/device needs to do. |
| 271 | * @ps: power-save mode (STA only). This flag is NOT affected by | ||
| 272 | * offchannel/dynamic_ps operations. | ||
| 269 | * @ssid: The SSID of the current vif. Only valid in AP-mode. | 273 | * @ssid: The SSID of the current vif. Only valid in AP-mode. |
| 270 | * @ssid_len: Length of SSID given in @ssid. | 274 | * @ssid_len: Length of SSID given in @ssid. |
| 271 | * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. | 275 | * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. |
| @@ -296,6 +300,7 @@ struct ieee80211_bss_conf { | |||
| 296 | bool arp_filter_enabled; | 300 | bool arp_filter_enabled; |
| 297 | bool qos; | 301 | bool qos; |
| 298 | bool idle; | 302 | bool idle; |
| 303 | bool ps; | ||
| 299 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 304 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| 300 | size_t ssid_len; | 305 | size_t ssid_len; |
| 301 | bool hidden_ssid; | 306 | bool hidden_ssid; |
| @@ -522,9 +527,6 @@ struct ieee80211_tx_rate { | |||
| 522 | * (2) driver internal use (if applicable) | 527 | * (2) driver internal use (if applicable) |
| 523 | * (3) TX status information - driver tells mac80211 what happened | 528 | * (3) TX status information - driver tells mac80211 what happened |
| 524 | * | 529 | * |
| 525 | * The TX control's sta pointer is only valid during the ->tx call, | ||
| 526 | * it may be NULL. | ||
| 527 | * | ||
| 528 | * @flags: transmit info flags, defined above | 530 | * @flags: transmit info flags, defined above |
| 529 | * @band: the band to transmit on (use for checking for races) | 531 | * @band: the band to transmit on (use for checking for races) |
| 530 | * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC | 532 | * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC |
| @@ -555,6 +557,7 @@ struct ieee80211_tx_info { | |||
| 555 | struct ieee80211_tx_rate rates[ | 557 | struct ieee80211_tx_rate rates[ |
| 556 | IEEE80211_TX_MAX_RATES]; | 558 | IEEE80211_TX_MAX_RATES]; |
| 557 | s8 rts_cts_rate_idx; | 559 | s8 rts_cts_rate_idx; |
| 560 | /* 3 bytes free */ | ||
| 558 | }; | 561 | }; |
| 559 | /* only needed before rate control */ | 562 | /* only needed before rate control */ |
| 560 | unsigned long jiffies; | 563 | unsigned long jiffies; |
| @@ -562,7 +565,7 @@ struct ieee80211_tx_info { | |||
| 562 | /* NB: vif can be NULL for injected frames */ | 565 | /* NB: vif can be NULL for injected frames */ |
| 563 | struct ieee80211_vif *vif; | 566 | struct ieee80211_vif *vif; |
| 564 | struct ieee80211_key_conf *hw_key; | 567 | struct ieee80211_key_conf *hw_key; |
| 565 | struct ieee80211_sta *sta; | 568 | /* 8 bytes free */ |
| 566 | } control; | 569 | } control; |
| 567 | struct { | 570 | struct { |
| 568 | struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; | 571 | struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; |
| @@ -673,21 +676,41 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
| 673 | * @RX_FLAG_HT_GF: This frame was received in a HT-greenfield transmission, if | 676 | * @RX_FLAG_HT_GF: This frame was received in a HT-greenfield transmission, if |
| 674 | * the driver fills this value it should add %IEEE80211_RADIOTAP_MCS_HAVE_FMT | 677 | * the driver fills this value it should add %IEEE80211_RADIOTAP_MCS_HAVE_FMT |
| 675 | * to hw.radiotap_mcs_details to advertise that fact | 678 | * to hw.radiotap_mcs_details to advertise that fact |
| 679 | * @RX_FLAG_AMPDU_DETAILS: A-MPDU details are known, in particular the reference | ||
| 680 | * number (@ampdu_reference) must be populated and be a distinct number for | ||
| 681 | * each A-MPDU | ||
| 682 | * @RX_FLAG_AMPDU_REPORT_ZEROLEN: driver reports 0-length subframes | ||
| 683 | * @RX_FLAG_AMPDU_IS_ZEROLEN: This is a zero-length subframe, for | ||
| 684 | * monitoring purposes only | ||
| 685 | * @RX_FLAG_AMPDU_LAST_KNOWN: last subframe is known, should be set on all | ||
| 686 | * subframes of a single A-MPDU | ||
| 687 | * @RX_FLAG_AMPDU_IS_LAST: this subframe is the last subframe of the A-MPDU | ||
| 688 | * @RX_FLAG_AMPDU_DELIM_CRC_ERROR: A delimiter CRC error has been detected | ||
| 689 | * on this subframe | ||
| 690 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC | ||
| 691 | * is stored in the @ampdu_delimiter_crc field) | ||
| 676 | */ | 692 | */ |
| 677 | enum mac80211_rx_flags { | 693 | enum mac80211_rx_flags { |
| 678 | RX_FLAG_MMIC_ERROR = 1<<0, | 694 | RX_FLAG_MMIC_ERROR = BIT(0), |
| 679 | RX_FLAG_DECRYPTED = 1<<1, | 695 | RX_FLAG_DECRYPTED = BIT(1), |
| 680 | RX_FLAG_MMIC_STRIPPED = 1<<3, | 696 | RX_FLAG_MMIC_STRIPPED = BIT(3), |
| 681 | RX_FLAG_IV_STRIPPED = 1<<4, | 697 | RX_FLAG_IV_STRIPPED = BIT(4), |
| 682 | RX_FLAG_FAILED_FCS_CRC = 1<<5, | 698 | RX_FLAG_FAILED_FCS_CRC = BIT(5), |
| 683 | RX_FLAG_FAILED_PLCP_CRC = 1<<6, | 699 | RX_FLAG_FAILED_PLCP_CRC = BIT(6), |
| 684 | RX_FLAG_MACTIME_MPDU = 1<<7, | 700 | RX_FLAG_MACTIME_MPDU = BIT(7), |
| 685 | RX_FLAG_SHORTPRE = 1<<8, | 701 | RX_FLAG_SHORTPRE = BIT(8), |
| 686 | RX_FLAG_HT = 1<<9, | 702 | RX_FLAG_HT = BIT(9), |
| 687 | RX_FLAG_40MHZ = 1<<10, | 703 | RX_FLAG_40MHZ = BIT(10), |
| 688 | RX_FLAG_SHORT_GI = 1<<11, | 704 | RX_FLAG_SHORT_GI = BIT(11), |
| 689 | RX_FLAG_NO_SIGNAL_VAL = 1<<12, | 705 | RX_FLAG_NO_SIGNAL_VAL = BIT(12), |
| 690 | RX_FLAG_HT_GF = 1<<13, | 706 | RX_FLAG_HT_GF = BIT(13), |
| 707 | RX_FLAG_AMPDU_DETAILS = BIT(14), | ||
| 708 | RX_FLAG_AMPDU_REPORT_ZEROLEN = BIT(15), | ||
| 709 | RX_FLAG_AMPDU_IS_ZEROLEN = BIT(16), | ||
| 710 | RX_FLAG_AMPDU_LAST_KNOWN = BIT(17), | ||
| 711 | RX_FLAG_AMPDU_IS_LAST = BIT(18), | ||
| 712 | RX_FLAG_AMPDU_DELIM_CRC_ERROR = BIT(19), | ||
| 713 | RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20), | ||
| 691 | }; | 714 | }; |
| 692 | 715 | ||
| 693 | /** | 716 | /** |
| @@ -711,17 +734,22 @@ enum mac80211_rx_flags { | |||
| 711 | * HT rates are use (RX_FLAG_HT) | 734 | * HT rates are use (RX_FLAG_HT) |
| 712 | * @flag: %RX_FLAG_* | 735 | * @flag: %RX_FLAG_* |
| 713 | * @rx_flags: internal RX flags for mac80211 | 736 | * @rx_flags: internal RX flags for mac80211 |
| 737 | * @ampdu_reference: A-MPDU reference number, must be a different value for | ||
| 738 | * each A-MPDU but the same for each subframe within one A-MPDU | ||
| 739 | * @ampdu_delimiter_crc: A-MPDU delimiter CRC | ||
| 714 | */ | 740 | */ |
| 715 | struct ieee80211_rx_status { | 741 | struct ieee80211_rx_status { |
| 716 | u64 mactime; | 742 | u64 mactime; |
| 717 | u32 device_timestamp; | 743 | u32 device_timestamp; |
| 718 | u16 flag; | 744 | u32 ampdu_reference; |
| 745 | u32 flag; | ||
| 719 | u16 freq; | 746 | u16 freq; |
| 720 | u8 rate_idx; | 747 | u8 rate_idx; |
| 721 | u8 rx_flags; | 748 | u8 rx_flags; |
| 722 | u8 band; | 749 | u8 band; |
| 723 | u8 antenna; | 750 | u8 antenna; |
| 724 | s8 signal; | 751 | s8 signal; |
| 752 | u8 ampdu_delimiter_crc; | ||
| 725 | }; | 753 | }; |
| 726 | 754 | ||
| 727 | /** | 755 | /** |
| @@ -1074,6 +1102,16 @@ enum sta_notify_cmd { | |||
| 1074 | }; | 1102 | }; |
| 1075 | 1103 | ||
| 1076 | /** | 1104 | /** |
| 1105 | * struct ieee80211_tx_control - TX control data | ||
| 1106 | * | ||
| 1107 | * @sta: station table entry, this sta pointer may be NULL and | ||
| 1108 | * it is not allowed to copy the pointer, due to RCU. | ||
| 1109 | */ | ||
| 1110 | struct ieee80211_tx_control { | ||
| 1111 | struct ieee80211_sta *sta; | ||
| 1112 | }; | ||
| 1113 | |||
| 1114 | /** | ||
| 1077 | * enum ieee80211_hw_flags - hardware flags | 1115 | * enum ieee80211_hw_flags - hardware flags |
| 1078 | * | 1116 | * |
| 1079 | * These flags are used to indicate hardware capabilities to | 1117 | * These flags are used to indicate hardware capabilities to |
| @@ -1203,6 +1241,10 @@ enum sta_notify_cmd { | |||
| 1203 | * queue mapping in order to use different queues (not just one per AC) | 1241 | * queue mapping in order to use different queues (not just one per AC) |
| 1204 | * for different virtual interfaces. See the doc section on HW queue | 1242 | * for different virtual interfaces. See the doc section on HW queue |
| 1205 | * control for more details. | 1243 | * control for more details. |
| 1244 | * | ||
| 1245 | * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any | ||
| 1246 | * P2P Interface. This will be honoured even if more than one interface | ||
| 1247 | * is supported. | ||
| 1206 | */ | 1248 | */ |
| 1207 | enum ieee80211_hw_flags { | 1249 | enum ieee80211_hw_flags { |
| 1208 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1250 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
| @@ -1230,6 +1272,7 @@ enum ieee80211_hw_flags { | |||
| 1230 | IEEE80211_HW_AP_LINK_PS = 1<<22, | 1272 | IEEE80211_HW_AP_LINK_PS = 1<<22, |
| 1231 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, | 1273 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, |
| 1232 | IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, | 1274 | IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, |
| 1275 | IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, | ||
| 1233 | }; | 1276 | }; |
| 1234 | 1277 | ||
| 1235 | /** | 1278 | /** |
| @@ -1884,10 +1927,14 @@ enum ieee80211_frame_release_type { | |||
| 1884 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit | 1927 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit |
| 1885 | * to this station changed. | 1928 | * to this station changed. |
| 1886 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. | 1929 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. |
| 1930 | * @IEEE80211_RC_SUPP_RATES_CHANGED: The supported rate set of this peer | ||
| 1931 | * changed (in IBSS mode) due to discovering more information about | ||
| 1932 | * the peer. | ||
| 1887 | */ | 1933 | */ |
| 1888 | enum ieee80211_rate_control_changed { | 1934 | enum ieee80211_rate_control_changed { |
| 1889 | IEEE80211_RC_BW_CHANGED = BIT(0), | 1935 | IEEE80211_RC_BW_CHANGED = BIT(0), |
| 1890 | IEEE80211_RC_SMPS_CHANGED = BIT(1), | 1936 | IEEE80211_RC_SMPS_CHANGED = BIT(1), |
| 1937 | IEEE80211_RC_SUPP_RATES_CHANGED = BIT(2), | ||
| 1891 | }; | 1938 | }; |
| 1892 | 1939 | ||
| 1893 | /** | 1940 | /** |
| @@ -2264,7 +2311,9 @@ enum ieee80211_rate_control_changed { | |||
| 2264 | * The callback is optional and can (should!) sleep. | 2311 | * The callback is optional and can (should!) sleep. |
| 2265 | */ | 2312 | */ |
| 2266 | struct ieee80211_ops { | 2313 | struct ieee80211_ops { |
| 2267 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 2314 | void (*tx)(struct ieee80211_hw *hw, |
| 2315 | struct ieee80211_tx_control *control, | ||
| 2316 | struct sk_buff *skb); | ||
| 2268 | int (*start)(struct ieee80211_hw *hw); | 2317 | int (*start)(struct ieee80211_hw *hw); |
| 2269 | void (*stop)(struct ieee80211_hw *hw); | 2318 | void (*stop)(struct ieee80211_hw *hw); |
| 2270 | #ifdef CONFIG_PM | 2319 | #ifdef CONFIG_PM |
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index e1ce1048fe5..4a045cda9c6 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
| @@ -18,6 +18,7 @@ struct nf_conntrack_ecache { | |||
| 18 | u16 ctmask; /* bitmask of ct events to be delivered */ | 18 | u16 ctmask; /* bitmask of ct events to be delivered */ |
| 19 | u16 expmask; /* bitmask of expect events to be delivered */ | 19 | u16 expmask; /* bitmask of expect events to be delivered */ |
| 20 | u32 pid; /* netlink pid of destroyer */ | 20 | u32 pid; /* netlink pid of destroyer */ |
| 21 | struct timer_list timeout; | ||
| 21 | }; | 22 | }; |
| 22 | 23 | ||
| 23 | static inline struct nf_conntrack_ecache * | 24 | static inline struct nf_conntrack_ecache * |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index ace280d19a2..7d00583d53d 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #ifndef __NETNS_IPV4_H__ | 5 | #ifndef __NETNS_IPV4_H__ |
| 6 | #define __NETNS_IPV4_H__ | 6 | #define __NETNS_IPV4_H__ |
| 7 | 7 | ||
| 8 | #include <linux/uidgid.h> | ||
| 8 | #include <net/inet_frag.h> | 9 | #include <net/inet_frag.h> |
| 9 | 10 | ||
| 10 | struct tcpm_hash_bucket; | 11 | struct tcpm_hash_bucket; |
| @@ -60,7 +61,7 @@ struct netns_ipv4 { | |||
| 60 | int sysctl_icmp_ratemask; | 61 | int sysctl_icmp_ratemask; |
| 61 | int sysctl_icmp_errors_use_inbound_ifaddr; | 62 | int sysctl_icmp_errors_use_inbound_ifaddr; |
| 62 | 63 | ||
| 63 | unsigned int sysctl_ping_group_range[2]; | 64 | kgid_t sysctl_ping_group_range[2]; |
| 64 | long sysctl_tcp_mem[3]; | 65 | long sysctl_tcp_mem[3]; |
| 65 | 66 | ||
| 66 | atomic_t rt_genid; | 67 | atomic_t rt_genid; |
diff --git a/include/net/netns/packet.h b/include/net/netns/packet.h index 4780b080a43..17ec2b95c06 100644 --- a/include/net/netns/packet.h +++ b/include/net/netns/packet.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #define __NETNS_PACKET_H__ | 5 | #define __NETNS_PACKET_H__ |
| 6 | 6 | ||
| 7 | #include <linux/rculist.h> | 7 | #include <linux/rculist.h> |
| 8 | #include <linux/spinlock.h> | 8 | #include <linux/mutex.h> |
| 9 | 9 | ||
| 10 | struct netns_packet { | 10 | struct netns_packet { |
| 11 | struct mutex sklist_lock; | 11 | struct mutex sklist_lock; |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 4c0766e201e..b01d8dd9ee7 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
| @@ -106,6 +106,34 @@ struct listen_sock { | |||
| 106 | struct request_sock *syn_table[0]; | 106 | struct request_sock *syn_table[0]; |
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | /* | ||
| 110 | * For a TCP Fast Open listener - | ||
| 111 | * lock - protects the access to all the reqsk, which is co-owned by | ||
| 112 | * the listener and the child socket. | ||
| 113 | * qlen - pending TFO requests (still in TCP_SYN_RECV). | ||
| 114 | * max_qlen - max TFO reqs allowed before TFO is disabled. | ||
| 115 | * | ||
| 116 | * XXX (TFO) - ideally these fields can be made as part of "listen_sock" | ||
| 117 | * structure above. But there is some implementation difficulty due to | ||
| 118 | * listen_sock being part of request_sock_queue hence will be freed when | ||
| 119 | * a listener is stopped. But TFO related fields may continue to be | ||
| 120 | * accessed even after a listener is closed, until its sk_refcnt drops | ||
| 121 | * to 0 implying no more outstanding TFO reqs. One solution is to keep | ||
| 122 | * listen_opt around until sk_refcnt drops to 0. But there is some other | ||
| 123 | * complexity that needs to be resolved. E.g., a listener can be disabled | ||
| 124 | * temporarily through shutdown()->tcp_disconnect(), and re-enabled later. | ||
| 125 | */ | ||
| 126 | struct fastopen_queue { | ||
| 127 | struct request_sock *rskq_rst_head; /* Keep track of past TFO */ | ||
| 128 | struct request_sock *rskq_rst_tail; /* requests that caused RST. | ||
| 129 | * This is part of the defense | ||
| 130 | * against spoofing attack. | ||
| 131 | */ | ||
| 132 | spinlock_t lock; | ||
| 133 | int qlen; /* # of pending (TCP_SYN_RECV) reqs */ | ||
| 134 | int max_qlen; /* != 0 iff TFO is currently enabled */ | ||
| 135 | }; | ||
| 136 | |||
| 109 | /** struct request_sock_queue - queue of request_socks | 137 | /** struct request_sock_queue - queue of request_socks |
| 110 | * | 138 | * |
| 111 | * @rskq_accept_head - FIFO head of established children | 139 | * @rskq_accept_head - FIFO head of established children |
| @@ -129,6 +157,12 @@ struct request_sock_queue { | |||
| 129 | u8 rskq_defer_accept; | 157 | u8 rskq_defer_accept; |
| 130 | /* 3 bytes hole, try to pack */ | 158 | /* 3 bytes hole, try to pack */ |
| 131 | struct listen_sock *listen_opt; | 159 | struct listen_sock *listen_opt; |
| 160 | struct fastopen_queue *fastopenq; /* This is non-NULL iff TFO has been | ||
| 161 | * enabled on this listener. Check | ||
| 162 | * max_qlen != 0 in fastopen_queue | ||
| 163 | * to determine if TFO is enabled | ||
| 164 | * right at this moment. | ||
| 165 | */ | ||
| 132 | }; | 166 | }; |
| 133 | 167 | ||
| 134 | extern int reqsk_queue_alloc(struct request_sock_queue *queue, | 168 | extern int reqsk_queue_alloc(struct request_sock_queue *queue, |
| @@ -136,6 +170,8 @@ extern int reqsk_queue_alloc(struct request_sock_queue *queue, | |||
| 136 | 170 | ||
| 137 | extern void __reqsk_queue_destroy(struct request_sock_queue *queue); | 171 | extern void __reqsk_queue_destroy(struct request_sock_queue *queue); |
| 138 | extern void reqsk_queue_destroy(struct request_sock_queue *queue); | 172 | extern void reqsk_queue_destroy(struct request_sock_queue *queue); |
| 173 | extern void reqsk_fastopen_remove(struct sock *sk, | ||
| 174 | struct request_sock *req, bool reset); | ||
| 139 | 175 | ||
| 140 | static inline struct request_sock * | 176 | static inline struct request_sock * |
| 141 | reqsk_queue_yank_acceptq(struct request_sock_queue *queue) | 177 | reqsk_queue_yank_acceptq(struct request_sock_queue *queue) |
| @@ -190,19 +226,6 @@ static inline struct request_sock *reqsk_queue_remove(struct request_sock_queue | |||
| 190 | return req; | 226 | return req; |
| 191 | } | 227 | } |
| 192 | 228 | ||
| 193 | static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queue, | ||
| 194 | struct sock *parent) | ||
| 195 | { | ||
| 196 | struct request_sock *req = reqsk_queue_remove(queue); | ||
| 197 | struct sock *child = req->sk; | ||
| 198 | |||
| 199 | WARN_ON(child == NULL); | ||
| 200 | |||
| 201 | sk_acceptq_removed(parent); | ||
| 202 | __reqsk_free(req); | ||
| 203 | return child; | ||
| 204 | } | ||
| 205 | |||
| 206 | static inline int reqsk_queue_removed(struct request_sock_queue *queue, | 229 | static inline int reqsk_queue_removed(struct request_sock_queue *queue, |
| 207 | struct request_sock *req) | 230 | struct request_sock *req) |
| 208 | { | 231 | { |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d9611e03241..4616f468d59 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -188,7 +188,8 @@ struct tcf_proto_ops { | |||
| 188 | 188 | ||
| 189 | unsigned long (*get)(struct tcf_proto*, u32 handle); | 189 | unsigned long (*get)(struct tcf_proto*, u32 handle); |
| 190 | void (*put)(struct tcf_proto*, unsigned long); | 190 | void (*put)(struct tcf_proto*, unsigned long); |
| 191 | int (*change)(struct tcf_proto*, unsigned long, | 191 | int (*change)(struct sk_buff *, |
| 192 | struct tcf_proto*, unsigned long, | ||
| 192 | u32 handle, struct nlattr **, | 193 | u32 handle, struct nlattr **, |
| 193 | unsigned long *); | 194 | unsigned long *); |
| 194 | int (*delete)(struct tcf_proto*, unsigned long); | 195 | int (*delete)(struct tcf_proto*, unsigned long); |
diff --git a/include/net/sock.h b/include/net/sock.h index 72132aef53f..84bdaeca131 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -606,6 +606,15 @@ static inline void sk_add_bind_node(struct sock *sk, | |||
| 606 | #define sk_for_each_bound(__sk, node, list) \ | 606 | #define sk_for_each_bound(__sk, node, list) \ |
| 607 | hlist_for_each_entry(__sk, node, list, sk_bind_node) | 607 | hlist_for_each_entry(__sk, node, list, sk_bind_node) |
| 608 | 608 | ||
| 609 | static inline struct user_namespace *sk_user_ns(struct sock *sk) | ||
| 610 | { | ||
| 611 | /* Careful only use this in a context where these parameters | ||
| 612 | * can not change and must all be valid, such as recvmsg from | ||
| 613 | * userspace. | ||
| 614 | */ | ||
| 615 | return sk->sk_socket->file->f_cred->user_ns; | ||
| 616 | } | ||
| 617 | |||
| 609 | /* Sock flags */ | 618 | /* Sock flags */ |
| 610 | enum sock_flags { | 619 | enum sock_flags { |
| 611 | SOCK_DEAD, | 620 | SOCK_DEAD, |
| @@ -1670,7 +1679,7 @@ static inline void sock_graft(struct sock *sk, struct socket *parent) | |||
| 1670 | write_unlock_bh(&sk->sk_callback_lock); | 1679 | write_unlock_bh(&sk->sk_callback_lock); |
| 1671 | } | 1680 | } |
| 1672 | 1681 | ||
| 1673 | extern int sock_i_uid(struct sock *sk); | 1682 | extern kuid_t sock_i_uid(struct sock *sk); |
| 1674 | extern unsigned long sock_i_ino(struct sock *sk); | 1683 | extern unsigned long sock_i_ino(struct sock *sk); |
| 1675 | 1684 | ||
| 1676 | static inline struct dst_entry * | 1685 | static inline struct dst_entry * |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 1f000ffe707..1421b02a790 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -98,11 +98,21 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
| 98 | * 15 is ~13-30min depending on RTO. | 98 | * 15 is ~13-30min depending on RTO. |
| 99 | */ | 99 | */ |
| 100 | 100 | ||
| 101 | #define TCP_SYN_RETRIES 5 /* number of times to retry active opening a | 101 | #define TCP_SYN_RETRIES 6 /* This is how many retries are done |
| 102 | * connection: ~180sec is RFC minimum */ | 102 | * when active opening a connection. |
| 103 | * RFC1122 says the minimum retry MUST | ||
| 104 | * be at least 180secs. Nevertheless | ||
| 105 | * this value is corresponding to | ||
| 106 | * 63secs of retransmission with the | ||
| 107 | * current initial RTO. | ||
| 108 | */ | ||
| 103 | 109 | ||
| 104 | #define TCP_SYNACK_RETRIES 5 /* number of times to retry passive opening a | 110 | #define TCP_SYNACK_RETRIES 5 /* This is how may retries are done |
| 105 | * connection: ~180sec is RFC minimum */ | 111 | * when passive opening a connection. |
| 112 | * This is corresponding to 31secs of | ||
| 113 | * retransmission with the current | ||
| 114 | * initial RTO. | ||
| 115 | */ | ||
| 106 | 116 | ||
| 107 | #define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT | 117 | #define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT |
| 108 | * state, about 60 seconds */ | 118 | * state, about 60 seconds */ |
| @@ -214,8 +224,24 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
| 214 | 224 | ||
| 215 | /* Bit Flags for sysctl_tcp_fastopen */ | 225 | /* Bit Flags for sysctl_tcp_fastopen */ |
| 216 | #define TFO_CLIENT_ENABLE 1 | 226 | #define TFO_CLIENT_ENABLE 1 |
| 227 | #define TFO_SERVER_ENABLE 2 | ||
| 217 | #define TFO_CLIENT_NO_COOKIE 4 /* Data in SYN w/o cookie option */ | 228 | #define TFO_CLIENT_NO_COOKIE 4 /* Data in SYN w/o cookie option */ |
| 218 | 229 | ||
| 230 | /* Process SYN data but skip cookie validation */ | ||
| 231 | #define TFO_SERVER_COOKIE_NOT_CHKED 0x100 | ||
| 232 | /* Accept SYN data w/o any cookie option */ | ||
| 233 | #define TFO_SERVER_COOKIE_NOT_REQD 0x200 | ||
| 234 | |||
| 235 | /* Force enable TFO on all listeners, i.e., not requiring the | ||
| 236 | * TCP_FASTOPEN socket option. SOCKOPT1/2 determine how to set max_qlen. | ||
| 237 | */ | ||
| 238 | #define TFO_SERVER_WO_SOCKOPT1 0x400 | ||
| 239 | #define TFO_SERVER_WO_SOCKOPT2 0x800 | ||
| 240 | /* Always create TFO child sockets on a TFO listener even when | ||
| 241 | * cookie/data not present. (For testing purpose!) | ||
| 242 | */ | ||
| 243 | #define TFO_SERVER_ALWAYS 0x1000 | ||
| 244 | |||
| 219 | extern struct inet_timewait_death_row tcp_death_row; | 245 | extern struct inet_timewait_death_row tcp_death_row; |
| 220 | 246 | ||
| 221 | /* sysctl variables for tcp */ | 247 | /* sysctl variables for tcp */ |
| @@ -398,7 +424,8 @@ extern enum tcp_tw_status tcp_timewait_state_process(struct inet_timewait_sock * | |||
| 398 | const struct tcphdr *th); | 424 | const struct tcphdr *th); |
| 399 | extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb, | 425 | extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb, |
| 400 | struct request_sock *req, | 426 | struct request_sock *req, |
| 401 | struct request_sock **prev); | 427 | struct request_sock **prev, |
| 428 | bool fastopen); | ||
| 402 | extern int tcp_child_process(struct sock *parent, struct sock *child, | 429 | extern int tcp_child_process(struct sock *parent, struct sock *child, |
| 403 | struct sk_buff *skb); | 430 | struct sk_buff *skb); |
| 404 | extern bool tcp_use_frto(struct sock *sk); | 431 | extern bool tcp_use_frto(struct sock *sk); |
| @@ -411,12 +438,6 @@ extern void tcp_metrics_init(void); | |||
| 411 | extern bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, bool paws_check); | 438 | extern bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, bool paws_check); |
| 412 | extern bool tcp_remember_stamp(struct sock *sk); | 439 | extern bool tcp_remember_stamp(struct sock *sk); |
| 413 | extern bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw); | 440 | extern bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw); |
| 414 | extern void tcp_fastopen_cache_get(struct sock *sk, u16 *mss, | ||
| 415 | struct tcp_fastopen_cookie *cookie, | ||
| 416 | int *syn_loss, unsigned long *last_syn_loss); | ||
| 417 | extern void tcp_fastopen_cache_set(struct sock *sk, u16 mss, | ||
| 418 | struct tcp_fastopen_cookie *cookie, | ||
| 419 | bool syn_lost); | ||
| 420 | extern void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst); | 441 | extern void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst); |
| 421 | extern void tcp_disable_fack(struct tcp_sock *tp); | 442 | extern void tcp_disable_fack(struct tcp_sock *tp); |
| 422 | extern void tcp_close(struct sock *sk, long timeout); | 443 | extern void tcp_close(struct sock *sk, long timeout); |
| @@ -458,7 +479,8 @@ extern int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, | |||
| 458 | extern int tcp_connect(struct sock *sk); | 479 | extern int tcp_connect(struct sock *sk); |
| 459 | extern struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, | 480 | extern struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, |
| 460 | struct request_sock *req, | 481 | struct request_sock *req, |
| 461 | struct request_values *rvp); | 482 | struct request_values *rvp, |
| 483 | struct tcp_fastopen_cookie *foc); | ||
| 462 | extern int tcp_disconnect(struct sock *sk, int flags); | 484 | extern int tcp_disconnect(struct sock *sk, int flags); |
| 463 | 485 | ||
| 464 | void tcp_connect_init(struct sock *sk); | 486 | void tcp_connect_init(struct sock *sk); |
| @@ -527,6 +549,7 @@ extern void tcp_send_delayed_ack(struct sock *sk); | |||
| 527 | extern void tcp_cwnd_application_limited(struct sock *sk); | 549 | extern void tcp_cwnd_application_limited(struct sock *sk); |
| 528 | extern void tcp_resume_early_retransmit(struct sock *sk); | 550 | extern void tcp_resume_early_retransmit(struct sock *sk); |
| 529 | extern void tcp_rearm_rto(struct sock *sk); | 551 | extern void tcp_rearm_rto(struct sock *sk); |
| 552 | extern void tcp_reset(struct sock *sk); | ||
| 530 | 553 | ||
| 531 | /* tcp_timer.c */ | 554 | /* tcp_timer.c */ |
| 532 | extern void tcp_init_xmit_timers(struct sock *); | 555 | extern void tcp_init_xmit_timers(struct sock *); |
| @@ -576,6 +599,7 @@ extern int tcp_mtu_to_mss(struct sock *sk, int pmtu); | |||
| 576 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); | 599 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); |
| 577 | extern void tcp_mtup_init(struct sock *sk); | 600 | extern void tcp_mtup_init(struct sock *sk); |
| 578 | extern void tcp_valid_rtt_meas(struct sock *sk, u32 seq_rtt); | 601 | extern void tcp_valid_rtt_meas(struct sock *sk, u32 seq_rtt); |
| 602 | extern void tcp_init_buffer_space(struct sock *sk); | ||
| 579 | 603 | ||
| 580 | static inline void tcp_bound_rto(const struct sock *sk) | 604 | static inline void tcp_bound_rto(const struct sock *sk) |
| 581 | { | 605 | { |
| @@ -1094,6 +1118,7 @@ static inline void tcp_openreq_init(struct request_sock *req, | |||
| 1094 | req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ | 1118 | req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ |
| 1095 | req->cookie_ts = 0; | 1119 | req->cookie_ts = 0; |
| 1096 | tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; | 1120 | tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; |
| 1121 | tcp_rsk(req)->rcv_nxt = TCP_SKB_CB(skb)->seq + 1; | ||
| 1097 | req->mss = rx_opt->mss_clamp; | 1122 | req->mss = rx_opt->mss_clamp; |
| 1098 | req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; | 1123 | req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; |
| 1099 | ireq->tstamp_ok = rx_opt->tstamp_ok; | 1124 | ireq->tstamp_ok = rx_opt->tstamp_ok; |
| @@ -1298,15 +1323,34 @@ extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff | |||
| 1298 | extern int tcp_md5_hash_key(struct tcp_md5sig_pool *hp, | 1323 | extern int tcp_md5_hash_key(struct tcp_md5sig_pool *hp, |
| 1299 | const struct tcp_md5sig_key *key); | 1324 | const struct tcp_md5sig_key *key); |
| 1300 | 1325 | ||
| 1326 | /* From tcp_fastopen.c */ | ||
| 1327 | extern void tcp_fastopen_cache_get(struct sock *sk, u16 *mss, | ||
| 1328 | struct tcp_fastopen_cookie *cookie, | ||
| 1329 | int *syn_loss, unsigned long *last_syn_loss); | ||
| 1330 | extern void tcp_fastopen_cache_set(struct sock *sk, u16 mss, | ||
| 1331 | struct tcp_fastopen_cookie *cookie, | ||
| 1332 | bool syn_lost); | ||
| 1301 | struct tcp_fastopen_request { | 1333 | struct tcp_fastopen_request { |
| 1302 | /* Fast Open cookie. Size 0 means a cookie request */ | 1334 | /* Fast Open cookie. Size 0 means a cookie request */ |
| 1303 | struct tcp_fastopen_cookie cookie; | 1335 | struct tcp_fastopen_cookie cookie; |
| 1304 | struct msghdr *data; /* data in MSG_FASTOPEN */ | 1336 | struct msghdr *data; /* data in MSG_FASTOPEN */ |
| 1305 | u16 copied; /* queued in tcp_connect() */ | 1337 | u16 copied; /* queued in tcp_connect() */ |
| 1306 | }; | 1338 | }; |
| 1307 | |||
| 1308 | void tcp_free_fastopen_req(struct tcp_sock *tp); | 1339 | void tcp_free_fastopen_req(struct tcp_sock *tp); |
| 1309 | 1340 | ||
| 1341 | extern struct tcp_fastopen_context __rcu *tcp_fastopen_ctx; | ||
| 1342 | int tcp_fastopen_reset_cipher(void *key, unsigned int len); | ||
| 1343 | void tcp_fastopen_cookie_gen(__be32 addr, struct tcp_fastopen_cookie *foc); | ||
| 1344 | |||
| 1345 | #define TCP_FASTOPEN_KEY_LENGTH 16 | ||
| 1346 | |||
| 1347 | /* Fastopen key context */ | ||
| 1348 | struct tcp_fastopen_context { | ||
| 1349 | struct crypto_cipher __rcu *tfm; | ||
| 1350 | __u8 key[TCP_FASTOPEN_KEY_LENGTH]; | ||
| 1351 | struct rcu_head rcu; | ||
| 1352 | }; | ||
| 1353 | |||
| 1310 | /* write queue abstraction */ | 1354 | /* write queue abstraction */ |
| 1311 | static inline void tcp_write_queue_purge(struct sock *sk) | 1355 | static inline void tcp_write_queue_purge(struct sock *sk) |
| 1312 | { | 1356 | { |
| @@ -1510,7 +1554,8 @@ struct tcp_iter_state { | |||
| 1510 | sa_family_t family; | 1554 | sa_family_t family; |
| 1511 | enum tcp_seq_states state; | 1555 | enum tcp_seq_states state; |
| 1512 | struct sock *syn_wait_sk; | 1556 | struct sock *syn_wait_sk; |
| 1513 | int bucket, offset, sbucket, num, uid; | 1557 | int bucket, offset, sbucket, num; |
| 1558 | kuid_t uid; | ||
| 1514 | loff_t last_pos; | 1559 | loff_t last_pos; |
| 1515 | }; | 1560 | }; |
| 1516 | 1561 | ||
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 128ce46fa48..015cea01ae3 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -503,8 +503,6 @@ struct se_cmd { | |||
| 503 | u32 se_ordered_id; | 503 | u32 se_ordered_id; |
| 504 | /* Total size in bytes associated with command */ | 504 | /* Total size in bytes associated with command */ |
| 505 | u32 data_length; | 505 | u32 data_length; |
| 506 | /* SCSI Presented Data Transfer Length */ | ||
| 507 | u32 cmd_spdtl; | ||
| 508 | u32 residual_count; | 506 | u32 residual_count; |
| 509 | u32 orig_fe_lun; | 507 | u32 orig_fe_lun; |
| 510 | /* Persistent Reservation key */ | 508 | /* Persistent Reservation key */ |
