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);
324 /* Fail if user set invalid QoS */ in iso_connect_bis()
325 if (iso_pi(sk)->qos_user_set && !check_bcast_qos(&iso_pi(sk)->qos)) { in iso_connect_bis()
326 iso_pi(sk)->qos = default_qos; in iso_connect_bis()
332 if (!iso_pi(sk)->qos.bcast.out.phy) { in iso_connect_bis()
340 &iso_pi(sk)->qos, iso_pi(sk)->base_len, in iso_connect_bis()
349 &iso_pi(sk)->qos, iso_pi(sk)->base_len, in iso_connect_bis()
415 /* Fail if user set invalid QoS */ in iso_connect_cis()
416 if (iso_pi(sk)->qos_user_set && !check_ucast_qos(&iso_pi(sk)->qos)) { in iso_connect_cis()
417 iso_pi(sk)->qos = default_qos; in iso_connect_cis()
423 if (!iso_pi(sk)->qos.ucast.in.phy && !iso_pi(sk)->qos.ucast.out.phy) { in iso_connect_cis()
432 &iso_pi(sk)->qos); in iso_connect_cis()
440 &iso_pi(sk)->qos); in iso_connect_cis()
489 return &iso_pi(sk)->qos; in iso_sock_get_qos()
495 struct bt_iso_qos *qos = iso_sock_get_qos(sk); in iso_send_frame() local
501 if (skb->len > qos->ucast.out.sdu) in iso_send_frame()
657 if (iso_pi(sk)->qos.bcast.big != big) in iso_get_sock_big()
731 iso_pi(sk)->qos.bcast.big); in iso_sock_disconn()
862 iso_pi(sk)->qos = default_qos; in iso_sock_alloc()
1099 /* Fail if user set invalid QoS */ in iso_listen_bis()
1100 if (iso_pi(sk)->qos_user_set && !check_bcast_qos(&iso_pi(sk)->qos)) { in iso_listen_bis()
1101 iso_pi(sk)->qos = default_qos; in iso_listen_bis()
1107 iso_pi(sk)->bc_sid, &iso_pi(sk)->qos); in iso_listen_bis()
1343 &iso_pi(sk)->qos, in iso_conn_big_sync()
1387 static bool check_io_qos(struct bt_iso_io_qos *qos) in check_io_qos() argument
1390 if (!qos->phy && qos->sdu) in check_io_qos()
1393 if (qos->interval && (qos->interval < 0xff || qos->interval > 0xfffff)) in check_io_qos()
1396 if (qos->latency && (qos->latency < 0x05 || qos->latency > 0xfa0)) in check_io_qos()
1399 if (qos->phy > BT_ISO_PHY_ANY) in check_io_qos()
1405 static bool check_ucast_qos(struct bt_iso_qos *qos) in check_ucast_qos() argument
1407 if (qos->ucast.cig > 0xef && qos->ucast.cig != BT_ISO_QOS_CIG_UNSET) in check_ucast_qos()
1410 if (qos->ucast.cis > 0xef && qos->ucast.cis != BT_ISO_QOS_CIS_UNSET) in check_ucast_qos()
1413 if (qos->ucast.sca > 0x07) in check_ucast_qos()
1416 if (qos->ucast.packing > 0x01) in check_ucast_qos()
1419 if (qos->ucast.framing > 0x01) in check_ucast_qos()
1422 if (!check_io_qos(&qos->ucast.in)) in check_ucast_qos()
1425 if (!check_io_qos(&qos->ucast.out)) in check_ucast_qos()
1431 static bool check_bcast_qos(struct bt_iso_qos *qos) in check_bcast_qos() argument
1433 if (qos->bcast.sync_factor == 0x00) in check_bcast_qos()
1436 if (qos->bcast.packing > 0x01) in check_bcast_qos()
1439 if (qos->bcast.framing > 0x01) in check_bcast_qos()
1442 if (!check_io_qos(&qos->bcast.in)) in check_bcast_qos()
1445 if (!check_io_qos(&qos->bcast.out)) in check_bcast_qos()
1448 if (qos->bcast.encryption > 0x01) in check_bcast_qos()
1451 if (qos->bcast.options > 0x07) in check_bcast_qos()
1454 if (qos->bcast.skip > 0x01f3) in check_bcast_qos()
1457 if (qos->bcast.sync_timeout < 0x000a || qos->bcast.sync_timeout > 0x4000) in check_bcast_qos()
1460 if (qos->bcast.sync_cte_type > 0x1f) in check_bcast_qos()
1463 if (qos->bcast.mse > 0x1f) in check_bcast_qos()
1466 if (qos->bcast.timeout < 0x000a || qos->bcast.timeout > 0x4000) in check_bcast_qos()
1477 struct bt_iso_qos qos = default_qos; in iso_sock_setsockopt() local
1521 len = min_t(unsigned int, sizeof(qos), optlen); in iso_sock_setsockopt()
1523 if (copy_from_sockptr(&qos, optval, len)) { in iso_sock_setsockopt()
1528 if (len == sizeof(qos.ucast) && !check_ucast_qos(&qos)) { in iso_sock_setsockopt()
1533 iso_pi(sk)->qos = qos; in iso_sock_setsockopt()
1575 struct bt_iso_qos *qos; in iso_sock_getsockopt() local
1606 qos = iso_sock_get_qos(sk); in iso_sock_getsockopt()
1608 len = min_t(unsigned int, len, sizeof(*qos)); in iso_sock_getsockopt()
1609 if (copy_to_user(optval, qos, len)) in iso_sock_getsockopt()
1733 return ev->handle == iso_pi(sk)->qos.bcast.big; in iso_match_big()
1826 iso_pi(sk)->qos = iso_pi(parent)->qos; in iso_conn_ready()
1827 iso_pi(sk)->qos.bcast.encryption = ev3->encryption; in iso_conn_ready()
1828 hcon->iso_qos = iso_pi(sk)->qos; in iso_conn_ready()
1948 &iso_pi(sk)->qos, in iso_connect_ind()