Lines Matching refs:vcc

51 static void svc_disconnect(struct atm_vcc *vcc)  in svc_disconnect()  argument
55 struct sock *sk = sk_atm(vcc); in svc_disconnect()
57 pr_debug("%p\n", vcc); in svc_disconnect()
58 if (test_bit(ATM_VF_REGIS, &vcc->flags)) { in svc_disconnect()
59 sigd_enq(vcc, as_close, NULL, NULL, NULL); in svc_disconnect()
62 if (test_bit(ATM_VF_RELEASED, &vcc->flags) || !sigd) in svc_disconnect()
71 atm_return(vcc, skb->truesize); in svc_disconnect()
73 sigd_enq2(NULL, as_reject, vcc, NULL, NULL, &vcc->qos, 0); in svc_disconnect()
76 clear_bit(ATM_VF_REGIS, &vcc->flags); in svc_disconnect()
83 struct atm_vcc *vcc; in svc_release() local
86 vcc = ATM_SD(sock); in svc_release()
87 pr_debug("%p\n", vcc); in svc_release()
88 clear_bit(ATM_VF_READY, &vcc->flags); in svc_release()
94 svc_disconnect(vcc); in svc_release()
106 struct atm_vcc *vcc; in svc_bind() local
120 vcc = ATM_SD(sock); in svc_bind()
126 clear_bit(ATM_VF_BOUND, &vcc->flags); in svc_bind()
129 if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) { in svc_bind()
133 vcc->local = *addr; in svc_bind()
134 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_bind()
135 sigd_enq(vcc, as_bind, NULL, NULL, &vcc->local); in svc_bind()
138 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_bind()
143 clear_bit(ATM_VF_REGIS, &vcc->flags); /* doesn't count */ in svc_bind()
149 set_bit(ATM_VF_BOUND, &vcc->flags); in svc_bind()
162 struct atm_vcc *vcc = ATM_SD(sock); in svc_connect() local
165 pr_debug("%p\n", vcc); in svc_connect()
180 if (test_bit(ATM_VF_WAITING, &vcc->flags)) { in svc_connect()
196 if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) { in svc_connect()
200 if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS || in svc_connect()
201 vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) { in svc_connect()
205 if (!vcc->qos.txtp.traffic_class && in svc_connect()
206 !vcc->qos.rxtp.traffic_class) { in svc_connect()
210 vcc->remote = *addr; in svc_connect()
211 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_connect()
212 sigd_enq(vcc, as_connect, NULL, NULL, &vcc->remote); in svc_connect()
220 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { in svc_connect()
240 sigd_enq(vcc, as_close, NULL, NULL, NULL); in svc_connect()
241 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { in svc_connect()
247 while (!test_bit(ATM_VF_RELEASED, &vcc->flags) && in svc_connect()
253 clear_bit(ATM_VF_REGIS, &vcc->flags); in svc_connect()
254 clear_bit(ATM_VF_RELEASED, &vcc->flags); in svc_connect()
255 clear_bit(ATM_VF_CLOSE, &vcc->flags); in svc_connect()
273 vcc->qos.txtp.max_pcr = SELECT_TOP_PCR(vcc->qos.txtp); in svc_connect()
274 vcc->qos.txtp.pcr = 0; in svc_connect()
275 vcc->qos.txtp.min_pcr = 0; in svc_connect()
277 error = vcc_connect(sock, vcc->itf, vcc->vpi, vcc->vci); in svc_connect()
281 (void)svc_disconnect(vcc); in svc_connect()
291 struct atm_vcc *vcc = ATM_SD(sock); in svc_listen() local
294 pr_debug("%p\n", vcc); in svc_listen()
297 if (test_bit(ATM_VF_SESSION, &vcc->flags)) { in svc_listen()
301 if (test_bit(ATM_VF_LISTEN, &vcc->flags)) { in svc_listen()
305 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_listen()
306 sigd_enq(vcc, as_listen, NULL, NULL, &vcc->local); in svc_listen()
309 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_listen()
318 set_bit(ATM_VF_LISTEN, &vcc->flags); in svc_listen()
437 int svc_change_qos(struct atm_vcc *vcc, struct atm_qos *qos) in svc_change_qos() argument
439 struct sock *sk = sk_atm(vcc); in svc_change_qos()
442 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_change_qos()
443 sigd_enq2(vcc, as_modify, NULL, NULL, &vcc->local, qos, 0); in svc_change_qos()
446 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || in svc_change_qos()
447 test_bit(ATM_VF_RELEASED, &vcc->flags) || !sigd) { in svc_change_qos()
462 struct atm_vcc *vcc = ATM_SD(sock); in svc_setsockopt() local
472 if (copy_from_sockptr(&vcc->sap, optval, optlen)) { in svc_setsockopt()
476 set_bit(ATM_VF_HASSAP, &vcc->flags); in svc_setsockopt()
488 set_bit(ATM_VF_SESSION, &vcc->flags); in svc_setsockopt()
490 clear_bit(ATM_VF_SESSION, &vcc->flags); in svc_setsockopt()
536 struct atm_vcc *vcc = ATM_SD(sock); in svc_addparty() local
540 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_addparty()
541 sigd_enq(vcc, as_addparty, NULL, NULL, in svc_addparty()
550 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_addparty()
565 struct atm_vcc *vcc = ATM_SD(sock); in svc_dropparty() local
569 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_dropparty()
570 sigd_enq2(vcc, as_dropparty, NULL, NULL, NULL, NULL, ep_ref); in svc_dropparty()
573 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_dropparty()
592 struct atm_vcc *vcc = ATM_SD(sock); in svc_ioctl() local
596 if (!test_bit(ATM_VF_SESSION, &vcc->flags)) in svc_ioctl()
604 if (!test_bit(ATM_VF_SESSION, &vcc->flags)) in svc_ioctl()