diff options
| -rw-r--r-- | net/ipc_router/ipc_router_core.c | 15 | ||||
| -rw-r--r-- | net/ipc_router/ipc_router_private.h | 8 | ||||
| -rw-r--r-- | net/ipc_router/ipc_router_socket.c | 2 |
3 files changed, 20 insertions, 5 deletions
diff --git a/net/ipc_router/ipc_router_core.c b/net/ipc_router/ipc_router_core.c index ee4a8733b3e1..fae41583d0e9 100644 --- a/net/ipc_router/ipc_router_core.c +++ b/net/ipc_router/ipc_router_core.c @@ -1525,6 +1525,14 @@ static int msm_ipc_router_lookup_resume_tx_port( } /** + * ipc_router_dummy_write_space() - Dummy write space available callback + * @sk: Socket pointer for which the callback is called. + */ +void ipc_router_dummy_write_space(struct sock *sk) +{ +} + +/** * post_resume_tx() - Post the resume_tx event * @rport_ptr: Pointer to the remote port * @pkt : The data packet that is received on a resume_tx event @@ -1560,10 +1568,11 @@ static void post_resume_tx(struct msm_ipc_router_remote_port *rport_ptr, read_lock(&sk->sk_callback_lock); write_space = sk->sk_write_space; read_unlock(&sk->sk_callback_lock); - if (write_space) - write_space(sk); } - if (!write_space) + if (write_space && + write_space != ipc_router_dummy_write_space) + write_space(sk); + else post_pkt_to_port(local_port, pkt, 1); } else { IPC_RTR_ERR("%s: Local Port %d not Found", diff --git a/net/ipc_router/ipc_router_private.h b/net/ipc_router/ipc_router_private.h index 2dc0a0ff5fdb..ce6c84070402 100644 --- a/net/ipc_router/ipc_router_private.h +++ b/net/ipc_router/ipc_router_private.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -141,4 +141,10 @@ void *msm_ipc_load_default_node(void); void msm_ipc_unload_default_node(void *pil); +/** + * ipc_router_dummy_write_space() - Dummy write space available callback + * @sk: Socket pointer for which the callback is called. + */ +void ipc_router_dummy_write_space(struct sock *sk); + #endif diff --git a/net/ipc_router/ipc_router_socket.c b/net/ipc_router/ipc_router_socket.c index ccde0a94443d..b05ab20a6f13 100644 --- a/net/ipc_router/ipc_router_socket.c +++ b/net/ipc_router/ipc_router_socket.c @@ -198,7 +198,7 @@ static int msm_ipc_router_create(struct net *net, sock->ops = &msm_ipc_proto_ops; sock_init_data(sock, sk); sk->sk_data_ready = NULL; - sk->sk_write_space = NULL; + sk->sk_write_space = ipc_router_dummy_write_space; sk->sk_rcvtimeo = DEFAULT_RCV_TIMEO; sk->sk_sndtimeo = DEFAULT_SND_TIMEO; |
