Lines Matching refs:bch
371 struct bchannel *bch;
393 bch = hc->chan[channel].bch;
394 if (!dch && !bch) {
422 if (bch) {
458 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb);
1030 struct bchannel *bch;
1038 bch = hc->chan[ch].bch;
1039 if (!bch) {
1040 printk(KERN_ERR "%s:internal error ch %d has no bch\n",
1044 if (test_and_set_bit(FLG_OPEN, &bch->Flags))
1046 bch->ch.protocol = rq->protocol;
1047 rq->ch = &bch->ch;
1111 struct bchannel *bch = container_of(ch, struct bchannel, ch);
1112 struct l1oip *hc = bch->hw;
1136 hc->chan[bch->slot].tx_counter += l;
1147 hc->chan[bch->slot].tx_counter += l;
1158 l1oip_socket_send(hc, hc->codec, bch->slot, 0,
1159 hc->chan[bch->slot].tx_counter, p, ll);
1160 hc->chan[bch->slot].tx_counter += ll;
1170 , __func__, bch->slot, hc->b_num + 1);
1171 hc->chan[bch->slot].codecstate = 0;
1172 test_and_set_bit(FLG_ACTIVE, &bch->Flags);
1179 "(1..%d)\n", __func__, bch->slot,
1181 test_and_clear_bit(FLG_ACTIVE, &bch->Flags);
1192 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
1222 struct bchannel *bch = container_of(ch, struct bchannel, ch);
1225 if (bch->debug & DEBUG_HW)
1230 test_and_clear_bit(FLG_OPEN, &bch->Flags);
1231 test_and_clear_bit(FLG_ACTIVE, &bch->Flags);
1238 err = channel_bctrl(bch, arg);
1274 if (hc->chan[ch].bch) {
1275 mISDN_freebchannel(hc->chan[ch].bch);
1276 kfree(hc->chan[ch].bch);
1310 struct bchannel *bch;
1414 bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL);
1415 if (!bch) {
1420 bch->nr = i + ch;
1421 bch->slot = i + ch;
1422 bch->debug = debug;
1423 mISDN_initbchannel(bch, MAX_DATA_MEM);
1424 bch->hw = hc;
1425 bch->ch.send = handle_bmsg;
1426 bch->ch.ctrl = l1oip_bctrl;
1427 bch->ch.nr = i + ch;
1428 list_add(&bch->ch.list, &dch->dev.bchannels);
1429 hc->chan[i + ch].bch = bch;
1430 set_channelmap(bch->nr, dch->dev.channelmap);