mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 13:53:24 +00:00
Bluetooth: ISO: Allow binding a bcast listener to 0 bises
This makes it possible to bind a broadcast listener to a broadcaster address without asking for any BIS indexes to sync with. Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
02be109d3a
commit
31ca583b38
@ -2147,7 +2147,7 @@ int hci_le_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon,
|
||||
} pdu;
|
||||
int err;
|
||||
|
||||
if (num_bis > sizeof(pdu.bis))
|
||||
if (num_bis < 0x01 || num_bis > sizeof(pdu.bis))
|
||||
return -EINVAL;
|
||||
|
||||
err = qos_set_big(hdev, qos);
|
||||
|
@ -790,8 +790,7 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr,
|
||||
BT_DBG("sk %p bc_sid %u bc_num_bis %u", sk, sa->iso_bc->bc_sid,
|
||||
sa->iso_bc->bc_num_bis);
|
||||
|
||||
if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc) ||
|
||||
sa->iso_bc->bc_num_bis < 0x01 || sa->iso_bc->bc_num_bis > 0x1f)
|
||||
if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc))
|
||||
return -EINVAL;
|
||||
|
||||
bacpy(&iso_pi(sk)->dst, &sa->iso_bc->bc_bdaddr);
|
||||
|
Loading…
Reference in New Issue
Block a user