All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Cancel the hci_request timeout if it received expected event
@ 2014-12-23  3:01 Tedd Ho-Jeong An
  2014-12-23 18:55 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Tedd Ho-Jeong An @ 2014-12-23  3:01 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org; +Cc: An, Tedd, Johan Hedberg, Marcel Holtmann

From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch cancels the hci_request timeout work if the expected event
is recevied.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
---
 net/bluetooth/hci_event.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 39a5c8a..9d18470 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4855,6 +4855,9 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
 		struct hci_command_hdr *cmd_hdr = (void *) hdev->sent_cmd->data;
 		u16 opcode = __le16_to_cpu(cmd_hdr->opcode);
 
+		if (opcode != HCI_OP_NOP)
+			cancel_delayed_work(&hdev->cmd_timer);
+
 		hci_req_cmd_complete(hdev, opcode, 0);
 	}
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-23 20:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23  3:01 [PATCH] Bluetooth: Cancel the hci_request timeout if it received expected event Tedd Ho-Jeong An
2014-12-23 18:55 ` Johan Hedberg
2014-12-23 19:09   ` An, Tedd
2014-12-23 20:37     ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.