|
@@ -373,13 +373,13 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr,
|
|
addr->sa_family = AF_BLUETOOTH;
|
|
addr->sa_family = AF_BLUETOOTH;
|
|
*len = sizeof(struct sockaddr_l2);
|
|
*len = sizeof(struct sockaddr_l2);
|
|
|
|
|
|
|
|
+ la->l2_psm = chan->psm;
|
|
|
|
+
|
|
if (peer) {
|
|
if (peer) {
|
|
- la->l2_psm = chan->psm;
|
|
|
|
bacpy(&la->l2_bdaddr, &chan->dst);
|
|
bacpy(&la->l2_bdaddr, &chan->dst);
|
|
la->l2_cid = cpu_to_le16(chan->dcid);
|
|
la->l2_cid = cpu_to_le16(chan->dcid);
|
|
la->l2_bdaddr_type = chan->dst_type;
|
|
la->l2_bdaddr_type = chan->dst_type;
|
|
} else {
|
|
} else {
|
|
- la->l2_psm = chan->sport;
|
|
|
|
bacpy(&la->l2_bdaddr, &chan->src);
|
|
bacpy(&la->l2_bdaddr, &chan->src);
|
|
la->l2_cid = cpu_to_le16(chan->scid);
|
|
la->l2_cid = cpu_to_le16(chan->scid);
|
|
la->l2_bdaddr_type = chan->src_type;
|
|
la->l2_bdaddr_type = chan->src_type;
|