aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/dccp/ccids/ccid3.c5
-rw-r--r--net/dccp/dccp.h1
-rw-r--r--net/dccp/ipv4.c1
-rw-r--r--net/dccp/output.c13
4 files changed, 20 insertions, 0 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index e22b0eefdbf9..7bf3b3a91e97 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -556,6 +556,11 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
556 /* remove all packets older than the one acked from history */ 556 /* remove all packets older than the one acked from history */
557 dccp_tx_hist_purge_older(ccid3_tx_hist, 557 dccp_tx_hist_purge_older(ccid3_tx_hist,
558 &hctx->ccid3hctx_hist, packet); 558 &hctx->ccid3hctx_hist, packet);
559 /*
560 * As we have calculated new ipi, delta, t_nom it is possible that
561 * we now can send a packet, so wake up dccp_wait_for_ccids.
562 */
563 sk->sk_write_space(sk);
559 564
560 /* 565 /*
561 * Schedule no feedback timer to expire in 566 * Schedule no feedback timer to expire in
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 5cd9e794bbe2..33456c0d5937 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -127,6 +127,7 @@ extern void dccp_send_sync(struct sock *sk, const u64 seq,
127 const enum dccp_pkt_type pkt_type); 127 const enum dccp_pkt_type pkt_type);
128 128
129extern int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo); 129extern int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo);
130extern void dccp_write_space(struct sock *sk);
130 131
131extern void dccp_init_xmit_timers(struct sock *sk); 132extern void dccp_init_xmit_timers(struct sock *sk);
132static inline void dccp_clear_xmit_timers(struct sock *sk) 133static inline void dccp_clear_xmit_timers(struct sock *sk)
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 3cf2cbcdcafd..3fc75dbee4b8 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -1280,6 +1280,7 @@ static int dccp_v4_init_sock(struct sock *sk)
1280 dccp_init_xmit_timers(sk); 1280 dccp_init_xmit_timers(sk);
1281 inet_csk(sk)->icsk_rto = DCCP_TIMEOUT_INIT; 1281 inet_csk(sk)->icsk_rto = DCCP_TIMEOUT_INIT;
1282 sk->sk_state = DCCP_CLOSED; 1282 sk->sk_state = DCCP_CLOSED;
1283 sk->sk_write_space = dccp_write_space;
1283 dp->dccps_mss_cache = 536; 1284 dp->dccps_mss_cache = 536;
1284 dp->dccps_role = DCCP_ROLE_UNDEFINED; 1285 dp->dccps_role = DCCP_ROLE_UNDEFINED;
1285 1286
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 116f6db5678d..28de157a4326 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -150,6 +150,19 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu)
150 return mss_now; 150 return mss_now;
151} 151}
152 152
153void dccp_write_space(struct sock *sk)
154{
155 read_lock(&sk->sk_callback_lock);
156
157 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
158 wake_up_interruptible(sk->sk_sleep);
159 /* Should agree with poll, otherwise some programs break */
160 if (sock_writeable(sk))
161 sk_wake_async(sk, 2, POLL_OUT);
162
163 read_unlock(&sk->sk_callback_lock);
164}
165
153/** 166/**
154 * dccp_wait_for_ccid - Wait for ccid to tell us we can send a packet 167 * dccp_wait_for_ccid - Wait for ccid to tell us we can send a packet
155 * @sk: socket to wait for 168 * @sk: socket to wait for