[rtems-libbsd commit] if_ffec_mcf548x: Init when interface is set to UP.

Chris Johns chrisj at rtems.org
Fri Feb 16 02:17:21 UTC 2018


Module:    rtems-libbsd
Branch:    refs/tags/4.11.3
Commit:    0157c5b2c12546969372b23032fb08a26a745d3b
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=0157c5b2c12546969372b23032fb08a26a745d3b

Author:    Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date:      Fri Aug  5 12:00:47 2016 +0200

if_ffec_mcf548x: Init when interface is set to UP.

Call the driver initialization function if the interface is set to UP.

---

 rtemsbsd/sys/dev/ffec/if_ffec_mcf548x.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/rtemsbsd/sys/dev/ffec/if_ffec_mcf548x.c b/rtemsbsd/sys/dev/ffec/if_ffec_mcf548x.c
index 67a62e1..93c2410 100644
--- a/rtemsbsd/sys/dev/ffec/if_ffec_mcf548x.c
+++ b/rtemsbsd/sys/dev/ffec/if_ffec_mcf548x.c
@@ -1379,6 +1379,14 @@ static int mcf548x_fec_ioctl (struct ifnet *ifp, ioctl_command_t command, caddr_
 
   switch(command)
     {
+    case SIOCSIFFLAGS:
+      if (ifp->if_flags & IFF_UP) {
+        if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
+          mcf548x_fec_init(sc);
+        }
+      }
+      break;
+
     case SIO_RTEMS_SHOW_STATS:
 
       enet_stats(sc);



More information about the vc mailing list