Lines Matching refs:modem
144 } modem; member
238 timediff = 1000000 + tv->tv_usec - bc->modem.ser12.pll_time; in ser12_rx()
243 bc->modem.ser12.pll_time += bc->baud_us; in ser12_rx()
244 bc->modem.ser12.dcd_time--; in ser12_rx()
246 if (bc->modem.shreg & 1) { in ser12_rx()
247 hdlcdrv_putbits(&bc->hdrv, (bc->modem.shreg >> 1) ^ 0xffff); in ser12_rx()
248 bc->modem.shreg = 0x10000; in ser12_rx()
251 bc->modem.shreg >>= 1; in ser12_rx()
253 if (bc->modem.ser12.dcd_time <= 0) { in ser12_rx()
255 hdlcdrv_setdcd(&bc->hdrv, (bc->modem.ser12.dcd_sum0 + in ser12_rx()
256 bc->modem.ser12.dcd_sum1 + in ser12_rx()
257 bc->modem.ser12.dcd_sum2) < 0); in ser12_rx()
258 bc->modem.ser12.dcd_sum2 = bc->modem.ser12.dcd_sum1; in ser12_rx()
259 bc->modem.ser12.dcd_sum1 = bc->modem.ser12.dcd_sum0; in ser12_rx()
260 bc->modem.ser12.dcd_sum0 = 2; /* slight bias */ in ser12_rx()
261 bc->modem.ser12.dcd_time += 120; in ser12_rx()
263 if (bc->modem.ser12.last_rxbit != curs) { in ser12_rx()
264 bc->modem.ser12.last_rxbit = curs; in ser12_rx()
265 bc->modem.shreg |= 0x10000; in ser12_rx()
268 bc->modem.ser12.pll_time += bdus8; in ser12_rx()
270 bc->modem.ser12.pll_time += 1000000 - bdus8; in ser12_rx()
273 bc->modem.ser12.dcd_sum0 += 4; in ser12_rx()
275 bc->modem.ser12.dcd_sum0--; in ser12_rx()
280 while (bc->modem.ser12.pll_time >= 1000000) in ser12_rx()
281 bc->modem.ser12.pll_time -= 1000000; in ser12_rx()
328 if (bc->modem.ptt) in ser12_interrupt()
329 outb(0x0e | (!!bc->modem.ser12.tx_bit), MCR(dev->base_addr)); in ser12_interrupt()
344 if (bc->modem.ptt && txcount) { in ser12_interrupt()
345 if (bc->modem.ser12.txshreg <= 1) { in ser12_interrupt()
346 bc->modem.ser12.txshreg = 0x10000 | hdlcdrv_getbits(&bc->hdrv); in ser12_interrupt()
349 bc->modem.ptt = 0; in ser12_interrupt()
353 bc->modem.ser12.tx_bit = !(bc->modem.ser12.tx_bit ^ (bc->modem.ser12.txshreg & 1)); in ser12_interrupt()
354 bc->modem.ser12.txshreg >>= 1; in ser12_interrupt()
358 if (!bc->modem.ptt && txcount) { in ser12_interrupt()
362 bc->modem.ser12.txshreg = 1; in ser12_interrupt()
363 bc->modem.ptt = 1; in ser12_interrupt()
437 memset(&bc->modem, 0, sizeof(bc->modem)); in ser12_open()