Bluetooth: mgmt: multi adv for set_advertising*()
authorFlorian Grandel <fgrandel@gmail.com>
Thu, 18 Jun 2015 01:16:45 +0000 (03:16 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 18 Jun 2015 16:11:52 +0000 (18:11 +0200)
commit7816b82039b56308a0d685e97d4a9f4b52e239bd
tree0b97f6239ce2362044a81668d22a52fee9fa65cc
parentf63ba24b97ac795c516315c2b1b8a8463a6acd46
Bluetooth: mgmt: multi adv for set_advertising*()

The set_advertising() and set_advertising_complete() methods rely on
the now obsolete hci_dev->adv_instance structure. We replace this
reference by an equivalent access to the newly introduced dynamic
advertising instance list.

This patch introduces a helper function that schedules an advertising
instance correctly calculating advertising timing based on the timeout
and duration settings of the instance. Scheduling is factored into
its own function for readability and code sharing.

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