From: Marcel Holtmann <marcel@holtmann.org>
To: johan.hedberg@gmail.com
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] Bluetooth: Fix request completion for command status events
Date: Mon, 21 Nov 2011 17:43:13 +0100 [thread overview]
Message-ID: <1321893793.2011.13.camel@aeonflux> (raw)
In-Reply-To: <1321888740-15598-1-git-send-email-johan.hedberg@gmail.com>
Hi Johan,
> 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);
> +
we actually would write it "if (!ev->status)" in the kernel code.
Regards
Marcel
next prev parent reply other threads:[~2011-11-21 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Marcel Holtmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-11-21 18:01 [PATCH 1/2] Bluetooth: Fix request completion for command status events johan.hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1321893793.2011.13.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).