Lines Matching refs:modem

130 	} modem;  member
199 bc->modem.ser12.pll_time; in ser12_rx()
204 bc->modem.ser12.pll_time += bc->baud_us; in ser12_rx()
205 bc->modem.ser12.dcd_time--; in ser12_rx()
207 if (bc->modem.shreg & 1) { in ser12_rx()
208 hdlcdrv_putbits(&bc->hdrv, (bc->modem.shreg >> 1) ^ 0xffff); in ser12_rx()
209 bc->modem.shreg = 0x10000; in ser12_rx()
212 bc->modem.shreg >>= 1; in ser12_rx()
214 if (bc->modem.ser12.dcd_time <= 0) { in ser12_rx()
216 hdlcdrv_setdcd(&bc->hdrv, (bc->modem.ser12.dcd_sum0 + in ser12_rx()
217 bc->modem.ser12.dcd_sum1 + in ser12_rx()
218 bc->modem.ser12.dcd_sum2) < 0); in ser12_rx()
219 bc->modem.ser12.dcd_sum2 = bc->modem.ser12.dcd_sum1; in ser12_rx()
220 bc->modem.ser12.dcd_sum1 = bc->modem.ser12.dcd_sum0; in ser12_rx()
221 bc->modem.ser12.dcd_sum0 = 2; /* slight bias */ in ser12_rx()
222 bc->modem.ser12.dcd_time += 120; in ser12_rx()
224 if (bc->modem.ser12.last_rxbit != curs) { in ser12_rx()
225 bc->modem.ser12.last_rxbit = curs; in ser12_rx()
226 bc->modem.shreg |= 0x10000; in ser12_rx()
229 bc->modem.ser12.pll_time += bdus8; in ser12_rx()
231 bc->modem.ser12.pll_time += 1000000 - bdus8; in ser12_rx()
234 bc->modem.ser12.dcd_sum0 += 4; in ser12_rx()
236 bc->modem.ser12.dcd_sum0--; in ser12_rx()
241 while (bc->modem.ser12.pll_time >= 1000000) in ser12_rx()
242 bc->modem.ser12.pll_time -= 1000000; in ser12_rx()
289 if (bc->modem.ptt) in ser12_interrupt()
290 outb(0x0e | (!!bc->modem.ser12.tx_bit), MCR(dev->base_addr)); in ser12_interrupt()
305 if (bc->modem.ptt && txcount) { in ser12_interrupt()
306 if (bc->modem.ser12.txshreg <= 1) { in ser12_interrupt()
307 bc->modem.ser12.txshreg = 0x10000 | hdlcdrv_getbits(&bc->hdrv); in ser12_interrupt()
310 bc->modem.ptt = 0; in ser12_interrupt()
314 bc->modem.ser12.tx_bit = !(bc->modem.ser12.tx_bit ^ (bc->modem.ser12.txshreg & 1)); in ser12_interrupt()
315 bc->modem.ser12.txshreg >>= 1; in ser12_interrupt()
319 if (!bc->modem.ptt && txcount) { in ser12_interrupt()
323 bc->modem.ser12.txshreg = 1; in ser12_interrupt()
324 bc->modem.ptt = 1; in ser12_interrupt()
398 memset(&bc->modem, 0, sizeof(bc->modem)); in ser12_open()