Lines Matching refs:bcs
47 struct bc_state *bcs; in writebuf_from_LL() local
60 bcs = &cs->bcs[channel]; in writebuf_from_LL()
104 return cs->ops->send_skb(bcs, skb); in writebuf_from_LL()
115 void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb) in gigaset_skb_sent() argument
117 isdn_if *iif = bcs->cs->iif; in gigaset_skb_sent()
122 ++bcs->trans_up; in gigaset_skb_sent()
125 dev_warn(bcs->cs->dev, "%s: skb->len==%d\n", in gigaset_skb_sent()
131 bcs->cs->myid, bcs->channel, len); in gigaset_skb_sent()
133 response.driver = bcs->cs->myid; in gigaset_skb_sent()
135 response.arg = bcs->channel; in gigaset_skb_sent()
151 void gigaset_skb_rcvd(struct bc_state *bcs, struct sk_buff *skb) in gigaset_skb_rcvd() argument
153 isdn_if *iif = bcs->cs->iif; in gigaset_skb_rcvd()
155 iif->rcvcallb_skb(bcs->cs->myid, bcs->channel, skb); in gigaset_skb_rcvd()
156 bcs->trans_down++; in gigaset_skb_rcvd()
167 void gigaset_isdn_rcv_err(struct bc_state *bcs) in gigaset_isdn_rcv_err() argument
169 isdn_if *iif = bcs->cs->iif; in gigaset_isdn_rcv_err()
173 if (bcs->ignore) { in gigaset_isdn_rcv_err()
174 bcs->ignore--; in gigaset_isdn_rcv_err()
179 bcs->corrupted++; in gigaset_isdn_rcv_err()
183 response.driver = bcs->cs->myid; in gigaset_isdn_rcv_err()
185 response.arg = bcs->channel; in gigaset_isdn_rcv_err()
198 struct bc_state *bcs; in command_from_LL() local
231 bcs = cs->bcs + ch; in command_from_LL()
232 if (gigaset_get_channel(bcs) < 0) { in command_from_LL()
236 switch (bcs->proto2) { in command_from_LL()
238 bcs->rx_bufsize = SBUFSIZE; in command_from_LL()
241 bcs->rx_bufsize = TRANSBUFSIZE; in command_from_LL()
243 dev_kfree_skb(bcs->rx_skb); in command_from_LL()
244 gigaset_new_rx_skb(bcs); in command_from_LL()
248 gigaset_free_channel(bcs); in command_from_LL()
302 snprintf(commands[AT_PROTO], 9, "^SBPR=%u\r", bcs->proto2); in command_from_LL()
308 (unsigned) bcs->channel + 1); in command_from_LL()
310 if (!gigaset_add_event(cs, &bcs->at_state, EV_DIAL, commands, in command_from_LL()
311 bcs->at_state.seq_index, NULL)) { in command_from_LL()
315 gigaset_free_channel(bcs); in command_from_LL()
327 bcs = cs->bcs + ch; in command_from_LL()
328 switch (bcs->proto2) { in command_from_LL()
330 bcs->rx_bufsize = SBUFSIZE; in command_from_LL()
333 bcs->rx_bufsize = TRANSBUFSIZE; in command_from_LL()
335 dev_kfree_skb(bcs->rx_skb); in command_from_LL()
336 gigaset_new_rx_skb(bcs); in command_from_LL()
337 if (!gigaset_add_event(cs, &bcs->at_state, in command_from_LL()
350 bcs = cs->bcs + ch; in command_from_LL()
351 if (!gigaset_add_event(cs, &bcs->at_state, in command_from_LL()
370 bcs = cs->bcs + ch; in command_from_LL()
371 if (bcs->chstate & CHS_D_UP) { in command_from_LL()
379 bcs->proto2 = L2_HDLC; in command_from_LL()
383 bcs->proto2 = L2_VOICE; in command_from_LL()
418 dev_err(bcs->cs->dev, "out of memory\n"); in command_from_LL()
422 gigaset_free_channel(bcs); in command_from_LL()
437 static void gigaset_i4l_channel_cmd(struct bc_state *bcs, int cmd) in gigaset_i4l_channel_cmd() argument
439 isdn_if *iif = bcs->cs->iif; in gigaset_i4l_channel_cmd()
442 command.driver = bcs->cs->myid; in gigaset_i4l_channel_cmd()
444 command.arg = bcs->channel; in gigaset_i4l_channel_cmd()
460 struct bc_state *bcs = at_state->bcs; in gigaset_isdn_icall() local
499 if (!bcs) { in gigaset_isdn_icall()
506 response.arg = bcs->channel; in gigaset_isdn_icall()
515 bcs->chstate |= CHS_NOTIFY_LL; in gigaset_isdn_icall()
545 void gigaset_isdn_connD(struct bc_state *bcs) in gigaset_isdn_connD() argument
548 gigaset_i4l_channel_cmd(bcs, ISDN_STAT_DCONN); in gigaset_isdn_connD()
558 void gigaset_isdn_hupD(struct bc_state *bcs) in gigaset_isdn_hupD() argument
561 gigaset_i4l_channel_cmd(bcs, ISDN_STAT_DHUP); in gigaset_isdn_hupD()
571 void gigaset_isdn_connB(struct bc_state *bcs) in gigaset_isdn_connB() argument
574 gigaset_i4l_channel_cmd(bcs, ISDN_STAT_BCONN); in gigaset_isdn_connB()
584 void gigaset_isdn_hupB(struct bc_state *bcs) in gigaset_isdn_hupB() argument
587 gigaset_i4l_channel_cmd(bcs, ISDN_STAT_BHUP); in gigaset_isdn_hupB()