Lines Matching refs: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()
1007 struct bchannel *bch; in open_bchannel() local
1015 bch = hc->chan[ch].bch; in open_bchannel()
1016 if (!bch) { in open_bchannel()
1021 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1023 bch->ch.protocol = rq->protocol; in open_bchannel()
1024 rq->ch = &bch->ch; in open_bchannel()
1088 struct bchannel *bch = container_of(ch, struct bchannel, ch); in handle_bmsg() local
1089 struct l1oip *hc = bch->hw; in handle_bmsg()
1113 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1124 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1139 l1oip_socket_send(hc, hc->codec, bch->slot, 0, in handle_bmsg()
1140 hc->chan[bch->slot].tx_counter, p, ll); in handle_bmsg()
1141 hc->chan[bch->slot].tx_counter += ll; in handle_bmsg()
1151 , __func__, bch->slot, hc->b_num + 1); in handle_bmsg()
1152 hc->chan[bch->slot].codecstate = 0; in handle_bmsg()
1153 test_and_set_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1160 "(1..%d)\n", __func__, bch->slot, in handle_bmsg()
1162 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1173 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) in channel_bctrl() argument
1203 struct bchannel *bch = container_of(ch, struct bchannel, ch); in l1oip_bctrl() local
1206 if (bch->debug & DEBUG_HW) in l1oip_bctrl()
1211 test_and_clear_bit(FLG_OPEN, &bch->Flags); in l1oip_bctrl()
1212 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in l1oip_bctrl()
1219 err = channel_bctrl(bch, arg); in l1oip_bctrl()
1254 if (hc->chan[ch].bch) { in release_card()
1255 mISDN_freebchannel(hc->chan[ch].bch); in release_card()
1256 kfree(hc->chan[ch].bch); in release_card()
1289 struct bchannel *bch; in init_card() local
1393 bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL); in init_card()
1394 if (!bch) { in init_card()
1399 bch->nr = i + ch; in init_card()
1400 bch->slot = i + ch; in init_card()
1401 bch->debug = debug; in init_card()
1402 mISDN_initbchannel(bch, MAX_DATA_MEM, 0); in init_card()
1403 bch->hw = hc; in init_card()
1404 bch->ch.send = handle_bmsg; in init_card()
1405 bch->ch.ctrl = l1oip_bctrl; in init_card()
1406 bch->ch.nr = i + ch; in init_card()
1407 list_add(&bch->ch.list, &dch->dev.bchannels); in init_card()
1408 hc->chan[i + ch].bch = bch; in init_card()
1409 set_channelmap(bch->nr, dch->dev.channelmap); in init_card()