Use the new signature of rxnotify caused by the routing table. From Max Holtzberg

This commit is contained in:
Gregory Nutt
2013-10-06 07:38:15 -06:00
parent 52797b84a1
commit f6a90114b1
4 changed files with 9 additions and 7 deletions
+3
View File
@@ -5713,3 +5713,6 @@
looking the the correct router IP address to use in the ARP request.
In that case, we want the MAC address of the router, not of the the
target endpoint (2013-10-5).
* net/netdev_rxnotify.c and others: Use the new signature of rxnotify
caused by the routing table. From Max Holtzberg (2013-10-6).
+4 -5
View File
@@ -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? */
struct uip_driver_s *dev = netdev_findbyname("eth0");
struct uip_driver_s *dev = netdev_findbyaddr(raddr);
if (dev && dev->d_rxavail)
{
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)