diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/9p/client.h | 18 | ||||
| -rw-r--r-- | include/net/bluetooth/bluetooth.h | 2 | ||||
| -rw-r--r-- | include/net/ip6_route.h | 18 | ||||
| -rw-r--r-- | include/net/ip6_tunnel.h | 1 | ||||
| -rw-r--r-- | include/net/irda/irttp.h | 2 | ||||
| -rw-r--r-- | include/net/mac80211.h | 3 | ||||
| -rw-r--r-- | include/net/net_namespace.h | 5 | ||||
| -rw-r--r-- | include/net/netlink.h | 6 | ||||
| -rw-r--r-- | include/net/sock.h | 17 | ||||
| -rw-r--r-- | include/net/tcp.h | 2 | ||||
| -rw-r--r-- | include/net/xfrm.h | 3 |
11 files changed, 62 insertions, 15 deletions
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index fb00b329f0d3..f076dfa75ae8 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
| @@ -29,6 +29,19 @@ | |||
| 29 | /* Number of requests per row */ | 29 | /* Number of requests per row */ |
| 30 | #define P9_ROW_MAXTAG 255 | 30 | #define P9_ROW_MAXTAG 255 |
| 31 | 31 | ||
| 32 | /** enum p9_proto_versions - 9P protocol versions | ||
| 33 | * @p9_proto_legacy: 9P Legacy mode, pre-9P2000.u | ||
| 34 | * @p9_proto_2000u: 9P2000.u extension | ||
| 35 | * @p9_proto_2000L: 9P2000.L extension | ||
| 36 | */ | ||
| 37 | |||
| 38 | enum p9_proto_versions{ | ||
| 39 | p9_proto_legacy = 0, | ||
| 40 | p9_proto_2000u = 1, | ||
| 41 | p9_proto_2000L = 2, | ||
| 42 | }; | ||
| 43 | |||
| 44 | |||
| 32 | /** | 45 | /** |
| 33 | * enum p9_trans_status - different states of underlying transports | 46 | * enum p9_trans_status - different states of underlying transports |
| 34 | * @Connected: transport is connected and healthy | 47 | * @Connected: transport is connected and healthy |
| @@ -111,6 +124,7 @@ struct p9_req_t { | |||
| 111 | * @lock: protect @fidlist | 124 | * @lock: protect @fidlist |
| 112 | * @msize: maximum data size negotiated by protocol | 125 | * @msize: maximum data size negotiated by protocol |
| 113 | * @dotu: extension flags negotiated by protocol | 126 | * @dotu: extension flags negotiated by protocol |
| 127 | * @proto_version: 9P protocol version to use | ||
| 114 | * @trans_mod: module API instantiated with this client | 128 | * @trans_mod: module API instantiated with this client |
| 115 | * @trans: tranport instance state and API | 129 | * @trans: tranport instance state and API |
| 116 | * @conn: connection state information used by trans_fd | 130 | * @conn: connection state information used by trans_fd |
| @@ -137,7 +151,7 @@ struct p9_req_t { | |||
| 137 | struct p9_client { | 151 | struct p9_client { |
| 138 | spinlock_t lock; /* protect client structure */ | 152 | spinlock_t lock; /* protect client structure */ |
| 139 | int msize; | 153 | int msize; |
| 140 | unsigned char dotu; | 154 | unsigned char proto_version; |
| 141 | struct p9_trans_module *trans_mod; | 155 | struct p9_trans_module *trans_mod; |
| 142 | enum p9_trans_status status; | 156 | enum p9_trans_status status; |
| 143 | void *trans; | 157 | void *trans; |
| @@ -209,5 +223,7 @@ int p9_parse_header(struct p9_fcall *, int32_t *, int8_t *, int16_t *, int); | |||
| 209 | int p9stat_read(char *, int, struct p9_wstat *, int); | 223 | int p9stat_read(char *, int, struct p9_wstat *, int); |
| 210 | void p9stat_free(struct p9_wstat *); | 224 | void p9stat_free(struct p9_wstat *); |
| 211 | 225 | ||
| 226 | int p9_is_proto_dotu(struct p9_client *clnt); | ||
| 227 | int p9_is_proto_dotl(struct p9_client *clnt); | ||
| 212 | 228 | ||
| 213 | #endif /* NET_9P_CLIENT_H */ | 229 | #endif /* NET_9P_CLIENT_H */ |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 04a6908e38d2..ff77e8f882f1 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
| @@ -176,6 +176,6 @@ extern void hci_sock_cleanup(void); | |||
| 176 | extern int bt_sysfs_init(void); | 176 | extern int bt_sysfs_init(void); |
| 177 | extern void bt_sysfs_cleanup(void); | 177 | extern void bt_sysfs_cleanup(void); |
| 178 | 178 | ||
| 179 | extern struct class *bt_class; | 179 | extern struct dentry *bt_debugfs; |
| 180 | 180 | ||
| 181 | #endif /* __BLUETOOTH_H */ | 181 | #endif /* __BLUETOOTH_H */ |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 4a808de7c0f6..68f67836e146 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
| @@ -37,6 +37,24 @@ struct route_info { | |||
| 37 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 | 37 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 |
| 38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 | 38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 |
| 39 | 39 | ||
| 40 | /* | ||
| 41 | * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate | ||
| 42 | * between IPV6_ADDR_PREFERENCES socket option values | ||
| 43 | * IPV6_PREFER_SRC_TMP = 0x1 | ||
| 44 | * IPV6_PREFER_SRC_PUBLIC = 0x2 | ||
| 45 | * IPV6_PREFER_SRC_COA = 0x4 | ||
| 46 | * and above RT6_LOOKUP_F_SRCPREF_xxx flags. | ||
| 47 | */ | ||
| 48 | static inline int rt6_srcprefs2flags(unsigned int srcprefs) | ||
| 49 | { | ||
| 50 | /* No need to bitmask because srcprefs have only 3 bits. */ | ||
| 51 | return srcprefs << 3; | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline unsigned int rt6_flags2srcprefs(int flags) | ||
| 55 | { | ||
| 56 | return (flags >> 3) & 7; | ||
| 57 | } | ||
| 40 | 58 | ||
| 41 | extern void ip6_route_input(struct sk_buff *skb); | 59 | extern void ip6_route_input(struct sk_buff *skb); |
| 42 | 60 | ||
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h index 83b4e008b16d..fbf9d1cda27b 100644 --- a/include/net/ip6_tunnel.h +++ b/include/net/ip6_tunnel.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | struct ip6_tnl { | 15 | struct ip6_tnl { |
| 16 | struct ip6_tnl *next; /* next tunnel in list */ | 16 | struct ip6_tnl *next; /* next tunnel in list */ |
| 17 | struct net_device *dev; /* virtual device associated with tunnel */ | 17 | struct net_device *dev; /* virtual device associated with tunnel */ |
| 18 | int recursion; /* depth of hard_start_xmit recursion */ | ||
| 19 | struct ip6_tnl_parm parms; /* tunnel configuration parameters */ | 18 | struct ip6_tnl_parm parms; /* tunnel configuration parameters */ |
| 20 | struct flowi fl; /* flowi template for xmit */ | 19 | struct flowi fl; /* flowi template for xmit */ |
| 21 | struct dst_entry *dst_cache; /* cached dst */ | 20 | struct dst_entry *dst_cache; /* cached dst */ |
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h index 0788c23d2828..11aee7a2972a 100644 --- a/include/net/irda/irttp.h +++ b/include/net/irda/irttp.h | |||
| @@ -97,7 +97,7 @@ | |||
| 97 | #define TTP_MAX_SDU_SIZE 0x01 | 97 | #define TTP_MAX_SDU_SIZE 0x01 |
| 98 | 98 | ||
| 99 | /* | 99 | /* |
| 100 | * This structure contains all data assosiated with one instance of a TTP | 100 | * This structure contains all data associated with one instance of a TTP |
| 101 | * connection. | 101 | * connection. |
| 102 | */ | 102 | */ |
| 103 | struct tsap_cb { | 103 | struct tsap_cb { |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 80eb7cc42ce9..45d7d44d7cbe 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -2426,7 +2426,8 @@ struct rate_control_ops { | |||
| 2426 | struct ieee80211_sta *sta, void *priv_sta); | 2426 | struct ieee80211_sta *sta, void *priv_sta); |
| 2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, | 2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, |
| 2428 | struct ieee80211_sta *sta, | 2428 | struct ieee80211_sta *sta, |
| 2429 | void *priv_sta, u32 changed); | 2429 | void *priv_sta, u32 changed, |
| 2430 | enum nl80211_channel_type oper_chan_type); | ||
| 2430 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | 2431 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, |
| 2431 | void *priv_sta); | 2432 | void *priv_sta); |
| 2432 | 2433 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 82b7be4db89a..bd10a7908993 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -100,14 +100,9 @@ struct net { | |||
| 100 | extern struct net init_net; | 100 | extern struct net init_net; |
| 101 | 101 | ||
| 102 | #ifdef CONFIG_NET | 102 | #ifdef CONFIG_NET |
| 103 | #define INIT_NET_NS(net_ns) .net_ns = &init_net, | ||
| 104 | |||
| 105 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); | 103 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); |
| 106 | 104 | ||
| 107 | #else /* CONFIG_NET */ | 105 | #else /* CONFIG_NET */ |
| 108 | |||
| 109 | #define INIT_NET_NS(net_ns) | ||
| 110 | |||
| 111 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) | 106 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) |
| 112 | { | 107 | { |
| 113 | /* There is nothing to copy so this is a noop */ | 108 | /* There is nothing to copy so this is a noop */ |
diff --git a/include/net/netlink.h b/include/net/netlink.h index f82e463c875a..4fc05b58503e 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
| @@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const struct nlattr *nla) | |||
| 945 | */ | 945 | */ |
| 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) | 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) |
| 947 | { | 947 | { |
| 948 | return *(__be64 *) nla_data(nla); | 948 | __be64 tmp; |
| 949 | |||
| 950 | nla_memcpy(&tmp, nla, sizeof(tmp)); | ||
| 951 | |||
| 952 | return tmp; | ||
| 949 | } | 953 | } |
| 950 | 954 | ||
| 951 | /** | 955 | /** |
diff --git a/include/net/sock.h b/include/net/sock.h index 6cb1676e409a..092b0551e77f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -253,6 +253,8 @@ struct sock { | |||
| 253 | struct { | 253 | struct { |
| 254 | struct sk_buff *head; | 254 | struct sk_buff *head; |
| 255 | struct sk_buff *tail; | 255 | struct sk_buff *tail; |
| 256 | int len; | ||
| 257 | int limit; | ||
| 256 | } sk_backlog; | 258 | } sk_backlog; |
| 257 | wait_queue_head_t *sk_sleep; | 259 | wait_queue_head_t *sk_sleep; |
| 258 | struct dst_entry *sk_dst_cache; | 260 | struct dst_entry *sk_dst_cache; |
| @@ -589,8 +591,8 @@ static inline int sk_stream_memory_free(struct sock *sk) | |||
| 589 | return sk->sk_wmem_queued < sk->sk_sndbuf; | 591 | return sk->sk_wmem_queued < sk->sk_sndbuf; |
| 590 | } | 592 | } |
| 591 | 593 | ||
| 592 | /* The per-socket spinlock must be held here. */ | 594 | /* OOB backlog add */ |
| 593 | static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | 595 | static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) |
| 594 | { | 596 | { |
| 595 | if (!sk->sk_backlog.tail) { | 597 | if (!sk->sk_backlog.tail) { |
| 596 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; | 598 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; |
| @@ -601,6 +603,17 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
| 601 | skb->next = NULL; | 603 | skb->next = NULL; |
| 602 | } | 604 | } |
| 603 | 605 | ||
| 606 | /* The per-socket spinlock must be held here. */ | ||
| 607 | static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb) | ||
| 608 | { | ||
| 609 | if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1)) | ||
| 610 | return -ENOBUFS; | ||
| 611 | |||
| 612 | __sk_add_backlog(sk, skb); | ||
| 613 | sk->sk_backlog.len += skb->truesize; | ||
| 614 | return 0; | ||
| 615 | } | ||
| 616 | |||
| 604 | static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) | 617 | static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) |
| 605 | { | 618 | { |
| 606 | return sk->sk_backlog_rcv(sk, skb); | 619 | return sk->sk_backlog_rcv(sk, skb); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 56f0aec40ed6..75be5a28815d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -939,7 +939,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
| 939 | 939 | ||
| 940 | tp->ucopy.memory = 0; | 940 | tp->ucopy.memory = 0; |
| 941 | } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) { | 941 | } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) { |
| 942 | wake_up_interruptible_poll(sk->sk_sleep, | 942 | wake_up_interruptible_sync_poll(sk->sk_sleep, |
| 943 | POLLIN | POLLRDNORM | POLLRDBAND); | 943 | POLLIN | POLLRDNORM | POLLRDBAND); |
| 944 | if (!inet_csk_ack_scheduled(sk)) | 944 | if (!inet_csk_ack_scheduled(sk)) |
| 945 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | 945 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a7df3275b860..d74e080ba6c9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -275,7 +275,8 @@ struct xfrm_policy_afinfo { | |||
| 275 | struct dst_entry *dst, | 275 | struct dst_entry *dst, |
| 276 | int nfheader_len); | 276 | int nfheader_len); |
| 277 | int (*fill_dst)(struct xfrm_dst *xdst, | 277 | int (*fill_dst)(struct xfrm_dst *xdst, |
| 278 | struct net_device *dev); | 278 | struct net_device *dev, |
| 279 | struct flowi *fl); | ||
| 279 | }; | 280 | }; |
| 280 | 281 | ||
| 281 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); | 282 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); |
