Bluetooth: hci_core/mgmt: move adv timeout to hdev
authorFlorian Grandel <fgrandel@gmail.com>
Thu, 18 Jun 2015 01:16:35 +0000 (03:16 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 18 Jun 2015 16:11:51 +0000 (18:11 +0200)
commit5d900e4601391576a3c0644d7fcad1ebf41a516e
tree8eb7d818696d6fadb24512cb882b3bc5d22517ce
parentd2609b345ebf0547015a78588c4d7ad68c9ccf26
Bluetooth: hci_core/mgmt: move adv timeout to hdev

Currently the delayed work managing advertising duration and timeout is
part of the advertising instance structure. This is not correct as only
a single instance can be advertised at any given time. To implement
round robin advertising a single delayed work structure is needed.

To fix this the delayed work structure is being moved to the hci_dev
structure. The instance specific variable is renamed to "remaining_time"
to make it clear that this is the remaining lifetime of the instance and
not the current advertising timeout.

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