abc cleanup.

This commit is contained in:
Fritz Elfert 1998-06-07 00:20:21 +00:00
parent a4ab312cdf
commit b5d29eca0b
8 changed files with 50 additions and 1317 deletions

View File

@ -2,7 +2,6 @@
# ISDN device configuration
#
if [ "$CONFIG_INET" != "n" ]; then
# bool 'ABC-Ext. Support (alpha-test) (>= 2.1.x Kernels)' CONFIG_ISDN_WITH_ABC
bool 'Support synchronous PPP' CONFIG_ISDN_PPP
if [ "$CONFIG_ISDN_PPP" != "n" ]; then
bool 'Use VJ-compression with synchronous PPP' CONFIG_ISDN_PPP_VJ
@ -52,6 +51,7 @@ fi
if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
dep_tristate 'Spellcaster support (EXPERIMENTAL)' CONFIG_ISDN_DRV_SC $CONFIG_ISDN
dep_tristate 'IBM Active 2000 support (EXPERIMENTAL)' CONFIG_ISDN_DRV_ACT2000 $CONFIG_ISDN
dep_tristate 'Diehl active card support (EXPERIMENTAL)' CONFIG_ISDN_DRV_DIEHL $CONFIG_ISDN
fi
dep_tristate 'AVM-B1 with CAPI2.0 support' CONFIG_ISDN_DRV_AVMB1 $CONFIG_ISDN
if [ "$CONFIG_ISDN_DRV_AVMB1" != "n" ]; then

View File

@ -13,7 +13,7 @@ O_TARGET :=
ifeq ($(CONFIG_ISDN),y)
L_TARGET := isdn.a
L_OBJS += isdn_net.o isdn_tty.o isdn_cards.o isdn_v110.o abccompress.o abcrout_net.o
L_OBJS += isdn_net.o isdn_tty.o isdn_cards.o isdn_v110.o
LX_OBJS += isdn_common.o
ifdef CONFIG_ISDN_PPP
L_OBJS += isdn_ppp.o
@ -35,7 +35,7 @@ else
ifeq ($(CONFIG_ISDN),m)
M_OBJS += isdn.o
O_TARGET += isdn.o
O_OBJS += isdn_net.o isdn_tty.o isdn_v110.o abccompress.o abcrout_net.o
O_OBJS += isdn_net.o isdn_tty.o isdn_v110.o
OX_OBJS += isdn_common.o
ifdef CONFIG_ISDN_PPP
O_OBJS += isdn_ppp.o
@ -127,5 +127,15 @@ else
endif
endif
ifeq ($(CONFIG_ISDN_DRV_DIEHL),y)
L_OBJS += diehl/diehl.o
SUB_DIRS += diehl
MOD_SUB_DIRS += diehl
else
ifeq ($(CONFIG_ISDN_DRV_DIEHL),m)
MOD_SUB_DIRS += diehl
endif
endif
include $(TOPDIR)/Rules.make

View File

@ -1,47 +0,0 @@
/* $Id$
*
* ONLY FOR KERNEL > 2.1.0 !!!!!!!!!!!!!!!
*
* Linux ISDN subsystem, network interfaces and related functions (linklevel).
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Fa. abc Agentur fuer
* Bildschirm-Communication GmbH
* Mercedesstrasse 14
* 71063 Sindelfingen
* Germany
*
* $Log$
* Revision 1.3 1998/04/27 12:00:21 detabc
* *** empty log message ***
*
* Revision 1.2 1998/03/08 13:14:20 detabc
* abc-extension support for kernels > 2.1.x
* first try (sorry experimental)
*
* Revision 1.1.2.2 1998/03/08 11:35:04 detabc
* Add cvs header-controls an remove unused funktions
*
*/
/*
** wegen einstweiliger verfuegung gegen DW ist zur zeit
** die abc-extension bis zur klaerung der rechtslage nicht
** im internet verfuegbar
*/

View File

