Back out most of previous commit

This commit is contained in:
Gregory Nutt
2016-02-26 06:45:37 -06:00
parent b0ea870bcc
commit 8db55f6493
15 changed files with 28 additions and 54 deletions

View File

@@ -149,7 +149,7 @@ struct tcp_conn_s
uint8_t sndseq[4]; /* The sequence number that was last sent by us */
uint8_t crefs; /* Reference counts on this instance */
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
uint8_t domain; /* IP domain: PF_INET, PF_INET6, or PF_IEEE802154 */
uint8_t domain; /* IP domain: PF_INET or PF_INET6 */
#endif
uint8_t sa; /* Retransmission time-out calculation state
* variable */

View File

@@ -139,9 +139,7 @@ static inline void accept_tcpsender(FAR struct socket *psock,
{
FAR struct sockaddr_in6 *inaddr = (FAR struct sockaddr_in6 *)addr;
DEBUGASSERT(psock->s_domain == PF_INET6 ||
psock->s_domain == PF_IEEE802154);
DEBUGASSERT(psock->s_domain == PF_INET6);
inaddr->sin6_family = AF_INET6;
inaddr->sin6_port = conn->rport;
net_ipv6addr_copy(inaddr->sin6_addr.s6_addr, conn->u.ipv6.raddr);

View File

@@ -977,8 +977,6 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct net_driver_s *dev,
domain = ipv6 ? PF_INET6 : PF_INET;
#elif defined(CONFIG_NET_IPv4)
domain = PF_INET;
#elif defined(CONFIG_NET_IEEE802154)
domain = PF_IEEE80254;
#else /* defined(CONFIG_NET_IPv6) */
domain = PF_INET6;
#endif

View File

@@ -241,13 +241,11 @@ static inline void send_ipselect(FAR struct net_driver_s *dev,
tcp_ipv4_select(dev);
}
else /* if (psock->s_domain == PF_INET6 || psock->s_domain == PF_IEEE802154) */
else /* if (psock->s_domain == PF_INET6) */
{
/* Select the IPv6 domain */
DEBUGASSERT(psock->s_domain == PF_INET6 ||
psock->s_domain == PF_IEEE802154);
DEBUGASSERT(psock->s_domain == PF_INET6);
tcp_ipv4_select(dev);
}
}
@@ -859,14 +857,12 @@ static inline void send_txnotify(FAR struct socket *psock,
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else /* if (psock->s_domain == PF_INET6 || psock->s_domain == PF_IEEE802154) */
else /* if (psock->s_domain == PF_INET6) */
#endif /* CONFIG_NET_IPv4 */
{
/* Notify the device driver that send data is available */
DEBUGASSERT(psock->s_domain == PF_INET6 ||
psock->s_domain == PF_IEEE802154);
DEBUGASSERT(psock->s_domain == PF_INET6);
#ifdef CONFIG_NETDEV_MULTINIC
netdev_ipv6_txnotify(conn->u.ipv6.laddr, conn->u.ipv6.raddr);
#else

View File

@@ -190,13 +190,11 @@ static inline void tcpsend_ipselect(FAR struct net_driver_s *dev,
tcp_ipv4_select(dev);
}
else /* if (psock->s_domain == PF_INET6 || psock->s_domain == PF_IEEE802154) */
else /* if (psock->s_domain == PF_INET6) */
{
/* Select the IPv6 domain */
DEBUGASSERT(psock->s_domain == PF_INET6 ||
psock->s_domain == PF_IEEE802154);
DEBUGASSERT(psock->s_domain == PF_INET6);
tcp_ipv4_select(dev);
}
}
@@ -639,14 +637,12 @@ static inline void send_txnotify(FAR struct socket *psock,
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else /* if (psock->s_domain == PF_INET6 || psock->s_domain == PF_IEEE802154) */
else /* if (psock->s_domain == PF_INET6) */
#endif /* CONFIG_NET_IPv4 */
{
/* Notify the device driver that send data is available */
DEBUGASSERT(psock->s_domain == PF_INET6 ||
psock->s_domain == PF_IEEE802154);
DEBUGASSERT(psock->s_domain == PF_INET6);
#ifdef CONFIG_NETDEV_MULTINIC
netdev_ipv6_txnotify(conn->u.ipv6.laddr, conn->u.ipv6.raddr);
#else