Lines Matching refs:bch

354 	struct bchannel *bch;
376 bch = hc->chan[channel].bch;
377 if (!dch && !bch) {
405 if (bch) {
435 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb);
1007 struct bchannel *bch;
1015 bch = hc->chan[ch].bch;
1016 if (!bch) {
1017 printk(KERN_ERR "%s:internal error ch %d has no bch\n",
1021 if (test_and_set_bit(FLG_OPEN, &bch->Flags))
1023 bch->ch.protocol = rq->protocol;
1024 rq->ch = &bch->ch;
1088 struct bchannel *bch = container_of(ch, struct bchannel, ch);
1089 struct l1oip *hc = bch->hw;
1113 hc->chan[bch->slot].tx_counter += l;
1124 hc->chan[bch->slot].tx_counter += l;
1139 l1oip_socket_send(hc, hc->codec, bch->slot, 0,
1140 hc->chan[bch->slot].tx_counter, p, ll);
1141 hc->chan[bch->slot].tx_counter += ll;
1151 , __func__, bch->slot, hc->b_num + 1);
1152 hc->chan[bch->slot].codecstate = 0;
1153 test_and_set_bit(FLG_ACTIVE, &bch->Flags);
1160 "(1..%d)\n", __func__, bch->slot,
1162 test_and_clear_bit(FLG_ACTIVE, &bch->Flags);
1173 channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
1203 struct bchannel *bch = container_of(ch, struct bchannel, ch);
1206 if (bch->debug & DEBUG_HW)
1211 test_and_clear_bit(FLG_OPEN, &bch->Flags);
1212 test_and_clear_bit(FLG_ACTIVE, &bch->Flags);
1219 err = channel_bctrl(bch, arg);
1254 if (hc->chan[ch].bch) {
1255 mISDN_freebchannel(hc->chan[ch].bch);
1256 kfree(hc->chan[ch].bch);
1289 struct bchannel *bch;
1393 bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL);
1394 if (!bch) {
1399 bch->nr = i + ch;
1400 bch->slot = i + ch;
1401 bch->debug = debug;
1402 mISDN_initbchannel(bch, MAX_DATA_MEM, 0);
1403 bch->hw = hc;
1404 bch->ch.send = handle_bmsg;
1405 bch->ch.ctrl = l1oip_bctrl;
1406 bch->ch.nr = i + ch;
1407 list_add(&bch->ch.list, &dch->dev.bchannels);
1408 hc->chan[i + ch].bch = bch;
1409 set_channelmap(bch->nr, dch->dev.channelmap);