Lines Matching refs:chan

61 static int pcbit_xmit(int driver, int chan, int ack, struct sk_buff *skb);
239 struct pcbit_chan *chan; in pcbit_command() local
250 chan = (ctl->arg & 0x0F) ? dev->b2 : dev->b1; in pcbit_command()
260 pcbit_fsm_event(dev, chan, EV_USR_SETUP_REQ, &info); in pcbit_command()
263 pcbit_fsm_event(dev, chan, EV_USR_SETUP_RESP, NULL); in pcbit_command()
269 pcbit_fsm_event(dev, chan, EV_USR_RELEASE_REQ, NULL); in pcbit_command()
272 chan->proto = (ctl->arg >> 8); in pcbit_command()
301 struct pcbit_chan *chan; in pcbit_block_timer() local
305 chan = (struct pcbit_chan *)data; in pcbit_block_timer()
307 dev = chan2dev(chan); in pcbit_block_timer()
314 del_timer(&chan->block_timer); in pcbit_block_timer()
315 chan->block_timer.function = NULL; in pcbit_block_timer()
320 chan->queued = 0; in pcbit_block_timer()
323 ictl.arg = chan->id; in pcbit_block_timer()
332 struct pcbit_chan *chan; in pcbit_xmit() local
342 chan = chnum ? dev->b2 : dev->b1; in pcbit_xmit()
345 if (chan->fsm_state != ST_ACTIVE) in pcbit_xmit()
348 if (chan->queued >= MAX_QUEUED) in pcbit_xmit()
353 chan->queued); in pcbit_xmit()
361 if (chan->block_timer.function == NULL) { in pcbit_xmit()
362 init_timer(&chan->block_timer); in pcbit_xmit()
363 chan->block_timer.function = &pcbit_block_timer; in pcbit_xmit()
364 chan->block_timer.data = (long) chan; in pcbit_xmit()
365 chan->block_timer.expires = jiffies + 1 * HZ; in pcbit_xmit()
366 add_timer(&chan->block_timer); in pcbit_xmit()
373 chan->queued++; in pcbit_xmit()
377 hdrlen = capi_tdata_req(chan, skb); in pcbit_xmit()
380 chan->s_refnum = refnum; in pcbit_xmit()
471 struct pcbit_chan *chan; in pcbit_l3_receive() local
481 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
486 chan->r_refnum = skb->data[7]; in pcbit_l3_receive()
489 dev->dev_if->rcvcallb_skb(dev->id, chan->id, skb); in pcbit_l3_receive()
491 if (capi_tdata_resp(chan, &skb2) > 0) in pcbit_l3_receive()
497 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
509 if (chan->queued == MAX_QUEUED) { in pcbit_l3_receive()
510 del_timer(&chan->block_timer); in pcbit_l3_receive()
511 chan->block_timer.function = NULL; in pcbit_l3_receive()
515 chan->queued--; in pcbit_l3_receive()
519 ictl.arg = chan->id; in pcbit_l3_receive()
530 chan = dev->b1; in pcbit_l3_receive()
532 chan = dev->b2; in pcbit_l3_receive()
545 capi_decode_conn_ind(chan, skb, &cbdata); in pcbit_l3_receive()
548 pcbit_fsm_event(dev, chan, EV_NET_SETUP, NULL); in pcbit_l3_receive()
551 pcbit_fsm_event(dev, chan, EV_USR_PROCED_REQ, &cbdata); in pcbit_l3_receive()
553 pcbit_fsm_event(dev, chan, EV_USR_RELEASE_REQ, NULL); in pcbit_l3_receive()
573 chan = dev->b1; in pcbit_l3_receive()
576 chan = dev->b2; in pcbit_l3_receive()
578 chan = NULL; in pcbit_l3_receive()
583 if (capi_decode_conn_conf(chan, skb, &complete)) { in pcbit_l3_receive()
585 pcbit_fsm_event(dev, chan, EV_ERROR, NULL); in pcbit_l3_receive()
589 pcbit_fsm_event(dev, chan, EV_NET_CALL_PROC, NULL); in pcbit_l3_receive()
591 pcbit_fsm_event(dev, chan, EV_NET_SETUP_ACK, NULL); in pcbit_l3_receive()
595 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
601 if (capi_decode_conn_actv_ind(chan, skb)) { in pcbit_l3_receive()
606 chan->r_refnum = refnum; in pcbit_l3_receive()
607 pcbit_fsm_event(dev, chan, EV_NET_CONN, NULL); in pcbit_l3_receive()
611 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
617 if (capi_decode_conn_actv_conf(chan, skb) == 0) in pcbit_l3_receive()
618 pcbit_fsm_event(dev, chan, EV_NET_CONN_ACK, NULL); in pcbit_l3_receive()
626 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
632 if (!(err = capi_decode_sel_proto_conf(chan, skb))) in pcbit_l3_receive()
633 pcbit_fsm_event(dev, chan, EV_NET_SELP_RESP, NULL); in pcbit_l3_receive()
640 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
646 if (!capi_decode_actv_trans_conf(chan, skb)) in pcbit_l3_receive()
647 pcbit_fsm_event(dev, chan, EV_NET_ACTV_RESP, NULL); in pcbit_l3_receive()
652 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
658 if (!capi_decode_disc_ind(chan, skb)) in pcbit_l3_receive()
659 pcbit_fsm_event(dev, chan, EV_NET_DISC, NULL); in pcbit_l3_receive()
664 if (!(chan = capi_channel(dev, skb))) { in pcbit_l3_receive()
670 if (!capi_decode_disc_ind(chan, skb)) in pcbit_l3_receive()
671 pcbit_fsm_event(dev, chan, EV_NET_RELEASE, NULL); in pcbit_l3_receive()
773 void pcbit_state_change(struct pcbit_dev *dev, struct pcbit_chan *chan, in pcbit_state_change() argument
779 dev->id, chan->id, in pcbit_state_change()