aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c8
-rw-r--r--net/bluetooth/hci_event.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index edfd61addcec..d6dc44cd15b0 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2784,6 +2784,14 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
2784 if (conn) { 2784 if (conn) {
2785 hci_conn_enter_active_mode(conn, BT_POWER_FORCE_ACTIVE_OFF); 2785 hci_conn_enter_active_mode(conn, BT_POWER_FORCE_ACTIVE_OFF);
2786 2786
2787 hci_dev_lock(hdev);
2788 if (test_bit(HCI_MGMT, &hdev->dev_flags) &&
2789 !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags))
2790 mgmt_device_connected(hdev, &conn->dst, conn->type,
2791 conn->dst_type, 0, NULL, 0,
2792 conn->dev_class);
2793 hci_dev_unlock(hdev);
2794
2787 /* Send to upper protocol */ 2795 /* Send to upper protocol */
2788 l2cap_recv_acldata(conn, skb, flags); 2796 l2cap_recv_acldata(conn, skb, flags);
2789 return; 2797 return;
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 53680fe84628..1266f78fa8e3 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2109,7 +2109,7 @@ static inline void hci_remote_features_evt(struct hci_dev *hdev, struct sk_buff
2109 goto unlock; 2109 goto unlock;
2110 } 2110 }
2111 2111
2112 if (!ev->status) { 2112 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) {
2113 struct hci_cp_remote_name_req cp; 2113 struct hci_cp_remote_name_req cp;
2114 memset(&cp, 0, sizeof(cp)); 2114 memset(&cp, 0, sizeof(cp));
2115 bacpy(&cp.bdaddr, &conn->dst); 2115 bacpy(&cp.bdaddr, &conn->dst);
@@ -2878,7 +2878,7 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b
2878 if (conn->state != BT_CONFIG) 2878 if (conn->state != BT_CONFIG)
2879 goto unlock; 2879 goto unlock;
2880 2880
2881 if (!ev->status) { 2881 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) {
2882 struct hci_cp_remote_name_req cp; 2882 struct hci_cp_remote_name_req cp;
2883 memset(&cp, 0, sizeof(cp)); 2883 memset(&cp, 0, sizeof(cp));
2884 bacpy(&cp.bdaddr, &conn->dst); 2884 bacpy(&cp.bdaddr, &conn->dst);