Merge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 27 Sep 2013 14:56:14 +0000 (11:56 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 27 Sep 2013 14:56:14 +0000 (11:56 -0300)
Conflicts:
net/bluetooth/hci_core.c

1  2 
include/net/bluetooth/hci.h
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c
net/bluetooth/l2cap_core.c

Simple merge
index 3d9f02b2f010dc33778f2365917d476c849336c4,1b66547a3ca66281ee5b012ed1bc542f57e9b910..4549b5cbfac5aa5eaad080961ce29bb4803e6e0f
@@@ -1642,13 -1570,13 +1646,16 @@@ static int hci_rfkill_set_block(void *d
  
        BT_DBG("%p name %s blocked %d", hdev, hdev->name, blocked);
  
-       if (!blocked)
-               return 0;
-       hci_dev_do_close(hdev);
 +      if (test_bit(HCI_USER_CHANNEL, &hdev->dev_flags))
 +              return -EBUSY;
 +
 -}
+       if (blocked) {
+               set_bit(HCI_RFKILLED, &hdev->dev_flags);
+               if (!test_bit(HCI_SETUP, &hdev->dev_flags))
+                       hci_dev_do_close(hdev);
+       } else {
+               clear_bit(HCI_RFKILLED, &hdev->dev_flags);
++      }
  
        return 0;
  }
Simple merge
Simple merge