diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-08 14:21:51 (GMT) |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-08 14:27:44 (GMT) |
commit | fbd96c151cdcadb0ce83b45747d738498d72aa9d (patch) | |
tree | 6ea5bb8ca6cd0c5770c1d680c697033b5f591764 | |
parent | 562064e654d42599ad986812adaded653f3b81df (diff) | |
download | linux-fbd96c151cdcadb0ce83b45747d738498d72aa9d.tar.xz |
Bluetooth: Fix clearing HCI_LE_ADV for LE connections
All LE controllers always implicitly stop advertising when establishing
connections. Therefore, be sure to clear the flag in the event handler
for new LE connections.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/hci_event.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 2b3d366..f699790 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -4097,6 +4097,11 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) hci_dev_lock(hdev); + /* All controllers implicitly stop advertising in the event of a + * connection, so ensure that the state bit is cleared. + */ + clear_bit(HCI_LE_ADV, &hdev->dev_flags); + conn = hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT); if (!conn) { conn = hci_conn_add(hdev, LE_LINK, &ev->bdaddr); |