Bluetooth: Fix Set Extended (Scan Response) Data
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 9 Jun 2021 18:09:27 +0000 (11:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:30 +0000 (16:56 +0200)
commit4f5fc3be2cca7ae2c7697cfd97f17a1dd70de993
tree84367fc2cca485f4b7aac790d464b60eee36cc7c
parentc5fedfcc2046ab8b67befdf78ebd34ad561088b3
Bluetooth: Fix Set Extended (Scan Response) Data

[ Upstream commit c9ed0a7077306f9d41d74fb006ab5dbada8349c5 ]

These command do have variable length and the length can go up to 251,
so this changes the struct to not use a fixed size and then when
creating the PDU only the actual length of the data send to the
controller.

Fixes: a0fb3726ba551 ("Bluetooth: Use Set ext adv/scan rsp data if controller supports")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/bluetooth/hci.h
include/net/bluetooth/hci_core.h
net/bluetooth/hci_request.c