diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/caif/cfctrl.h | 4 | ||||
| -rw-r--r-- | include/net/cls_cgroup.h | 63 | ||||
| -rw-r--r-- | include/net/ip.h | 6 | ||||
| -rw-r--r-- | include/net/ipv6.h | 6 | ||||
| -rw-r--r-- | include/net/mac80211.h | 3 | ||||
| -rw-r--r-- | include/net/netfilter/nf_conntrack_core.h | 2 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 2 | ||||
| -rw-r--r-- | include/net/sock.h | 32 |
8 files changed, 100 insertions, 18 deletions
diff --git a/include/net/caif/cfctrl.h b/include/net/caif/cfctrl.h index 997603f2bf4c..9402543fc20d 100644 --- a/include/net/caif/cfctrl.h +++ b/include/net/caif/cfctrl.h | |||
| @@ -94,8 +94,8 @@ struct cfctrl_request_info { | |||
| 94 | enum cfctrl_cmd cmd; | 94 | enum cfctrl_cmd cmd; |
| 95 | u8 channel_id; | 95 | u8 channel_id; |
| 96 | struct cfctrl_link_param param; | 96 | struct cfctrl_link_param param; |
| 97 | struct cfctrl_request_info *next; | ||
| 98 | struct cflayer *client_layer; | 97 | struct cflayer *client_layer; |
| 98 | struct list_head list; | ||
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | struct cfctrl { | 101 | struct cfctrl { |
| @@ -103,7 +103,7 @@ struct cfctrl { | |||
| 103 | struct cfctrl_rsp res; | 103 | struct cfctrl_rsp res; |
| 104 | atomic_t req_seq_no; | 104 | atomic_t req_seq_no; |
| 105 | atomic_t rsp_seq_no; | 105 | atomic_t rsp_seq_no; |
| 106 | struct cfctrl_request_info *first_req; | 106 | struct list_head list; |
| 107 | /* Protects from simultaneous access to first_req list */ | 107 | /* Protects from simultaneous access to first_req list */ |
| 108 | spinlock_t info_list_lock; | 108 | spinlock_t info_list_lock; |
| 109 | #ifndef CAIF_NO_LOOP | 109 | #ifndef CAIF_NO_LOOP |
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h new file mode 100644 index 000000000000..726cc3536409 --- /dev/null +++ b/include/net/cls_cgroup.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | * cls_cgroup.h Control Group Classifier | ||
| 3 | * | ||
| 4 | * Authors: Thomas Graf <tgraf@suug.ch> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the Free | ||
| 8 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef _NET_CLS_CGROUP_H | ||
| 14 | #define _NET_CLS_CGROUP_H | ||
| 15 | |||
| 16 | #include <linux/cgroup.h> | ||
| 17 | #include <linux/hardirq.h> | ||
| 18 | #include <linux/rcupdate.h> | ||
| 19 | |||
| 20 | #ifdef CONFIG_CGROUPS | ||
| 21 | struct cgroup_cls_state | ||
| 22 | { | ||
| 23 | struct cgroup_subsys_state css; | ||
| 24 | u32 classid; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #ifdef CONFIG_NET_CLS_CGROUP | ||
| 28 | static inline u32 task_cls_classid(struct task_struct *p) | ||
| 29 | { | ||
| 30 | if (in_interrupt()) | ||
| 31 | return 0; | ||
| 32 | |||
| 33 | return container_of(task_subsys_state(p, net_cls_subsys_id), | ||
| 34 | struct cgroup_cls_state, css)->classid; | ||
| 35 | } | ||
| 36 | #else | ||
| 37 | extern int net_cls_subsys_id; | ||
| 38 | |||
| 39 | static inline u32 task_cls_classid(struct task_struct *p) | ||
| 40 | { | ||
| 41 | int id; | ||
| 42 | u32 classid = 0; | ||
| 43 | |||
| 44 | if (in_interrupt()) | ||
| 45 | return 0; | ||
| 46 | |||
| 47 | rcu_read_lock(); | ||
| 48 | id = rcu_dereference(net_cls_subsys_id); | ||
| 49 | if (id >= 0) | ||
| 50 | classid = container_of(task_subsys_state(p, id), | ||
| 51 | struct cgroup_cls_state, css)->classid; | ||
| 52 | rcu_read_unlock(); | ||
| 53 | |||
| 54 | return classid; | ||
| 55 | } | ||
| 56 | #endif | ||
| 57 | #else | ||
| 58 | static inline u32 task_cls_classid(struct task_struct *p) | ||
| 59 | { | ||
| 60 | return 0; | ||
| 61 | } | ||
| 62 | #endif | ||
| 63 | #endif /* _NET_CLS_CGROUP_H */ | ||
diff --git a/include/net/ip.h b/include/net/ip.h index 63548f0a44b1..452f229c380a 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -358,11 +358,11 @@ enum ip_defrag_users { | |||
| 358 | IP_DEFRAG_LOCAL_DELIVER, | 358 | IP_DEFRAG_LOCAL_DELIVER, |
| 359 | IP_DEFRAG_CALL_RA_CHAIN, | 359 | IP_DEFRAG_CALL_RA_CHAIN, |
| 360 | IP_DEFRAG_CONNTRACK_IN, | 360 | IP_DEFRAG_CONNTRACK_IN, |
| 361 | __IP_DEFRAG_CONNTRACK_IN_END = IP_DEFRAG_CONNTRACK_IN + USHORT_MAX, | 361 | __IP_DEFRAG_CONNTRACK_IN_END = IP_DEFRAG_CONNTRACK_IN + USHRT_MAX, |
| 362 | IP_DEFRAG_CONNTRACK_OUT, | 362 | IP_DEFRAG_CONNTRACK_OUT, |
| 363 | __IP_DEFRAG_CONNTRACK_OUT_END = IP_DEFRAG_CONNTRACK_OUT + USHORT_MAX, | 363 | __IP_DEFRAG_CONNTRACK_OUT_END = IP_DEFRAG_CONNTRACK_OUT + USHRT_MAX, |
| 364 | IP_DEFRAG_CONNTRACK_BRIDGE_IN, | 364 | IP_DEFRAG_CONNTRACK_BRIDGE_IN, |
| 365 | __IP_DEFRAG_CONNTRACK_BRIDGE_IN = IP_DEFRAG_CONNTRACK_BRIDGE_IN + USHORT_MAX, | 365 | __IP_DEFRAG_CONNTRACK_BRIDGE_IN = IP_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX, |
| 366 | IP_DEFRAG_VS_IN, | 366 | IP_DEFRAG_VS_IN, |
| 367 | IP_DEFRAG_VS_OUT, | 367 | IP_DEFRAG_VS_OUT, |
| 368 | IP_DEFRAG_VS_FWD | 368 | IP_DEFRAG_VS_FWD |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index eba5cc00325a..2600b69757b8 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -354,11 +354,11 @@ struct inet_frag_queue; | |||
| 354 | enum ip6_defrag_users { | 354 | enum ip6_defrag_users { |
| 355 | IP6_DEFRAG_LOCAL_DELIVER, | 355 | IP6_DEFRAG_LOCAL_DELIVER, |
| 356 | IP6_DEFRAG_CONNTRACK_IN, | 356 | IP6_DEFRAG_CONNTRACK_IN, |
| 357 | __IP6_DEFRAG_CONNTRACK_IN = IP6_DEFRAG_CONNTRACK_IN + USHORT_MAX, | 357 | __IP6_DEFRAG_CONNTRACK_IN = IP6_DEFRAG_CONNTRACK_IN + USHRT_MAX, |
| 358 | IP6_DEFRAG_CONNTRACK_OUT, | 358 | IP6_DEFRAG_CONNTRACK_OUT, |
| 359 | __IP6_DEFRAG_CONNTRACK_OUT = IP6_DEFRAG_CONNTRACK_OUT + USHORT_MAX, | 359 | __IP6_DEFRAG_CONNTRACK_OUT = IP6_DEFRAG_CONNTRACK_OUT + USHRT_MAX, |
| 360 | IP6_DEFRAG_CONNTRACK_BRIDGE_IN, | 360 | IP6_DEFRAG_CONNTRACK_BRIDGE_IN, |
| 361 | __IP6_DEFRAG_CONNTRACK_BRIDGE_IN = IP6_DEFRAG_CONNTRACK_BRIDGE_IN + USHORT_MAX, | 361 | __IP6_DEFRAG_CONNTRACK_BRIDGE_IN = IP6_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX, |
| 362 | }; | 362 | }; |
| 363 | 363 | ||
| 364 | struct ip6_create_arg { | 364 | struct ip6_create_arg { |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index e24b0363e6cb..de22cbfef232 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -815,6 +815,7 @@ enum ieee80211_key_flags { | |||
| 815 | * encrypted in hardware. | 815 | * encrypted in hardware. |
| 816 | * @alg: The key algorithm. | 816 | * @alg: The key algorithm. |
| 817 | * @flags: key flags, see &enum ieee80211_key_flags. | 817 | * @flags: key flags, see &enum ieee80211_key_flags. |
| 818 | * @ap_addr: AP's MAC address | ||
| 818 | * @keyidx: the key index (0-3) | 819 | * @keyidx: the key index (0-3) |
| 819 | * @keylen: key material length | 820 | * @keylen: key material length |
| 820 | * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte) | 821 | * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte) |
| @@ -1637,6 +1638,8 @@ enum ieee80211_ampdu_mlme_action { | |||
| 1637 | * Returns a negative error code on failure. | 1638 | * Returns a negative error code on failure. |
| 1638 | * The callback must be atomic. | 1639 | * The callback must be atomic. |
| 1639 | * | 1640 | * |
| 1641 | * @get_survey: Return per-channel survey information | ||
| 1642 | * | ||
| 1640 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also | 1643 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also |
| 1641 | * need to set wiphy->rfkill_poll to %true before registration, | 1644 | * need to set wiphy->rfkill_poll to %true before registration, |
| 1642 | * and need to call wiphy_rfkill_set_hw_state() in the callback. | 1645 | * and need to call wiphy_rfkill_set_hw_state() in the callback. |
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index dffde8e6920e..3d7524fba194 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h | |||
| @@ -61,7 +61,7 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb) | |||
| 61 | int ret = NF_ACCEPT; | 61 | int ret = NF_ACCEPT; |
| 62 | 62 | ||
| 63 | if (ct && ct != &nf_conntrack_untracked) { | 63 | if (ct && ct != &nf_conntrack_untracked) { |
| 64 | if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) | 64 | if (!nf_ct_is_confirmed(ct)) |
| 65 | ret = __nf_conntrack_confirm(skb); | 65 | ret = __nf_conntrack_confirm(skb); |
| 66 | if (likely(ret == NF_ACCEPT)) | 66 | if (likely(ret == NF_ACCEPT)) |
| 67 | nf_ct_deliver_cached_events(ct); | 67 | nf_ct_deliver_cached_events(ct); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 6173c619913a..4b860116e096 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -876,7 +876,7 @@ struct sctp_transport { | |||
| 876 | 876 | ||
| 877 | /* Reference counting. */ | 877 | /* Reference counting. */ |
| 878 | atomic_t refcnt; | 878 | atomic_t refcnt; |
| 879 | int dead:1, | 879 | __u32 dead:1, |
| 880 | /* RTO-Pending : A flag used to track if one of the DATA | 880 | /* RTO-Pending : A flag used to track if one of the DATA |
| 881 | * chunks sent to this address is currently being | 881 | * chunks sent to this address is currently being |
| 882 | * used to compute a RTT. If this flag is 0, | 882 | * used to compute a RTT. If this flag is 0, |
diff --git a/include/net/sock.h b/include/net/sock.h index 5697caf8cc76..ca241ea14875 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -312,7 +312,7 @@ struct sock { | |||
| 312 | void *sk_security; | 312 | void *sk_security; |
| 313 | #endif | 313 | #endif |
| 314 | __u32 sk_mark; | 314 | __u32 sk_mark; |
| 315 | /* XXX 4 bytes hole on 64 bit */ | 315 | u32 sk_classid; |
| 316 | void (*sk_state_change)(struct sock *sk); | 316 | void (*sk_state_change)(struct sock *sk); |
| 317 | void (*sk_data_ready)(struct sock *sk, int bytes); | 317 | void (*sk_data_ready)(struct sock *sk, int bytes); |
| 318 | void (*sk_write_space)(struct sock *sk); | 318 | void (*sk_write_space)(struct sock *sk); |
| @@ -1026,15 +1026,23 @@ extern void release_sock(struct sock *sk); | |||
| 1026 | SINGLE_DEPTH_NESTING) | 1026 | SINGLE_DEPTH_NESTING) |
| 1027 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) | 1027 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) |
| 1028 | 1028 | ||
| 1029 | static inline void lock_sock_bh(struct sock *sk) | 1029 | extern bool lock_sock_fast(struct sock *sk); |
| 1030 | /** | ||
| 1031 | * unlock_sock_fast - complement of lock_sock_fast | ||
| 1032 | * @sk: socket | ||
| 1033 | * @slow: slow mode | ||
| 1034 | * | ||
| 1035 | * fast unlock socket for user context. | ||
| 1036 | * If slow mode is on, we call regular release_sock() | ||
| 1037 | */ | ||
| 1038 | static inline void unlock_sock_fast(struct sock *sk, bool slow) | ||
| 1030 | { | 1039 | { |
| 1031 | spin_lock_bh(&sk->sk_lock.slock); | 1040 | if (slow) |
| 1041 | release_sock(sk); | ||
| 1042 | else | ||
| 1043 | spin_unlock_bh(&sk->sk_lock.slock); | ||
| 1032 | } | 1044 | } |
| 1033 | 1045 | ||
| 1034 | static inline void unlock_sock_bh(struct sock *sk) | ||
| 1035 | { | ||
| 1036 | spin_unlock_bh(&sk->sk_lock.slock); | ||
| 1037 | } | ||
| 1038 | 1046 | ||
| 1039 | extern struct sock *sk_alloc(struct net *net, int family, | 1047 | extern struct sock *sk_alloc(struct net *net, int family, |
| 1040 | gfp_t priority, | 1048 | gfp_t priority, |
| @@ -1074,6 +1082,14 @@ extern void *sock_kmalloc(struct sock *sk, int size, | |||
| 1074 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); | 1082 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); |
| 1075 | extern void sk_send_sigurg(struct sock *sk); | 1083 | extern void sk_send_sigurg(struct sock *sk); |
| 1076 | 1084 | ||
| 1085 | #ifdef CONFIG_CGROUPS | ||
| 1086 | extern void sock_update_classid(struct sock *sk); | ||
| 1087 | #else | ||
| 1088 | static inline void sock_update_classid(struct sock *sk) | ||
| 1089 | { | ||
| 1090 | } | ||
| 1091 | #endif | ||
| 1092 | |||
| 1077 | /* | 1093 | /* |
| 1078 | * Functions to fill in entries in struct proto_ops when a protocol | 1094 | * Functions to fill in entries in struct proto_ops when a protocol |
| 1079 | * does not implement a particular function. | 1095 | * does not implement a particular function. |
| @@ -1404,7 +1420,7 @@ static inline int sk_has_allocations(const struct sock *sk) | |||
| 1404 | 1420 | ||
| 1405 | /** | 1421 | /** |
| 1406 | * wq_has_sleeper - check if there are any waiting processes | 1422 | * wq_has_sleeper - check if there are any waiting processes |
| 1407 | * @sk: struct socket_wq | 1423 | * @wq: struct socket_wq |
| 1408 | * | 1424 | * |
| 1409 | * Returns true if socket_wq has waiting processes | 1425 | * Returns true if socket_wq has waiting processes |
| 1410 | * | 1426 | * |
