Changeset 356c928 in rtems


Ignore:
Timestamp:
Apr 3, 2012, 12:35:55 PM (7 years ago)
Author:
Christian Mauderer <Christian.Mauderer@…>
Branches:
4.11, master
Children:
32ec0f6b
Parents:
2d43f2d
git-author:
Christian Mauderer <Christian.Mauderer@…> (04/03/12 12:35:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/18/12 07:46:13)
Message:

bsp/mpc55xx: Implement network interface off

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c

    r2d43f2d r356c928  
    17891789}
    17901790
     1791static void smsc9218i_interface_off(struct ifnet *ifp)
     1792{
     1793  smsc9218i_driver_entry *e = (smsc9218i_driver_entry *) ifp->if_softc;
     1794  rtems_status_code sc = RTEMS_SUCCESSFUL;
     1795  rtems_interrupt_level level;
     1796  union SIU_DIRER_tag direr = MPC55XX_ZERO_FLAGS;
     1797
     1798  /* remove interrupt handler */
     1799  sc = rtems_interrupt_handler_remove(
     1800    MPC55XX_IRQ_SIU_EXTERNAL_0,
     1801    smsc9218i_interrupt_handler,
     1802    e
     1803  );
     1804  ASSERT_SC(sc);
     1805
     1806  mpc55xx_edma_release_channel(
     1807    &e->edma_receive
     1808  );
     1809
     1810  mpc55xx_edma_release_channel(
     1811    &e->edma_transmit
     1812  );
     1813
     1814  /* set in reset state */
     1815  smsc9218i_reset_signal(false);
     1816}
     1817
    17911818static int smsc9218i_interface_ioctl(
    17921819  struct ifnet *ifp,
     
    18091836      break;
    18101837    case SIOCSIFFLAGS:
    1811       if (ifp->if_flags & IFF_RUNNING) {
    1812         /* TODO: off */
    1813       }
    18141838      if (ifp->if_flags & IFF_UP) {
    18151839        ifp->if_flags |= IFF_RUNNING;
    18161840        /* TODO: init */
     1841      } else {
     1842        smsc9218i_interface_off(ifp);
    18171843      }
    18181844      break;
Note: See TracChangeset for help on using the changeset viewer.