From: Gustavo Padovan Date: Fri, 27 Sep 2013 14:56:14 +0000 (-0300) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth X-Git-Tag: submit/tizen/20160607.132125~5677^2~225^2~24^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1025c04cecd19882e28f16c4004034b475c372c5;p=sdk%2Femulator%2Femulator-kernel.git Merge git://git./linux/kernel/git/bluetooth/bluetooth Conflicts: net/bluetooth/hci_core.c --- 1025c04cecd19882e28f16c4004034b475c372c5 diff --cc net/bluetooth/hci_core.c index 3d9f02b,1b66547..4549b5c --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@@ -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 (test_bit(HCI_USER_CHANNEL, &hdev->dev_flags)) + return -EBUSY; + - 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; }