aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-09-28 14:40:49 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-28 14:40:49 -0400
commit6a06e5e1bb217be077e1f8ee2745b4c5b1aa02db (patch)
tree8faea23112a11f52524eb413f71b7b02712d8b53 /net/ipv4/tcp.c
parentd9f72f359e00a45a6cd7cc2d5121b04b9dc927e1 (diff)
parent6672d90fe779dc0dfffe027c3ede12609df091c2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/team/team.c drivers/net/usb/qmi_wwan.c net/batman-adv/bat_iv_ogm.c net/ipv4/fib_frontend.c net/ipv4/route.c net/l2tp/l2tp_netlink.c The team, fib_frontend, route, and l2tp_netlink conflicts were simply overlapping changes. qmi_wwan and bat_iv_ogm were of the "use HEAD" variety. With help from Antonio Quartulli. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 72ea4752f21b..f32c02e2a543 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1738,8 +1738,14 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
1738 } 1738 }
1739 1739
1740#ifdef CONFIG_NET_DMA 1740#ifdef CONFIG_NET_DMA
1741 if (tp->ucopy.dma_chan) 1741 if (tp->ucopy.dma_chan) {
1742 dma_async_memcpy_issue_pending(tp->ucopy.dma_chan); 1742 if (tp->rcv_wnd == 0 &&
1743 !skb_queue_empty(&sk->sk_async_wait_queue)) {
1744 tcp_service_net_dma(sk, true);
1745 tcp_cleanup_rbuf(sk, copied);
1746 } else
1747 dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
1748 }
1743#endif 1749#endif
1744 if (copied >= target) { 1750 if (copied >= target) {
1745 /* Do not sleep, just process backlog. */ 1751 /* Do not sleep, just process backlog. */
@@ -2320,10 +2326,17 @@ static int tcp_repair_options_est(struct tcp_sock *tp,
2320 tp->rx_opt.mss_clamp = opt.opt_val; 2326 tp->rx_opt.mss_clamp = opt.opt_val;
2321 break; 2327 break;
2322 case TCPOPT_WINDOW: 2328 case TCPOPT_WINDOW:
2323 if (opt.opt_val > 14) 2329 {
2324 return -EFBIG; 2330 u16 snd_wscale = opt.opt_val & 0xFFFF;
2331 u16 rcv_wscale = opt.opt_val >> 16;
2332
2333 if (snd_wscale > 14 || rcv_wscale > 14)
2334 return -EFBIG;
2325 2335
2326 tp->rx_opt.snd_wscale = opt.opt_val; 2336 tp->rx_opt.snd_wscale = snd_wscale;
2337 tp->rx_opt.rcv_wscale = rcv_wscale;
2338 tp->rx_opt.wscale_ok = 1;
2339 }
2327 break; 2340 break;
2328 case TCPOPT_SACK_PERM: 2341 case TCPOPT_SACK_PERM:
2329 if (opt.opt_val != 0) 2342 if (opt.opt_val != 0)