]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Add per-instance adv disable/remove
authorDaniel Winkler <danielwinkler@google.com>
Tue, 14 Jul 2020 21:16:00 +0000 (14:16 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 15 Jul 2020 13:16:09 +0000 (15:16 +0200)
commit3fd2c74ac342d47563af35bd617b2ba699a72b63
tree749896925a8dc1282f8912e5e93ceca17db48b00
parenta6332119bcaa3d370536e483193097cbfe9306d8
Bluetooth: Add per-instance adv disable/remove

Add functionality to disable and remove advertising instances,
and use that functionality in MGMT add/remove advertising calls.

Currently, advertising is globally-disabled, i.e. all instances are
disabled together, even if hardware offloading is available. This
patch adds functionality to disable and remove individual adv
instances, solving two issues:

1. On new advertisement registration, a global disable was done, and
then only the new instance was enabled. This meant only the newest
instance was actually enabled.

2. On advertisement removal, the structure was removed, but the instance
was never disabled or removed, which is incorrect with hardware offload
support.

Signed-off-by: Daniel Winkler <danielwinkler@google.com>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_conn.c
net/bluetooth/hci_request.c
net/bluetooth/hci_request.h
net/bluetooth/mgmt.c