linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Fix request completion for command status events
@ 2011-11-21 15:18 johan.hedberg
  2011-11-21 15:19 ` [PATCH 2/2] Bluetooth: Ignore HCI_Read_Local_Commands failures johan.hedberg
  2011-11-21 16:43 ` [PATCH 1/2] Bluetooth: Fix request completion for command status events Marcel Holtmann
  0 siblings, 2 replies; 10+ messages in thread
From: johan.hedberg @ 2011-11-21 15:18 UTC (permalink / raw)
  To: linux-bluetooth

From: Johan Hedberg <johan.hedberg@intel.com>

If a HCI command triggered by hci_request() fails at the command status
phase we need to properly inform the request tracking code of the
completion of the request.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 net/bluetooth/hci_event.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index dfe6fbc..236f895 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2055,6 +2055,9 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
 
 	opcode = __le16_to_cpu(ev->opcode);
 
+	if (ev->status != 0)
+		hci_req_complete(hdev, opcode, ev->status);
+
 	switch (opcode) {
 	case HCI_OP_INQUIRY:
 		hci_cs_inquiry(hdev, ev->status);
-- 
1.7.7.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH 1/2] Bluetooth: Fix request completion for command status events
@ 2011-11-21 18:01 johan.hedberg
  2011-11-21 18:01 ` [PATCH 2/2] Bluetooth: Ignore HCI_Read_Local_Commands failures johan.hedberg
  0 siblings, 1 reply; 10+ messages in thread
From: johan.hedberg @ 2011-11-21 18:01 UTC (permalink / raw)
  To: linux-bluetooth

From: Johan Hedberg <johan.hedberg@intel.com>

If a HCI command triggered by hci_request() fails at the command status
phase we need to properly inform the request tracking code of the
completion of the request.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 net/bluetooth/hci_event.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index dfe6fbc..af24b3d 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2115,6 +2115,8 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
 
 	default:
 		BT_DBG("%s opcode 0x%x", hdev->name, opcode);
+		if (ev->status)
+			hci_req_complete(hdev, opcode, ev->status);
 		break;
 	}
 
-- 
1.7.7.3


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

end of thread, other threads:[~2011-12-02 15:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 15:18 [PATCH 1/2] Bluetooth: Fix request completion for command status events johan.hedberg
2011-11-21 15:19 ` [PATCH 2/2] Bluetooth: Ignore HCI_Read_Local_Commands failures johan.hedberg
2011-11-21 16:44   ` Marcel Holtmann
2011-11-21 18:04     ` Johan Hedberg
2011-11-21 16:43 ` [PATCH 1/2] Bluetooth: Fix request completion for command status events Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2011-11-21 18:01 johan.hedberg
2011-11-21 18:01 ` [PATCH 2/2] Bluetooth: Ignore HCI_Read_Local_Commands failures johan.hedberg
2011-12-01 12:40   ` Gustavo Padovan
2011-12-01 13:09     ` Marcel Holtmann
2011-12-02  0:02       ` Gustavo Padovan
2011-12-02 15:26         ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).