firewire net: Release broadcast/fifo resources on ifdown.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Fri, 8 Mar 2013 01:45:57 +0000 (10:45 +0900)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 13 Mar 2013 15:11:12 +0000 (16:11 +0100)
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>
drivers/firewire/net.c

index ca41446d62f447638ea00a2db1d90ae50cbdcb91..c1898adeb900662c9e849412b0fccedefe7ce5bb 100644 (file)
@@ -1295,9 +1295,12 @@ out:
 /* 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;
 }
@@ -1638,9 +1641,6 @@ static int fwnet_remove(struct device *_dev)
        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);