diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-06 07:38:15 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-06 07:38:15 -0600 |
commit | 91ee7d6302158de8cbce24c728b7687e6ae0a49a (patch) | |
tree | 535600b05fea425448c8883e85fead9a7435e4e6 /nuttx/net | |
parent | 2b7e0d90d9f174acc184a77b93a972742dec686e (diff) | |
download | px4-nuttx-91ee7d6302158de8cbce24c728b7687e6ae0a49a.tar.gz px4-nuttx-91ee7d6302158de8cbce24c728b7687e6ae0a49a.tar.bz2 px4-nuttx-91ee7d6302158de8cbce24c728b7687e6ae0a49a.zip |
Use the new signature of rxnotify caused by the routing table. From Max Holtzberg
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/netdev_rxnotify.c | 9 | ||||
-rw-r--r-- | nuttx/net/netdev_txnotify.c | 2 | ||||
-rw-r--r-- | nuttx/net/recvfrom.c | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/nuttx/net/netdev_rxnotify.c b/nuttx/net/netdev_rxnotify.c index 8c3425507..f4352661b 100644 --- a/nuttx/net/netdev_rxnotify.c +++ b/nuttx/net/netdev_rxnotify.c @@ -80,7 +80,7 @@ * Notify the device driver that the application waits for RX data. * * Parameters: - * raddr - Pointer to the remote address to send the data + * raddr - The remote address to send the data * * Returned Value: * None @@ -90,13 +90,12 @@ * ****************************************************************************/ -void netdev_rxnotify(const uip_ipaddr_t *raddr) +void netdev_rxnotify(const uip_ipaddr_t raddr) { - /* Find the device driver that serves the subnet of the remote address */ - /* @HACK how to get the interface with INADDR_ANY? */ + /* Find the device driver that serves the subnet of the remote address */ - struct uip_driver_s *dev = netdev_findbyname("eth0"); + struct uip_driver_s *dev = netdev_findbyaddr(raddr); if (dev && dev->d_rxavail) { diff --git a/nuttx/net/netdev_txnotify.c b/nuttx/net/netdev_txnotify.c index 18e4e1b70..fe4c1d3dd 100644 --- a/nuttx/net/netdev_txnotify.c +++ b/nuttx/net/netdev_txnotify.c @@ -80,7 +80,7 @@ * Notify the device driver that new TX data is available. * * Parameters: - * raddr - Pointer to the remote address to send the data + * raddr - The remote address to send the data * * Returned Value: * None diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 388db3930..99802a80a 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -959,7 +959,7 @@ static ssize_t udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Notify the device driver of the receive call */ - netdev_rxnotify(&conn->ripaddr); + netdev_rxnotify(conn->ripaddr); /* Wait for either the receive to complete or for an error/timeout to occur. * NOTES: (1) uip_lockedwait will also terminate if a signal is received, (2) |