[rtems commit] bsps/arm: Move promiscuous mode setting
Sebastian Huber
sebh at rtems.org
Tue Dec 18 10:18:05 UTC 2012
Module: rtems
Branch: master
Commit: 4592658b700b4b261901146c89b7c8042c669988
Changeset: http://git.rtems.org/rtems/commit/?id=4592658b700b4b261901146c89b7c8042c669988
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Dec 18 09:24:56 2012 +0100
bsps/arm: Move promiscuous mode setting
---
.../libbsp/arm/shared/lpc/network/lpc-ethernet.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
index b545800..3b2d5b6 100644
--- a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
+++ b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
@@ -1359,8 +1359,6 @@ static int lpc_eth_up_or_down(lpc_eth_driver_entry *e, bool up)
lpc_eth->sa2 = ((uint32_t) e->arpcom.ac_enaddr [1] << 8)
| (uint32_t) e->arpcom.ac_enaddr [0];
- lpc_eth_enable_promiscous_mode((ifp->if_flags & IFF_PROMISC) != 0);
-
/* Enable receiver */
lpc_eth->mac1 = 0x03;
@@ -1533,6 +1531,9 @@ static int lpc_eth_interface_ioctl(
break;
case SIOCSIFFLAGS:
eno = lpc_eth_up_or_down(e, (ifp->if_flags & IFF_UP) != 0);
+ if (eno == 0 && (ifp->if_flags & IFF_UP) != 0) {
+ lpc_eth_enable_promiscous_mode((ifp->if_flags & IFF_PROMISC) != 0);
+ }
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
More information about the vc
mailing list