Lines Matching full:qos

1432 static int qos_set_big(struct hci_dev *hdev, struct bt_iso_qos *qos)  in qos_set_big()  argument
1438 if (qos->bcast.big == BT_ISO_QOS_BIG_UNSET) { in qos_set_big()
1450 qos->bcast.big = big; in qos_set_big()
1456 static int qos_set_bis(struct hci_dev *hdev, struct bt_iso_qos *qos) in qos_set_bis() argument
1462 if (qos->bcast.bis == BT_ISO_QOS_BIS_UNSET) { in qos_set_bis()
1463 if (qos->bcast.big != BT_ISO_QOS_BIG_UNSET) { in qos_set_bis()
1464 conn = hci_conn_hash_lookup_big(hdev, qos->bcast.big); in qos_set_bis()
1470 qos->bcast.bis = conn->iso_qos.bcast.bis; in qos_set_bis()
1490 qos->bcast.bis = bis; in qos_set_bis()
1498 struct bt_iso_qos *qos, __u8 base_len, in hci_add_bis() argument
1511 err = qos_set_big(hdev, qos); in hci_add_bis()
1515 err = qos_set_bis(hdev, qos); in hci_add_bis()
1520 conn = hci_conn_hash_lookup_per_adv_bis(hdev, dst, qos->bcast.big, in hci_add_bis()
1521 qos->bcast.big); in hci_add_bis()
1528 conn = hci_conn_hash_lookup_big(hdev, qos->bcast.big); in hci_add_bis()
1530 if (conn && (memcmp(qos, &conn->iso_qos, sizeof(*qos)) || in hci_add_bis()
1730 static int hci_le_create_big(struct hci_conn *conn, struct bt_iso_qos *qos) in hci_le_create_big() argument
1738 data.big = qos->bcast.big; in hci_le_create_big()
1739 data.bis = qos->bcast.bis; in hci_le_create_big()
1746 cp.handle = qos->bcast.big; in hci_le_create_big()
1747 cp.adv_handle = qos->bcast.bis; in hci_le_create_big()
1749 hci_cpu_to_le24(qos->bcast.out.interval, cp.bis.sdu_interval); in hci_le_create_big()
1750 cp.bis.sdu = cpu_to_le16(qos->bcast.out.sdu); in hci_le_create_big()
1751 cp.bis.latency = cpu_to_le16(qos->bcast.out.latency); in hci_le_create_big()
1752 cp.bis.rtn = qos->bcast.out.rtn; in hci_le_create_big()
1753 cp.bis.phy = qos->bcast.out.phy; in hci_le_create_big()
1754 cp.bis.packing = qos->bcast.packing; in hci_le_create_big()
1755 cp.bis.framing = qos->bcast.framing; in hci_le_create_big()
1756 cp.bis.encryption = qos->bcast.encryption; in hci_le_create_big()
1757 memcpy(cp.bis.bcode, qos->bcast.bcode, sizeof(cp.bis.bcode)); in hci_le_create_big()
1767 struct bt_iso_qos *qos; in set_cig_params_sync() local
1775 qos = &conn->iso_qos; in set_cig_params_sync()
1777 hci_cpu_to_le24(qos->ucast.out.interval, pdu->c_interval); in set_cig_params_sync()
1778 hci_cpu_to_le24(qos->ucast.in.interval, pdu->p_interval); in set_cig_params_sync()
1779 pdu->sca = qos->ucast.sca; in set_cig_params_sync()
1780 pdu->packing = qos->ucast.packing; in set_cig_params_sync()
1781 pdu->framing = qos->ucast.framing; in set_cig_params_sync()
1782 pdu->c_latency = cpu_to_le16(qos->ucast.out.latency); in set_cig_params_sync()
1783 pdu->p_latency = cpu_to_le16(qos->ucast.in.latency); in set_cig_params_sync()
1797 qos = &conn->iso_qos; in set_cig_params_sync()
1803 cis->c_phy = qos->ucast.out.phy ? qos->ucast.out.phy : in set_cig_params_sync()
1804 qos->ucast.in.phy; in set_cig_params_sync()
1805 cis->p_phy = qos->ucast.in.phy ? qos->ucast.in.phy : in set_cig_params_sync()
1806 qos->ucast.out.phy; in set_cig_params_sync()
1807 cis->c_rtn = qos->ucast.out.rtn; in set_cig_params_sync()
1808 cis->p_rtn = qos->ucast.in.rtn; in set_cig_params_sync()
1820 static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos) in hci_le_set_cig_params() argument
1828 if (qos->ucast.cig == BT_ISO_QOS_CIG_UNSET) { in hci_le_set_cig_params()
1847 qos->ucast.cig = data.cig; in hci_le_set_cig_params()
1850 if (qos->ucast.cis != BT_ISO_QOS_CIS_UNSET) { in hci_le_set_cig_params()
1851 if (hci_conn_hash_lookup_cis(hdev, NULL, 0, qos->ucast.cig, in hci_le_set_cig_params()
1852 qos->ucast.cis)) in hci_le_set_cig_params()
1858 for (data.cig = qos->ucast.cig, data.cis = 0x00; data.cis < 0xf0; in hci_le_set_cig_params()
1863 qos->ucast.cis = data.cis; in hci_le_set_cig_params()
1868 if (qos->ucast.cis == BT_ISO_QOS_CIS_UNSET) in hci_le_set_cig_params()
1873 UINT_PTR(qos->ucast.cig), NULL) < 0) in hci_le_set_cig_params()
1880 __u8 dst_type, struct bt_iso_qos *qos) in hci_bind_cis() argument
1884 cis = hci_conn_hash_lookup_cis(hdev, dst, dst_type, qos->ucast.cig, in hci_bind_cis()
1885 qos->ucast.cis); in hci_bind_cis()
1901 !memcmp(&cis->iso_qos, qos, sizeof(*qos))) in hci_bind_cis()
1904 /* Update LINK PHYs according to QoS preference */ in hci_bind_cis()
1905 cis->le_tx_phy = qos->ucast.out.phy; in hci_bind_cis()
1906 cis->le_rx_phy = qos->ucast.in.phy; in hci_bind_cis()
1911 if (!qos->ucast.out.interval) in hci_bind_cis()
1912 qos->ucast.out.interval = qos->ucast.in.interval; in hci_bind_cis()
1917 if (!qos->ucast.in.interval) in hci_bind_cis()
1918 qos->ucast.in.interval = qos->ucast.out.interval; in hci_bind_cis()
1923 if (!qos->ucast.out.latency) in hci_bind_cis()
1924 qos->ucast.out.latency = qos->ucast.in.latency; in hci_bind_cis()
1929 if (!qos->ucast.in.latency) in hci_bind_cis()
1930 qos->ucast.in.latency = qos->ucast.out.latency; in hci_bind_cis()
1932 if (!hci_le_set_cig_params(cis, qos)) { in hci_bind_cis()
1939 cis->iso_qos = *qos; in hci_bind_cis()
2021 struct bt_iso_io_qos *qos, __u8 phy) in hci_iso_qos_setup() argument
2024 if (!qos->sdu && qos->phy) in hci_iso_qos_setup()
2025 qos->sdu = conn->mtu; in hci_iso_qos_setup()
2028 if (qos->phy == BT_ISO_PHY_ANY) in hci_iso_qos_setup()
2029 qos->phy = phy; in hci_iso_qos_setup()
2032 if (!qos->interval) in hci_iso_qos_setup()
2034 qos->interval = conn->le_conn_interval * 1250; in hci_iso_qos_setup()
2037 if (!qos->latency) in hci_iso_qos_setup()
2038 qos->latency = conn->le_conn_latency; in hci_iso_qos_setup()
2044 struct bt_iso_qos *qos = &conn->iso_qos; in create_big_sync() local
2049 if (qos->bcast.out.phy == 0x02) in create_big_sync()
2053 interval = (qos->bcast.out.interval / 1250) * qos->bcast.sync_factor; in create_big_sync()
2055 if (qos->bcast.bis) in create_big_sync()
2058 err = hci_start_per_adv_sync(hdev, qos->bcast.bis, conn->le_per_adv_data_len, in create_big_sync()
2069 struct bt_iso_qos *qos) in hci_pa_create_sync() argument
2077 conn->iso_qos = *qos; in hci_pa_create_sync()
2081 conn->conn_timeout = msecs_to_jiffies(qos->bcast.sync_timeout * 10); in hci_pa_create_sync()
2091 struct bt_iso_qos *qos, __u16 sync_handle, in hci_conn_big_create_sync() argument
2099 err = qos_set_big(hdev, qos); in hci_conn_big_create_sync()
2104 /* Update hcon QoS */ in hci_conn_big_create_sync()
2105 hcon->iso_qos = *qos; in hci_conn_big_create_sync()
2109 hcon->conn_timeout = msecs_to_jiffies(qos->bcast.timeout * 10); in hci_conn_big_create_sync()
2129 struct bt_iso_qos *qos, in hci_bind_bis() argument
2138 conn = hci_conn_hash_lookup_big_state(hdev, qos->bcast.big, BT_OPEN); in hci_bind_bis()
2140 memcpy(qos, &conn->iso_qos, sizeof(*qos)); in hci_bind_bis()
2150 conn = hci_add_bis(hdev, dst, qos, base_len, eir); in hci_bind_bis()
2154 /* Update LINK PHYs according to QoS preference */ in hci_bind_bis()
2155 conn->le_tx_phy = qos->bcast.out.phy; in hci_bind_bis()
2156 conn->le_tx_phy = qos->bcast.out.phy; in hci_bind_bis()
2164 hci_iso_qos_setup(hdev, conn, &qos->bcast.out, in hci_bind_bis()
2168 conn->iso_qos = *qos; in hci_bind_bis()
2201 __u8 dst_type, struct bt_iso_qos *qos, in hci_connect_bis() argument
2208 conn = hci_bind_bis(hdev, dst, qos, base_len, base); in hci_connect_bis()
2215 data.big = qos->bcast.big; in hci_connect_bis()
2216 data.bis = qos->bcast.bis; in hci_connect_bis()
2237 __u8 dst_type, struct bt_iso_qos *qos) in hci_connect_cis() argument
2256 hci_iso_qos_setup(hdev, le, &qos->ucast.out, in hci_connect_cis()
2258 hci_iso_qos_setup(hdev, le, &qos->ucast.in, in hci_connect_cis()
2261 cis = hci_bind_cis(hdev, dst, dst_type, qos); in hci_connect_cis()