diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2019-06-02 15:46:11 +0900 |
---|---|---|
committer | Yoshinori Sato <ysato@users.sourceforge.jp> | 2019-06-02 15:46:11 +0900 |
commit | 860dbce3d8dd90cb9e909c58fa79808766243651 (patch) | |
tree | f68920c82fa779ae37bbce08a58259e5c3934ab3 /net/bluetooth/hci_core.c | |
parent | 1b496469d0c020e09124e03e66a81421c21272a7 (diff) | |
parent | 3ab4436f688c2d2f221793953cd05435ca84261c (diff) | |
download | blackbird-op-linux-860dbce3d8dd90cb9e909c58fa79808766243651.tar.gz blackbird-op-linux-860dbce3d8dd90cb9e909c58fa79808766243651.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index d6b2540ba7f8..b81bf53c5ac4 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1460,8 +1460,6 @@ static int hci_dev_do_open(struct hci_dev *hdev) hdev->set_bdaddr) ret = hdev->set_bdaddr(hdev, &hdev->public_addr); - else - ret = -EADDRNOTAVAIL; } setup_failed: @@ -4383,6 +4381,9 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status, return; } + /* If we reach this point this event matches the last command sent */ + hci_dev_clear_flag(hdev, HCI_CMD_PENDING); + /* If the command succeeded and there's still more commands in * this request the request is not yet complete. */ @@ -4493,6 +4494,8 @@ static void hci_cmd_work(struct work_struct *work) hdev->sent_cmd = skb_clone(skb, GFP_KERNEL); if (hdev->sent_cmd) { + if (hci_req_status_pend(hdev)) + hci_dev_set_flag(hdev, HCI_CMD_PENDING); atomic_dec(&hdev->cmd_cnt); hci_send_frame(hdev, skb); if (test_bit(HCI_RESET, &hdev->flags)) |