Lines Matching refs:hdlctx
190 } hdlctx; member
367 if (bc->hdlctx.bufcnt > 0) in encode_hdlc()
374 wp = bc->hdlctx.buf; in encode_hdlc()
412 bc->hdlctx.bufptr = bc->hdlctx.buf; in encode_hdlc()
413 bc->hdlctx.bufcnt = wp - bc->hdlctx.buf; in encode_hdlc()
426 if (bc->hdlctx.state == tx_tail && !(stat & EPP_PTTBIT)) in transmit()
427 bc->hdlctx.state = tx_idle; in transmit()
428 if (bc->hdlctx.state == tx_idle && bc->hdlctx.calibrate <= 0) { in transmit()
429 if (bc->hdlctx.bufcnt <= 0) in transmit()
431 if (bc->hdlctx.bufcnt <= 0) in transmit()
435 bc->hdlctx.slotcnt = bc->ch_params.slottime; in transmit()
438 if ((--bc->hdlctx.slotcnt) > 0) in transmit()
440 bc->hdlctx.slotcnt = bc->ch_params.slottime; in transmit()
445 if (bc->hdlctx.state == tx_idle && bc->hdlctx.bufcnt > 0) { in transmit()
446 bc->hdlctx.state = tx_keyup; in transmit()
447 bc->hdlctx.flags = tenms_to_flags(bc, bc->ch_params.tx_delay); in transmit()
451 switch (bc->hdlctx.state) { in transmit()
453 i = min_t(int, cnt, bc->hdlctx.flags); in transmit()
455 bc->hdlctx.flags -= i; in transmit()
456 if (bc->hdlctx.flags <= 0) in transmit()
457 bc->hdlctx.state = tx_data; in transmit()
468 if (bc->hdlctx.bufcnt <= 0) { in transmit()
470 if (bc->hdlctx.bufcnt <= 0) { in transmit()
471 bc->hdlctx.state = tx_tail; in transmit()
472 bc->hdlctx.flags = tenms_to_flags(bc, bc->ch_params.tx_tail); in transmit()
476 i = min_t(int, cnt, bc->hdlctx.bufcnt); in transmit()
477 bc->hdlctx.bufcnt -= i; in transmit()
479 if (i != pp->ops->epp_write_data(pp, bc->hdlctx.bufptr, i, 0)) in transmit()
481 bc->hdlctx.bufptr += i; in transmit()
486 if (bc->hdlctx.bufcnt > 0) { in transmit()
487 bc->hdlctx.state = tx_data; in transmit()
490 i = min_t(int, cnt, bc->hdlctx.flags); in transmit()
493 bc->hdlctx.flags -= i; in transmit()
506 if (bc->hdlctx.calibrate <= 0) in transmit()
508 i = min_t(int, cnt, bc->hdlctx.calibrate); in transmit()
510 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_siocdevprivate()
1073 bc->hdlctx.calibrate = hi.data.calibrate * bc->bitrate / 8; in baycom_siocdevprivate()