summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dahdi/dahdi-base.c5
-rw-r--r--include/dahdi/user.h23
2 files changed, 20 insertions, 8 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 2691cab..7749c68 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -3435,6 +3435,7 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in
switch(cmd) {
/* get channel parameters */
+ case DAHDI_GET_PARAMS_V1: /* Intentional drop through. */
case DAHDI_GET_PARAMS:
size_to_copy = sizeof(struct dahdi_params);
if (copy_from_user(&stack.param, (struct dahdi_params *) data, size_to_copy))
@@ -3665,6 +3666,7 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in
if (copy_to_user((struct dahdi_spaninfo *) data, &stack.spaninfo, size_to_copy))
return -EFAULT;
break;
+ case DAHDI_CHANDIAG_V1: /* Intentional drop through. */
case DAHDI_CHANDIAG:
get_user(j, (int *)data); /* get channel number from user */
/* make sure its a valid channel number */
@@ -4531,6 +4533,7 @@ static int dahdi_chanandpseudo_ioctl(struct inode *inode, struct file *file, uns
rv = start_tone(chan, j);
spin_unlock_irqrestore(&chan->lock, flags);
return rv;
+ case DAHDI_GETCONF_V1: /* intentional drop through */
case DAHDI_GETCONF: /* get conf stuff */
if (copy_from_user(&stack.conf,(struct dahdi_confinfo *) data,sizeof(stack.conf)))
return -EFAULT;
@@ -4546,6 +4549,7 @@ static int dahdi_chanandpseudo_ioctl(struct inode *inode, struct file *file, uns
if (copy_to_user((struct dahdi_confinfo *) data,&stack.conf,sizeof(stack.conf)))
return -EFAULT;
break;
+ case DAHDI_SETCONF_V1: /* Intentional fall through. */
case DAHDI_SETCONF: /* set conf stuff */
if (copy_from_user(&stack.conf,(struct dahdi_confinfo *) data,sizeof(stack.conf)))
return -EFAULT;
@@ -4708,6 +4712,7 @@ static int dahdi_chanandpseudo_ioctl(struct inode *inode, struct file *file, uns
spin_unlock(&chan->lock);
spin_unlock_irqrestore(&bigzaplock, flags);
return(rv);
+ case DAHDI_CONFDIAG_V1: /* Intention fall-through */
case DAHDI_CONFDIAG: /* output diagnostic info to console */
if (!(chan->flags & DAHDI_FLAG_AUDIO)) return (-EINVAL);
get_user(j,(int *)data); /* get conf # */
diff --git a/include/dahdi/user.h b/include/dahdi/user.h
index 7f4cd3b..67375bb 100644
--- a/include/dahdi/user.h
+++ b/include/dahdi/user.h
@@ -478,8 +478,9 @@ struct dahdi_params {
__u32 chan_alarms; /* alarms on this channel */
};
-#define DAHDI_GET_PARAMS _IOR(DAHDI_CODE, 5, struct dahdi_params)
-#define DAHDI_SET_PARAMS _IOW(DAHDI_CODE, 5, struct dahdi_params)
+#define DAHDI_GET_PARAMS_V1 _IOR(DAHDI_CODE, 5, struct dahdi_params)
+#define DAHDI_GET_PARAMS _IOWR(DAHDI_CODE, 5, struct dahdi_params)
+#define DAHDI_SET_PARAMS _IOW(DAHDI_CODE, 5, struct dahdi_params)
/*
* Set Hookswitch Status
@@ -547,8 +548,11 @@ struct dahdi_confinfo {
int confmode; /* conferencing mode */
};
-#define DAHDI_GETCONF _IOR(DAHDI_CODE, 12, struct dahdi_confinfo)
-#define DAHDI_SETCONF _IOW(DAHDI_CODE, 12, struct dahdi_confinfo)
+#define DAHDI_GETCONF_V1 _IOR(DAHDI_CODE, 12, struct dahdi_confinfo)
+#define DAHDI_GETCONF _IOWR(DAHDI_CODE, 12, struct dahdi_confinfo)
+
+#define DAHDI_SETCONF_V1 _IOW(DAHDI_CODE, 12, struct dahdi_confinfo)
+#define DAHDI_SETCONF _IOWR(DAHDI_CODE, 13, struct dahdi_confinfo)
/*
* Setup or Remove Conference Link
@@ -558,7 +562,8 @@ struct dahdi_confinfo {
/*
* Display Conference Diagnostic Information on Console
*/
-#define DAHDI_CONFDIAG _IOR(DAHDI_CODE, 15, int)
+#define DAHDI_CONFDIAG_V1 _IOR(DAHDI_CODE, 15, int)
+#define DAHDI_CONFDIAG _IOW(DAHDI_CODE, 15, int)
/*
* Get/Set Channel audio gains
@@ -569,8 +574,9 @@ struct dahdi_gains {
unsigned char txgain[256]; /* Transmit gain table */
};
-#define DAHDI_GETGAINS _IOR(DAHDI_CODE, 16, struct dahdi_gains)
-#define DAHDI_SETGAINS _IOW(DAHDI_CODE, 16, struct dahdi_gains)
+#define DAHDI_GETGAINS_V1 _IOR(DAHDI_CODE, 16, struct dahdi_gains)
+#define DAHDI_GETGAINS _IOWR(DAHDI_CODE, 16, struct dahdi_gains)
+#define DAHDI_SETGAINS _IOW(DAHDI_CODE, 16, struct dahdi_gains)
/*
* Set Line (T1) Configurations
@@ -810,7 +816,8 @@ struct dahdi_ring_cadence {
/*
* Display Channel Diagnostic Information on Console
*/
-#define DAHDI_CHANDIAG _IOR(DAHDI_CODE, 44, int)
+#define DAHDI_CHANDIAG_V1 _IOR(DAHDI_CODE, 44, int)
+#define DAHDI_CHANDIAG _IOW(DAHDI_CODE, 44, int)
/*
* Set Channel's SF Tone Configuration