* [PATCH BlueZ] emulator: Fix unsupported command for WRITE_LE_HOST_SUPPORTED
@ 2018-07-26 11:23 Jaganath Kanakkassery
2018-07-26 12:19 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Jaganath Kanakkassery @ 2018-07-26 11:23 UTC (permalink / raw)
To: linux-bluetooth; +Cc: marcel, johan.hedberg, Jaganath Kanakkassery
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;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] emulator: Fix unsupported command for WRITE_LE_HOST_SUPPORTED
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
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2018-07-26 12:19 UTC (permalink / raw)
To: Jaganath Kanakkassery; +Cc: linux-bluetooth, marcel, Jaganath Kanakkassery
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-26 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.