aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_event.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 62f92a508961..3ac23964e108 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3027,13 +3027,13 @@ static void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
3027 if (opcode != HCI_OP_NOP) 3027 if (opcode != HCI_OP_NOP)
3028 cancel_delayed_work(&hdev->cmd_timer); 3028 cancel_delayed_work(&hdev->cmd_timer);
3029 3029
3030 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags))
3031 atomic_set(&hdev->cmd_cnt, 1);
3032
3030 hci_req_cmd_complete(hdev, opcode, status); 3033 hci_req_cmd_complete(hdev, opcode, status);
3031 3034
3032 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { 3035 if (atomic_read(&hdev->cmd_cnt) && !skb_queue_empty(&hdev->cmd_q))
3033 atomic_set(&hdev->cmd_cnt, 1); 3036 queue_work(hdev->workqueue, &hdev->cmd_work);
3034 if (!skb_queue_empty(&hdev->cmd_q))
3035 queue_work(hdev->workqueue, &hdev->cmd_work);
3036 }
3037} 3037}
3038 3038
3039static void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb) 3039static void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
@@ -3122,15 +3122,15 @@ static void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
3122 if (opcode != HCI_OP_NOP) 3122 if (opcode != HCI_OP_NOP)
3123 cancel_delayed_work(&hdev->cmd_timer); 3123 cancel_delayed_work(&hdev->cmd_timer);
3124 3124
3125 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags))
3126 atomic_set(&hdev->cmd_cnt, 1);
3127
3125 if (ev->status || 3128 if (ev->status ||
3126 (hdev->sent_cmd && !bt_cb(hdev->sent_cmd)->req_event)) 3129 (hdev->sent_cmd && !bt_cb(hdev->sent_cmd)->req_event))
3127 hci_req_cmd_complete(hdev, opcode, ev->status); 3130 hci_req_cmd_complete(hdev, opcode, ev->status);
3128 3131
3129 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { 3132 if (atomic_read(&hdev->cmd_cnt) && !skb_queue_empty(&hdev->cmd_q))
3130 atomic_set(&hdev->cmd_cnt, 1); 3133 queue_work(hdev->workqueue, &hdev->cmd_work);
3131 if (!skb_queue_empty(&hdev->cmd_q))
3132 queue_work(hdev->workqueue, &hdev->cmd_work);
3133 }
3134} 3134}
3135 3135
3136static void hci_hardware_error_evt(struct hci_dev *hdev, struct sk_buff *skb) 3136static void hci_hardware_error_evt(struct hci_dev *hdev, struct sk_buff *skb)