Lines Matching defs:qos

1420 static int qos_set_big(struct hci_dev *hdev, struct bt_iso_qos *qos)
1426 if (qos->bcast.big == BT_ISO_QOS_BIG_UNSET) {
1438 qos->bcast.big = big;
1444 static int qos_set_bis(struct hci_dev *hdev, struct bt_iso_qos *qos)
1450 if (qos->bcast.bis == BT_ISO_QOS_BIS_UNSET) {
1451 if (qos->bcast.big != BT_ISO_QOS_BIG_UNSET) {
1452 conn = hci_conn_hash_lookup_big(hdev, qos->bcast.big);
1458 qos->bcast.bis = conn->iso_qos.bcast.bis;
1478 qos->bcast.bis = bis;
1486 struct bt_iso_qos *qos, __u8 base_len,
1499 err = qos_set_big(hdev, qos);
1503 err = qos_set_bis(hdev, qos);
1508 conn = hci_conn_hash_lookup_per_adv_bis(hdev, dst, qos->bcast.big,
1509 qos->bcast.big);
1516 conn = hci_conn_hash_lookup_big(hdev, qos->bcast.big);
1518 if (conn && (memcmp(qos, &conn->iso_qos, sizeof(*qos)) ||
1718 static int hci_le_create_big(struct hci_conn *conn, struct bt_iso_qos *qos)
1726 data.big = qos->bcast.big;
1727 data.bis = qos->bcast.bis;
1734 cp.handle = qos->bcast.big;
1735 cp.adv_handle = qos->bcast.bis;
1737 hci_cpu_to_le24(qos->bcast.out.interval, cp.bis.sdu_interval);
1738 cp.bis.sdu = cpu_to_le16(qos->bcast.out.sdu);
1739 cp.bis.latency = cpu_to_le16(qos->bcast.out.latency);
1740 cp.bis.rtn = qos->bcast.out.rtn;
1741 cp.bis.phy = qos->bcast.out.phy;
1742 cp.bis.packing = qos->bcast.packing;
1743 cp.bis.framing = qos->bcast.framing;
1744 cp.bis.encryption = qos->bcast.encryption;
1745 memcpy(cp.bis.bcode, qos->bcast.bcode, sizeof(cp.bis.bcode));
1755 struct bt_iso_qos *qos;
1763 qos = &conn->iso_qos;
1765 hci_cpu_to_le24(qos->ucast.out.interval, pdu->c_interval);
1766 hci_cpu_to_le24(qos->ucast.in.interval, pdu->p_interval);
1767 pdu->sca = qos->ucast.sca;
1768 pdu->packing = qos->ucast.packing;
1769 pdu->framing = qos->ucast.framing;
1770 pdu->c_latency = cpu_to_le16(qos->ucast.out.latency);
1771 pdu->p_latency = cpu_to_le16(qos->ucast.in.latency);
1785 qos = &conn->iso_qos;
1791 cis->c_phy = qos->ucast.out.phy ? qos->ucast.out.phy :
1792 qos->ucast.in.phy;
1793 cis->p_phy = qos->ucast.in.phy ? qos->ucast.in.phy :
1794 qos->ucast.out.phy;
1795 cis->c_rtn = qos->ucast.out.rtn;
1796 cis->p_rtn = qos->ucast.in.rtn;
1808 static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos)
1816 if (qos->ucast.cig == BT_ISO_QOS_CIG_UNSET) {
1835 qos->ucast.cig = data.cig;
1838 if (qos->ucast.cis != BT_ISO_QOS_CIS_UNSET) {
1839 if (hci_conn_hash_lookup_cis(hdev, NULL, 0, qos->ucast.cig,
1840 qos->ucast.cis))
1846 for (data.cig = qos->ucast.cig, data.cis = 0x00; data.cis < 0xf0;
1851 qos->ucast.cis = data.cis;
1856 if (qos->ucast.cis == BT_ISO_QOS_CIS_UNSET)
1861 UINT_PTR(qos->ucast.cig), NULL) < 0)
1868 __u8 dst_type, struct bt_iso_qos *qos)
1872 cis = hci_conn_hash_lookup_cis(hdev, dst, dst_type, qos->ucast.cig,
1873 qos->ucast.cis);
1889 !memcmp(&cis->iso_qos, qos, sizeof(*qos)))
1893 cis->le_tx_phy = qos->ucast.out.phy;
1894 cis->le_rx_phy = qos->ucast.in.phy;
1899 if (!qos->ucast.out.interval)
1900 qos->ucast.out.interval = qos->ucast.in.interval;
1905 if (!qos->ucast.in.interval)
1906 qos->ucast.in.interval = qos->ucast.out.interval;
1911 if (!qos->ucast.out.latency)
1912 qos->ucast.out.latency = qos->ucast.in.latency;
1917 if (!qos->ucast.in.latency)
1918 qos->ucast.in.latency = qos->ucast.out.latency;
1920 if (!hci_le_set_cig_params(cis, qos)) {
1927 cis->iso_qos = *qos;
2009 struct bt_iso_io_qos *qos, __u8 phy)
2012 if (!qos->sdu && qos->phy)
2013 qos->sdu = conn->mtu;
2016 if (qos->phy == BT_ISO_PHY_ANY)
2017 qos->phy = phy;
2020 if (!qos->interval)
2022 qos->interval = conn->le_conn_interval * 1250;
2025 if (!qos->latency)
2026 qos->latency = conn->le_conn_latency;
2032 struct bt_iso_qos *qos = &conn->iso_qos;
2037 if (qos->bcast.out.phy == 0x02)
2041 interval = (qos->bcast.out.interval / 1250) * qos->bcast.sync_factor;
2043 if (qos->bcast.bis)
2046 err = hci_start_per_adv_sync(hdev, qos->bcast.bis, conn->le_per_adv_data_len,
2084 struct bt_iso_qos *qos)
2097 conn->iso_qos = *qos;
2109 cp->options = qos->bcast.options;
2113 cp->skip = cpu_to_le16(qos->bcast.skip);
2114 cp->sync_timeout = cpu_to_le16(qos->bcast.sync_timeout);
2115 cp->sync_cte_type = qos->bcast.sync_cte_type;
2129 struct bt_iso_qos *qos,
2138 err = qos_set_big(hdev, qos);
2143 hcon->iso_qos.bcast.big = qos->bcast.big;
2145 pdu->handle = qos->bcast.big;
2147 pdu->encryption = qos->bcast.encryption;
2148 memcpy(pdu->bcode, qos->bcast.bcode, sizeof(pdu->bcode));
2149 pdu->mse = qos->bcast.mse;
2150 pdu->timeout = cpu_to_le16(qos->bcast.timeout);
2172 struct bt_iso_qos *qos,
2181 conn = hci_conn_hash_lookup_big_state(hdev, qos->bcast.big, BT_OPEN);
2183 memcpy(qos, &conn->iso_qos, sizeof(*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;
2248 __u8 dst_type, struct bt_iso_qos *qos,
2255 conn = hci_bind_bis(hdev, dst, qos, base_len, base);
2262 data.big = qos->bcast.big;
2263 data.bis = qos->bcast.bis;
2284 __u8 dst_type, struct bt_iso_qos *qos)
2303 hci_iso_qos_setup(hdev, le, &qos->ucast.out,
2305 hci_iso_qos_setup(hdev, le, &qos->ucast.in,
2308 cis = hci_bind_cis(hdev, dst, dst_type, qos);