]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - net/bluetooth/hci_event.c
Bluetooth: Fix sending HCI commands after reset
[linux-2.6.git] / net / bluetooth / hci_event.c
index 25edda03645e1f36afe83b7bc5f3aeb12610b921..ef45e10c44f29e5dbc787069669e2ca9592ee232 100644 (file)
@@ -2366,7 +2366,7 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
        if (ev->opcode != HCI_OP_NOP)
                del_timer(&hdev->cmd_timer);
 
-       if (ev->ncmd) {
+       if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) {
                atomic_set(&hdev->cmd_cnt, 1);
                if (!skb_queue_empty(&hdev->cmd_q))
                        queue_work(hdev->workqueue, &hdev->cmd_work);