Skip to content

Commit

Permalink
Bluetooth: hci_conn: use HCI dst_type values also for BIS
Browse files Browse the repository at this point in the history
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 <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
  • Loading branch information
Pauli Virtanen authored and Luiz Augusto von Dentz committed Dec 12, 2022
1 parent a479e71 commit d11ab69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 0 additions & 6 deletions net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2052,12 +2052,6 @@ int hci_pa_create_sync(struct hci_dev *hdev, bdaddr_t *dst, __u8 dst_type,
return -ENOMEM;
}

/* Convert from ISO socket address type to HCI address type */
if (dst_type == BDADDR_LE_PUBLIC)
dst_type = ADDR_LE_DEV_PUBLIC;
else
dst_type = ADDR_LE_DEV_RANDOM;

memset(cp, 0, sizeof(*cp));
cp->sid = sid;
cp->addr_type = dst_type;
Expand Down
6 changes: 4 additions & 2 deletions net/bluetooth/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ static int iso_connect_bis(struct sock *sk)
goto done;
}

hcon = hci_connect_bis(hdev, &iso_pi(sk)->dst, iso_pi(sk)->dst_type,
hcon = hci_connect_bis(hdev, &iso_pi(sk)->dst,
le_addr_type(iso_pi(sk)->dst_type),
&iso_pi(sk)->qos, iso_pi(sk)->base_len,
iso_pi(sk)->base);
if (IS_ERR(hcon)) {
Expand Down Expand Up @@ -875,7 +876,8 @@ static int iso_listen_bis(struct sock *sk)

hci_dev_lock(hdev);

err = hci_pa_create_sync(hdev, &iso_pi(sk)->dst, iso_pi(sk)->dst_type,
err = hci_pa_create_sync(hdev, &iso_pi(sk)->dst,
le_addr_type(iso_pi(sk)->dst_type),
iso_pi(sk)->bc_sid);

hci_dev_unlock(hdev);
Expand Down

0 comments on commit d11ab69

Please sign in to comment.