Lines Matching full:qos
69 struct bt_iso_qos qos; member
78 static bool check_ucast_qos(struct bt_iso_qos *qos);
79 static bool check_bcast_qos(struct bt_iso_qos *qos);
328 /* Fail if user set invalid QoS */ in iso_connect_bis()
329 if (iso_pi(sk)->qos_user_set && !check_bcast_qos(&iso_pi(sk)->qos)) { in iso_connect_bis()
330 iso_pi(sk)->qos = default_qos; in iso_connect_bis()
336 if (!iso_pi(sk)->qos.bcast.out.phy) { in iso_connect_bis()
344 &iso_pi(sk)->qos, iso_pi(sk)->base_len, in iso_connect_bis()
353 &iso_pi(sk)->qos, iso_pi(sk)->base_len, in iso_connect_bis()
419 /* Fail if user set invalid QoS */ in iso_connect_cis()
420 if (iso_pi(sk)->qos_user_set && !check_ucast_qos(&iso_pi(sk)->qos)) { in iso_connect_cis()
421 iso_pi(sk)->qos = default_qos; in iso_connect_cis()
427 if (!iso_pi(sk)->qos.ucast.in.phy && !iso_pi(sk)->qos.ucast.out.phy) { in iso_connect_cis()
436 &iso_pi(sk)->qos); in iso_connect_cis()
444 &iso_pi(sk)->qos); in iso_connect_cis()
493 return &iso_pi(sk)->qos; in iso_sock_get_qos()
499 struct bt_iso_qos *qos = iso_sock_get_qos(sk); in iso_send_frame() local
505 if (skb->len > qos->ucast.out.sdu) in iso_send_frame()
661 if (iso_pi(sk)->qos.bcast.big != big) in iso_get_sock_big()
735 iso_pi(sk)->qos.bcast.big); in iso_sock_disconn()
866 iso_pi(sk)->qos = default_qos; in iso_sock_alloc()
1047 /* Fail if user set invalid QoS */ in iso_listen_bis()
1048 if (iso_pi(sk)->qos_user_set && !check_bcast_qos(&iso_pi(sk)->qos)) { in iso_listen_bis()
1049 iso_pi(sk)->qos = default_qos; in iso_listen_bis()
1055 iso_pi(sk)->bc_sid, &iso_pi(sk)->qos); in iso_listen_bis()
1295 &iso_pi(sk)->qos, in iso_conn_big_sync()
1338 static bool check_io_qos(struct bt_iso_io_qos *qos) in check_io_qos() argument
1341 if (!qos->phy && qos->sdu) in check_io_qos()
1344 if (qos->interval && (qos->interval < 0xff || qos->interval > 0xfffff)) in check_io_qos()
1347 if (qos->latency && (qos->latency < 0x05 || qos->latency > 0xfa0)) in check_io_qos()
1350 if (qos->phy > BT_ISO_PHY_ANY) in check_io_qos()
1356 static bool check_ucast_qos(struct bt_iso_qos *qos) in check_ucast_qos() argument
1358 if (qos->ucast.cig > 0xef && qos->ucast.cig != BT_ISO_QOS_CIG_UNSET) in check_ucast_qos()
1361 if (qos->ucast.cis > 0xef && qos->ucast.cis != BT_ISO_QOS_CIS_UNSET) in check_ucast_qos()
1364 if (qos->ucast.sca > 0x07) in check_ucast_qos()
1367 if (qos->ucast.packing > 0x01) in check_ucast_qos()
1370 if (qos->ucast.framing > 0x01) in check_ucast_qos()
1373 if (!check_io_qos(&qos->ucast.in)) in check_ucast_qos()
1376 if (!check_io_qos(&qos->ucast.out)) in check_ucast_qos()
1382 static bool check_bcast_qos(struct bt_iso_qos *qos) in check_bcast_qos() argument
1384 if (!qos->bcast.sync_factor) in check_bcast_qos()
1385 qos->bcast.sync_factor = 0x01; in check_bcast_qos()
1387 if (qos->bcast.packing > 0x01) in check_bcast_qos()
1390 if (qos->bcast.framing > 0x01) in check_bcast_qos()
1393 if (!check_io_qos(&qos->bcast.in)) in check_bcast_qos()
1396 if (!check_io_qos(&qos->bcast.out)) in check_bcast_qos()
1399 if (qos->bcast.encryption > 0x01) in check_bcast_qos()
1402 if (qos->bcast.options > 0x07) in check_bcast_qos()
1405 if (qos->bcast.skip > 0x01f3) in check_bcast_qos()
1408 if (!qos->bcast.sync_timeout) in check_bcast_qos()
1409 qos->bcast.sync_timeout = BT_ISO_SYNC_TIMEOUT; in check_bcast_qos()
1411 if (qos->bcast.sync_timeout < 0x000a || qos->bcast.sync_timeout > 0x4000) in check_bcast_qos()
1414 if (qos->bcast.sync_cte_type > 0x1f) in check_bcast_qos()
1417 if (qos->bcast.mse > 0x1f) in check_bcast_qos()
1420 if (!qos->bcast.timeout) in check_bcast_qos()
1421 qos->bcast.sync_timeout = BT_ISO_SYNC_TIMEOUT; in check_bcast_qos()
1423 if (qos->bcast.timeout < 0x000a || qos->bcast.timeout > 0x4000) in check_bcast_qos()
1434 struct bt_iso_qos qos = default_qos; in iso_sock_setsockopt() local
1476 err = bt_copy_from_sockptr(&qos, sizeof(qos), optval, optlen); in iso_sock_setsockopt()
1480 iso_pi(sk)->qos = qos; in iso_sock_setsockopt()
1520 struct bt_iso_qos *qos; in iso_sock_getsockopt() local
1551 qos = iso_sock_get_qos(sk); in iso_sock_getsockopt()
1553 len = min_t(unsigned int, len, sizeof(*qos)); in iso_sock_getsockopt()
1554 if (copy_to_user(optval, qos, len)) in iso_sock_getsockopt()
1676 return ev->handle == iso_pi(sk)->qos.bcast.big; in iso_match_big()
1769 iso_pi(sk)->qos = iso_pi(parent)->qos; in iso_conn_ready()
1770 iso_pi(sk)->qos.bcast.encryption = ev3->encryption; in iso_conn_ready()
1771 hcon->iso_qos = iso_pi(sk)->qos; in iso_conn_ready()
1891 &iso_pi(sk)->qos, in iso_connect_ind()