Stopping a Network Device
NetDev_Stop()
is called once each time an interface is stopped.
NetDev_Stop()
must perform the following operations:
- Disable the receiver and transmitter.
- Disable all local MAC interrupt sources.
- Clear all local MAC interrupt status flags.
- For DMA devices, re-initialize all receive descriptors.
- For DMA devices, free all transmit descriptors by calling
NetOS_IF_DeallocTaskPost()
with the address of the transmit descriptor data areas. - For DMA devices, re-initialize all transmit descriptors.
- Set
perr
toNET_DEV_ERR_NONE
if no error occurs. Otherwise, setperr
to an appropriate network device error code.