struct net_device *netdev =
container_of ( refcnt, struct net_device, refcnt );
- stop_timer ( &netdev->link_block );
+ assert ( ! timer_running ( &netdev->link_block ) );
netdev_tx_flush ( netdev );
netdev_rx_flush ( netdev );
clear_settings ( netdev_settings ( netdev ) );
/* Close the device */
netdev->op->close ( netdev );
+ /* Stop link block timer */
+ stop_timer ( &netdev->link_block );
+
/* Flush TX and RX queues */
netdev_tx_flush ( netdev );
netdev_rx_flush ( netdev );