Bluetooth: 6lowpan: Enable delete_netdev to be scheduled when last peer is deleted
authorGlenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Wed, 17 Jun 2015 14:32:23 +0000 (07:32 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 17 Jun 2015 17:17:57 +0000 (19:17 +0200)
This patch fixes an issue with the netdev not being unregistered when
the last peer is deleted. Removing the logical negation operator on the
boolean solves this issue. If the last peer is removed the condition
will be true, and the delete_netdev() is scheduled.

Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/6lowpan.c

index f3d6046c8ee743cc05a46750e7027149676c8832..3edc7315835e60e512e510968e3887b14f85a682 100644 (file)
@@ -977,7 +977,7 @@ static void chan_close_cb(struct l2cap_chan *chan)
 
                ifdown(dev->netdev);
 
-               if (!removed) {
+               if (removed) {
                        INIT_WORK(&entry->delete_netdev, delete_netdev);
                        schedule_work(&entry->delete_netdev);
                }