diff --git a/net/usrsock/usrsock_accept.c b/net/usrsock/usrsock_accept.c index b91d5b51d16..d802b697a8f 100644 --- a/net/usrsock/usrsock_accept.c +++ b/net/usrsock/usrsock_accept.c @@ -54,9 +54,9 @@ static uint16_t accept_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -90,9 +90,9 @@ static uint16_t accept_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -106,9 +106,9 @@ static uint16_t accept_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -122,9 +122,9 @@ static uint16_t accept_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_bind.c b/net/usrsock/usrsock_bind.c index 5b9dd9892c3..415011bef91 100644 --- a/net/usrsock/usrsock_bind.c +++ b/net/usrsock/usrsock_bind.c @@ -57,9 +57,9 @@ static uint16_t bind_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -73,9 +73,9 @@ static uint16_t bind_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_close.c b/net/usrsock/usrsock_close.c index e20d37fef82..f7d59c096b4 100644 --- a/net/usrsock/usrsock_close.c +++ b/net/usrsock/usrsock_close.c @@ -58,9 +58,9 @@ static uint16_t close_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -74,9 +74,9 @@ static uint16_t close_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_connect.c b/net/usrsock/usrsock_connect.c index 709f2336bfc..6e40fc0eb13 100644 --- a/net/usrsock/usrsock_connect.c +++ b/net/usrsock/usrsock_connect.c @@ -57,9 +57,9 @@ static uint16_t connect_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -73,9 +73,9 @@ static uint16_t connect_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_devif.c b/net/usrsock/usrsock_devif.c index 6489fdc88d9..98ab7bae0e2 100644 --- a/net/usrsock/usrsock_devif.c +++ b/net/usrsock/usrsock_devif.c @@ -48,13 +48,13 @@ struct usrsock_req_s { - sem_t sem; /* Request semaphore (only one outstanding - * request) */ - sem_t acksem; /* Request acknowledgment notification */ - uint32_t newxid; /* New transcation Id */ - uint32_t ackxid; /* Exchange id for which waiting ack */ - uint16_t nbusy; /* Number of requests blocked from different - * threads */ + sem_t sem; /* Request semaphore (only one outstanding + * request) */ + sem_t acksem; /* Request acknowledgment notification */ + uint32_t newxid; /* New transcation Id */ + uint32_t ackxid; /* Exchange id for which waiting ack */ + uint16_t nbusy; /* Number of requests blocked from different + * threads */ /* Connection instance to receive data buffers. */ diff --git a/net/usrsock/usrsock_getpeername.c b/net/usrsock/usrsock_getpeername.c index b0c4d40ca08..1a33e338079 100644 --- a/net/usrsock/usrsock_getpeername.c +++ b/net/usrsock/usrsock_getpeername.c @@ -58,9 +58,9 @@ static uint16_t getpeername_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -84,9 +84,9 @@ static uint16_t getpeername_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_getsockname.c b/net/usrsock/usrsock_getsockname.c index fad8798a237..27cfad0f7c5 100644 --- a/net/usrsock/usrsock_getsockname.c +++ b/net/usrsock/usrsock_getsockname.c @@ -58,9 +58,9 @@ static uint16_t getsockname_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -84,9 +84,9 @@ static uint16_t getsockname_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_getsockopt.c b/net/usrsock/usrsock_getsockopt.c index d674122a65e..a829fb6977e 100644 --- a/net/usrsock/usrsock_getsockopt.c +++ b/net/usrsock/usrsock_getsockopt.c @@ -59,9 +59,9 @@ static uint16_t getsockopt_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -83,9 +83,9 @@ static uint16_t getsockopt_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_ioctl.c b/net/usrsock/usrsock_ioctl.c index 56555320c92..f143117d5ee 100644 --- a/net/usrsock/usrsock_ioctl.c +++ b/net/usrsock/usrsock_ioctl.c @@ -60,9 +60,9 @@ static uint16_t ioctl_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -86,9 +86,9 @@ static uint16_t ioctl_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_listen.c b/net/usrsock/usrsock_listen.c index f707cf823ba..8b262030a8b 100644 --- a/net/usrsock/usrsock_listen.c +++ b/net/usrsock/usrsock_listen.c @@ -52,9 +52,9 @@ static uint16_t listen_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -68,9 +68,9 @@ static uint16_t listen_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_poll.c b/net/usrsock/usrsock_poll.c index 0a03bb4806d..9184b27f6aa 100644 --- a/net/usrsock/usrsock_poll.c +++ b/net/usrsock/usrsock_poll.c @@ -181,26 +181,26 @@ static int usrsock_pollsetup(FAR struct socket *psock, /* Initialize the poll info container */ - info->conn = conn; - info->fds = fds; - info->cb = cb; + info->conn = conn; + info->fds = fds; + info->cb = cb; /* Initialize the callback structure. Save the reference to the info * structure as callback private data so that it will be available during * callback processing. */ - cb->flags = USRSOCK_EVENT_ABORT | USRSOCK_EVENT_CONNECT_READY | - USRSOCK_EVENT_SENDTO_READY | USRSOCK_EVENT_RECVFROM_AVAIL | - USRSOCK_EVENT_REMOTE_CLOSED; - cb->priv = (FAR void *)info; - cb->event = poll_event; + cb->flags = USRSOCK_EVENT_ABORT | USRSOCK_EVENT_CONNECT_READY | + USRSOCK_EVENT_SENDTO_READY | USRSOCK_EVENT_RECVFROM_AVAIL | + USRSOCK_EVENT_REMOTE_CLOSED; + cb->priv = (FAR void *)info; + cb->event = poll_event; /* Save the reference in the poll info structure as fds private as well * for use during poll teardown as well. */ - fds->priv = (FAR void *)info; + fds->priv = (FAR void *)info; /* Check if socket is in error state */ diff --git a/net/usrsock/usrsock_recvmsg.c b/net/usrsock/usrsock_recvmsg.c index ea0b1b0e258..68ea6342d33 100644 --- a/net/usrsock/usrsock_recvmsg.c +++ b/net/usrsock/usrsock_recvmsg.c @@ -59,9 +59,9 @@ static uint16_t recvfrom_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -95,9 +95,9 @@ static uint16_t recvfrom_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -111,9 +111,9 @@ static uint16_t recvfrom_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ @@ -127,9 +127,9 @@ static uint16_t recvfrom_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->reqstate.cb->flags = 0; - pstate->reqstate.cb->priv = NULL; - pstate->reqstate.cb->event = NULL; + pstate->reqstate.cb->flags = 0; + pstate->reqstate.cb->priv = NULL; + pstate->reqstate.cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_sendmsg.c b/net/usrsock/usrsock_sendmsg.c index d1fbed62e45..255dd80a7a6 100644 --- a/net/usrsock/usrsock_sendmsg.c +++ b/net/usrsock/usrsock_sendmsg.c @@ -57,9 +57,9 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -82,9 +82,9 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -98,9 +98,9 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -116,9 +116,9 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_setsockopt.c b/net/usrsock/usrsock_setsockopt.c index 1d571c26607..bb41297e594 100644 --- a/net/usrsock/usrsock_setsockopt.c +++ b/net/usrsock/usrsock_setsockopt.c @@ -58,9 +58,9 @@ static uint16_t setsockopt_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -74,9 +74,9 @@ static uint16_t setsockopt_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ diff --git a/net/usrsock/usrsock_socket.c b/net/usrsock/usrsock_socket.c index 128263510dd..e4ad67ee258 100644 --- a/net/usrsock/usrsock_socket.c +++ b/net/usrsock/usrsock_socket.c @@ -58,9 +58,9 @@ static uint16_t socket_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */ @@ -83,9 +83,9 @@ static uint16_t socket_event(FAR struct net_driver_s *dev, /* Stop further callbacks */ - pstate->cb->flags = 0; - pstate->cb->priv = NULL; - pstate->cb->event = NULL; + pstate->cb->flags = 0; + pstate->cb->priv = NULL; + pstate->cb->event = NULL; /* Wake up the waiting thread */