• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/isdn/hardware/mISDN/

Lines Matching defs:bch

60 	struct bchannel		bch;
98 card->bc[0].bch.debug = debug;
99 card->bc[1].bch.debug = debug;
465 struct w6692_hw *card = wch->bch.hw;
469 if (unlikely(wch->bch.state == ISDN_P_NONE)) {
472 if (wch->bch.rx_skb)
473 skb_trim(wch->bch.rx_skb, 0);
476 if (!wch->bch.rx_skb) {
477 wch->bch.rx_skb = mI_alloc_skb(wch->bch.maxlen, GFP_ATOMIC);
478 if (unlikely(!wch->bch.rx_skb)) {
485 if (wch->bch.rx_skb->len + count > wch->bch.maxlen) {
489 skb_trim(wch->bch.rx_skb, 0);
492 ptr = skb_put(wch->bch.rx_skb, count);
497 wch->bch.nr, card->name, count);
505 struct w6692_hw *card = wch->bch.hw;
510 if (!wch->bch.tx_skb)
512 count = wch->bch.tx_skb->len - wch->bch.tx_idx;
515 ptr = wch->bch.tx_skb->data + wch->bch.tx_idx;
518 else if (test_bit(FLG_HDLC, &wch->bch.Flags))
522 count, wch->bch.tx_idx);
523 wch->bch.tx_idx += count;
528 wch->bch.nr, card->name, count);
537 struct w6692_hw *card = wch->bch.hw;
553 card = wch->bch.hw;
555 wch->bch.nr, wch->bch.state, pr);
561 mISDN_clear_bchannel(&wch->bch);
564 test_and_clear_bit(FLG_HDLC, &wch->bch.Flags);
565 test_and_clear_bit(FLG_TRANSPARENT, &wch->bch.Flags);
573 test_and_set_bit(FLG_TRANSPARENT, &wch->bch.Flags);
583 test_and_set_bit(FLG_HDLC, &wch->bch.Flags);
589 wch->bch.state = pr;
596 if (wch->bch.tx_skb && wch->bch.tx_idx < wch->bch.tx_skb->len)
599 if (wch->bch.tx_skb) {
601 if (test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
602 confirm_Bsend(&wch->bch);
603 dev_kfree_skb(wch->bch.tx_skb);
605 if (get_next_bframe(&wch->bch))
618 pr_debug("%s: B%d EXIR %02x\n", card->name, wch->bch.nr, stat);
623 test_bit(FLG_ACTIVE, &wch->bch.Flags)) {
625 wch->bch.nr, wch->bch.state);
627 wch->bch.err_rdo++;
630 if (test_bit(FLG_HDLC, &wch->bch.Flags)) {
633 card->name, wch->bch.nr);
635 wch->bch.err_crc++;
640 card->name, wch->bch.nr);
642 wch->bch.err_inv++;
648 if (wch->bch.rx_skb)
649 skb_trim(wch->bch.rx_skb, 0);
656 recv_Bchannel(&wch->bch, 0);
664 wch->bch.nr, wch->bch.state);
666 wch->bch.err_rdo++;
672 if (test_bit(FLG_TRANSPARENT, &wch->bch.Flags) &&
673 wch->bch.rx_skb && (wch->bch.rx_skb->len > 0))
674 recv_Bchannel(&wch->bch, 0);
681 wch->bch.nr, wch->bch.state);
683 wch->bch.err_rdo++;
693 wch->bch.nr, star);
697 wch->bch.nr, wch->bch.state);
699 wch->bch.err_xdu++;
704 if (wch->bch.tx_skb) {
705 if (!test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
706 wch->bch.tx_idx = 0;
715 wch->bch.nr, wch->bch.state);
717 wch->bch.err_xdu++;
721 if (wch->bch.tx_skb) {
722 if (!test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
723 wch->bch.tx_idx = 0;
897 struct bchannel *bch = container_of(ch, struct bchannel, ch);
898 struct w6692_ch *bc = container_of(bch, struct w6692_ch, bch);
899 struct w6692_hw *card = bch->hw;
908 ret = bchannel_senddata(bch, skb);
914 if (!test_bit(FLG_TRANSPARENT, &bch->Flags))
921 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags))
932 mISDN_clear_bchannel(bch);
950 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
971 struct bchannel *bch;
977 bch = &card->bc[rq->adr.channel - 1].bch;
978 if (test_and_set_bit(FLG_OPEN, &bch->Flags))
980 test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags);
981 bch->ch.protocol = rq->protocol;
982 rq->ch = &bch->ch;
1006 struct bchannel *bch = container_of(ch, struct bchannel, ch);
1007 struct w6692_ch *bc = container_of(bch, struct w6692_ch, bch);
1008 struct w6692_hw *card = bch->hw;
1015 test_and_clear_bit(FLG_OPEN, &bch->Flags);
1016 if (test_bit(FLG_ACTIVE, &bch->Flags)) {
1018 mISDN_freebchannel(bch);
1022 skb_queue_purge(&bch->rqueue);
1023 bch->rcount = 0;
1031 ret = channel_bctrl(bch, arg);
1245 mISDN_freebchannel(&card->bc[1].bch);
1246 mISDN_freebchannel(&card->bc[0].bch);
1278 mISDN_initbchannel(&card->bc[i].bch, MAX_DATA_MEM);
1279 card->bc[i].bch.hw = card;
1280 card->bc[i].bch.nr = i + 1;
1281 card->bc[i].bch.ch.nr = i + 1;
1282 card->bc[i].bch.ch.send = w6692_l2l1B;
1283 card->bc[i].bch.ch.ctrl = w6692_bctrl;
1285 list_add(&card->bc[i].bch.ch.list, &card->dch.dev.bchannels);
1310 mISDN_freebchannel(&card->bc[1].bch);
1311 mISDN_freebchannel(&card->bc[0].bch);