diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index a0053750e37a..e56162cd65b0 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -538,6 +538,8 @@ int sock_tx_timestamp(struct sock *sk, __u8 *tx_flags) | |||
538 | *tx_flags |= SKBTX_HW_TSTAMP; | 538 | *tx_flags |= SKBTX_HW_TSTAMP; |
539 | if (sock_flag(sk, SOCK_TIMESTAMPING_TX_SOFTWARE)) | 539 | if (sock_flag(sk, SOCK_TIMESTAMPING_TX_SOFTWARE)) |
540 | *tx_flags |= SKBTX_SW_TSTAMP; | 540 | *tx_flags |= SKBTX_SW_TSTAMP; |
541 | if (sock_flag(sk, SOCK_WIFI_STATUS)) | ||
542 | *tx_flags |= SKBTX_WIFI_STATUS; | ||
541 | return 0; | 543 | return 0; |
542 | } | 544 | } |
543 | EXPORT_SYMBOL(sock_tx_timestamp); | 545 | EXPORT_SYMBOL(sock_tx_timestamp); |
@@ -549,6 +551,8 @@ static inline int __sock_sendmsg_nosec(struct kiocb *iocb, struct socket *sock, | |||
549 | 551 | ||
550 | sock_update_classid(sock->sk); | 552 | sock_update_classid(sock->sk); |
551 | 553 | ||
554 | sock_update_netprioidx(sock->sk); | ||
555 | |||
552 | si->sock = sock; | 556 | si->sock = sock; |
553 | si->scm = NULL; | 557 | si->scm = NULL; |
554 | si->msg = msg; | 558 | si->msg = msg; |
@@ -674,6 +678,22 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, | |||
674 | } | 678 | } |
675 | EXPORT_SYMBOL_GPL(__sock_recv_timestamp); | 679 | EXPORT_SYMBOL_GPL(__sock_recv_timestamp); |
676 | 680 | ||
681 | void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk, | ||
682 | struct sk_buff *skb) | ||
683 | { | ||
684 | int ack; | ||
685 | |||
686 | if (!sock_flag(sk, SOCK_WIFI_STATUS)) | ||
687 | return; | ||
688 | if (!skb->wifi_acked_valid) | ||
689 | return; | ||
690 | |||
691 | ack = skb->wifi_acked; | ||
692 | |||
693 | put_cmsg(msg, SOL_SOCKET, SCM_WIFI_STATUS, sizeof(ack), &ack); | ||
694 | } | ||
695 | EXPORT_SYMBOL_GPL(__sock_recv_wifi_status); | ||
696 | |||
677 | static inline void sock_recv_drops(struct msghdr *msg, struct sock *sk, | 697 | static inline void sock_recv_drops(struct msghdr *msg, struct sock *sk, |
678 | struct sk_buff *skb) | 698 | struct sk_buff *skb) |
679 | { | 699 | { |
@@ -2738,10 +2758,10 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) | |||
2738 | case ETHTOOL_GRXRINGS: | 2758 | case ETHTOOL_GRXRINGS: |
2739 | case ETHTOOL_GRXCLSRLCNT: | 2759 | case ETHTOOL_GRXCLSRLCNT: |
2740 | case ETHTOOL_GRXCLSRULE: | 2760 | case ETHTOOL_GRXCLSRULE: |
2761 | case ETHTOOL_SRXCLSRLINS: | ||
2741 | convert_out = true; | 2762 | convert_out = true; |
2742 | /* fall through */ | 2763 | /* fall through */ |
2743 | case ETHTOOL_SRXCLSRLDEL: | 2764 | case ETHTOOL_SRXCLSRLDEL: |
2744 | case ETHTOOL_SRXCLSRLINS: | ||
2745 | buf_size += sizeof(struct ethtool_rxnfc); | 2765 | buf_size += sizeof(struct ethtool_rxnfc); |
2746 | convert_in = true; | 2766 | convert_in = true; |
2747 | break; | 2767 | break; |