Lines Matching full:qos
1411 static int qos_set_big(struct hci_dev *hdev, struct bt_iso_qos *qos) in qos_set_big() argument
1417 if (qos->bcast.big == BT_ISO_QOS_BIG_UNSET) { in qos_set_big()
1429 qos->bcast.big = big; in qos_set_big()
1435 static int qos_set_bis(struct hci_dev *hdev, struct bt_iso_qos *qos) in qos_set_bis() argument
1441 if (qos->bcast.bis == BT_ISO_QOS_BIS_UNSET) { in qos_set_bis()
1457 qos->bcast.bis = bis; in qos_set_bis()
1465 struct bt_iso_qos *qos, __u8 base_len, in hci_add_bis() argument
1478 err = qos_set_big(hdev, qos); in hci_add_bis()
1482 err = qos_set_bis(hdev, qos); in hci_add_bis()
1487 conn = hci_conn_hash_lookup_per_adv_bis(hdev, dst, qos->bcast.big, in hci_add_bis()
1488 qos->bcast.big); in hci_add_bis()
1495 conn = hci_conn_hash_lookup_big(hdev, qos->bcast.big); in hci_add_bis()
1497 if (conn && (memcmp(qos, &conn->iso_qos, sizeof(*qos)) || in hci_add_bis()
1695 static int hci_le_create_big(struct hci_conn *conn, struct bt_iso_qos *qos) in hci_le_create_big() argument
1703 data.big = qos->bcast.big; in hci_le_create_big()
1704 data.bis = qos->bcast.bis; in hci_le_create_big()
1711 cp.handle = qos->bcast.big; in hci_le_create_big()
1712 cp.adv_handle = qos->bcast.bis; in hci_le_create_big()
1714 hci_cpu_to_le24(qos->bcast.out.interval, cp.bis.sdu_interval); in hci_le_create_big()
1715 cp.bis.sdu = cpu_to_le16(qos->bcast.out.sdu); in hci_le_create_big()
1716 cp.bis.latency = cpu_to_le16(qos->bcast.out.latency); in hci_le_create_big()
1717 cp.bis.rtn = qos->bcast.out.rtn; in hci_le_create_big()
1718 cp.bis.phy = qos->bcast.out.phy; in hci_le_create_big()
1719 cp.bis.packing = qos->bcast.packing; in hci_le_create_big()
1720 cp.bis.framing = qos->bcast.framing; in hci_le_create_big()
1721 cp.bis.encryption = qos->bcast.encryption; in hci_le_create_big()
1722 memcpy(cp.bis.bcode, qos->bcast.bcode, sizeof(cp.bis.bcode)); in hci_le_create_big()
1731 struct bt_iso_qos *qos; in set_cig_params_sync() local
1741 qos = &conn->iso_qos; in set_cig_params_sync()
1743 hci_cpu_to_le24(qos->ucast.out.interval, pdu.cp.c_interval); in set_cig_params_sync()
1744 hci_cpu_to_le24(qos->ucast.in.interval, pdu.cp.p_interval); in set_cig_params_sync()
1745 pdu.cp.sca = qos->ucast.sca; in set_cig_params_sync()
1746 pdu.cp.packing = qos->ucast.packing; in set_cig_params_sync()
1747 pdu.cp.framing = qos->ucast.framing; in set_cig_params_sync()
1748 pdu.cp.c_latency = cpu_to_le16(qos->ucast.out.latency); in set_cig_params_sync()
1749 pdu.cp.p_latency = cpu_to_le16(qos->ucast.in.latency); in set_cig_params_sync()
1763 qos = &conn->iso_qos; in set_cig_params_sync()
1769 cis->c_phy = qos->ucast.out.phy ? qos->ucast.out.phy : in set_cig_params_sync()
1770 qos->ucast.in.phy; in set_cig_params_sync()
1771 cis->p_phy = qos->ucast.in.phy ? qos->ucast.in.phy : in set_cig_params_sync()
1772 qos->ucast.out.phy; in set_cig_params_sync()
1773 cis->c_rtn = qos->ucast.out.rtn; in set_cig_params_sync()
1774 cis->p_rtn = qos->ucast.in.rtn; in set_cig_params_sync()
1786 static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos) in hci_le_set_cig_params() argument
1794 if (qos->ucast.cig == BT_ISO_QOS_CIG_UNSET) { in hci_le_set_cig_params()
1813 qos->ucast.cig = data.cig; in hci_le_set_cig_params()
1816 if (qos->ucast.cis != BT_ISO_QOS_CIS_UNSET) { in hci_le_set_cig_params()
1817 if (hci_conn_hash_lookup_cis(hdev, NULL, 0, qos->ucast.cig, in hci_le_set_cig_params()
1818 qos->ucast.cis)) in hci_le_set_cig_params()
1824 for (data.cig = qos->ucast.cig, data.cis = 0x00; data.cis < 0xf0; in hci_le_set_cig_params()
1829 qos->ucast.cis = data.cis; in hci_le_set_cig_params()
1834 if (qos->ucast.cis == BT_ISO_QOS_CIS_UNSET) in hci_le_set_cig_params()
1839 UINT_PTR(qos->ucast.cig), NULL) < 0) in hci_le_set_cig_params()
1846 __u8 dst_type, struct bt_iso_qos *qos) in hci_bind_cis() argument
1850 cis = hci_conn_hash_lookup_cis(hdev, dst, dst_type, qos->ucast.cig, in hci_bind_cis()
1851 qos->ucast.cis); in hci_bind_cis()
1867 !memcmp(&cis->iso_qos, qos, sizeof(*qos))) in hci_bind_cis()
1870 /* Update LINK PHYs according to QoS preference */ in hci_bind_cis()
1871 cis->le_tx_phy = qos->ucast.out.phy; in hci_bind_cis()
1872 cis->le_rx_phy = qos->ucast.in.phy; in hci_bind_cis()
1877 if (!qos->ucast.out.interval) in hci_bind_cis()
1878 qos->ucast.out.interval = qos->ucast.in.interval; in hci_bind_cis()
1883 if (!qos->ucast.in.interval) in hci_bind_cis()
1884 qos->ucast.in.interval = qos->ucast.out.interval; in hci_bind_cis()
1889 if (!qos->ucast.out.latency) in hci_bind_cis()
1890 qos->ucast.out.latency = qos->ucast.in.latency; in hci_bind_cis()
1895 if (!qos->ucast.in.latency) in hci_bind_cis()
1896 qos->ucast.in.latency = qos->ucast.out.latency; in hci_bind_cis()
1898 if (!hci_le_set_cig_params(cis, qos)) { in hci_bind_cis()
1905 cis->iso_qos = *qos; in hci_bind_cis()
1987 struct bt_iso_io_qos *qos, __u8 phy) in hci_iso_qos_setup() argument
1990 if (!qos->sdu && qos->phy) in hci_iso_qos_setup()
1991 qos->sdu = conn->mtu; in hci_iso_qos_setup()
1994 if (qos->phy == BT_ISO_PHY_ANY) in hci_iso_qos_setup()
1995 qos->phy = phy; in hci_iso_qos_setup()
1998 if (!qos->interval) in hci_iso_qos_setup()
2000 qos->interval = conn->le_conn_interval * 1250; in hci_iso_qos_setup()
2003 if (!qos->latency) in hci_iso_qos_setup()
2004 qos->latency = conn->le_conn_latency; in hci_iso_qos_setup()
2010 struct bt_iso_qos *qos = &conn->iso_qos; in create_big_sync() local
2015 if (qos->bcast.out.phy == 0x02) in create_big_sync()
2019 interval = (qos->bcast.out.interval / 1250) * qos->bcast.sync_factor; in create_big_sync()
2021 if (qos->bcast.bis) in create_big_sync()
2024 err = hci_start_per_adv_sync(hdev, qos->bcast.bis, conn->le_per_adv_data_len, in create_big_sync()
2061 __u8 sid, struct bt_iso_qos *qos) in hci_pa_create_sync() argument
2074 cp->options = qos->bcast.options; in hci_pa_create_sync()
2078 cp->skip = cpu_to_le16(qos->bcast.skip); in hci_pa_create_sync()
2079 cp->sync_timeout = cpu_to_le16(qos->bcast.sync_timeout); in hci_pa_create_sync()
2080 cp->sync_cte_type = qos->bcast.sync_cte_type; in hci_pa_create_sync()
2087 struct bt_iso_qos *qos, in hci_le_big_create_sync() argument
2099 err = qos_set_big(hdev, qos); in hci_le_big_create_sync()
2104 hcon->iso_qos.bcast.big = qos->bcast.big; in hci_le_big_create_sync()
2107 pdu.cp.handle = qos->bcast.big; in hci_le_big_create_sync()
2109 pdu.cp.encryption = qos->bcast.encryption; in hci_le_big_create_sync()
2110 memcpy(pdu.cp.bcode, qos->bcast.bcode, sizeof(pdu.cp.bcode)); in hci_le_big_create_sync()
2111 pdu.cp.mse = qos->bcast.mse; in hci_le_big_create_sync()
2112 pdu.cp.timeout = cpu_to_le16(qos->bcast.timeout); in hci_le_big_create_sync()
2134 struct bt_iso_qos *qos, in hci_bind_bis() argument
2143 conn = hci_conn_hash_lookup_big_state(hdev, qos->bcast.big, BT_OPEN); in hci_bind_bis()
2145 memcpy(qos, &conn->iso_qos, sizeof(*qos)); in hci_bind_bis()
2155 conn = hci_add_bis(hdev, dst, qos, base_len, eir); in hci_bind_bis()
2159 /* Update LINK PHYs according to QoS preference */ in hci_bind_bis()
2160 conn->le_tx_phy = qos->bcast.out.phy; in hci_bind_bis()
2161 conn->le_tx_phy = qos->bcast.out.phy; in hci_bind_bis()
2169 hci_iso_qos_setup(hdev, conn, &qos->bcast.out, in hci_bind_bis()
2173 conn->iso_qos = *qos; in hci_bind_bis()
2206 __u8 dst_type, struct bt_iso_qos *qos, in hci_connect_bis() argument
2213 conn = hci_bind_bis(hdev, dst, qos, base_len, base); in hci_connect_bis()
2220 data.big = qos->bcast.big; in hci_connect_bis()
2221 data.bis = qos->bcast.bis; in hci_connect_bis()
2242 __u8 dst_type, struct bt_iso_qos *qos) in hci_connect_cis() argument
2261 hci_iso_qos_setup(hdev, le, &qos->ucast.out, in hci_connect_cis()
2263 hci_iso_qos_setup(hdev, le, &qos->ucast.in, in hci_connect_cis()
2266 cis = hci_bind_cis(hdev, dst, dst_type, qos); in hci_connect_cis()