aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-06 20:22:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-06 20:22:09 -0500
commit9753dfe19a85e7e45a34a56f4cb2048bb4f50e27 (patch)
treec017a1b4a70b8447c71b01d8b320e071546b5c9d /net/socket.c
parentedf7c8148ec40c0fd27c0ef3f688defcc65e3913 (diff)
parent9f42f126154786e6e76df513004800c8c633f020 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1958 commits) net: pack skb_shared_info more efficiently net_sched: red: split red_parms into parms and vars net_sched: sfq: extend limits cnic: Improve error recovery on bnx2x devices cnic: Re-init dev->stats_addr after chip reset net_sched: Bug in netem reordering bna: fix sparse warnings/errors bna: make ethtool_ops and strings const xgmac: cleanups net: make ethtool_ops const vmxnet3" make ethtool ops const xen-netback: make ops structs const virtio_net: Pass gfp flags when allocating rx buffers. ixgbe: FCoE: Add support for ndo_get_fcoe_hbainfo() call netdev: FCoE: Add new ndo_get_fcoe_hbainfo() call igb: reset PHY after recovering from PHY power down igb: add basic runtime PM support igb: Add support for byte queue limits. e1000: cleanup CE4100 MDIO registers access e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove ...
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c22
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}
543EXPORT_SYMBOL(sock_tx_timestamp); 545EXPORT_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}
675EXPORT_SYMBOL_GPL(__sock_recv_timestamp); 679EXPORT_SYMBOL_GPL(__sock_recv_timestamp);
676 680
681void __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}
695EXPORT_SYMBOL_GPL(__sock_recv_wifi_status);
696
677static inline void sock_recv_drops(struct msghdr *msg, struct sock *sk, 697static 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;