Re: [PATCH BlueZ] emulator: Fix unsupported command for WRITE_LE_HOST_SUPPORTED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux