diff options
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/base.c')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 2fe0bdd..afdbc89 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -2213,8 +2213,9 @@ static void wctdm_isr_misc_fxs(struct wctdm *wc, struct wctdm_module *const mod) struct fxs *const fxs = &mod->mod.fxs; unsigned long flags; - if (!(wc->framecount % 10000)) { + if (time_after(wc->framecount, fxs->check_alarm)) { /* Accept an alarm once per 10 seconds */ + fxs->check_alarm = wc->framecount + (1000*10); if (fxs->palarms) fxs->palarms--; } @@ -2222,8 +2223,11 @@ static void wctdm_isr_misc_fxs(struct wctdm *wc, struct wctdm_module *const mod) wctdm_proslic_check_oppending(wc, mod); - if (!(wc->framecount & 0xfc)) /* every 256ms */ + if (time_after(wc->framecount, fxs->check_proslic)) { + fxs->check_proslic = wc->framecount + 250; /* every 250ms */ wctdm_proslic_recheck_sanity(wc, mod); + } + if (SLIC_LF_RINGING == fxs->lasttxhook) { /* RINGing, prepare for OHT */ fxs->ohttimer = OHT_TIMER << 3; |