Lines Matching refs:bch

355 	struct bchannel *bch;  in l1oip_socket_recv()  local
377 bch = hc->chan[channel].bch; in l1oip_socket_recv()
378 if (!dch && !bch) { in l1oip_socket_recv()
406 if (bch) { in l1oip_socket_recv()
436 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); in l1oip_socket_recv()
1008 struct bchannel *bch; in open_bchannel() local
1016 bch = hc->chan[ch].bch; in open_bchannel()
1017 if (!bch) { in open_bchannel()
1022 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1024 bch->ch.protocol = rq->protocol; in open_bchannel()
1025 rq->ch = &bch->ch; in open_bchannel()
1089 struct bchannel *bch = container_of(ch, struct bchannel, ch); in handle_bmsg() local
1090 struct l1oip *hc = bch->hw; in handle_bmsg()
1114 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1125 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1140 l1oip_socket_send(hc, hc->codec, bch->slot, 0, in handle_bmsg()
1141 hc->chan[bch->slot].tx_counter, p, ll); in handle_bmsg()
1142 hc->chan[bch->slot].tx_counter += ll; in handle_bmsg()
1152 , __func__, bch->slot, hc->b_num + 1); in handle_bmsg()
1153 hc->chan[bch->slot].codecstate = 0; in handle_bmsg()
1154 test_and_set_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1161 "(1..%d)\n", __func__, bch->slot, in handle_bmsg()
1163 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1174 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) in channel_bctrl() argument
1204 struct bchannel *bch = container_of(ch, struct bchannel, ch); in l1oip_bctrl() local
1207 if (bch->debug & DEBUG_HW) in l1oip_bctrl()
1212 test_and_clear_bit(FLG_OPEN, &bch->Flags); in l1oip_bctrl()
1213 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in l1oip_bctrl()
1220 err = channel_bctrl(bch, arg); in l1oip_bctrl()
1255 if (hc->chan[ch].bch) { in release_card()
1256 mISDN_freebchannel(hc->chan[ch].bch); in release_card()
1257 kfree(hc->chan[ch].bch); in release_card()
1290 struct bchannel *bch; in init_card() local
1394 bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL); in init_card()
1395 if (!bch) { in init_card()
1400 bch->nr = i + ch; in init_card()
1401 bch->slot = i + ch; in init_card()
1402 bch->debug = debug; in init_card()
1403 mISDN_initbchannel(bch, MAX_DATA_MEM, 0); in init_card()
1404 bch->hw = hc; in init_card()
1405 bch->ch.send = handle_bmsg; in init_card()
1406 bch->ch.ctrl = l1oip_bctrl; in init_card()
1407 bch->ch.nr = i + ch; in init_card()
1408 list_add(&bch->ch.list, &dch->dev.bchannels); in init_card()
1409 hc->chan[i + ch].bch = bch; in init_card()
1410 set_channelmap(bch->nr, dch->dev.channelmap); in init_card()