@ -1,74 +0,0 @@
/* $Id$
*
* ONLY FOR KERNEL > 2.1.0 !!!!!!!!!!!!!!!
*
* Linux ISDN subsystem, network interfaces and related functions (linklevel).
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
* Fa. abc Agentur fuer
* Bildschirm-Communication GmbH
* Mercedesstrasse 14
* 71063 Sindelfingen
* Germany
*
*
* $Log$
* Revision 1.9 1998/05/22 10:01:20 detabc
* in case of a icmp-unreach condition the tcp-keepalive-entrys
* will be dropped from the internal double-link-list (only abc-extension).
* send icmp unreach only if the skb->protocol == ETH_P_IP
* speedup abc-no-dchan redial
*
* Revision 1.8 1998/05/07 19:58:48 detabc
* bugfix in abc_delayed_hangup
* optimize keepalive-tests for abc_rawip
*
* Revision 1.7 1998/05/06 08:35:00 detabc
* fixed a wrong response-message in udp-control-packets
*
* Revision 1.6 1998/04/27 12:00:23 detabc
* *** empty log message ***
*
* Revision 1.5 1998/04/26 20:01:17 detabc
* add new abc-extension-code from 2.0.xx kernels
* remove some unused code
*
* Revision 1.4 1998/04/21 18:03:40 detabc
* changes for 2.1.x kernels
*
* Revision 1.3 1998/03/08 14:26:06 detabc
* change kfree_skb to dev_kfree_skb
* remove SET_SKB_FREE
*
* Revision 1.2 1998/03/08 13:14:23 detabc
* abc-extension support for kernels > 2.1.x
* first try (sorry experimental)
*
* Revision 1.1.2.2 1998/03/08 11:35:06 detabc
* Add cvs header-controls an remove unused funktions
*
*/
/*
** wegen einstweiliger verfuegung gegen DW ist zur zeit
** die abc-extension bis zur klaerung der rechtslage nicht
** im internet verfuegbar
*/

View File

