netlink: Remove the unused netlink_active

Change-Id: I976b3fbab033baa4eaec35f8f443d4eb971db142
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-04-08 01:44:23 +08:00
committed by patacongo
parent ef360394c7
commit 9fb6eee5fe
4 changed files with 12 additions and 64 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
# #
############################################################################ ############################################################################
# Logic specific to IPv6 Neighbor Discovery Protocol # Logic specific to NETLINK
ifeq ($(CONFIG_NET_NETLINK),y) ifeq ($(CONFIG_NET_NETLINK),y)
-30
View File
@@ -55,12 +55,6 @@
#ifdef CONFIG_NET_NETLINK #ifdef CONFIG_NET_NETLINK
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define NETLINK_NO_WAITER ((pid_t)-1)
/**************************************************************************** /****************************************************************************
* Public Type Definitions * Public Type Definitions
****************************************************************************/ ****************************************************************************/
@@ -73,13 +67,6 @@ struct netlink_conn_s
dq_entry_t node; /* Supports a doubly linked list */ dq_entry_t node; /* Supports a doubly linked list */
/* This is a list of NetLink connection callbacks. Each callback
* represents a thread that is stalled, waiting for a device-specific
* event.
*/
FAR struct devif_callback_s *list; /* NetLink callbacks */
/* NetLink-specific content follows */ /* NetLink-specific content follows */
uint32_t pid; /* Port ID (if bound) */ uint32_t pid; /* Port ID (if bound) */
@@ -112,12 +99,6 @@ extern "C"
EXTERN const struct sock_intf_s g_netlink_sockif; EXTERN const struct sock_intf_s g_netlink_sockif;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
struct sockaddr_nl; /* Forward reference */
/**************************************************************************** /****************************************************************************
* Name: netlink_initialize() * Name: netlink_initialize()
* *
@@ -164,17 +145,6 @@ void netlink_free(FAR struct netlink_conn_s *conn);
FAR struct netlink_conn_s *netlink_nextconn(FAR struct netlink_conn_s *conn); FAR struct netlink_conn_s *netlink_nextconn(FAR struct netlink_conn_s *conn);
/****************************************************************************
* Name: netlink_active()
*
* Description:
* Find a connection structure that is the appropriate connection for the
* provided NetLink address
*
****************************************************************************/
FAR struct netlink_conn_s *netlink_active(FAR struct sockaddr_nl *addr);
/**************************************************************************** /****************************************************************************
* Name: netlink_notifier_setup * Name: netlink_notifier_setup
* *
+3 -25
View File
@@ -129,7 +129,7 @@ static void netlink_response_available(FAR void *arg)
* Name: netlink_initialize() * Name: netlink_initialize()
* *
* Description: * Description:
* Initialize the User Socket connection structures. Called once and only * Initialize the NetLink connection structures. Called once and only
* from the networking layer. * from the networking layer.
* *
****************************************************************************/ ****************************************************************************/
@@ -250,27 +250,6 @@ FAR struct netlink_conn_s *netlink_nextconn(FAR struct netlink_conn_s *conn)
} }
} }
/****************************************************************************
* Name: netlink_active
*
* Description:
* Find a connection structure that is the appropriate connection for the
* provided NetLink address
*
* Assumptions:
*
****************************************************************************/
FAR struct netlink_conn_s *netlink_active(FAR struct sockaddr_nl *addr)
{
/* This function is used to handle routing of incoming messages to sockets
* connected to the address. There is no such use case for NetLink
* sockets.
*/
return NULL;
}
/**************************************************************************** /****************************************************************************
* Name: netlink_add_response * Name: netlink_add_response
* *
@@ -391,8 +370,8 @@ FAR struct netlink_response_s *
/* Set up a semaphore to notify us when a response is queued. */ /* Set up a semaphore to notify us when a response is queued. */
(void)sem_init(&waitsem, 0, 0); sem_init(&waitsem, 0, 0);
(void)nxsem_setprotocol(&waitsem, SEM_PRIO_NONE); nxsem_setprotocol(&waitsem, SEM_PRIO_NONE);
/* Set up a notifier to post the semaphore when a response is /* Set up a notifier to post the semaphore when a response is
* received. * received.
@@ -420,7 +399,6 @@ FAR struct netlink_response_s *
if (ret < 0) if (ret < 0)
{ {
resp = NULL;
break; break;
} }
} }
+3 -3
View File
@@ -118,7 +118,7 @@ const struct sock_intf_s g_netlink_sockif =
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: inet_setup * Name: netlink_setup
* *
* Description: * Description:
* Called for socket() to verify that the provided socket type and * Called for socket() to verify that the provided socket type and
@@ -458,7 +458,7 @@ static int netlink_connect(FAR struct socket *psock,
* actual length of the address returned. * actual length of the address returned.
* *
* If no pending connections are present on the queue, and the socket is * If no pending connections are present on the queue, and the socket is
* not marked as non-blocking, inet_accept blocks the caller until a * not marked as non-blocking, accept blocks the caller until a
* connection is present. If the socket is marked non-blocking and no * connection is present. If the socket is marked non-blocking and no
* pending connections are present on the queue, inet_accept returns * pending connections are present on the queue, inet_accept returns
* EAGAIN. * EAGAIN.
@@ -518,7 +518,7 @@ static void netlink_response_available(FAR void *arg)
/* Wake up the poll() with POLLIN */ /* Wake up the poll() with POLLIN */
*conn->pollevent |= POLLIN; *conn->pollevent |= POLLIN;
(void)nxsem_post(conn->pollsem); nxsem_post(conn->pollsem);
} }
else else
{ {