qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] bt: HCI Reset returns a Cmd Complete event.
@ 2012-06-07 13:43 Andrzej Zaborowski
  2012-06-07 13:43 ` [Qemu-devel] [PATCH] bt: Fix the bitmask in event masked check Andrzej Zaborowski
  0 siblings, 1 reply; 2+ messages in thread
From: Andrzej Zaborowski @ 2012-06-07 13:43 UTC (permalink / raw)
  To: qemu-devel

HCI Reset command returns a Command Complete event, not a Command Status
event.  We need to avoid resetting the stored last command code for the
response to be fully correct.

Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
---
 hw/bt-hci.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index a3a7fb4..8c717f9 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -1783,7 +1783,8 @@ static void bt_submit_hci(struct HCIInfo *info,
 
     case cmd_opcode_pack(OGF_HOST_CTL, OCF_RESET):
         bt_hci_reset(hci);
-        bt_hci_event_status(hci, HCI_SUCCESS);
+        hci->last_cmd = cpu_to_le16(cmd);
+        bt_hci_event_complete_status(hci, HCI_SUCCESS);
         break;
 
     case cmd_opcode_pack(OGF_HOST_CTL, OCF_SET_EVENT_FLT):
-- 
1.7.4.4

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

* [Qemu-devel] [PATCH] bt: Fix the bitmask in event masked check.
  2012-06-07 13:43 [Qemu-devel] [PATCH] bt: HCI Reset returns a Cmd Complete event Andrzej Zaborowski
@ 2012-06-07 13:43 ` Andrzej Zaborowski
  0 siblings, 0 replies; 2+ messages in thread
From: Andrzej Zaborowski @ 2012-06-07 13:43 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
---
 hw/bt-hci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index 8c717f9..48cbbb5 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -442,7 +442,7 @@ static inline uint8_t *bt_hci_event_start(struct bt_hci_s *hci,
     }
 
     mask_byte = (evt - 1) >> 3;
-    mask = 1 << ((evt - 1) & 3);
+    mask = 1 << ((evt - 1) & 7);
     if (mask & bt_event_reserved_mask[mask_byte] & ~hci->event_mask[mask_byte])
         return NULL;
 
-- 
1.7.4.4

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

end of thread, other threads:[~2012-06-07 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 13:43 [Qemu-devel] [PATCH] bt: HCI Reset returns a Cmd Complete event Andrzej Zaborowski
2012-06-07 13:43 ` [Qemu-devel] [PATCH] bt: Fix the bitmask in event masked check Andrzej Zaborowski

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).