diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-03-15 18:07:01 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-03-18 13:02:04 -0400 |
commit | 04b4edcbc9049e100681c0149b572de439be42ab (patch) | |
tree | 9256c6de723509d3df7b1ae5bc7f24302963e399 /include/net | |
parent | 13928971396fb5ad022ec65f694cea367ca48504 (diff) |
Bluetooth: Handle AD updating through an async request
For proper control of the AD update and the related HCI commands it's
best to run the AD update through an async request instead of a
standalone HCI command. This patch changes the hci_update_ad() function
to take a request pointer and updates its users appropriately. E.g. the
function is no longer called after the init sequence but during stage 3
of the init sequence.
The TX power is read during the init sequence, so we don't need an
explicit update whenever it is read and the AD update based on the local
name should be done through the local name mgmt handler. The only other
user is the update based on enabling advertising. This part is still
kept as there is no mgmt API to enable it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index d6c32561fc02..cb99193c7493 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -740,8 +740,6 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash, | |||
740 | u8 *randomizer); | 740 | u8 *randomizer); |
741 | int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr); | 741 | int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr); |
742 | 742 | ||
743 | int hci_update_ad(struct hci_dev *hdev); | ||
744 | |||
745 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); | 743 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); |
746 | 744 | ||
747 | int hci_recv_frame(struct sk_buff *skb); | 745 | int hci_recv_frame(struct sk_buff *skb); |
@@ -1167,6 +1165,8 @@ struct hci_sec_filter { | |||
1167 | #define hci_req_lock(d) mutex_lock(&d->req_lock) | 1165 | #define hci_req_lock(d) mutex_lock(&d->req_lock) |
1168 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) | 1166 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) |
1169 | 1167 | ||
1168 | void hci_update_ad(struct hci_request *req); | ||
1169 | |||
1170 | void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, | 1170 | void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, |
1171 | u16 latency, u16 to_multiplier); | 1171 | u16 latency, u16 to_multiplier); |
1172 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], | 1172 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], |