Lines Matching full:qos
104 return (vcc->qos.txtp.max_sdu + in vcc_writable()
159 vcc->qos.txtp.max_sdu = 1 << 16; /* for meta VCs */ in vcc_create()
324 walk->vci == vci && ((walk->qos.txtp.traffic_class != in check_ci()
325 ATM_NONE && vcc->qos.txtp.traffic_class != ATM_NONE) || in check_ci()
326 (walk->qos.rxtp.traffic_class != ATM_NONE && in check_ci()
327 vcc->qos.rxtp.traffic_class != ATM_NONE))) in check_ci()
408 switch (vcc->qos.aal) { in __vcc_connect()
419 vcc->qos.aal = ATM_AAL5; in __vcc_connect()
429 error = adjust_tp(&vcc->qos.txtp, vcc->qos.aal); in __vcc_connect()
431 error = adjust_tp(&vcc->qos.rxtp, vcc->qos.aal); in __vcc_connect()
434 pr_debug("VCC %d.%d, AAL %d\n", vpi, vci, vcc->qos.aal); in __vcc_connect()
436 vcc->qos.txtp.traffic_class, in __vcc_connect()
437 vcc->qos.txtp.min_pcr, in __vcc_connect()
438 vcc->qos.txtp.max_pcr, in __vcc_connect()
439 vcc->qos.txtp.max_sdu); in __vcc_connect()
441 vcc->qos.rxtp.traffic_class, in __vcc_connect()
442 vcc->qos.rxtp.min_pcr, in __vcc_connect()
443 vcc->qos.rxtp.max_pcr, in __vcc_connect()
444 vcc->qos.rxtp.max_sdu); in __vcc_connect()
483 vcc->qos.txtp.traffic_class, vcc->qos.txtp.min_pcr, in vcc_connect()
484 vcc->qos.txtp.max_pcr, vcc->qos.txtp.max_sdu, in vcc_connect()
485 vcc->qos.rxtp.traffic_class, vcc->qos.rxtp.min_pcr, in vcc_connect()
486 vcc->qos.rxtp.max_pcr, vcc->qos.rxtp.max_sdu, in vcc_connect()
487 vcc->qos.aal == ATM_AAL5 ? "" : in vcc_connect()
488 vcc->qos.aal == ATM_AAL0 ? "" : " ??? code ", in vcc_connect()
489 vcc->qos.aal == ATM_AAL0 ? 0 : vcc->qos.aal); in vcc_connect()
492 if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS || in vcc_connect()
493 vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) in vcc_connect()
597 if (size > vcc->qos.txtp.max_sdu) { in vcc_sendmsg()
679 if (vcc->qos.txtp.traffic_class != ATM_NONE && in vcc_poll()
686 static int atm_change_qos(struct atm_vcc *vcc, struct atm_qos *qos) in atm_change_qos() argument
691 * Don't let the QoS change the already connected AAL type nor the in atm_change_qos()
694 if (qos->aal != vcc->qos.aal || in atm_change_qos()
695 qos->rxtp.traffic_class != vcc->qos.rxtp.traffic_class || in atm_change_qos()
696 qos->txtp.traffic_class != vcc->qos.txtp.traffic_class) in atm_change_qos()
698 error = adjust_tp(&qos->txtp, qos->aal); in atm_change_qos()
700 error = adjust_tp(&qos->rxtp, qos->aal); in atm_change_qos()
706 return vcc->dev->ops->change_qos(vcc, qos, ATM_MF_SET); in atm_change_qos()
707 return svc_change_qos(vcc, qos); in atm_change_qos()
730 static int check_qos(const struct atm_qos *qos) in check_qos() argument
734 if (!qos->txtp.traffic_class && !qos->rxtp.traffic_class) in check_qos()
736 if (qos->txtp.traffic_class != qos->rxtp.traffic_class && in check_qos()
737 qos->txtp.traffic_class && qos->rxtp.traffic_class && in check_qos()
738 qos->txtp.traffic_class != ATM_ANYCLASS && in check_qos()
739 qos->rxtp.traffic_class != ATM_ANYCLASS) in check_qos()
741 error = check_tp(&qos->txtp); in check_qos()
744 return check_tp(&qos->rxtp); in check_qos()
761 struct atm_qos qos; in vcc_setsockopt() local
763 if (copy_from_sockptr(&qos, optval, sizeof(qos))) in vcc_setsockopt()
765 error = check_qos(&qos); in vcc_setsockopt()
769 return atm_change_qos(vcc, &qos); in vcc_setsockopt()
772 vcc->qos = qos; in vcc_setsockopt()
805 return copy_to_user(optval, &vcc->qos, sizeof(vcc->qos)) in vcc_getsockopt()