Lines Matching refs:bcs
271 BChannel_proc_xmt(struct BCState *bcs) in BChannel_proc_xmt() argument
273 struct PStack *st = bcs->st; in BChannel_proc_xmt()
275 if (test_bit(BC_FLG_BUSY, &bcs->Flag)) { in BChannel_proc_xmt()
276 debugl1(bcs->cs, "BC_BUSY Error"); in BChannel_proc_xmt()
282 if (!test_bit(BC_FLG_ACTIV, &bcs->Flag)) { in BChannel_proc_xmt()
283 if (!test_bit(BC_FLG_BUSY, &bcs->Flag) && in BChannel_proc_xmt()
284 skb_queue_empty(&bcs->squeue)) { in BChannel_proc_xmt()
291 BChannel_proc_rcv(struct BCState *bcs) in BChannel_proc_rcv() argument
295 if (bcs->st->l1.l1m.state == ST_L1_WAIT_ACT) { in BChannel_proc_rcv()
296 FsmDelTimer(&bcs->st->l1.timer, 4); in BChannel_proc_rcv()
297 FsmEvent(&bcs->st->l1.l1m, EV_TIMER_ACT, NULL); in BChannel_proc_rcv()
299 while ((skb = skb_dequeue(&bcs->rqueue))) { in BChannel_proc_rcv()
300 bcs->st->l1.l1l2(bcs->st, PH_DATA | INDICATION, skb); in BChannel_proc_rcv()
305 BChannel_proc_ack(struct BCState *bcs) in BChannel_proc_ack() argument
310 spin_lock_irqsave(&bcs->aclock, flags); in BChannel_proc_ack()
311 ack = bcs->ackcnt; in BChannel_proc_ack()
312 bcs->ackcnt = 0; in BChannel_proc_ack()
313 spin_unlock_irqrestore(&bcs->aclock, flags); in BChannel_proc_ack()
315 lli_writewakeup(bcs->st, ack); in BChannel_proc_ack()
321 struct BCState *bcs = container_of(work, struct BCState, tqueue); in BChannel_bh() local
323 if (!bcs) in BChannel_bh()
325 if (test_and_clear_bit(B_RCVBUFREADY, &bcs->event)) in BChannel_bh()
326 BChannel_proc_rcv(bcs); in BChannel_bh()
327 if (test_and_clear_bit(B_XMTBUFREADY, &bcs->event)) in BChannel_bh()
328 BChannel_proc_xmt(bcs); in BChannel_bh()
329 if (test_and_clear_bit(B_ACKPENDING, &bcs->event)) in BChannel_bh()
330 BChannel_proc_ack(bcs); in BChannel_bh()
364 struct BCState *bcs = cs->bcs + bc; in init_bcstate() local
366 bcs->cs = cs; in init_bcstate()
367 bcs->channel = bc; in init_bcstate()
368 INIT_WORK(&bcs->tqueue, BChannel_bh); in init_bcstate()
369 spin_lock_init(&bcs->aclock); in init_bcstate()
370 bcs->BC_SetStack = NULL; in init_bcstate()
371 bcs->BC_Close = NULL; in init_bcstate()
372 bcs->Flag = 0; in init_bcstate()