diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-05-13 23:07:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-30 10:44:41 +0300 |
commit | 0baa80343e78b9b69bb14d23d1dfe032dc95ad93 (patch) | |
tree | 1acad06d7b1e3c65c747801f66c8f5057424c774 /include | |
parent | ec339f0c3472445003b47f28da951e119446146c (diff) | |
download | linux-0baa80343e78b9b69bb14d23d1dfe032dc95ad93.tar.xz |
Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1
[ Upstream commit e77f43d531af41e9ce299eab10dcae8fa5dbc293 ]
If hdev->le_num_of_adv_sets is set to 1 it means that only handle 0x00
can be used, but since the MGMT interface instances start from 1
(instance 0 means all instances in case of MGMT_OP_REMOVE_ADVERTISING)
the code needs to map the instance to handle otherwise users will not be
able to advertise as instance 1 would attempt to use handle 0x01.
Fixes: 1d0fac2c38ed ("Bluetooth: Use controller sets when available")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 762b049bdabf..5277c6d5134c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -246,6 +246,7 @@ struct adv_info { bool periodic; __u8 mesh; __u8 instance; + __u8 handle; __u32 flags; __u16 timeout; __u16 remaining_time; |