Lines Matching refs:vcc

46 static void svc_disconnect(struct atm_vcc *vcc)  in svc_disconnect()  argument
50 struct sock *sk = sk_atm(vcc); in svc_disconnect()
52 pr_debug("%p\n", vcc); in svc_disconnect()
53 if (test_bit(ATM_VF_REGIS, &vcc->flags)) { in svc_disconnect()
54 sigd_enq(vcc, as_close, NULL, NULL, NULL); in svc_disconnect()
57 if (test_bit(ATM_VF_RELEASED, &vcc->flags) || !sigd) in svc_disconnect()
66 atm_return(vcc, skb->truesize); in svc_disconnect()
68 sigd_enq2(NULL, as_reject, vcc, NULL, NULL, &vcc->qos, 0); in svc_disconnect()
71 clear_bit(ATM_VF_REGIS, &vcc->flags); in svc_disconnect()
78 struct atm_vcc *vcc; in svc_release() local
81 vcc = ATM_SD(sock); in svc_release()
82 pr_debug("%p\n", vcc); in svc_release()
83 clear_bit(ATM_VF_READY, &vcc->flags); in svc_release()
89 svc_disconnect(vcc); in svc_release()
101 struct atm_vcc *vcc; in svc_bind() local
115 vcc = ATM_SD(sock); in svc_bind()
121 clear_bit(ATM_VF_BOUND, &vcc->flags); in svc_bind()
124 if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) { in svc_bind()
128 vcc->local = *addr; in svc_bind()
129 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_bind()
130 sigd_enq(vcc, as_bind, NULL, NULL, &vcc->local); in svc_bind()
133 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_bind()
138 clear_bit(ATM_VF_REGIS, &vcc->flags); /* doesn't count */ in svc_bind()
144 set_bit(ATM_VF_BOUND, &vcc->flags); in svc_bind()
157 struct atm_vcc *vcc = ATM_SD(sock); in svc_connect() local
160 pr_debug("%p\n", vcc); in svc_connect()
175 if (test_bit(ATM_VF_WAITING, &vcc->flags)) { in svc_connect()
191 if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) { in svc_connect()
195 if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS || in svc_connect()
196 vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) { in svc_connect()
200 if (!vcc->qos.txtp.traffic_class && in svc_connect()
201 !vcc->qos.rxtp.traffic_class) { in svc_connect()
205 vcc->remote = *addr; in svc_connect()
206 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_connect()
207 sigd_enq(vcc, as_connect, NULL, NULL, &vcc->remote); in svc_connect()
215 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { in svc_connect()
235 sigd_enq(vcc, as_close, NULL, NULL, NULL); in svc_connect()
236 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { in svc_connect()
242 while (!test_bit(ATM_VF_RELEASED, &vcc->flags) && in svc_connect()
248 clear_bit(ATM_VF_REGIS, &vcc->flags); in svc_connect()
249 clear_bit(ATM_VF_RELEASED, &vcc->flags); in svc_connect()
250 clear_bit(ATM_VF_CLOSE, &vcc->flags); in svc_connect()
268 vcc->qos.txtp.max_pcr = SELECT_TOP_PCR(vcc->qos.txtp); in svc_connect()
269 vcc->qos.txtp.pcr = 0; in svc_connect()
270 vcc->qos.txtp.min_pcr = 0; in svc_connect()
272 error = vcc_connect(sock, vcc->itf, vcc->vpi, vcc->vci); in svc_connect()
276 (void)svc_disconnect(vcc); in svc_connect()
286 struct atm_vcc *vcc = ATM_SD(sock); in svc_listen() local
289 pr_debug("%p\n", vcc); in svc_listen()
292 if (test_bit(ATM_VF_SESSION, &vcc->flags)) { in svc_listen()
296 if (test_bit(ATM_VF_LISTEN, &vcc->flags)) { in svc_listen()
300 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_listen()
301 sigd_enq(vcc, as_listen, NULL, NULL, &vcc->local); in svc_listen()
304 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_listen()
313 set_bit(ATM_VF_LISTEN, &vcc->flags); in svc_listen()
432 int svc_change_qos(struct atm_vcc *vcc, struct atm_qos *qos) in svc_change_qos() argument
434 struct sock *sk = sk_atm(vcc); in svc_change_qos()
437 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_change_qos()
438 sigd_enq2(vcc, as_modify, NULL, NULL, &vcc->local, qos, 0); in svc_change_qos()
441 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || in svc_change_qos()
442 test_bit(ATM_VF_RELEASED, &vcc->flags) || !sigd) { in svc_change_qos()
457 struct atm_vcc *vcc = ATM_SD(sock); in svc_setsockopt() local
467 if (copy_from_sockptr(&vcc->sap, optval, optlen)) { in svc_setsockopt()
471 set_bit(ATM_VF_HASSAP, &vcc->flags); in svc_setsockopt()
483 set_bit(ATM_VF_SESSION, &vcc->flags); in svc_setsockopt()
485 clear_bit(ATM_VF_SESSION, &vcc->flags); in svc_setsockopt()
531 struct atm_vcc *vcc = ATM_SD(sock); in svc_addparty() local
535 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_addparty()
536 sigd_enq(vcc, as_addparty, NULL, NULL, in svc_addparty()
545 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_addparty()
560 struct atm_vcc *vcc = ATM_SD(sock); in svc_dropparty() local
564 set_bit(ATM_VF_WAITING, &vcc->flags); in svc_dropparty()
565 sigd_enq2(vcc, as_dropparty, NULL, NULL, NULL, NULL, ep_ref); in svc_dropparty()
568 if (!test_bit(ATM_VF_WAITING, &vcc->flags) || !sigd) in svc_dropparty()
587 struct atm_vcc *vcc = ATM_SD(sock); in svc_ioctl() local
591 if (!test_bit(ATM_VF_SESSION, &vcc->flags)) in svc_ioctl()
599 if (!test_bit(ATM_VF_SESSION, &vcc->flags)) in svc_ioctl()