Bluetooth: Move connectable changes to hdev->req_workqueue

This way the connectable changes are synchronized against each other,
which helps avoid potential races. The connectable mode is also linked
together with LE advertising which makes is more convenient to have it
behind the same workqueue.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Johan Hedberg
2015-11-22 16:43:43 +03:00
committed by Marcel Holtmann
parent f22525700b
commit 53c0ba7451
3 changed files with 53 additions and 74 deletions

View File

@@ -330,6 +330,7 @@ struct hci_dev {
struct work_struct discov_update;
struct work_struct bg_scan_update;
struct work_struct scan_update;
struct work_struct connectable_update;
struct delayed_work le_scan_disable;
struct delayed_work le_scan_restart;
@@ -1491,6 +1492,7 @@ void mgmt_new_conn_param(struct hci_dev *hdev, bdaddr_t *bdaddr,
u16 max_interval, u16 latency, u16 timeout);
void mgmt_smp_complete(struct hci_conn *conn, bool complete);
bool mgmt_get_connectable(struct hci_dev *hdev);
void mgmt_set_connectable_complete(struct hci_dev *hdev, u8 status);
u8 mgmt_get_adv_discov_flags(struct hci_dev *hdev);
void mgmt_advertising_added(struct sock *sk, struct hci_dev *hdev,
u8 instance);