aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-11-09 06:58:58 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-11-10 14:53:41 -0500
commit48264f06943e2db2c971b752949606f070d9d292 (patch)
tree927709fad8b5fdfba976619cd27b98839ade0975 /net/bluetooth/hci_event.c
parent1eb54c8a0fa0061247f3bd327b320c3e20c97340 (diff)
Bluetooth: Add public/random LE address information to mgmt messages
It's necessary to know the distinction between public and random LE addresses so the mgmt interface also needs to distinguish between them. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index a89cf1f24e47..bbfaaa8c018f 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1437,7 +1437,7 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *
1437 data.rssi = 0x00; 1437 data.rssi = 0x00;
1438 data.ssp_mode = 0x00; 1438 data.ssp_mode = 0x00;
1439 hci_inquiry_cache_update(hdev, &data); 1439 hci_inquiry_cache_update(hdev, &data);
1440 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 1440 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
1441 info->dev_class, 0, NULL); 1441 info->dev_class, 0, NULL);
1442 } 1442 }
1443 1443
@@ -1472,7 +1472,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
1472 conn->state = BT_CONFIG; 1472 conn->state = BT_CONFIG;
1473 hci_conn_hold(conn); 1473 hci_conn_hold(conn);
1474 conn->disc_timeout = HCI_DISCONN_TIMEOUT; 1474 conn->disc_timeout = HCI_DISCONN_TIMEOUT;
1475 mgmt_connected(hdev, &ev->bdaddr, conn->type); 1475 mgmt_connected(hdev, &ev->bdaddr, conn->type,
1476 conn->dst_type);
1476 } else 1477 } else
1477 conn->state = BT_CONNECTED; 1478 conn->state = BT_CONNECTED;
1478 1479
@@ -1505,7 +1506,7 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
1505 conn->state = BT_CLOSED; 1506 conn->state = BT_CLOSED;
1506 if (conn->type == ACL_LINK) 1507 if (conn->type == ACL_LINK)
1507 mgmt_connect_failed(hdev, &ev->bdaddr, conn->type, 1508 mgmt_connect_failed(hdev, &ev->bdaddr, conn->type,
1508 ev->status); 1509 conn->dst_type, ev->status);
1509 } 1510 }
1510 1511
1511 if (conn->type == ACL_LINK) 1512 if (conn->type == ACL_LINK)
@@ -1620,7 +1621,8 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff
1620 conn->state = BT_CLOSED; 1621 conn->state = BT_CLOSED;
1621 1622
1622 if (conn->type == ACL_LINK || conn->type == LE_LINK) 1623 if (conn->type == ACL_LINK || conn->type == LE_LINK)
1623 mgmt_disconnected(hdev, &conn->dst, conn->type); 1624 mgmt_disconnected(hdev, &conn->dst, conn->type,
1625 conn->dst_type);
1624 1626
1625 hci_proto_disconn_cfm(conn, ev->reason); 1627 hci_proto_disconn_cfm(conn, ev->reason);
1626 hci_conn_del(conn); 1628 hci_conn_del(conn);
@@ -2444,7 +2446,7 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
2444 data.rssi = info->rssi; 2446 data.rssi = info->rssi;
2445 data.ssp_mode = 0x00; 2447 data.ssp_mode = 0x00;
2446 hci_inquiry_cache_update(hdev, &data); 2448 hci_inquiry_cache_update(hdev, &data);
2447 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 2449 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
2448 info->dev_class, info->rssi, 2450 info->dev_class, info->rssi,
2449 NULL); 2451 NULL);
2450 } 2452 }
@@ -2461,7 +2463,7 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
2461 data.rssi = info->rssi; 2463 data.rssi = info->rssi;
2462 data.ssp_mode = 0x00; 2464 data.ssp_mode = 0x00;
2463 hci_inquiry_cache_update(hdev, &data); 2465 hci_inquiry_cache_update(hdev, &data);
2464 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 2466 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
2465 info->dev_class, info->rssi, 2467 info->dev_class, info->rssi,
2466 NULL); 2468 NULL);
2467 } 2469 }
@@ -2604,7 +2606,7 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
2604 data.rssi = info->rssi; 2606 data.rssi = info->rssi;
2605 data.ssp_mode = 0x01; 2607 data.ssp_mode = 0x01;
2606 hci_inquiry_cache_update(hdev, &data); 2608 hci_inquiry_cache_update(hdev, &data);
2607 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 2609 mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
2608 info->dev_class, info->rssi, info->data); 2610 info->dev_class, info->rssi, info->data);
2609 } 2611 }
2610 2612
@@ -2868,14 +2870,15 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff
2868 } 2870 }
2869 2871
2870 if (ev->status) { 2872 if (ev->status) {
2871 mgmt_connect_failed(hdev, &ev->bdaddr, conn->type, ev->status); 2873 mgmt_connect_failed(hdev, &ev->bdaddr, conn->type,
2874 conn->dst_type, ev->status);
2872 hci_proto_connect_cfm(conn, ev->status); 2875 hci_proto_connect_cfm(conn, ev->status);
2873 conn->state = BT_CLOSED; 2876 conn->state = BT_CLOSED;
2874 hci_conn_del(conn); 2877 hci_conn_del(conn);
2875 goto unlock; 2878 goto unlock;
2876 } 2879 }
2877 2880
2878 mgmt_connected(hdev, &ev->bdaddr, conn->type); 2881 mgmt_connected(hdev, &ev->bdaddr, conn->type, conn->dst_type);
2879 2882
2880 conn->sec_level = BT_SECURITY_LOW; 2883 conn->sec_level = BT_SECURITY_LOW;
2881 conn->handle = __le16_to_cpu(ev->handle); 2884 conn->handle = __le16_to_cpu(ev->handle);