aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorVille Tervo <ville.tervo@nokia.com>2011-02-16 09:32:41 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-16 14:33:26 -0500
commit6bd32326cdaa9b14794416150c88e4832fb7e592 (patch)
tree4c48387761df0207bb50952dda7fd5c980893351 /net/bluetooth/hci_event.c
parent7f4b2b04c88377af30c022f36c060190182850fb (diff)
Bluetooth: Use proper timer for hci command timout
Use proper timer instead of hci command flow control to timeout failed hci commands. Otherwise stack ends up sending commands when flow control is used to block new commands. 2010-09-01 18:29:41.592132 < HCI Command: Remote Name Request (0x01|0x0019) plen 10 bdaddr 00:16:CF:E1:C7:D7 mode 2 clkoffset 0x0000 2010-09-01 18:29:41.592681 > HCI Event: Command Status (0x0f) plen 4 Remote Name Request (0x01|0x0019) status 0x00 ncmd 0 2010-09-01 18:29:51.022033 < HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6 bdaddr 00:16:CF:E1:C7:D7 Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 74f04a27734d..09cb29e8713a 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1732,6 +1732,9 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
1732 break; 1732 break;
1733 } 1733 }
1734 1734
1735 if (ev->opcode != HCI_OP_NOP)
1736 del_timer(&hdev->cmd_timer);
1737
1735 if (ev->ncmd) { 1738 if (ev->ncmd) {
1736 atomic_set(&hdev->cmd_cnt, 1); 1739 atomic_set(&hdev->cmd_cnt, 1);
1737 if (!skb_queue_empty(&hdev->cmd_q)) 1740 if (!skb_queue_empty(&hdev->cmd_q))
@@ -1807,6 +1810,9 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
1807 break; 1810 break;
1808 } 1811 }
1809 1812
1813 if (ev->opcode != HCI_OP_NOP)
1814 del_timer(&hdev->cmd_timer);
1815
1810 if (ev->ncmd) { 1816 if (ev->ncmd) {
1811 atomic_set(&hdev->cmd_cnt, 1); 1817 atomic_set(&hdev->cmd_cnt, 1);
1812 if (!skb_queue_empty(&hdev->cmd_q)) 1818 if (!skb_queue_empty(&hdev->cmd_q))