Lines Matching refs:qos

1460 static int qos_set_big(struct hci_dev *hdev, struct bt_iso_qos *qos)
1466 if (qos->bcast.big == BT_ISO_QOS_BIG_UNSET) {
1478 qos->bcast.big = big;
1484 static int qos_set_bis(struct hci_dev *hdev, struct bt_iso_qos *qos)
1490 if (qos->bcast.bis == BT_ISO_QOS_BIS_UNSET) {
1506 qos->bcast.bis = bis;
1514 struct bt_iso_qos *qos, __u8 base_len,
1527 err = qos_set_big(hdev, qos);
1531 err = qos_set_bis(hdev, qos);
1536 conn = hci_conn_hash_lookup_per_adv_bis(hdev, dst, qos->bcast.big,
1537 qos->bcast.big);
1544 conn = hci_conn_hash_lookup_big(hdev, qos->bcast.big);
1546 if (conn && (memcmp(qos, &conn->iso_qos, sizeof(*qos)) ||
1737 static int hci_le_create_big(struct hci_conn *conn, struct bt_iso_qos *qos)
1745 data.big = qos->bcast.big;
1746 data.bis = qos->bcast.bis;
1753 cp.handle = qos->bcast.big;
1754 cp.adv_handle = qos->bcast.bis;
1756 hci_cpu_to_le24(qos->bcast.out.interval, cp.bis.sdu_interval);
1757 cp.bis.sdu = cpu_to_le16(qos->bcast.out.sdu);
1758 cp.bis.latency = cpu_to_le16(qos->bcast.out.latency);
1759 cp.bis.rtn = qos->bcast.out.rtn;
1760 cp.bis.phy = qos->bcast.out.phy;
1761 cp.bis.packing = qos->bcast.packing;
1762 cp.bis.framing = qos->bcast.framing;
1763 cp.bis.encryption = qos->bcast.encryption;
1764 memcpy(cp.bis.bcode, qos->bcast.bcode, sizeof(cp.bis.bcode));
1773 struct bt_iso_qos *qos;
1783 qos = &conn->iso_qos;
1785 hci_cpu_to_le24(qos->ucast.out.interval, pdu.cp.c_interval);
1786 hci_cpu_to_le24(qos->ucast.in.interval, pdu.cp.p_interval);
1787 pdu.cp.sca = qos->ucast.sca;
1788 pdu.cp.packing = qos->ucast.packing;
1789 pdu.cp.framing = qos->ucast.framing;
1790 pdu.cp.c_latency = cpu_to_le16(qos->ucast.out.latency);
1791 pdu.cp.p_latency = cpu_to_le16(qos->ucast.in.latency);
1805 qos = &conn->iso_qos;
1811 cis->c_phy = qos->ucast.out.phy ? qos->ucast.out.phy :
1812 qos->ucast.in.phy;
1813 cis->p_phy = qos->ucast.in.phy ? qos->ucast.in.phy :
1814 qos->ucast.out.phy;
1815 cis->c_rtn = qos->ucast.out.rtn;
1816 cis->p_rtn = qos->ucast.in.rtn;
1828 static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos)
1836 if (qos->ucast.cig == BT_ISO_QOS_CIG_UNSET) {
1855 qos->ucast.cig = data.cig;
1858 if (qos->ucast.cis != BT_ISO_QOS_CIS_UNSET) {
1859 if (hci_conn_hash_lookup_cis(hdev, NULL, 0, qos->ucast.cig,
1860 qos->ucast.cis))
1866 for (data.cig = qos->ucast.cig, data.cis = 0x00; data.cis < 0xf0;
1871 qos->ucast.cis = data.cis;
1876 if (qos->ucast.cis == BT_ISO_QOS_CIS_UNSET)
1881 UINT_PTR(qos->ucast.cig), NULL) < 0)
1888 __u8 dst_type, struct bt_iso_qos *qos)
1892 cis = hci_conn_hash_lookup_cis(hdev, dst, dst_type, qos->ucast.cig,
1893 qos->ucast.cis);
1909 !memcmp(&cis->iso_qos, qos, sizeof(*qos)))
1913 cis->le_tx_phy = qos->ucast.out.phy;
1914 cis->le_rx_phy = qos->ucast.in.phy;
1919 if (!qos->ucast.out.interval)
1920 qos->ucast.out.interval = qos->ucast.in.interval;
1925 if (!qos->ucast.in.interval)
1926 qos->ucast.in.interval = qos->ucast.out.interval;
1931 if (!qos->ucast.out.latency)
1932 qos->ucast.out.latency = qos->ucast.in.latency;
1937 if (!qos->ucast.in.latency)
1938 qos->ucast.in.latency = qos->ucast.out.latency;
1940 if (!hci_le_set_cig_params(cis, qos)) {
1947 cis->iso_qos = *qos;
2029 struct bt_iso_io_qos *qos, __u8 phy)
2032 if (!qos->sdu && qos->phy) {
2034 qos->sdu = hdev->iso_mtu;
2036 qos->sdu = hdev->le_mtu;
2038 qos->sdu = hdev->acl_mtu;
2042 if (qos->phy == BT_ISO_PHY_ANY)
2043 qos->phy = phy;
2046 if (!qos->interval)
2048 qos->interval = conn->le_conn_interval * 1250;
2051 if (!qos->latency)
2052 qos->latency = conn->le_conn_latency;
2058 struct bt_iso_qos *qos = &conn->iso_qos;
2063 if (qos->bcast.out.phy == 0x02)
2067 interval = (qos->bcast.out.interval / 1250) * qos->bcast.sync_factor;
2069 if (qos->bcast.bis)
2072 err = hci_start_per_adv_sync(hdev, qos->bcast.bis, conn->le_per_adv_data_len,
2109 __u8 sid, struct bt_iso_qos *qos)
2122 cp->options = qos->bcast.options;
2126 cp->skip = cpu_to_le16(qos->bcast.skip);
2127 cp->sync_timeout = cpu_to_le16(qos->bcast.sync_timeout);
2128 cp->sync_cte_type = qos->bcast.sync_cte_type;
2135 struct bt_iso_qos *qos,
2147 err = qos_set_big(hdev, qos);
2152 hcon->iso_qos.bcast.big = qos->bcast.big;
2155 pdu.cp.handle = qos->bcast.big;
2157 pdu.cp.encryption = qos->bcast.encryption;
2158 memcpy(pdu.cp.bcode, qos->bcast.bcode, sizeof(pdu.cp.bcode));
2159 pdu.cp.mse = qos->bcast.mse;
2160 pdu.cp.timeout = cpu_to_le16(qos->bcast.timeout);
2182 struct bt_iso_qos *qos,
2193 conn = hci_add_bis(hdev, dst, qos, base_len, eir);
2198 conn->le_tx_phy = qos->bcast.out.phy;
2199 conn->le_tx_phy = qos->bcast.out.phy;
2207 hci_iso_qos_setup(hdev, conn, &qos->bcast.out,
2211 conn->iso_qos = *qos;
2234 __u8 dst_type, struct bt_iso_qos *qos,
2241 conn = hci_bind_bis(hdev, dst, qos, base_len, base);
2245 data.big = qos->bcast.big;
2246 data.bis = qos->bcast.bis;
2267 __u8 dst_type, struct bt_iso_qos *qos)
2286 hci_iso_qos_setup(hdev, le, &qos->ucast.out,
2288 hci_iso_qos_setup(hdev, le, &qos->ucast.in,
2291 cis = hci_bind_cis(hdev, dst, dst_type, qos);