Thread (18 messages) flat view 18 messages, 3 authors, 2011-06-09

[bluetooth-next 13/13] Bluetooth: Add support for random destination address

From: Vinicius Costa Gomes <hidden>
Date: 2011-06-07 22:50:14
Subsystem: bluetooth subsystem, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

From: Anderson Lizardo <redacted>

For source address, only public address type is supported for now.

Signed-off-by: Anderson Lizardo <redacted>
---
 net/bluetooth/smp.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index b8774a7..9abcc6a 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -306,7 +306,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb)
 		return SMP_UNSPECIFIED;
 
 	ret = smp_c1(tfm, conn->tk, conn->prnd, conn->preq, conn->prsp, 0,
-			conn->src, 0, conn->dst, res);
+			conn->src, conn->hcon->dst_type, conn->dst, res);
 	if (ret)
 		return SMP_UNSPECIFIED;
 
@@ -342,7 +342,8 @@ static u8 smp_cmd_pairing_confirm(struct l2cap_conn *conn, struct sk_buff *skb)
 			return SMP_UNSPECIFIED;
 
 		ret = smp_c1(tfm, conn->tk, conn->prnd, conn->preq, conn->prsp,
-					0, conn->dst, 0, conn->src, res);
+						conn->hcon->dst_type, conn->dst,
+						0, conn->src, res);
 		if (ret)
 			return SMP_CONFIRM_FAILED;
 
@@ -369,10 +370,12 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
 
 	if (conn->hcon->out)
 		ret = smp_c1(tfm, conn->tk, random, conn->preq, conn->prsp, 0,
-				conn->src, 0, conn->dst, res);
+				conn->src, conn->hcon->dst_type, conn->dst,
+				res);
 	else
-		ret = smp_c1(tfm, conn->tk, random, conn->preq, conn->prsp, 0,
-				conn->dst, 0, conn->src, res);
+		ret = smp_c1(tfm, conn->tk, random, conn->preq, conn->prsp,
+				conn->hcon->dst_type, conn->dst, 0, conn->src,
+				res);
 	if (ret)
 		return SMP_UNSPECIFIED;
 
-- 
1.7.5.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help