diff options
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 8 | ||||
-rw-r--r-- | drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 2 |
2 files changed, 8 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; diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index 535cf8e..8dafb10 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -186,6 +186,8 @@ struct fxs { int vmwi_linereverse; int reversepolarity; /* polarity reversal */ struct calregs calregs; + unsigned long check_alarm; + unsigned long check_proslic; }; struct qrv { |