Since those resources are allocated on ifup, relsase them on ifdown.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
/* ifdown */
static int fwnet_stop(struct net_device *net)
{
+ struct fwnet_device *dev = netdev_priv(net);
+
netif_stop_queue(net);
- /* Deallocate iso context for use by other applications? */
+ fwnet_broadcast_stop(dev);
+ fwnet_fifo_stop(dev);
return 0;
}
if (list_empty(&dev->peer_list)) {
unregister_netdev(net);
- fwnet_fifo_stop(dev);
- fwnet_broadcast_stop(dev);
-
for (i = 0; dev->queued_datagrams && i < 5; i++)
ssleep(1);
WARN_ON(dev->queued_datagrams);