aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2011-05-31 13:20:54 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-06-08 15:58:18 -0400
commit29b7988a23daf79c15d587ef9e98e64715aa1ea8 (patch)
treee50821c4663e4f6bfa35456cc5d2caa98358758c /net/bluetooth/hci_event.c
parentd7556e20ade582a223ca1792e1f8a7bfd7d5d008 (diff)
Bluetooth: Add 'dst_type' field to struct hci_conn
This patch adds a new field (dst_type) to the struct hci_conn which holds the type of the destination address (bdaddr_t dst). This approach is needed in order to use the struct hci_conn as an abstraction of LE connections in HCI Layer. For non-LE this field is ignored. This patch also set properly the 'dst_type' field after initializing LE hci_conn structures. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 6fc766e107aa..afee4ac1008b 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1234,10 +1234,12 @@ static void hci_cs_le_create_conn(struct hci_dev *hdev, __u8 status)
1234 } else { 1234 } else {
1235 if (!conn) { 1235 if (!conn) {
1236 conn = hci_conn_add(hdev, LE_LINK, &cp->peer_addr); 1236 conn = hci_conn_add(hdev, LE_LINK, &cp->peer_addr);
1237 if (conn) 1237 if (conn) {
1238 conn->dst_type = cp->peer_addr_type;
1238 conn->out = 1; 1239 conn->out = 1;
1239 else 1240 } else {
1240 BT_ERR("No memory for new connection"); 1241 BT_ERR("No memory for new connection");
1242 }
1241 } 1243 }
1242 } 1244 }
1243 1245
@@ -2694,6 +2696,8 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff
2694 hci_dev_unlock(hdev); 2696 hci_dev_unlock(hdev);
2695 return; 2697 return;
2696 } 2698 }
2699
2700 conn->dst_type = ev->bdaddr_type;
2697 } 2701 }
2698 2702
2699 if (ev->status) { 2703 if (ev->status) {