Lines Matching full:qos
71 struct bt_iso_qos qos; member
80 static bool check_ucast_qos(struct bt_iso_qos *qos);
81 static bool check_bcast_qos(struct bt_iso_qos *qos);
355 /* Fail if user set invalid QoS */ in iso_connect_bis()
356 if (iso_pi(sk)->qos_user_set && !check_bcast_qos(&iso_pi(sk)->qos)) { in iso_connect_bis()
357 iso_pi(sk)->qos = default_qos; in iso_connect_bis()
363 if (!iso_pi(sk)->qos.bcast.out.phy) { in iso_connect_bis()
371 &iso_pi(sk)->qos, iso_pi(sk)->base_len, in iso_connect_bis()
381 iso_pi(sk)->bc_sid, &iso_pi(sk)->qos, in iso_connect_bis()
452 /* Fail if user set invalid QoS */ in iso_connect_cis()
453 if (iso_pi(sk)->qos_user_set && !check_ucast_qos(&iso_pi(sk)->qos)) { in iso_connect_cis()
454 iso_pi(sk)->qos = default_qos; in iso_connect_cis()
460 if (!iso_pi(sk)->qos.ucast.in.phy && !iso_pi(sk)->qos.ucast.out.phy) { in iso_connect_cis()
466 if (iso_pi(sk)->qos.ucast.out.sdu && !hci_iso_count(hdev) && in iso_connect_cis()
476 &iso_pi(sk)->qos, in iso_connect_cis()
485 &iso_pi(sk)->qos, in iso_connect_cis()
535 return &iso_pi(sk)->qos; in iso_sock_get_qos()
542 struct bt_iso_qos *qos = iso_sock_get_qos(sk); in iso_send_frame() local
548 if (skb->len > qos->ucast.out.sdu) in iso_send_frame()
707 if (iso_pi(sk)->qos.bcast.big != big) in iso_get_sock_big()
787 iso_pi(sk)->qos.bcast.big); in iso_sock_disconn()
918 iso_pi(sk)->qos = default_qos; in iso_sock_alloc()
1161 /* Fail if user set invalid QoS */ in iso_listen_bis()
1162 if (iso_pi(sk)->qos_user_set && !check_bcast_qos(&iso_pi(sk)->qos)) { in iso_listen_bis()
1163 iso_pi(sk)->qos = default_qos; in iso_listen_bis()
1170 iso_pi(sk)->bc_sid, &iso_pi(sk)->qos); in iso_listen_bis()
1502 &iso_pi(sk)->qos, in iso_conn_big_sync()
1579 static bool check_io_qos(struct bt_iso_io_qos *qos) in check_io_qos() argument
1582 if (!qos->phy && qos->sdu) in check_io_qos()
1585 if (qos->interval && (qos->interval < 0xff || qos->interval > 0xfffff)) in check_io_qos()
1588 if (qos->latency && (qos->latency < 0x05 || qos->latency > 0xfa0)) in check_io_qos()
1591 if (qos->phy > BT_ISO_PHY_ANY) in check_io_qos()
1597 static bool check_ucast_qos(struct bt_iso_qos *qos) in check_ucast_qos() argument
1599 if (qos->ucast.cig > 0xef && qos->ucast.cig != BT_ISO_QOS_CIG_UNSET) in check_ucast_qos()
1602 if (qos->ucast.cis > 0xef && qos->ucast.cis != BT_ISO_QOS_CIS_UNSET) in check_ucast_qos()
1605 if (qos->ucast.sca > 0x07) in check_ucast_qos()
1608 if (qos->ucast.packing > 0x01) in check_ucast_qos()
1611 if (qos->ucast.framing > 0x01) in check_ucast_qos()
1614 if (!check_io_qos(&qos->ucast.in)) in check_ucast_qos()
1617 if (!check_io_qos(&qos->ucast.out)) in check_ucast_qos()
1623 static bool check_bcast_qos(struct bt_iso_qos *qos) in check_bcast_qos() argument
1625 if (!qos->bcast.sync_factor) in check_bcast_qos()
1626 qos->bcast.sync_factor = 0x01; in check_bcast_qos()
1628 if (qos->bcast.packing > 0x01) in check_bcast_qos()
1631 if (qos->bcast.framing > 0x01) in check_bcast_qos()
1634 if (!check_io_qos(&qos->bcast.in)) in check_bcast_qos()
1637 if (!check_io_qos(&qos->bcast.out)) in check_bcast_qos()
1640 if (qos->bcast.encryption > 0x01) in check_bcast_qos()
1643 if (qos->bcast.options > 0x07) in check_bcast_qos()
1646 if (qos->bcast.skip > 0x01f3) in check_bcast_qos()
1649 if (!qos->bcast.sync_timeout) in check_bcast_qos()
1650 qos->bcast.sync_timeout = BT_ISO_SYNC_TIMEOUT; in check_bcast_qos()
1652 if (qos->bcast.sync_timeout < 0x000a || qos->bcast.sync_timeout > 0x4000) in check_bcast_qos()
1655 if (qos->bcast.sync_cte_type > 0x1f) in check_bcast_qos()
1658 if (qos->bcast.mse > 0x1f) in check_bcast_qos()
1661 if (!qos->bcast.timeout) in check_bcast_qos()
1662 qos->bcast.sync_timeout = BT_ISO_SYNC_TIMEOUT; in check_bcast_qos()
1664 if (qos->bcast.timeout < 0x000a || qos->bcast.timeout > 0x4000) in check_bcast_qos()
1675 struct bt_iso_qos qos = default_qos; in iso_sock_setsockopt() local
1730 err = copy_safe_from_sockptr(&qos, sizeof(qos), optval, optlen); in iso_sock_setsockopt()
1734 iso_pi(sk)->qos = qos; in iso_sock_setsockopt()
1774 struct bt_iso_qos *qos; in iso_sock_getsockopt() local
1805 qos = iso_sock_get_qos(sk); in iso_sock_getsockopt()
1807 len = min_t(unsigned int, len, sizeof(*qos)); in iso_sock_getsockopt()
1808 if (copy_to_user(optval, qos, len)) in iso_sock_getsockopt()
1927 return ev->handle == iso_pi(sk)->qos.bcast.big; in iso_match_big()
1934 return hcon->iso_qos.bcast.big == iso_pi(sk)->qos.bcast.big; in iso_match_big_hcon()
2039 iso_pi(sk)->qos = iso_pi(parent)->qos; in iso_conn_ready()
2040 hcon->iso_qos = iso_pi(sk)->qos; in iso_conn_ready()
2168 iso_pi(sk)->qos.bcast.encryption = ev2->encryption; in iso_connect_ind()
2176 &iso_pi(sk)->qos, in iso_connect_ind()