]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: mgmt: multi adv for clear_adv_instances()
authorFlorian Grandel <fgrandel@gmail.com>
Thu, 18 Jun 2015 01:16:46 +0000 (03:16 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 18 Jun 2015 16:11:52 +0000 (18:11 +0200)
commit339c66303cdc4122454db6308c09b6505f75649b
tree64b2c6ab733b134910271ca920a94eb23671baf7
parent81df6b8e54dc9b265ec45f7d8eb128c3a8cf2d8b
Bluetooth: mgmt: multi adv for clear_adv_instances()

The clear_adv_instance() function could not clean up multiple
advertising instances previously. It is being changed to provide both, a
means to clean up a single instance and cleaning up all instances at
once.

An additional instance parameter is being introduced to achieve this.
Passing in 0x00 to this parameter signifies that all instances should be
cleaned up. This semantics has been chosen similarly to the semantics of
the instance parameter in the remove_advertising() function.

When removing a single instance the method also ensures that another
instance will be scheduled if available. When the currently advertising
method is being removed, it will be canceled immediately.

Signed-off-by: Florian Grandel <fgrandel@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c