@ -21,6 +21,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.64 1998/06/02 12:10:03 detabc
* wegen einer einstweiliger verfuegung gegen DW ist zur zeit
* die abc-extension bis zur klaerung der rechtslage nicht verfuegbar
*
* Revision 1.63 1998/05/03 17:40:38 detabc
* Include abc-extension-support for >= 2.1.x Kernels in
* isdn_net.c and isdn_common.c. alpha-test OK and running !
@ -287,13 +291,6 @@
#include "isdn_v110.h"
#include "isdn_cards.h"
#undef CONFIG_ISDN_WITH_ABC
/*
** wegen einstweiliger verfuegung gegen DW ist zur zeit
** die abc-extension bis zur klaerung der rechtslage nicht
** im internet verfuegbar
*/
/* Debugflags */
#undef ISDN_DEBUG_STATCALLB
@ -317,80 +314,6 @@ extern char *isdn_v110_revision;
static int isdn_writebuf_stub(int, int, const u_char *, int, int);
#ifdef CONFIG_ISDN_WITH_ABC
extern struct sk_buff_head abc_receive_q;
static void abc_control_t(ulong dummy)
{
ulong flags;
ulong xt = dev->abc_use_timeout;
save_flags(flags);
if(xt > 0 && jiffies > xt) {
int i;
ulong jt = jiffies - xt;
int anz = 0;
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
int di;
int ch;
driver *d;
isdn_ctrl cmd;
if(!dev->abc_last_use_jiffies[i] ||
dev->abc_last_use_jiffies[i] > jt)
continue;
dev->abc_last_use_jiffies[i] = 0;
if( (di = dev->drvmap[i]) < 0 ||
(ch = dev->chanmap[i]) < 0)
continue;
if((d = dev->drv[di]) == NULL)
continue;
if( d->interface == NULL ||
d->interface->command == NULL)
continue;
if(dev->abc_last_use_jiffies[i] > jt)
continue;
anz++;
memset(&cmd,0,sizeof(cmd));
cmd.driver = di;
cmd.arg = ch;
cmd.command = ISDN_CMD_HANGUP;
(void) d->interface->command(&cmd);
dev->abc_last_use_jiffies[i] = 0;
}
if(dev->net_verbose > 1 && anz > 0)
printk(KERN_DEBUG "abc_timer_control send %d Hangups\n",anz);
}
save_flags(flags);
cli();
del_timer(&dev->abc_control_timer);
dev->abc_control_timer.expires = jiffies + HZ * 60;
add_timer(&dev->abc_control_timer);
restore_flags(flags);
}
static __inline void abc_set_last_jiffies(int di,int ch)
{
if(di > -1 && ch > -1) {
int i;
if((i = isdn_dc2minor(di,ch)) > -1)
dev->abc_last_use_jiffies[i] = jiffies;
}
}
#endif
void
isdn_MOD_INC_USE_COUNT(void)
{
@ -449,9 +372,6 @@ static void
isdn_timer_funct(ulong dummy)
{
int tf = dev->tflags;
#ifdef CONFIG_ISDN_WITH_ABC
int once_more_timer = abc_test_rcvq(NULL);
#endif
if (tf & ISDN_TIMER_FAST) {
if (tf & ISDN_TIMER_MODEMREAD)
isdn_tty_readmodem();
@ -486,11 +406,7 @@ isdn_timer_funct(ulong dummy)
#endif
}
}
#ifdef CONFIG_ISDN_WITH_ABC
if(once_more_timer || tf)
#else
if (tf)
#endif
{
int flags;
@ -539,9 +455,6 @@ isdn_receive_skb_callback(int di, int channel, struct sk_buff *skb)
dev_kfree_skb(skb);
return;
}
#ifdef CONFIG_ISDN_WITH_ABC
dev->abc_last_use_jiffies[i] = jiffies;
#endif
/* Update statistics */
dev->ibytes[i] += skb->len;
@ -613,9 +526,6 @@ isdn_all_eaz(int di, int ch)
if (di < 0)
return;
#ifdef CONFIG_ISDN_WITH_ABC
abc_set_last_jiffies(di,ch);
#endif
cmd.driver = di;
cmd.arg = ch;
cmd.command = ISDN_CMD_SETEAZ;
@ -693,13 +603,6 @@ isdn_status_callback(isdn_ctrl * c)
return -1;
#ifdef ISDN_DEBUG_STATCALLB
printk(KERN_DEBUG "ICALL (net): %d %ld %s\n", di, c->arg, c->parm.num);
#endif
#ifdef CONFIG_ISDN_WITH_ABC
dev->abc_last_use_jiffies[i] = jiffies;
if(dev->net_verbose > 2)
printk(KERN_DEBUG "ICALL driver %d ch %d i= %d\n",
(int)di,(int)c->arg,(int)i);
#endif
if (dev->global_flags & ISDN_GLOBAL_STOPPED) {
cmd.driver = di;
@ -719,36 +622,6 @@ isdn_status_callback(isdn_ctrl * c)
/* No network-device replies.
* Try ttyI's
*/
#ifdef CONFIG_ISDN_WITH_ABC
if(abc_test_incall(c->parm.setup.phone)) {
printk(KERN_DEBUG "ICALL rejecting <%s>\n",
c->parm.setup.phone);
cmd.driver = di;
cmd.arg = c->arg;
cmd.command = ISDN_CMD_HANGUP;
isdn_command(&cmd);
retval = 2;
} else {
if (isdn_tty_find_icall(di,
c->arg, c->parm.setup) >= 0) {
retval = 1;
abc_insert_incall(c->parm.setup.phone);
} else if (dev->drv[di]->reject_bus) {
cmd.driver = di;
cmd.arg = c->arg;
cmd.command = ISDN_CMD_HANGUP;
isdn_command(&cmd);
retval = 2;
}
}
#else
if (isdn_tty_find_icall(di, c->arg, c->parm.setup) >= 0)
retval = 1;
else if (dev->drv[di]->reject_bus) {
@ -758,7 +631,6 @@ isdn_status_callback(isdn_ctrl * c)
isdn_command(&cmd);
retval = 2;
}
#endif
break;
case 1:
/* Schedule connection-setup */
@ -1725,19 +1597,8 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
#endif /* CONFIG_ISDN_BUDGET */
#endif /* CONFIG_NETDEVICES */
case IIOCSETVER:
#ifdef CONFIG_ISDN_WITH_ABC
dev->abc_use_timeout = 0;
if(arg > 99)
dev->abc_use_timeout = HZ * 60 * (arg / 100);
dev->net_verbose = arg % 100;
printk(KERN_INFO
"isdn: Verbose-Level is %d ABC-Timeout %ld Min.\n",
dev->net_verbose,dev->abc_use_timeout / (HZ * 60));
#else
dev->net_verbose = arg;
printk(KERN_INFO "isdn: Verbose-Level is %d\n", dev->net_verbose);
#endif
return 0;
case IIOCSETGST:
if (arg)
@ -2043,9 +1904,6 @@ isdn_close(struct inode *ino, struct file *filep)
infostruct *q = NULL;
while (p) {
if (p->private == (char *) &(filep->private_data)) {
#ifdef CONFIG_ISDN_WITH_ABC
abc_free_receive();
#endif
if (q)
q->next = p->next;
else
@ -2147,12 +2005,6 @@ isdn_get_free_channel(int usage, int l2_proto, int l3_proto, int pre_dev
if ((dev->usage[i] & ISDN_USAGE_EXCLUSIVE) &&
((pre_dev != d) || (pre_chan != dev->chanmap[i])))
continue;
#ifdef CONFIG_ISDN_WITH_ABC
if(dev->abc_not_avail_jiffies[i] > jiffies)
continue;
dev->abc_last_use_jiffies[i] = jiffies;
#endif
if ((dev->drv[d]->running)) {
if (((dev->drv[d]->interface->features & features) == features) ||
(((dev->drv[d]->interface->features & vfeatures) == vfeatures) &&
@ -2259,9 +2111,6 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char * buf, int len,
copy_from_user(skb_put(skb, len), buf, len);
else
memcpy(skb_put(skb, len), buf, len);
#ifdef CONFIG_ISDN_WITH_ABC
abc_set_last_jiffies(drvidx,chan);
#endif
ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb);
if (ret <= 0)
dev_kfree_skb(skb);
@ -2280,9 +2129,7 @@ isdn_writebuf_skb_stub(int drvidx, int chan, int ack, struct sk_buff *skb)
struct sk_buff *nskb = NULL;
int v110_ret = skb->len;
int idx = isdn_dc2minor(drvidx, chan);
#ifdef CONFIG_ISDN_WITH_ABC
abc_set_last_jiffies(drvidx,chan);
#endif
if (dev->v110[idx]) {
atomic_inc(&dev->v110use[idx]);
nskb = isdn_v110_encode(dev->v110[idx], skb);
@ -2531,12 +2378,6 @@ isdn_init(void)
init_timer(&dev->timer);
dev->timer.function = isdn_timer_funct;
dev->sem = MUTEX;
#ifdef CONFIG_ISDN_WITH_ABC
init_timer(&dev->abc_control_timer);
dev->abc_control_timer.function = abc_control_t;
skb_queue_head_init(&abc_receive_q);
abcgmbh_getpack_mem();
#endif
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
dev->drvmap[i] = -1;
dev->chanmap[i] = -1;
@ -2583,16 +2424,6 @@ isdn_init(void)
printk("%s/", isdn_getrev(tmprev));
strcpy(tmprev, isdn_v110_revision);
printk("%s", isdn_getrev(tmprev));
#ifdef CONFIG_ISDN_WITH_ABC
{
ulong flags;
save_flags(flags);
cli();
dev->abc_control_timer.expires = jiffies + HZ * 60;
add_timer(&dev->abc_control_timer);
restore_flags(flags);
}
#endif
#ifdef MODULE
printk(" loaded\n");
@ -2641,12 +2472,6 @@ cleanup_module(void)
if (unregister_chrdev(ISDN_MAJOR, "isdn") != 0) {
printk(KERN_WARNING "isdn: controldevice busy, remove cancelled\n");
} else {
#ifdef CONFIG_ISDN_WITH_ABC
del_timer(&dev->abc_control_timer);
abc_free_receive();
(void)abc_clean_up_memory();
(void)abcgmbh_freepack_mem();
#endif
del_timer(&dev->timer);
kfree(dev);
printk(KERN_NOTICE "ISDN-subsystem unloaded\n");

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.53 1998/06/02 12:10:16 detabc
* wegen einer einstweiliger verfuegung gegen DW ist zur zeit
* die abc-extension bis zur klaerung der rechtslage nicht verfuegbar
*
* Revision 1.52 1998/03/19 13:18:21 keil
* Start of a CAPI like interface for supplementary Service
* first service: SUSPEND
@ -247,13 +251,6 @@
#define VBUFX (VBUF/16)
#endif
#undef CONFIG_ISDN_WITH_ABC
/*
** wegen einstweiliger verfuegung gegen DW ist zur zeit
** die abc-extension bis zur klaerung der rechtslage nicht
** im internet verfuegbar
*/
#define FIX_FILE_TRANSFER
/* Prototypes */
@ -605,8 +602,6 @@ isdn_tty_tint(modem_info * info)
dev_kfree_skb(skb);
return;
}
if (slen)
skb_pull(skb, slen);
skb_queue_head(&info->xmit_queue, skb);
}
@ -1613,41 +1608,6 @@ isdn_tty_set_modem_info(modem_info * info, uint cmd, uint * value)
isdn_tty_modem_ncarrier(info);
}
break;
#ifdef CONFIG_ISDN_WITH_ABC
case (('.' << 16L ) | 4711):
/*
** internal ioctl to get the phone-number over a filedesc
** returns
**
** <NUMBER (incoming call and number. if any)
** >NUMBER (outgoing call and number. if any)
**/
{
int need = ISDN_MSNLEN + 2;
char n_buf[ISDN_MSNLEN + 2];
char *p = NULL;
char *ep = NULL;
char *s = info->last_num;
ep = p = n_buf;
ep += 1 + ISDN_MSNLEN;
if(info->last_dir)
*(p++) = '>';
else
*(p++) = '<';
while(p < ep && *s != 0)
*(p++) = *(s++);
*p = 0;
if(copy_to_user((void *)arg,n_buf,need))
return -EFAULT;
}
break;
#endif
default:
return -EINVAL;
}
@ -1843,9 +1803,6 @@ isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info *
info->count--;
restore_flags(flags);
info->blocked_open++;
#ifdef CONFIG_ISDN_WITH_ABC
info->flags |= ISDN_ASYNC_NORMAL_ACTIVE;
#endif
while (1) {
current->state = TASK_INTERRUPTIBLE;
if (tty_hung_up_p(filp) ||
@ -2094,12 +2051,7 @@ isdn_tty_reset_profile(atemu * m)
m->profile[18] = 4;
m->profile[19] = 0;
m->profile[20] = 0;
#ifdef CONFIG_ISDN_WITH_ABC
m->pmsn[0] = '0';
m->pmsn[1] = '\0';
#else
m->pmsn[0] = '\0';
#endif
}
#ifdef CONFIG_ISDN_AUDIO
@ -2410,10 +2362,6 @@ isdn_tty_stat_callback(int i, isdn_ctrl * c)
isdn_tty_modem_result(5, info);
if (USG_VOICE(dev->usage[i]))
isdn_tty_modem_result(11, info);
#ifdef CONFIG_ISDN_WITH_ABC
if (info->blocked_open)
wake_up_interruptible(&info->open_wait);
#endif
return 1;
}
break;

View File

@ -12,11 +12,23 @@
* than 80, change the LINEWIDTH below.#
*
* For use with modules, you have to export screen_pos and fg_console
* from console.c
* from console.c and selection.h
* For recent kernels (e.g. 2.1.86) do this, by adding modifying
* kernel/ksyms.c:
*
* At end of other include-lines:
* Add an #include <linux/selection.h>
*
* At section /* tty routines */ add the following lines:
* EXPORT_SYMBOL(fg_console)
* EXPORT_SYMBOL(screen_pos)
*
* Finally, rebuild the kernel. Now you can create modules using
* kdebug.h
*
* Functionality:
*
* -If you are defined CLI_DEBUG
* -If you have defined CLI_DEBUG
* cli(), sti() and restore_flags() are redefined. Every time, cli()
* is called, the filename and linenumber of the caller is printed
* on the console, preceeded by a "!". Once interrupts are enabled
@ -35,6 +47,10 @@
* position x,y.
*
* $Log$
* Revision 1.3 1998/02/08 20:47:17 keil
* Changes for 2.1 (virtual address mapping; SMP stuff)
* New CLI_DEBUG define to enable cli/sti/restore_flags debugging
*
* Revision 1.2 1997/02/03 23:33:22 fritz
* Reformatted according CodingStyle
*
@ -169,6 +185,12 @@ extern void __global_restore_flags(unsigned long);
gput_str("Leave " #x " ", 40, 0); \
}
#define CTRXY(x, y, fn) { \
gput_str("Enter " #fn " ", x, y); \
fn; \
gput_str("Leave " #fn " ", x, y); \
}
#define DBGCNTDEF(n,x,y) { \
char tmp[10]; \
dbg_cnt_v[n] = 0; \