Skip to content

Commit d11ab69

Browse files
pvVudentz
authored andcommitted
Bluetooth: hci_conn: use HCI dst_type values also for BIS
For ISO BIS related functions in hci_conn.c, make dst_type values be HCI address type values, not ISO socket address type values. This makes it consistent with CIS functions. Signed-off-by: Pauli Virtanen <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent a479e71 commit d11ab69

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

net/bluetooth/hci_conn.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,12 +2052,6 @@ int hci_pa_create_sync(struct hci_dev *hdev, bdaddr_t *dst, __u8 dst_type,
20522052
return -ENOMEM;
20532053
}
20542054

2055-
/* Convert from ISO socket address type to HCI address type */
2056-
if (dst_type == BDADDR_LE_PUBLIC)
2057-
dst_type = ADDR_LE_DEV_PUBLIC;
2058-
else
2059-
dst_type = ADDR_LE_DEV_RANDOM;
2060-
20612055
memset(cp, 0, sizeof(*cp));
20622056
cp->sid = sid;
20632057
cp->addr_type = dst_type;

net/bluetooth/iso.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ static int iso_connect_bis(struct sock *sk)
270270
goto done;
271271
}
272272

273-
hcon = hci_connect_bis(hdev, &iso_pi(sk)->dst, iso_pi(sk)->dst_type,
273+
hcon = hci_connect_bis(hdev, &iso_pi(sk)->dst,
274+
le_addr_type(iso_pi(sk)->dst_type),
274275
&iso_pi(sk)->qos, iso_pi(sk)->base_len,
275276
iso_pi(sk)->base);
276277
if (IS_ERR(hcon)) {
@@ -875,7 +876,8 @@ static int iso_listen_bis(struct sock *sk)
875876

876877
hci_dev_lock(hdev);
877878

878-
err = hci_pa_create_sync(hdev, &iso_pi(sk)->dst, iso_pi(sk)->dst_type,
879+
err = hci_pa_create_sync(hdev, &iso_pi(sk)->dst,
880+
le_addr_type(iso_pi(sk)->dst_type),
879881
iso_pi(sk)->bc_sid);
880882

881883
hci_dev_unlock(hdev);

0 commit comments

Comments
 (0)