Lines Matching refs:bch
366 struct bchannel *bch; in l1oip_socket_recv() local
388 bch = hc->chan[channel].bch; in l1oip_socket_recv()
389 if (!dch && !bch) { in l1oip_socket_recv()
417 if (bch) { in l1oip_socket_recv()
453 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); in l1oip_socket_recv()
1023 struct bchannel *bch; in open_bchannel() local
1031 bch = hc->chan[ch].bch; in open_bchannel()
1032 if (!bch) { in open_bchannel()
1037 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1039 bch->ch.protocol = rq->protocol; in open_bchannel()
1040 rq->ch = &bch->ch; in open_bchannel()
1104 struct bchannel *bch = container_of(ch, struct bchannel, ch); in handle_bmsg() local
1105 struct l1oip *hc = bch->hw; in handle_bmsg()
1129 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1140 hc->chan[bch->slot].tx_counter += l; in handle_bmsg()
1151 l1oip_socket_send(hc, hc->codec, bch->slot, 0, in handle_bmsg()
1152 hc->chan[bch->slot].tx_counter, p, ll); in handle_bmsg()
1153 hc->chan[bch->slot].tx_counter += ll; in handle_bmsg()
1163 , __func__, bch->slot, hc->b_num + 1); in handle_bmsg()
1164 hc->chan[bch->slot].codecstate = 0; in handle_bmsg()
1165 test_and_set_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1172 "(1..%d)\n", __func__, bch->slot, in handle_bmsg()
1174 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in handle_bmsg()
1185 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) in channel_bctrl() argument
1215 struct bchannel *bch = container_of(ch, struct bchannel, ch); in l1oip_bctrl() local
1218 if (bch->debug & DEBUG_HW) in l1oip_bctrl()
1223 test_and_clear_bit(FLG_OPEN, &bch->Flags); in l1oip_bctrl()
1224 test_and_clear_bit(FLG_ACTIVE, &bch->Flags); in l1oip_bctrl()
1231 err = channel_bctrl(bch, arg); in l1oip_bctrl()
1267 if (hc->chan[ch].bch) { in release_card()
1268 mISDN_freebchannel(hc->chan[ch].bch); in release_card()
1269 kfree(hc->chan[ch].bch); in release_card()
1303 struct bchannel *bch; in init_card() local
1407 bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL); in init_card()
1408 if (!bch) { in init_card()
1413 bch->nr = i + ch; in init_card()
1414 bch->slot = i + ch; in init_card()
1415 bch->debug = debug; in init_card()
1416 mISDN_initbchannel(bch, MAX_DATA_MEM, 0); in init_card()
1417 bch->hw = hc; in init_card()
1418 bch->ch.send = handle_bmsg; in init_card()
1419 bch->ch.ctrl = l1oip_bctrl; in init_card()
1420 bch->ch.nr = i + ch; in init_card()
1421 list_add(&bch->ch.list, &dch->dev.bchannels); in init_card()
1422 hc->chan[i + ch].bch = bch; in init_card()
1423 set_channelmap(bch->nr, dch->dev.channelmap); in init_card()