From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scczr-0000FT-3p for qemu-devel@nongnu.org; Thu, 07 Jun 2012 09:43:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Scczm-00040D-IN for qemu-devel@nongnu.org; Thu, 07 Jun 2012 09:43:30 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:35417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scczm-0003zg-98 for qemu-devel@nongnu.org; Thu, 07 Jun 2012 09:43:26 -0400 Received: by bkwj10 with SMTP id j10so599474bkw.4 for ; Thu, 07 Jun 2012 06:43:23 -0700 (PDT) From: Andrzej Zaborowski Date: Thu, 7 Jun 2012 15:43:09 +0200 Message-Id: <1339076590-18909-1-git-send-email-balrogg@gmail.com> Subject: [Qemu-devel] [PATCH] bt: HCI Reset returns a Cmd Complete event. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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