Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Sep 2013 17:09:17 +0000 (13:09 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Sep 2013 17:11:17 +0000 (13:11 -0400)
Also fixed-up a badly indented closing brace...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
1  2 
net/bluetooth/hci_core.c

index 634debab4d54582f04c69a4664b00c7541696a93,1b66547a3ca66281ee5b012ed1bc542f57e9b910..fb7356fcfe51e03664d7aed6458eafd3015634e5
@@@ -1566,10 -1570,13 +1570,13 @@@ 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 (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;
  }