Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cd60d2c authored by Chinh Tran's avatar Chinh Tran Committed by Matt Wagantall
Browse files

cne: Add reference count for Smart Wireless Interface Manager



Add the reference count for Smart Wireless Interface Manager to
know whether there are any process who still has the socket in
question in use or not.
Enable INET DIAG.
Redefine the TCP_FLAG as it gives compiling error when an enum is defined
by a function return.

Change-Id: I1aa9c810fec2e332048c9ef4199ec3f996bc3a75
Signed-off-by: default avatarChinh Tran <chinht@codeaurora.org>
[mattw@codeaurora.org: resolve conflicts encountered with port to 3.18]
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 354fd4cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@ struct tcp_info {
	__u8	tcpi_backoff;
	__u8	tcpi_options;
	__u8	tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
	__u8	tcpi_count;

	__u32	tcpi_rto;
	__u32	tcpi_ato;
+8 −0
Original line number Diff line number Diff line
@@ -2720,6 +2720,14 @@ void tcp_get_info(const struct sock *sk, struct tcp_info *info)
					sk->sk_pacing_rate : ~0ULL;
	info->tcpi_max_pacing_rate = sk->sk_max_pacing_rate != ~0U ?
					sk->sk_max_pacing_rate : ~0ULL;
	/*
	* Expose reference count for socket.
	*/
	if (NULL != sk->sk_socket) {
		struct file *filep = sk->sk_socket->file;
		if (NULL != filep)
			info->tcpi_count = atomic_read(&filep->f_count);
	}
}
EXPORT_SYMBOL_GPL(tcp_get_info);