mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
Add logic to netdev_findbyaddr() to return the correct network device for the case where a broadcast address is used. This change caused trivial ripples through other files because additional parameters are required for netdev_findbyaddr() when CONFIG_NET_MULTINIC
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* net/netdev/netdev_txnotify.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2012, 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -51,11 +51,11 @@
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Priviate Types
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -81,7 +81,7 @@
|
||||
* Notify the device driver that new TX data is available.
|
||||
*
|
||||
* Parameters:
|
||||
* raddr - The remote address to send the data
|
||||
* ripaddr - The remote address to send the data
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
@@ -91,11 +91,21 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void netdev_txnotify(const net_ipaddr_t raddr)
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
void netdev_txnotify(const net_ipaddr_t lipaddr, const net_ipaddr_t ripaddr)
|
||||
#else
|
||||
void netdev_txnotify(const net_ipaddr_t ripaddr)
|
||||
#endif
|
||||
{
|
||||
FAR struct net_driver_s *dev;
|
||||
|
||||
/* Find the device driver that serves the subnet of the remote address */
|
||||
|
||||
struct net_driver_s *dev = netdev_findbyaddr(raddr);
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
dev = netdev_findbyaddr(lipaddr, ripaddr);
|
||||
#else
|
||||
dev = netdev_findbyaddr(ripaddr);
|
||||
#endif
|
||||
|
||||
if (dev && dev->d_txavail)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user