diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index abb6e0f0c3c3..8ac338cb39ce 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -306,8 +306,8 @@ struct sock { | |||
306 | kmemcheck_bitfield_end(flags); | 306 | kmemcheck_bitfield_end(flags); |
307 | int sk_wmem_queued; | 307 | int sk_wmem_queued; |
308 | gfp_t sk_allocation; | 308 | gfp_t sk_allocation; |
309 | int sk_route_caps; | 309 | netdev_features_t sk_route_caps; |
310 | int sk_route_nocaps; | 310 | netdev_features_t sk_route_nocaps; |
311 | int sk_gso_type; | 311 | int sk_gso_type; |
312 | unsigned int sk_gso_max_size; | 312 | unsigned int sk_gso_max_size; |
313 | int sk_rcvlowat; | 313 | int sk_rcvlowat; |
@@ -320,6 +320,9 @@ struct sock { | |||
320 | unsigned short sk_ack_backlog; | 320 | unsigned short sk_ack_backlog; |
321 | unsigned short sk_max_ack_backlog; | 321 | unsigned short sk_max_ack_backlog; |
322 | __u32 sk_priority; | 322 | __u32 sk_priority; |
323 | #ifdef CONFIG_CGROUPS | ||
324 | __u32 sk_cgrp_prioidx; | ||
325 | #endif | ||
323 | struct pid *sk_peer_pid; | 326 | struct pid *sk_peer_pid; |
324 | const struct cred *sk_peer_cred; | 327 | const struct cred *sk_peer_cred; |
325 | long sk_rcvtimeo; | 328 | long sk_rcvtimeo; |
@@ -563,6 +566,7 @@ enum sock_flags { | |||
563 | SOCK_FASYNC, /* fasync() active */ | 566 | SOCK_FASYNC, /* fasync() active */ |
564 | SOCK_RXQ_OVFL, | 567 | SOCK_RXQ_OVFL, |
565 | SOCK_ZEROCOPY, /* buffers from userspace */ | 568 | SOCK_ZEROCOPY, /* buffers from userspace */ |
569 | SOCK_WIFI_STATUS, /* push wifi status to userspace */ | ||
566 | }; | 570 | }; |
567 | 571 | ||
568 | static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) | 572 | static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) |
@@ -1089,8 +1093,8 @@ extern struct sock *sk_alloc(struct net *net, int family, | |||
1089 | struct proto *prot); | 1093 | struct proto *prot); |
1090 | extern void sk_free(struct sock *sk); | 1094 | extern void sk_free(struct sock *sk); |
1091 | extern void sk_release_kernel(struct sock *sk); | 1095 | extern void sk_release_kernel(struct sock *sk); |
1092 | extern struct sock *sk_clone(const struct sock *sk, | 1096 | extern struct sock *sk_clone_lock(const struct sock *sk, |
1093 | const gfp_t priority); | 1097 | const gfp_t priority); |
1094 | 1098 | ||
1095 | extern struct sk_buff *sock_wmalloc(struct sock *sk, | 1099 | extern struct sk_buff *sock_wmalloc(struct sock *sk, |
1096 | unsigned long size, int force, | 1100 | unsigned long size, int force, |
@@ -1393,7 +1397,7 @@ static inline int sk_can_gso(const struct sock *sk) | |||
1393 | 1397 | ||
1394 | extern void sk_setup_caps(struct sock *sk, struct dst_entry *dst); | 1398 | extern void sk_setup_caps(struct sock *sk, struct dst_entry *dst); |
1395 | 1399 | ||
1396 | static inline void sk_nocaps_add(struct sock *sk, int flags) | 1400 | static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags) |
1397 | { | 1401 | { |
1398 | sk->sk_route_nocaps |= flags; | 1402 | sk->sk_route_nocaps |= flags; |
1399 | sk->sk_route_caps &= ~flags; | 1403 | sk->sk_route_caps &= ~flags; |
@@ -1714,6 +1718,8 @@ static inline int sock_intr_errno(long timeo) | |||
1714 | 1718 | ||
1715 | extern void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, | 1719 | extern void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, |
1716 | struct sk_buff *skb); | 1720 | struct sk_buff *skb); |
1721 | extern void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk, | ||
1722 | struct sk_buff *skb); | ||
1717 | 1723 | ||
1718 | static __inline__ void | 1724 | static __inline__ void |
1719 | sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) | 1725 | sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) |
@@ -1741,6 +1747,9 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) | |||
1741 | __sock_recv_timestamp(msg, sk, skb); | 1747 | __sock_recv_timestamp(msg, sk, skb); |
1742 | else | 1748 | else |
1743 | sk->sk_stamp = kt; | 1749 | sk->sk_stamp = kt; |
1750 | |||
1751 | if (sock_flag(sk, SOCK_WIFI_STATUS) && skb->wifi_acked_valid) | ||
1752 | __sock_recv_wifi_status(msg, sk, skb); | ||
1744 | } | 1753 | } |
1745 | 1754 | ||
1746 | extern void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, | 1755 | extern void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, |