diff options
-rw-r--r-- | drivers/dahdi/wctdm.c | 4 | ||||
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 4 | ||||
-rw-r--r-- | include/dahdi/user.h | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c index 2d92a80..d4c94e9 100644 --- a/drivers/dahdi/wctdm.c +++ b/drivers/dahdi/wctdm.c @@ -1848,8 +1848,8 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS) return -EINVAL; - wc->mod[chan->chanpos - 1].fxs.vmwimessages = (x & 255); - wc->mod[chan->chanpos - 1].fxs.mwisendtype = (x & ~255); + wc->mod[chan->chanpos - 1].fxs.vmwimessages = (x & DAHDI_VMWI_NUMBER_MASK); + wc->mod[chan->chanpos - 1].fxs.mwisendtype = (x & ~ DAHDI_VMWI_NUMBER_MASK); if (wc->mod[chan->chanpos - 1].fxs.vmwimessages){ x = wc->mod[chan->chanpos - 1].fxs.mwisendtype; wc->mod[chan->chanpos - 1].fxs.vmwi_lrev = (x & DAHDI_VMWI_LREV)?1:0; diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index e80ac82..37591eb 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -2453,8 +2453,8 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS) return -EINVAL; - wc->mods[chan->chanpos - 1].fxs.vmwimessages = (x & 255); - wc->mods[chan->chanpos - 1].fxs.mwisendtype = (x & ~255); + wc->mods[chan->chanpos - 1].fxs.vmwimessages = (x & DAHDI_VMWI_NUMBER_MASK); + wc->mods[chan->chanpos - 1].fxs.mwisendtype = (x & ~DAHDI_VMWI_NUMBER_MASK); if (wc->mods[chan->chanpos - 1].fxs.vmwimessages){ x = wc->mods[chan->chanpos - 1].fxs.mwisendtype; wc->mods[chan->chanpos - 1].fxs.vmwilinereverse= (x & DAHDI_VMWI_LREV)?1:0; diff --git a/include/dahdi/user.h b/include/dahdi/user.h index db79fbf..c7b45c2 100644 --- a/include/dahdi/user.h +++ b/include/dahdi/user.h @@ -972,6 +972,7 @@ struct dahdi_hwgain { */ #define DAHDI_VMWI _IOWR(DAHDI_CODE, 94, int) +#define DAHDI_VMWI_NUMBER_MASK (0xffff) /* Number of messages pending for VMWI */ #define DAHDI_VMWI_FSK (1 << 16) /* default FSK, no Ring Pulse Alert Signal*/ #define DAHDI_VMWI_RPAS (1 << 17) /* Ring Pulse Alert Signal then FSK */ #define DAHDI_VMWI_LREV (1 << 18) /* Line Reversal */ |