diff options
author | 2012-12-03 13:46:03 -0500 | |
---|---|---|
committer | 2012-12-03 13:46:03 -0500 | |
commit | 06ef5c4bbb9816e7a7eb44917f11c2e3375fb51a (patch) | |
tree | cac94ec09e789a6e5162d1925ee944075bf6eef6 /net/bluetooth/hci_core.c | |
parent | brcmsmac: Fix possible NULL pointer dereference in _dma_ctrlflags() (diff) | |
parent | Revert "Bluetooth: Fix possible deadlock in SCO code" (diff) | |
download | linux-06ef5c4bbb9816e7a7eb44917f11c2e3375fb51a.tar.gz linux-06ef5c4bbb9816e7a7eb44917f11c2e3375fb51a.tar.bz2 linux-06ef5c4bbb9816e7a7eb44917f11c2e3375fb51a.zip |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 7140f83328a2..596660d37c5e 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -861,6 +861,9 @@ static int hci_dev_do_close(struct hci_dev *hdev) /* Clear flags */ hdev->flags = 0; + /* Controller radio is available but is currently powered down */ + hdev->amp_status = 0; + memset(hdev->eir, 0, sizeof(hdev->eir)); memset(hdev->dev_class, 0, sizeof(hdev->dev_class)); @@ -1854,6 +1857,8 @@ void hci_unregister_dev(struct hci_dev *hdev) for (i = 0; i < NUM_REASSEMBLY; i++) kfree_skb(hdev->reassembly[i]); + cancel_work_sync(&hdev->power_on); + if (!test_bit(HCI_INIT, &hdev->flags) && !test_bit(HCI_SETUP, &hdev->dev_flags)) { hci_dev_lock(hdev); |