change log for rtems (2011-03-28)

rtems-vc at rtems.org rtems-vc at rtems.org
Mon Mar 28 13:10:20 UTC 2011


 *sh*:
2011-03-29	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* shared/lpc/network/lpc-ethernet.c: Support multicast.

M   1.91  c/src/lib/libbsp/arm/ChangeLog
M    1.5  c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c

diff -u rtems/c/src/lib/libbsp/arm/ChangeLog:1.90 rtems/c/src/lib/libbsp/arm/ChangeLog:1.91
--- rtems/c/src/lib/libbsp/arm/ChangeLog:1.90	Mon Mar 28 03:49:58 2011
+++ rtems/c/src/lib/libbsp/arm/ChangeLog	Mon Mar 28 07:27:29 2011
@@ -4,6 +4,7 @@
 	bsp_reset().
 	* shared/startup/linkcmds.base: Move unsupported sections into
 	read-only section.  Changed barrier sections.
+	* shared/lpc/network/lpc-ethernet.c: Support multicast.
 
 2011-02-11	Ralf Corsépius <ralf.corsepius at rtems.org>
 

diff -u rtems/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c:1.4 rtems/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c:1.5
--- rtems/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c:1.4	Thu Dec 16 07:35:26 2010
+++ rtems/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c	Mon Mar 28 07:27:29 2011
@@ -7,12 +7,13 @@
  */
 
 /*
- * Copyright (c) 2009
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * D-82178 Puchheim
- * Germany
- * <rtems at embedded-brains.de>
+ * Copyright (c) 2009-2011 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
  *
  * The license and distribution terms for this file may be
  * found in the file LICENSE in this distribution or at
@@ -354,12 +355,12 @@
 static void lpc_eth_enable_promiscous_mode(bool enable)
 {
   if (enable) {
-    lpc_eth->rxfilterctrl = ETH_RX_FIL_CTRL_ACCEPT_PERFECT
-      | ETH_RX_FIL_CTRL_ACCEPT_UNICAST
+    lpc_eth->rxfilterctrl = ETH_RX_FIL_CTRL_ACCEPT_UNICAST
       | ETH_RX_FIL_CTRL_ACCEPT_MULTICAST
       | ETH_RX_FIL_CTRL_ACCEPT_BROADCAST;
   } else {
     lpc_eth->rxfilterctrl = ETH_RX_FIL_CTRL_ACCEPT_PERFECT
+      | ETH_RX_FIL_CTRL_ACCEPT_MULTICAST
       | ETH_RX_FIL_CTRL_ACCEPT_BROADCAST;
   }
 }
@@ -1291,7 +1292,8 @@
 )
 {
   lpc_eth_driver_entry *e = (lpc_eth_driver_entry *) ifp->if_softc;
-  int rv = 0;
+  struct ifreq *ifr = (struct ifreq *) data;
+  int eno = 0;
 
   LPC_ETH_PRINTF("%s\n", __func__);
 
@@ -1313,15 +1315,25 @@
         /* TODO: init */
       }
       break;
+    case SIOCADDMULTI:
+    case SIOCDELMULTI: {
+      eno = (command == SIOCADDMULTI) ? ether_addmulti(ifr, &e->arpcom)
+        : ether_delmulti(ifr, &e->arpcom);
+      if (eno == ENETRESET) {
+        /* TODO: Use imperfect hash filter */
+        eno = 0;
+      }
+      break;
+    }
     case SIO_RTEMS_SHOW_STATS:
       lpc_eth_interface_stats(e);
       break;
     default:
-      rv = EINVAL;
+      eno = EINVAL;
       break;
   }
 
-  return rv;
+  return eno;
 }
 
 static void lpc_eth_interface_start(struct ifnet *ifp)
@@ -1504,7 +1516,7 @@
   ifp->if_start = lpc_eth_interface_start;
   ifp->if_output = ether_output;
   ifp->if_watchdog = lpc_eth_interface_watchdog;
-  ifp->if_flags = config->ignore_broadcast ? 0 : IFF_BROADCAST;
+  ifp->if_flags = IFF_MULTICAST | IFF_BROADCAST | IFF_SIMPLEX;
   ifp->if_snd.ifq_maxlen = ifqmaxlen;
   ifp->if_timer = 0;
 



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110328/ec7ae0a1/attachment-0001.html>


More information about the vc mailing list