Bluetooth: Fix enabling advertising for central role
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 20 Aug 2021 23:40:38 +0000 (16:40 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 30 Aug 2021 14:49:26 +0000 (16:49 +0200)
commit1eeaa1ae79d84df025eaca363fdce3f397313647
tree9da58a2fd0c0ecfa62d6d38b01575217cfcbff99
parent99c23da0eed4fd20cae8243f2b51e10e66aa0951
Bluetooth: Fix enabling advertising for central role

When disconnecting the advertising shall be re-enabled only when the
connection role is slave/peripheral as the central role use advertising
to connect it could end up enabling the instance 0x00 if there are other
advertising instances.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c