Lines Matching refs:hdlctx

205         } hdlctx;  member
378 if (bc->hdlctx.bufcnt > 0) in encode_hdlc()
385 wp = bc->hdlctx.buf; in encode_hdlc()
423 bc->hdlctx.bufptr = bc->hdlctx.buf; in encode_hdlc()
424 bc->hdlctx.bufcnt = wp - bc->hdlctx.buf; in encode_hdlc()
437 if (bc->hdlctx.state == tx_tail && !(stat & EPP_PTTBIT)) in transmit()
438 bc->hdlctx.state = tx_idle; in transmit()
439 if (bc->hdlctx.state == tx_idle && bc->hdlctx.calibrate <= 0) { in transmit()
440 if (bc->hdlctx.bufcnt <= 0) in transmit()
442 if (bc->hdlctx.bufcnt <= 0) in transmit()
446 bc->hdlctx.slotcnt = bc->ch_params.slottime; in transmit()
449 if ((--bc->hdlctx.slotcnt) > 0) in transmit()
451 bc->hdlctx.slotcnt = bc->ch_params.slottime; in transmit()
456 if (bc->hdlctx.state == tx_idle && bc->hdlctx.bufcnt > 0) { in transmit()
457 bc->hdlctx.state = tx_keyup; in transmit()
458 bc->hdlctx.flags = tenms_to_flags(bc, bc->ch_params.tx_delay); in transmit()
462 switch (bc->hdlctx.state) { in transmit()
464 i = min_t(int, cnt, bc->hdlctx.flags); in transmit()
466 bc->hdlctx.flags -= i; in transmit()
467 if (bc->hdlctx.flags <= 0) in transmit()
468 bc->hdlctx.state = tx_data; in transmit()
479 if (bc->hdlctx.bufcnt <= 0) { in transmit()
481 if (bc->hdlctx.bufcnt <= 0) { in transmit()
482 bc->hdlctx.state = tx_tail; in transmit()
483 bc->hdlctx.flags = tenms_to_flags(bc, bc->ch_params.tx_tail); in transmit()
487 i = min_t(int, cnt, bc->hdlctx.bufcnt); in transmit()
488 bc->hdlctx.bufcnt -= i; in transmit()
490 if (i != pp->ops->epp_write_data(pp, bc->hdlctx.bufptr, i, 0)) in transmit()
492 bc->hdlctx.bufptr += i; in transmit()
497 if (bc->hdlctx.bufcnt > 0) { in transmit()
498 bc->hdlctx.state = tx_data; in transmit()
501 i = min_t(int, cnt, bc->hdlctx.flags); in transmit()
504 bc->hdlctx.flags -= i; in transmit()
516 if (bc->hdlctx.calibrate <= 0) in transmit()
518 i = min_t(int, cnt, bc->hdlctx.calibrate); in transmit()
520 bc->hdlctx.calibrate -= i; in transmit()
925 bc->hdlctx.state = tx_idle; in epp_open()
926 bc->hdlctx.bufcnt = 0; in epp_open()
927 bc->hdlctx.slotcnt = bc->ch_params.slottime; in epp_open()
928 bc->hdlctx.calibrate = 0; in epp_open()
1033 bc->hdlctx.slotcnt = 1; in baycom_ioctl()
1073 bc->hdlctx.calibrate = hi.data.calibrate * bc->bitrate / 8; in baycom_ioctl()