diff options
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 19 | ||||
-rw-r--r-- | include/dahdi/kernel.h | 70 |
2 files changed, 3 insertions, 86 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index bfa5a8d..6bb7b93 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -3086,10 +3086,8 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in switch(cmd) { /* get channel parameters */ - case DAHDI_GET_PARAMS_V1: case DAHDI_GET_PARAMS: - size_to_copy = (cmd == DAHDI_GET_PARAMS_V1) ? sizeof(struct dahdi_params_v1) : - sizeof(struct dahdi_params); + size_to_copy = sizeof(struct dahdi_params); if (copy_from_user(&stack.param, (struct dahdi_params *) data, size_to_copy)) return -EFAULT; @@ -3173,13 +3171,8 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in break; /* set channel parameters */ - case DAHDI_SET_PARAMS_V1: case DAHDI_SET_PARAMS: - /* The difference between dahdi_params and dahdi_params_v1 is just the - * last field, which is read-only anyway. Thus we just read the - * size of the older struct. - */ - if (copy_from_user(&stack.param, (struct dahdi_params *) data, sizeof(struct dahdi_params_v1))) + if (copy_from_user(&stack.param, (struct dahdi_params *) data, sizeof(struct dahdi_params))) return -EFAULT; stack.param.chan_alarms = 0; /* be explicit about the above */ @@ -3273,12 +3266,8 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in if (copy_to_user((struct dahdi_gains *) data,&stack.gain,sizeof(stack.gain))) return -EFAULT; break; - case DAHDI_SPANSTAT_V1: - case DAHDI_SPANSTAT_V2: case DAHDI_SPANSTAT: - size_to_copy = (cmd == DAHDI_SPANSTAT_V1) ? sizeof(struct dahdi_spaninfo_v1) : - (cmd == DAHDI_SPANSTAT_V2) ? sizeof(struct dahdi_spaninfo_v2) : - sizeof(struct dahdi_spaninfo); + size_to_copy = sizeof(struct dahdi_spaninfo); if (copy_from_user(&stack.spaninfo, (struct dahdi_spaninfo *) data, size_to_copy)) return -EFAULT; i = stack.spaninfo.spanno; /* get specified span number */ @@ -3311,10 +3300,8 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in if (spans[i]->chans[j].sig) stack.spaninfo.numchans++; } - /* version 2 fields */ stack.spaninfo.lbo = spans[i]->lbo; stack.spaninfo.lineconfig = spans[i]->lineconfig; - /* version 3 fields */ stack.spaninfo.irq = spans[i]->irq; stack.spaninfo.linecompat = spans[i]->linecompat; dahdi_copy_string(stack.spaninfo.lboname, dahdi_lboname(spans[i]->lbo), sizeof(stack.spaninfo.lboname)); diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index d93ebd8..cdceb00 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -168,34 +168,6 @@ #define DAHDI_SPANINFO_HAS_LINECONFIG #define DAHDI_SPANINFO_HAS_LBONAME -struct dahdi_params_v1 -{ - int channo; /* Channel number */ - int spanno; /* Span itself */ - int chanpos; /* Channel number in span */ - int sigtype; /* read-only */ - int sigcap; /* read-only */ - int rxisoffhook; /* read-only */ - int rxbits; /* read-only */ - int txbits; /* read-only */ - int txhooksig; /* read-only */ - int rxhooksig; /* read-only */ - int curlaw; /* read-only -- one of DAHDI_LAW_MULAW or DAHDI_LAW_ALAW */ - int idlebits; /* read-only -- What is considered the idle state */ - char name[40]; /* Name of channel */ - int prewinktime; - int preflashtime; - int winktime; - int flashtime; - int starttime; - int rxwinktime; - int rxflashtime; - int debouncetime; - int pulsebreaktime; - int pulsemaketime; - int pulseaftertime; -}; - typedef struct dahdi_params { int channo; /* Channel number */ @@ -225,44 +197,6 @@ typedef struct dahdi_params __u32 chan_alarms; /* alarms on this channel */ } DAHDI_PARAMS; -struct dahdi_spaninfo_v1 { - int spanno; /* span number */ - char name[20]; /* Name */ - char desc[40]; /* Description */ - int alarms; /* alarms status */ - int txlevel; /* what TX level is set to */ - int rxlevel; /* current RX level */ - int bpvcount; /* current BPV count */ - int crc4count; /* current CRC4 error count */ - int ebitcount; /* current E-bit error count */ - int fascount; /* current FAS error count */ - int irqmisses; /* current IRQ misses */ - int syncsrc; /* span # of current sync source, or 0 for free run */ - int numchans; /* number of configured channels on this span */ - int totalchans; /* total number of channels on the span */ - int totaflspans; /* total number of spans in entire system */ -}; - -struct dahdi_spaninfo_v2 { - int spanno; /* span number */ - char name[20]; /* Name */ - char desc[40]; /* Description */ - int alarms; /* alarms status */ - int txlevel; /* what TX level is set to */ - int rxlevel; /* current RX level */ - int bpvcount; /* current BPV count */ - int crc4count; /* current CRC4 error count */ - int ebitcount; /* current E-bit error count */ - int fascount; /* current FAS error count */ - int irqmisses; /* current IRQ misses */ - int syncsrc; /* span # of current sync source, or 0 for free run */ - int numchans; /* number of configured channels on this span */ - int totalchans; /* total number of channels on the span */ - int totalspans; /* total number of spans in entire system */ - int lbo; /* line build out */ - int lineconfig; /* framing/coding */ -}; - typedef struct dahdi_spaninfo { int spanno; /* span number */ char name[20]; /* Name */ @@ -430,13 +364,11 @@ struct dahdi_hwgain{ /* * Get channel parameters */ -#define DAHDI_GET_PARAMS_V1 _IOR (DAHDI_CODE, 5, struct dahdi_params_v1) #define DAHDI_GET_PARAMS _IOR (DAHDI_CODE, 5, struct dahdi_params) /* * Get channel parameters */ -#define DAHDI_SET_PARAMS_V1 _IOW (DAHDI_CODE, 6, struct dahdi_params_v1) #define DAHDI_SET_PARAMS _IOW (DAHDI_CODE, 6, struct dahdi_params) /* @@ -457,8 +389,6 @@ struct dahdi_hwgain{ /* * Get Span Status */ -#define DAHDI_SPANSTAT_V1 _IOWR (DAHDI_CODE, 10, struct dahdi_spaninfo_v1) -#define DAHDI_SPANSTAT_V2 _IOWR (DAHDI_CODE, 10, struct dahdi_spaninfo_v2) #define DAHDI_SPANSTAT _IOWR (DAHDI_CODE, 10, struct dahdi_spaninfo) /* |