Lines Matching full:bch
354 struct bchannel *bch; in l1oip_socket_recv() local
376 bch = hc->chan[channel].bch; in l1oip_socket_recv()
377 if (!dch && !bch) { in l1oip_socket_recv()
405 if (bch) { in l1oip_socket_recv()
435 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); in l1oip_socket_recv()
1005 struct bchannel *bch; in open_bchannel() local
1013 bch = hc->chan[ch].bch; in open_bchannel()
1014 if (!bch) { in open_bchannel()
1015 printk(KERN_ERR "%s:internal error ch %d has no bch\n", in open_bchannel()
1019 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1021 bch->ch.protocol = rq->protocol; in open_bchannel()
1022 rq->ch = &bch->ch; in open_bchannel()
1086 struct bchannel *bch = container_of(ch, struct bchannel, ch); in handle_bmsg() local
1087 struct l1oip *hc = bch->hw; in handle_bmsg()
1111 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1122 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1137 l1oip_socket_send(hc, hc->codec, bch->slot, 0, in handle_bmsg()
1138 hc->chan[bch->slot].tx_counter, p, ll); in handle_bmsg()
1139 hc->chan[bch->slot].tx_counter += ll; in handle_bmsg()
1149 , __func__, bch->slot, hc->b_num + 1); in handle_bmsg()
1150 hc->chan[bch->slot].codecstate = 0; in handle_bmsg()
1151 test_and_set_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1158 "(1..%d)\n", __func__, bch->slot, in handle_bmsg()
1160 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1171 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) in channel_bctrl() argument
1201 struct bchannel *bch = container_of(ch, struct bchannel, ch); in l1oip_bctrl() local
1204 if (bch->debug & DEBUG_HW) in l1oip_bctrl()
1209 test_and_clear_bit(FLG_OPEN, &bch->Flags); in l1oip_bctrl()
1210 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in l1oip_bctrl()
1217 err = channel_bctrl(bch, arg); in l1oip_bctrl()
1253 if (hc->chan[ch].bch) { in release_card()
1254 mISDN_freebchannel(hc->chan[ch].bch); in release_card()
1255 kfree(hc->chan[ch].bch); in release_card()
1288 struct bchannel *bch; in init_card() local
1392 bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL); in init_card()
1393 if (!bch) { in init_card()
1398 bch->nr = i + ch; in init_card()
1399 bch->slot = i + ch; in init_card()
1400 bch->debug = debug; in init_card()
1401 mISDN_initbchannel(bch, MAX_DATA_MEM, 0); in init_card()
1402 bch->hw = hc; in init_card()
1403 bch->ch.send = handle_bmsg; in init_card()
1404 bch->ch.ctrl = l1oip_bctrl; in init_card()
1405 bch->ch.nr = i + ch; in init_card()
1406 list_add(&bch->ch.list, &dch->dev.bchannels); in init_card()
1407 hc->chan[i + ch].bch = bch; in init_card()
1408 set_channelmap(bch->nr, dch->dev.channelmap); in init_card()