linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Jaganath Kanakkassery <jaganath.k.os@gmail.com>
Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org,
	Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Subject: Re: [PATCH BlueZ] emulator: Fix unsupported command for WRITE_LE_HOST_SUPPORTED
Date: Thu, 26 Jul 2018 15:19:34 +0300	[thread overview]
Message-ID: <20180726121934.GA5196@x1c.home> (raw)
In-Reply-To: <1532604209-32633-1-git-send-email-jaganathx.kanakkassery@intel.com>

Hi Jaganath,

On Thu, Jul 26, 2018, Jaganath Kanakkassery wrote:
> WRITE_LE_HOST_SUPPORTED command needs check for BTDEV_TYPE_LE as well.
> ---
>  emulator/btdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/emulator/btdev.c b/emulator/btdev.c
> index f8289d0..ae30950 100644
> --- a/emulator/btdev.c
> +++ b/emulator/btdev.c
> @@ -2960,6 +2960,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
>  
>  	case BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED:
>  		if (btdev->type != BTDEV_TYPE_BREDRLE &&
> +				btdev->type != BTDEV_TYPE_LE &&
>  				btdev->type != BTDEV_TYPE_BREDRLE50)
>  			goto unsupported;
>  		wlhs = data;

Applied. Thanks.

FWIW, the alternative solution would have been to remove the command
from the supported commands bitmap, since it's an optional command for
single-mode controllers. Additionally, the call to
bthost_write_le_host_supported() from mgmt-tester.c should have been
removed when the tests sets enable_le=true for data->type ==
HCIEMU_TYPE_LE, since this is where it's comming from (it's not the
kernel that's sending it).

Johan

      reply	other threads:[~2018-07-26 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 11:23 [PATCH BlueZ] emulator: Fix unsupported command for WRITE_LE_HOST_SUPPORTED Jaganath Kanakkassery
2018-07-26 12:19 ` Johan Hedberg [this message]

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=20180726121934.GA5196@x1c.home \
    --to=johan.hedberg@gmail.com \
    --cc=jaganath.k.os@gmail.com \
    --cc=jaganathx.kanakkassery@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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).