Lines Matching full:qos
1384 static int qos_set_big(struct hci_dev *hdev, struct bt_iso_qos *qos) in qos_set_big() argument
1389 if (qos->big == BT_ISO_QOS_BIG_UNSET) { in qos_set_big()
1404 qos->big = data.big; in qos_set_big()
1410 static int qos_set_bis(struct hci_dev *hdev, struct bt_iso_qos *qos) in qos_set_bis() argument
1415 if (qos->bis == BT_ISO_QOS_BIS_UNSET) { in qos_set_bis()
1433 qos->bis = data.bis; in qos_set_bis()
1441 struct bt_iso_qos *qos) in hci_add_bis() argument
1454 err = qos_set_big(hdev, qos); in hci_add_bis()
1458 err = qos_set_bis(hdev, qos); in hci_add_bis()
1462 data.big = qos->big; in hci_add_bis()
1463 data.bis = qos->bis; in hci_add_bis()
1471 conn = hci_conn_hash_lookup_bis(hdev, dst, qos->big, qos->bis); in hci_add_bis()
1622 static void cis_add(struct iso_list_data *d, struct bt_iso_qos *qos) in cis_add() argument
1626 cis->cis_id = qos->cis; in cis_add()
1627 cis->c_sdu = cpu_to_le16(qos->out.sdu); in cis_add()
1628 cis->p_sdu = cpu_to_le16(qos->in.sdu); in cis_add()
1629 cis->c_phy = qos->out.phy ? qos->out.phy : qos->in.phy; in cis_add()
1630 cis->p_phy = qos->in.phy ? qos->in.phy : qos->out.phy; in cis_add()
1631 cis->c_rtn = qos->out.rtn; in cis_add()
1632 cis->p_rtn = qos->in.rtn; in cis_add()
1658 static int hci_le_create_big(struct hci_conn *conn, struct bt_iso_qos *qos) in hci_le_create_big() argument
1665 cp.handle = qos->big; in hci_le_create_big()
1666 cp.adv_handle = qos->bis; in hci_le_create_big()
1668 hci_cpu_to_le24(qos->out.interval, cp.bis.sdu_interval); in hci_le_create_big()
1669 cp.bis.sdu = cpu_to_le16(qos->out.sdu); in hci_le_create_big()
1670 cp.bis.latency = cpu_to_le16(qos->out.latency); in hci_le_create_big()
1671 cp.bis.rtn = qos->out.rtn; in hci_le_create_big()
1672 cp.bis.phy = qos->out.phy; in hci_le_create_big()
1673 cp.bis.packing = qos->packing; in hci_le_create_big()
1674 cp.bis.framing = qos->framing; in hci_le_create_big()
1681 static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos) in hci_le_set_cig_params() argument
1689 if (qos->cig == BT_ISO_QOS_CIG_UNSET) { in hci_le_set_cig_params()
1709 qos->cig = data.cig; in hci_le_set_cig_params()
1712 data.pdu.cp.cig_id = qos->cig; in hci_le_set_cig_params()
1713 hci_cpu_to_le24(qos->out.interval, data.pdu.cp.c_interval); in hci_le_set_cig_params()
1714 hci_cpu_to_le24(qos->in.interval, data.pdu.cp.p_interval); in hci_le_set_cig_params()
1715 data.pdu.cp.sca = qos->sca; in hci_le_set_cig_params()
1716 data.pdu.cp.packing = qos->packing; in hci_le_set_cig_params()
1717 data.pdu.cp.framing = qos->framing; in hci_le_set_cig_params()
1718 data.pdu.cp.c_latency = cpu_to_le16(qos->out.latency); in hci_le_set_cig_params()
1719 data.pdu.cp.p_latency = cpu_to_le16(qos->in.latency); in hci_le_set_cig_params()
1721 if (qos->cis != BT_ISO_QOS_CIS_UNSET) { in hci_le_set_cig_params()
1723 data.cig = qos->cig; in hci_le_set_cig_params()
1724 data.cis = qos->cis; in hci_le_set_cig_params()
1731 cis_add(&data, qos); in hci_le_set_cig_params()
1735 for (data.cig = qos->cig, data.cis = 0x00; data.cis < 0x11; in hci_le_set_cig_params()
1745 if (qos->cis == BT_ISO_QOS_CIS_UNSET) { in hci_le_set_cig_params()
1747 qos->cis = data.cis; in hci_le_set_cig_params()
1748 cis_add(&data, qos); in hci_le_set_cig_params()
1752 if (qos->cis == BT_ISO_QOS_CIS_UNSET || !data.pdu.cp.num_cis) in hci_le_set_cig_params()
1765 __u8 dst_type, struct bt_iso_qos *qos) in hci_bind_cis() argument
1783 !memcmp(&cis->iso_qos, qos, sizeof(*qos))) in hci_bind_cis()
1786 /* Update LINK PHYs according to QoS preference */ in hci_bind_cis()
1787 cis->le_tx_phy = qos->out.phy; in hci_bind_cis()
1788 cis->le_rx_phy = qos->in.phy; in hci_bind_cis()
1793 if (!qos->out.interval) in hci_bind_cis()
1794 qos->out.interval = qos->in.interval; in hci_bind_cis()
1799 if (!qos->in.interval) in hci_bind_cis()
1800 qos->in.interval = qos->out.interval; in hci_bind_cis()
1805 if (!qos->out.latency) in hci_bind_cis()
1806 qos->out.latency = qos->in.latency; in hci_bind_cis()
1811 if (!qos->in.latency) in hci_bind_cis()
1812 qos->in.latency = qos->out.latency; in hci_bind_cis()
1814 if (!hci_le_set_cig_params(cis, qos)) { in hci_bind_cis()
1819 cis->iso_qos = *qos; in hci_bind_cis()
1950 struct bt_iso_io_qos *qos, __u8 phy) in hci_iso_qos_setup() argument
1953 if (!qos->sdu && qos->phy) { in hci_iso_qos_setup()
1955 qos->sdu = hdev->iso_mtu; in hci_iso_qos_setup()
1957 qos->sdu = hdev->le_mtu; in hci_iso_qos_setup()
1959 qos->sdu = hdev->acl_mtu; in hci_iso_qos_setup()
1963 if (qos->phy == BT_ISO_PHY_ANY) in hci_iso_qos_setup()
1964 qos->phy = phy; in hci_iso_qos_setup()
1967 if (!qos->interval) in hci_iso_qos_setup()
1969 qos->interval = conn->le_conn_interval * 1250; in hci_iso_qos_setup()
1972 if (!qos->latency) in hci_iso_qos_setup()
1973 qos->latency = conn->le_conn_latency; in hci_iso_qos_setup()
1977 struct bt_iso_qos *qos) in hci_bind_bis() argument
1979 /* Update LINK PHYs according to QoS preference */ in hci_bind_bis()
1980 conn->le_tx_phy = qos->out.phy; in hci_bind_bis()
1981 conn->le_tx_phy = qos->out.phy; in hci_bind_bis()
1982 conn->iso_qos = *qos; in hci_bind_bis()
1991 struct bt_iso_qos *qos = &conn->iso_qos; in create_big_sync() local
1996 if (qos->out.phy == 0x02) in create_big_sync()
2000 interval = qos->out.interval / 1250; in create_big_sync()
2002 if (qos->bis) in create_big_sync()
2003 sync_interval = qos->sync_interval * 1600; in create_big_sync()
2005 err = hci_start_per_adv_sync(hdev, qos->bis, conn->le_per_adv_data_len, in create_big_sync()
2070 int hci_le_big_create_sync(struct hci_dev *hdev, struct bt_iso_qos *qos, in hci_le_big_create_sync() argument
2082 err = qos_set_big(hdev, qos); in hci_le_big_create_sync()
2087 pdu.cp.handle = qos->big; in hci_le_big_create_sync()
2110 __u8 dst_type, struct bt_iso_qos *qos, in hci_connect_bis() argument
2117 conn = hci_add_bis(hdev, dst, qos); in hci_connect_bis()
2121 conn = hci_bind_bis(conn, qos); in hci_connect_bis()
2142 hci_iso_qos_setup(hdev, conn, &qos->out, in hci_connect_bis()
2150 __u8 dst_type, struct bt_iso_qos *qos) in hci_connect_cis() argument
2168 hci_iso_qos_setup(hdev, le, &qos->out, in hci_connect_cis()
2170 hci_iso_qos_setup(hdev, le, &qos->in, in hci_connect_cis()
2173 cis = hci_bind_cis(hdev, dst, dst_type, qos); in hci_connect_cis()