Old Teles driver removed, Changed doc and scripts accordingly.

This commit is contained in:
Fritz Elfert 1997-04-23 18:56:21 +00:00
parent 347d8c44a9
commit f958a6e506
24 changed files with 104 additions and 8924 deletions

View File

@ -10,12 +10,12 @@ README.audio
- info for running audio over ISDN.
README.icn
- info on the ICN-ISDN-card and its driver.
README.HiSax
- info on the HiSax driver which replaces the old teles.
README.pcbit
- info on the PCBIT-D ISDN adapter and driver.
README.syncppp
- info on running Sync PPP over ISDN.
README.teles
- info on driver for Teles compatible ISDN cards.
syncPPP.FAQ
- frequently asked questions about running PPP over ISDN.
README.avmb1

View File

@ -60,7 +60,7 @@ README for the ISDN-subsystem
A raw-control-device with the following functions:
write: raw D-channel-messages (format: depends on driver).
read: raw D-channel-messages (format: depends on driver).
ioctl: depends on driver, for the ICN-driver, the base-address of
ioctl: depends on driver, i.e. for the ICN-driver, the base-address of
the ports and the shared memory on the card can be set and read
also the boot-code an the protocol software can be loaded into
the card.
@ -107,7 +107,7 @@ README for the ISDN-subsystem
ATZ Load registers and EAZ/MSN from Profile.
AT&Bx Set Send-Packet-size to x (max. 4000)
The real packet-size may be limited by the
low-level-driver used. i.e.: the Teles-Module-
low-level-driver used. i.e.: the HiSax-Module-
limit is 2000. You will get NO Error-Message,
if you set it to higher Values, because at the
time of giving this command the corresponding
@ -120,8 +120,7 @@ README for the ISDN-subsystem
AT&D3 Same as AT&D2 but also resets all registers.
AT&Ex Set the EAZ/MSN for this channel to x.
AT&F Reset all registers and profile to "factory-defaults"
AT&Sx Set window-size for Teles-driver (x = 1..8) (not yet
implemented)
AT&Sx Set window-size (x = 1..8) (not yet implemented)
AT&V Show all settings.
AT&W0 Write registers and EAZ/MSN to profile. See also
iprofd (5.c in this README).
@ -194,7 +193,7 @@ README for the ISDN-subsystem
15 0 Layer-3 protocol: (at the moment always 0)
0 = transparent
16 250 Send-Packet-size/16
17 8 Window-size for Teles-driver (not yet implemented)
17 8 Window-size (not yet implemented)
18 4 Bit coded register, Service-Octet-1 to accept,
or to be used on dialout:
Bit 0: Service 1 (audio) when set.
@ -271,111 +270,8 @@ README for the ISDN-subsystem
3. Lowlevel-driver configuration.
Configuration depends on how the drivers are built.
3.1 Drivers built into the kernel.
3.1.1 Teles driver.
The Teles driver can be configured using the commandline-feature
while loading the kernel with LILO or LOADLIN. It accepts the
following syntax:
teles=p0,i0,m0,d0[,p1,i1,m1,d1 ... ,pn,in,mn,dn][,idstring]
where
p0 = portbase of 1st card. (default: 0xd80)
i0 = irq of 1st card. (default: 15)
m0 = shared memory of 1st card. (default: 0xd0000)
d0 = D-channel protocol of 1st card. 1=1TR6, 2=EDSS1 (default: 2)
p1,i1,m1,d1 = Parameters of second card (defaults: none)
pn,in,mn,d1 = Parameters of n'th card (up to 16 cards are supported)
idstring = Driver-Id for accessing with utilities and identification
when using a Line-monitor. (default: none)
idstring must start with a character!
The type of the card is determined by the port, irq and shared memory:
port == 0, shared memory != 0 -> Teles S0-8
port != 0, shared memory != 0 -> Teles S0-16.0
port != 0, shared memory == 0 -> Teles S0-16.3
ATTENTION:
Due to limited hardware-capabilities, there is no way to check the
existence of a card. Therefore you need to be sure your card's setup
is correct. Also there are bugs in the printed manual of some newer
16.3 cards. Have a look to the kernel-syslog. With most of the cards,
you should see a line "HSCX version A:5 B:5" there.
3.1.2 ICN driver.
The ICN driver can be configured using the commandline-feature while
loading the kernel with LILO or LOADLIN. It accepts the following
syntax
icn=p,m[,idstring1[,idstring2]]
where
p = portbase (default: 0x320)
m = shared memory (default: 0xd0000)
When using the ICN double card, you MUST define TWO idstrings.
idstring must start with a character!
If you like to use more than one card, you can use the program
"icnctrl" from the utility-package to configure additional cards.
You need to configure shared memory only once, since the icn-driver
maps all cards into the same address-space.
Using the "icnctrl"-utility, portbase and shared memory can also be
changed during runtime.
The D-channel protocol is configured by loading different firmware
into the card's memory using the "icnctrl"-utility.
3.2 Drivers built as modules.
3.2.1 Teles driver.
The module teles.o can be configured during "insmod'ing" it by
appending its parameters to the insmod-commandline. The following
syntax is accepted:
io=m0,i0,p0,d0[,m1,i1,p1,d1 ... ,mn,in,pn,dn] teles_id=idstring
where
m0,i0,p0,d0 ... mn,in,pn,dn have the same meanings like the
parameters described for the kernel-
version above. Watch out: different
sequence!
3.2.2 ICN driver.
The module icn.o can be configured during "insmod'ing" it by
appending its parameters to the insmod-commandline. The following
syntax is accepted:
portbase=p membase=m icn_id=idstring icn_id2=idstring2
where p, m, idstring1 and idstring2 have the same meanings like
parameters described for the kernel-
version above.
When using the ICN double card, you MUST define TWO idstrings.
idstring must start with a character!
Using the "icnctrl"-utility, the same features apply to the modularized
version like to the kernel-builtin one.
The D-channel protocol is configured by loading different firmware
into the card's memory using the "icnctrl"-utility.
Configuration depends on how the drivers are built. See the
README.<yourDriver> for information on driver-specific setup.
4. Device-inodes
@ -386,26 +282,11 @@ README for the ISDN-subsystem
44 for the ISDN-callout-tty's.
45 for control/info/debug devices.
5. Application
a) (Only for ICN-cards) Load the firmware into the card:
cd icn
For 1TR6:
icnctrl [-d IDstring] load download/loadpg.bin download/pc_1t_ca.bin
For Euro-ISDN:
icnctrl [-d IDstring] load download/loadpg.bin download/pc_eu_ca.bin
When using the ICN-4B, the protocol-software for the second half of
the card must be appended to the command line.
-> The two LEDs at the back cover of the card (ICN-4B: 4 LEDs) must be
blinking intermittently now. If a connection is up, the corresponding
led is lit continuously.
For loading pcbit-firmware, refer to Documentation/isdn/README.pcbit
and the pcbit manpage, included in the utility-package.
a) For some card-types, firmware has to be loaded into the cards, before
proceeding with device-independant setup. See README.<yourDriver>
for how to do that.
b) If you only intend to use ttys, you are nearly ready now.
@ -437,8 +318,7 @@ README for the ISDN-subsystem
h) additionally you may activate charge-hang-up (= Hang up before
next charge-info, this only works, if your isdn-provider transmits
the charge-info during and after the connection, it does NOT work
with the Teles on an EDSS1-Line.):
the charge-info during and after the connection):
isdnctrl chargehup isdn0 on
i) Setup the interface with ifconfig as usual, and set a route to it.
@ -542,7 +422,7 @@ README for the ISDN-subsystem
"isdnctrl l2_prot <InterfaceName> <L2-ProtocolName>"
Selects a layer-2-protocol.
(With the ICN-driver and the Teles-driver, "x75i" and "hdlc" is available.
(With the ICN-driver and the HiSax-driver, "x75i" and "hdlc" is available.
With other drivers, "x75ui", "x75bui" may be possible too.)
isdnctrl l3_prot <InterfaceName> <L3-ProtocolName>

View File

@ -3,7 +3,7 @@ $Id$
You can get the ICN-ISDN-card from:
Thinking Objects Software GmbH
Obere Heerbergstr. 17
Versbacher Röthe 159
97078 Würzburg
Tel: +49 931 2877950
Fax: +49 931 2877951
@ -62,3 +62,87 @@ Setting up the IO-address dipswitches for the ICN-ISDN-card:
1 1 1 0 0x368
1 1 1 1 NOT ALLOWED!
The ICN driver either may be build into kernel or as a module. Initialization
depends on how the drive is built:
Driver built into the kernel:
The ICN driver can be configured using the commandline-feature while
loading the kernel with LILO or LOADLIN. It accepts the following syntax:
icn=p,m[,idstring1[,idstring2]]
where
p = portbase (default: 0x320)
m = shared memory (default: 0xd0000)
When using the ICN double card (4B), you MUST define TWO idstrings.
idstring must start with a character! There is no way for the driver
to distinguish between a 2B and 4B type card. Therefore, by supplying
TWO idstrings, you tell the driver that you have a 4B installed.
If you like to use more than one card, you can use the program
"icnctrl" from the utility-package to configure additional cards.
You need to configure shared memory only once, since the icn-driver
maps all cards into the same address-space.
Using the "icnctrl"-utility, portbase and shared memory can also be
changed during runtime.
The D-channel protocol is configured by loading different firmware
into the card's memory using the "icnctrl"-utility.
Driver built as module:
The module icn.o can be configured during "insmod'ing" it by
appending its parameters to the insmod-commandline. The following
syntax is accepted:
portbase=p membase=m icn_id=idstring [icn_id2=idstring2]
where p, m, idstring1 and idstring2 have the same meanings like
parameters described for the kernel-version above.
When using the ICN double card (4B), you MUST define TWO idstrings.
idstring must start with a character! There is no way for the driver
to distinguish between a 2B and 4B type card. Therefore, by supplying
TWO idstrings, you tell the driver that you have a 4B installed.
Using the "icnctrl"-utility, the same features apply to the modularized
version like to the kernel-builtin one.
The D-channel protocol is configured by loading different firmware
into the card's memory using the "icnctrl"-utility.
Loading the firmware into the card:
The firmware is supplied together with the isdn4k-utils package. It
can be found in the subdirectory icnctrl/firmware/
There are 3 files:
loadpg.bin - Image of the bootstrap loader.
pc_1t_ca.bin - Image of firmware for german 1TR6 protocol.
pc_eu_ca.bin - Image if firmware for EDSS1 (Euro-ISDN) protocol.
Assumed you have installed the utility-package correctly, the firmware
will be downloaded into the 2B-card using the following command:
icnctrl -d Idstring load /etc/isdn/loadpg.bin /etc/isdn/pc_XX_ca.bin
where XX is either "1t" or "eu", depending of the D-Channel protocol
used on your S0-bus and Idstring is the Name of the card, given during
insmod-time or (for kernel-builtin driver) on the kernel commandline.
To load a 4B-card, the same command is used, except a second firmware
file is appended to the commandline of icnctrl.
-> After dowloading firmware, the two LEDs at the back cover of the card
(ICN-4B: 4 LEDs) must be blinking intermittently now. If a connection
is up, the corresponding led is lit continuously.
For further documentation (adding more ICN-cards), refer to the manpage
icnctrl.8 which is included in the isdn4k-utils package.

View File

@ -11,7 +11,6 @@ fi
bool 'Support audio via ISDN' CONFIG_ISDN_AUDIO
dep_tristate 'ICN 2B and 4B support' CONFIG_ISDN_DRV_ICN $CONFIG_ISDN
dep_tristate 'PCBIT-D support' CONFIG_ISDN_DRV_PCBIT $CONFIG_ISDN
dep_tristate 'Teles/NICCY1016PC/Creatix support' CONFIG_ISDN_DRV_TELES $CONFIG_ISDN
dep_tristate 'HiSax SiemensChipSet driver support' CONFIG_ISDN_DRV_HISAX $CONFIG_ISDN
if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
bool 'HiSax Support for Teles 16.0/8.0' CONFIG_HISAX_16_0

View File

@ -1,6 +1,6 @@
SUB_DIRS :=
MOD_SUB_DIRS :=
ALL_SUB_DIRS := icn teles pcbit hisax avmb1
ALL_SUB_DIRS := icn pcbit hisax avmb1
L_OBJS :=
LX_OBJS :=
@ -36,16 +36,6 @@ else
endif
endif
ifeq ($(CONFIG_ISDN_DRV_TELES),y)
L_OBJS += teles/teles.o
SUB_DIRS += teles
MOD_SUB_DIRS += teles
else
ifeq ($(CONFIG_ISDN_DRV_TELES),m)
MOD_SUB_DIRS += teles
endif
endif
ifeq ($(CONFIG_ISDN_DRV_HISAX),y)
L_OBJS += hisax/hisax.o
SUB_DIRS += hisax

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.5 1997/03/30 17:10:36 calle
* added support for AVM-B1-PCI card.
*
* Revision 1.4 1997/03/04 21:59:44 calle
* Added AVM-B1-CAPI2.0 driver
*
@ -39,10 +42,6 @@
extern void icn_init(void);
#endif
#ifdef CONFIG_ISDN_DRV_TELES
extern void teles_init(void);
#endif
#ifdef CONFIG_ISDN_DRV_HISAX
extern void HiSax_init(void);
#endif
@ -66,9 +65,6 @@ isdn_cards_init(void)
#if CONFIG_ISDN_DRV_ICN
icn_init();
#endif
#if CONFIG_ISDN_DRV_TELES
teles_init();
#endif
#ifdef CONFIG_ISDN_DRV_HISAX
HiSax_init();
#endif

View File

@ -1,17 +0,0 @@
L_OBJS :=
M_OBJS :=
O_OBJS := mod.o card.o config.o buffers.o tei.o isdnl2.o isdnl3.o \
llglue.o q931.o callc.o fsm.o
O_TARGET :=
ifeq ($(CONFIG_ISDN_DRV_TELES),y)
O_TARGET += teles.o
else
ifeq ($(CONFIG_ISDN_DRV_TELES),m)
O_TARGET += teles.o
M_OBJS += teles.o
endif
endif
include $(TOPDIR)/Rules.make

View File

@ -1,322 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.2 1996/04/29 22:48:14 fritz
* Removed compatibility-macros. No longer needed.
*
* Revision 1.1 1996/04/13 10:19:28 fritz
* Initial revision
*
*
*/
#define __NO_VERSION__
#include "teles.h"
#include <linux/mm.h>
#include <linux/malloc.h>
void
BufPoolInit(struct BufPool *bp, int order, int bpps,
int maxpages)
{
#ifdef DEBUG_MAGIC
generateerror
bp->magic = 010167;
#endif
#if 0
printk(KERN_DEBUG "BufPoolInit bp %x\n", bp);
#endif
bp->freelist = NULL;
bp->pageslist = NULL;
bp->pageorder = order;
bp->pagescount = 0;
bp->bpps = bpps;
bp->bufsize = BUFFER_SIZE(order, bpps);
bp->maxpages = maxpages;
}
int
BufPoolAdd(struct BufPool *bp, int priority)
{
struct Pages *ptr;
byte *bptr;
int i;
struct BufHeader *bh = NULL, *prev, *first;
#if 0
printk(KERN_DEBUG "BufPoolAdd bp %x\n", bp);
#endif
ptr = (struct Pages *) __get_free_pages(priority, bp->pageorder, 0);
if (!ptr) {
printk(KERN_WARNING "BufPoolAdd couldn't get pages!\n");
return (-1);
}
#if 0
printk(KERN_DEBUG "Order %d pages allocated at %x\n", bp->pageorder, ptr);
#endif
ptr->next = bp->pageslist;
bp->pageslist = ptr;
bp->pagescount++;
bptr = (byte *) ptr + sizeof(struct Pages *);
i = bp->bpps;
first = (struct BufHeader *) bptr;
prev = NULL;
while (i--) {
bh = (struct BufHeader *) bptr;
#ifdef DEBUG_MAGIC
bh->magic = 020167;
#endif
bh->next = prev;
prev = bh;
bh->bp = bp;
bptr += PART_SIZE(bp->pageorder, bp->bpps);
}
first->next = bp->freelist;
bp->freelist = bh;
return (0);
}
void
BufPoolFree(struct BufPool *bp)
{
struct Pages *p;
#if 0
printk(KERN_DEBUG "BufPoolFree bp %x\n", bp);
#endif
while (bp->pagescount--) {
p = bp->pageslist->next;
free_pages((unsigned long) bp->pageslist, bp->pageorder);
#if 0
printk(KERN_DEBUG "Free pages %x order %d\n", bp->pageslist, bp->pageorder);
#endif
bp->pageslist = p;
}
}
int
BufPoolGet(struct BufHeader **bh,
struct BufPool *bp, int priority, void *heldby, int where)
{
long flags;
int i;
#ifdef DEBUG_MAGIC
if (bp->magic != 010167) {
printk(KERN_DEBUG "BufPoolGet: not a BufHeader\n");
return (-1);
}
#endif
save_flags(flags);
cli();
i = 0;
while (!0) {
if (bp->freelist) {
*bh = bp->freelist;
bp->freelist = bp->freelist->next;
(*bh)->heldby = heldby;
(*bh)->where = where;
restore_flags(flags);
return (0);
}
if ((i == 0) && (bp->pagescount < bp->maxpages)) {
if (BufPoolAdd(bp, priority)) {
restore_flags(flags);
return -1;
}
i++;
} else {
*bh = NULL;
restore_flags(flags);
return (-1);
}
}
}
void
BufPoolRelease(struct BufHeader *bh)
{
struct BufPool *bp;
long flags;
#ifdef DEBUG_MAGIC
if (bh->magic != 020167) {
printk(KERN_DEBUG "BufPoolRelease: not a BufHeader\n");
printk(KERN_DEBUG "called from %x\n", __builtin_return_address(0));
return;
}
#endif
bp = bh->bp;
#ifdef DEBUG_MAGIC
if (bp->magic != 010167) {
printk(KERN_DEBUG "BufPoolRelease: not a BufPool\n");
return;
}
#endif
save_flags(flags);
cli();
bh->next = bp->freelist;
bp->freelist = bh;
restore_flags(flags);
}
void
BufQueueLink(struct BufQueue *bq,
struct BufHeader *bh)
{
unsigned long flags;
save_flags(flags);
cli();
if (!bq->head)
bq->head = bh;
if (bq->tail)
bq->tail->next = bh;
bq->tail = bh;
bh->next = NULL;
restore_flags(flags);
}
void
BufQueueLinkFront(struct BufQueue *bq,
struct BufHeader *bh)
{
unsigned long flags;
save_flags(flags);
cli();
bh->next = bq->head;
bq->head = bh;
if (!bq->tail)
bq->tail = bh;
restore_flags(flags);
}
int
BufQueueUnlink(struct BufHeader **bh, struct BufQueue *bq)
{
long flags;
save_flags(flags);
cli();
if (bq->head) {
if (bq->tail == bq->head)
bq->tail = NULL;
*bh = bq->head;
bq->head = (*bh)->next;
restore_flags(flags);
return (0);
} else {
restore_flags(flags);
return (-1);
}
}
void
BufQueueInit(struct BufQueue *bq)
{
#ifdef DEBUG_MAGIC
bq->magic = 030167;
#endif
bq->head = NULL;
bq->tail = NULL;
}
void
BufQueueRelease(struct BufQueue *bq)
{
struct BufHeader *bh;
while (bq->head) {
BufQueueUnlink(&bh, bq);
BufPoolRelease(bh);
}
}
int
BufQueueLength(struct BufQueue *bq)
{
int i = 0;
struct BufHeader *bh;
bh = bq->head;
while (bh) {
i++;
bh = bh->next;
}
return (i);
}
void
BufQueueDiscard(struct BufQueue *q, int pr, void *heldby,
int releasetoo)
{
long flags;
struct BufHeader *sp;
save_flags(flags);
cli();
while (!0) {
sp = q->head;
if (!sp)
break;
if ((sp->primitive == pr) && (sp->heldby == heldby)) {
q->head = sp->next;
if (q->tail == sp)
q->tail = NULL;
if (releasetoo)
BufPoolRelease(sp);
} else
break;
}
sp = q->head;
if (sp)
while (sp->next) {
if ((sp->next->primitive == pr) && (sp->next->heldby == heldby)) {
if (q->tail == sp->next)
q->tail = sp;
if (releasetoo)
BufPoolRelease(sp->next);
sp->next = sp->next->next;
} else
sp = sp->next;
}
restore_flags(flags);
}
void
Sfree(byte * ptr)
{
#if 0
printk(KERN_DEBUG "Sfree %x\n", ptr);
#endif
kfree(ptr);
}
byte *
Smalloc(int size, int pr, char *why)
{
byte *p;
p = (byte *) kmalloc(size, pr);
#if 0
printk(KERN_DEBUG "Smalloc %s size %d res %x\n", why, size, p);
#endif
return (p);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +0,0 @@
/* $Id$
*
* $Log$
*
*/
#define __NO_VERSION__
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/timer.h>
#include "teles.h"
/*
* This structure array contains one entry per card. An entry looks
* like this:
*
* { membase,irq,portbase,protocol,NULL }
*
* protocol can be either ISDN_PTYPE_EURO or ISDN_PTYPE_1TR6
*
* Cards which don't have an io port (Teles 8 bit cards for
* example) can be entered with io port 0x0
*
* For the Teles 16.3, membase has to be set to 0.
*
*/
struct IsdnCard cards[] =
{
{(byte *) 0xd0000, 15, 0xd80, ISDN_PTYPE_EURO, NULL}, /* example */
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
};

View File

@ -1,153 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.2 1996/04/29 22:49:57 fritz
* Removed compatibility-macros.
*
* Revision 1.1 1996/04/13 10:23:41 fritz
* Initial revision
*
*
*/
#define __NO_VERSION__
#include "teles.h"
void
FsmNew(struct Fsm *fsm,
struct FsmNode *fnlist, int fncount)
{
int i;
fsm->jumpmatrix = (int *) Smalloc(4L * fsm->state_count * fsm->event_count,
GFP_KERNEL, "Fsm jumpmatrix");
memset(fsm->jumpmatrix, 0, 4L * fsm->state_count * fsm->event_count);
for (i = 0; i < fncount; i++)
fsm->jumpmatrix[fsm->state_count * fnlist[i].event +
fnlist[i].state] = (int) fnlist[i].routine;
}
void
FsmFree(struct Fsm *fsm)
{
Sfree((void *) fsm->jumpmatrix);
}
int
FsmEvent(struct FsmInst *fi, int event, void *arg)
{
void (*r) (struct FsmInst *, int, void *);
char str[80];
r = (void (*)) fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state];
if (r) {
if (fi->debug) {
sprintf(str, "State %s Event %s",
fi->fsm->strState[fi->state],
fi->fsm->strEvent[event]);
fi->printdebug(fi, str);
}
r(fi, event, arg);
return (0);
} else {
if (fi->debug) {
sprintf(str, "State %s Event %s no routine",
fi->fsm->strState[fi->state],
fi->fsm->strEvent[event]);
fi->printdebug(fi, str);
}
return (!0);
}
}
void
FsmChangeState(struct FsmInst *fi, int newstate)
{
char str[80];
fi->state = newstate;
if (fi->debug) {
sprintf(str, "ChangeState %s",
fi->fsm->strState[newstate]);
fi->printdebug(fi, str);
}
}
static void
FsmExpireTimer(struct FsmTimer *ft)
{
FsmEvent(ft->fi, ft->event, ft->arg);
}
void
FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
{
ft->fi = fi;
ft->tl.function = (void *) FsmExpireTimer;
ft->tl.data = (long) ft;
init_timer(&ft->tl);
}
void
FsmDelTimer(struct FsmTimer *ft, int where)
{
#if 0
if (ft->fi->debug) {
sprintf(str, "FsmDelTimer %lx %d", ft, where);
ft->fi->printdebug(ft->fi, str);
}
#endif
del_timer(&ft->tl);
}
int
FsmAddTimer(struct FsmTimer *ft,
int millisec, int event, void *arg, int where)
{
#if 0
if (ft->fi->debug) {
sprintf(str, "FsmAddTimer %lx %d %d", ft, millisec, where);
ft->fi->printdebug(ft->fi, str);
}
#endif
if (ft->tl.next || ft->tl.prev) {
printk(KERN_WARNING "FsmAddTimer: timer already active!\n");
return -1;
}
init_timer(&ft->tl);
ft->event = event;
ft->arg = arg;
ft->tl.expires = jiffies + (millisec * HZ) / 1000;
add_timer(&ft->tl);
return 0;
}
int
FsmTimerRunning(struct FsmTimer *ft)
{
return (ft->tl.next != NULL);
}
void
jiftime(char *s, long mark)
{
s += 8;
*s-- = '\0';
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = '.';
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = mark % 6 + '0';
mark /= 6;
*s-- = ':';
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = mark % 10 + '0';
}

File diff suppressed because it is too large Load Diff

View File

@ -1,670 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.12 1997/02/11 01:39:20 keil
* Changed setup-interface (incoming and outgoing)
*
* Revision 1.11 1996/09/29 19:41:58 fritz
* Bugfix: ignore unknown frames.
*
* Revision 1.10 1996/09/25 18:32:43 keil
* response for STATUS_ENQ message added
*
* Revision 1.9 1996/06/06 14:22:27 fritz
* Changed level of "non-digital call..." message, since
* with audio support, this is quite normal.
*
* Revision 1.8 1996/06/03 20:35:04 fritz
* Fixed typos.
*
* Revision 1.7 1996/06/03 20:03:39 fritz
* Fixed typos.
*
* Revision 1.6 1996/05/21 11:33:50 keil
* Adding SETUP_ACKNOWLEDGE as answer of a SETUP message.
*
* Revision 1.5 1996/05/18 01:37:16 fritz
* Added spelling corrections and some minor changes
* to stay in sync with kernel.
*
* Revision 1.4 1996/05/17 03:46:16 fritz
* General cleanup.
*
* Revision 1.3 1996/04/30 21:57:53 isdn4dev
* remove some debugging code, improve callback Karsten Keil
*
* Revision 1.2 1996/04/20 16:45:05 fritz
* Changed to report all incoming calls to Linklevel, not just those
* with Service 7.
* Misc. typos
*
* Revision 1.1 1996/04/13 10:24:45 fritz
* Initial revision
*
*
*/
#define __NO_VERSION__
#define P_1TR6
#include "teles.h"
#include "l3_1TR6.h"
#define DEBUG_1TR6 0
static void
i_down(struct PStack *st,
struct BufHeader *ibh)
{
st->l3.l3l2(st, DL_DATA, ibh);
}
static void
newl3state(struct PStack *st, int state)
{
st->l3.state = state;
if (DEBUG_1TR6 > 4)
printk(KERN_INFO "isdnl3: bc:%d cr:%x new state %d\n",
st->pa->bchannel, st->pa->callref, state);
}
static void
l3_message(struct PStack *st, int mt)
{
struct BufHeader *dibh;
byte *p;
int size;
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 18);
p = DATAPTR(dibh);
p += st->l2.ihsize;
size = st->l2.ihsize;
*p++ = 0x8;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = mt;
size += 4;
dibh->datasize = size;
i_down(st, dibh);
}
static void
l3s3(struct PStack *st, byte pr, void *arg)
{
l3_message(st, MT_RELEASE);
newl3state(st, 19);
}
static void
l3s4(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
newl3state(st, 0);
st->l3.l3l4(st, CC_RELEASE_CNF, NULL);
}
static void
l3s4_1(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
newl3state(st, 19);
l3_message(st, MT_RELEASE);
st->l3.l3l4(st, CC_RELEASE_CNF, NULL);
}
static void
l3s5(struct PStack *st, byte pr,
void *arg)
{
struct BufHeader *dibh;
byte *p;
char *teln;
st->l3.callref = st->pa->callref;
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 19);
p = DATAPTR(dibh);
p += st->l2.ihsize;
*p++ = 0x8;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = MT_SETUP;
*p++ = 0xa1;
/*
* Set Bearer Capability, Map info from 1TR6-convention to EDSS1
*/
switch (st->pa->setup.si1) {
case 1: /* Telephony */
*p++ = 0x4; /* BC-IE-code */
*p++ = 0x3; /* Length */
*p++ = 0x90; /* Coding Std. national, 3.1 kHz audio */
*p++ = 0x90; /* Circuit-Mode 64kbps */
*p++ = 0xa3; /* A-Law Audio */
break;
case 5: /* Datatransmission 64k, BTX */
case 7: /* Datatransmission 64k */
default:
*p++ = 0x4; /* BC-IE-code */
*p++ = 0x2; /* Length */
*p++ = 0x88; /* Coding Std. nat., unrestr. dig. Inform. */
*p++ = 0x90; /* Packet-Mode 64kbps */
break;
}
/*
* What about info2? Mapping to High-Layer-Compatibility?
*/
if (st->pa->setup.eazmsn[0] != '\0') {
*p++ = 0x6c;
*p++ = strlen(st->pa->setup.eazmsn) + 1;
/* Classify as AnyPref. */
*p++ = 0x81; /* Ext = '1'B, Type = '000'B, Plan = '0001'B. */
teln = st->pa->setup.eazmsn;
while (*teln)
*p++ = *teln++ & 0x7f;
}
*p++ = 0x70;
*p++ = strlen(st->pa->setup.phone) + 1;
/* Classify as AnyPref. */
*p++ = 0x81; /* Ext = '1'B, Type = '000'B, Plan = '0001'B. */
teln = st->pa->setup.phone;
while (*teln)
*p++ = *teln++ & 0x7f;
dibh->datasize = p - DATAPTR(dibh);
newl3state(st, 1);
i_down(st, dibh);
}
static void
l3s6(struct PStack *st, byte pr, void *arg)
{
byte *p;
struct BufHeader *ibh = arg;
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.ihsize, ibh->datasize - st->l2.ihsize,
0x18, 0))) {
st->pa->bchannel = p[2] & 0x3;
} else
printk(KERN_WARNING "octect 3 not found\n");
BufPoolRelease(ibh);
newl3state(st, 3);
st->l3.l3l4(st, CC_PROCEEDING_IND, NULL);
}
static void
l3s7(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
newl3state(st, 12);
st->l3.l3l4(st, CC_DISCONNECT_IND, NULL);
}
static void
l3s8(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
st->l3.l3l4(st, CC_SETUP_CNF, NULL);
newl3state(st, 10);
}
static void
l3s11(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
newl3state(st, 4);
st->l3.l3l4(st, CC_ALERTING_IND, NULL);
}
static void
l3s12(struct PStack *st, byte pr, void *arg)
{
byte *p;
int bcfound = 0;
struct BufHeader *ibh = arg;
p = DATAPTR(ibh);
p += st->l2.uihsize;
st->pa->callref = getcallref(p);
st->l3.callref = 0x80 + st->pa->callref;
/*
* Channel Identification
*/
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize,
0x18, 0))) {
st->pa->bchannel = p[2] & 0x3;
bcfound++ ;
} else
printk(KERN_WARNING "l3s12: Channel ident not found\n");
p = DATAPTR(ibh);
if (st->protocol == ISDN_PTYPE_1TR6) {
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize, 0x01, 6))) {
st->pa->setup.si1 = p[2];
st->pa->setup.si2 = p[3];
} else
printk(KERN_WARNING "l3s12(1TR6): ServiceIndicator not found\n");
} else {
/*
* Bearer Capabilities
*/
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize, 0x04, 0))) {
st->pa->setup.si2 = 0;
switch (p[2] & 0x1f) {
case 0x00:
/* Speech */
case 0x10:
/* 3.1 Khz audio */
st->pa->setup.si1 = 1;
break;
case 0x08:
/* Unrestricted digital information */
st->pa->setup.si1 = 7;
break;
case 0x09:
/* Restricted digital information */
st->pa->setup.si1 = 2;
break;
case 0x11:
/* Unrestr. digital information with tones/announcements */
st->pa->setup.si1 = 3;
break;
case 0x18:
/* Video */
st->pa->setup.si1 = 4;
break;
default:
st->pa->setup.si1 = 0;
}
} else
printk(KERN_WARNING "l3s12: Bearer capabilities not found\n");
}
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize,
0x70, 0)))
iecpy(st->pa->setup.eazmsn, p, 1);
else
strcpy(st->pa->setup.eazmsn, "");
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize,
0x6c, 0))) {
st->pa->setup.plan = p[2];
if (st->protocol == ISDN_PTYPE_1TR6) {
iecpy(st->pa->setup.phone, p, 1);
} else {
st->pa->setup.screen = p[3];
iecpy(st->pa->setup.phone, p, 2);
}
} else
strcpy(st->pa->setup.phone, "");
BufPoolRelease(ibh);
if (bcfound) {
if (st->pa->setup.si1 != 7) {
printk(KERN_DEBUG "non-digital call: %s -> %s\n",
st->pa->setup.phone,
st->pa->setup.eazmsn);
}
newl3state(st, 6);
st->l3.l3l4(st, CC_SETUP_IND, NULL);
}
}
static void
l3s13(struct PStack *st, byte pr, void *arg)
{
newl3state(st, 0);
}
static void
l3s16(struct PStack *st, byte pr,
void *arg)
{
st->l3.callref = 0x80 + st->pa->callref;
l3_message(st, MT_CONNECT);
newl3state(st, 8);
}
static void
l3s17(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
st->l3.l3l4(st, CC_SETUP_COMPLETE_IND, NULL);
newl3state(st, 10);
}
static void
l3s18(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *dibh;
byte *p;
int size;
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 20);
p = DATAPTR(dibh);
p += st->l2.ihsize;
size = st->l2.ihsize;
*p++ = 0x8;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = MT_DISCONNECT;
size += 4;
*p++ = IE_CAUSE;
*p++ = 0x2;
*p++ = 0x80;
*p++ = 0x90;
size += 4;
dibh->datasize = size;
i_down(st, dibh);
newl3state(st, 11);
}
static void
l3s19(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
newl3state(st, 0);
l3_message(st, MT_RELEASE_COMPLETE);
st->l3.l3l4(st, CC_RELEASE_IND, NULL);
}
static void
l3s20(struct PStack *st, byte pr,
void *arg)
{
l3_message(st, MT_ALERTING);
newl3state(st, 7);
}
static void
l3s21(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *dibh=arg;
byte *p;
int size;
BufPoolRelease(dibh);
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 20);
p = DATAPTR(dibh);
p += st->l2.ihsize;
size = st->l2.ihsize;
*p++ = 0x8;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = MT_STATUS;
size += 4;
*p++ = IE_CAUSE;
*p++ = 0x2;
*p++ = 0x80;
*p++ = 0x9E; /* answer status enquire */
size += 4;
*p++ = 0x14; /* CallState */
*p++ = 0x1;
*p++ = st->l3.state & 0x3f; /* ISO L3 CallState */
size += 3;
dibh->datasize = size;
i_down(st, dibh);
}
struct stateentry {
int state;
byte primitive;
void (*rout) (struct PStack *, byte, void *);
};
static struct stateentry downstatelist[] =
{
{0,CC_SETUP_REQ,l3s5},
{1,CC_DISCONNECT_REQ,l3s18},
{1,CC_RELEASE_REQ,l3s3},
{1,CC_DLRL,l3s13},
{3,CC_DISCONNECT_REQ,l3s18},
{3,CC_RELEASE_REQ,l3s3},
{3,CC_DLRL,l3s13},
{4,CC_RELEASE_REQ,l3s3},
{4,CC_DISCONNECT_REQ,l3s18},
{4,CC_DLRL,l3s13},
{6,CC_RELEASE_REQ,l3s3},
{6,CC_DISCONNECT_REQ,l3s18},
{6,CC_ALERTING_REQ,l3s20},
{6,CC_DLRL,l3s13},
{7,CC_RELEASE_REQ,l3s3},
{7,CC_SETUP_RSP,l3s16},
{7,CC_DLRL,l3s13},
{8,CC_RELEASE_REQ,l3s3},
{8,CC_DISCONNECT_REQ,l3s18},
{8,CC_DLRL,l3s13},
{10,CC_DISCONNECT_REQ,l3s18},
{10,CC_RELEASE_REQ,l3s3},
{10,CC_DLRL,l3s13},
{11,CC_RELEASE_REQ,l3s3},
{12,CC_RELEASE_REQ,l3s3},
{19,CC_DLRL,l3s13},
};
static int downsllen = sizeof(downstatelist) /
sizeof(struct stateentry);
static struct stateentry datastatelist[] =
{
{0,MT_STATUS_ENQUIRY,l3s21},
{0,MT_SETUP,l3s12},
{1,MT_STATUS_ENQUIRY,l3s21},
{1,MT_CALL_PROCEEDING,l3s6},
{1,MT_SETUP_ACKNOWLEDGE,l3s6},
{1,MT_RELEASE_COMPLETE,l3s4},
{1,MT_RELEASE,l3s19},
{1,MT_DISCONNECT,l3s7},
{3,MT_STATUS_ENQUIRY,l3s21},
{3,MT_DISCONNECT,l3s7},
{3,MT_CONNECT,l3s8},
{3,MT_ALERTING,l3s11},
{3,MT_RELEASE,l3s19},
{3,MT_RELEASE_COMPLETE,l3s4},
{4,MT_STATUS_ENQUIRY,l3s21},
{4,MT_CONNECT,l3s8},
{4,MT_DISCONNECT,l3s7},
{4,MT_RELEASE,l3s19},
{4,MT_RELEASE_COMPLETE,l3s4},
{8,MT_STATUS_ENQUIRY,l3s21},
{6,MT_SETUP,l3s12},
{8,MT_STATUS_ENQUIRY,l3s21},
{7,MT_RELEASE,l3s19},
{7,MT_RELEASE_COMPLETE,l3s4_1},
{7,MT_DISCONNECT,l3s7},
{8,MT_STATUS_ENQUIRY,l3s21},
{8,MT_RELEASE,l3s19},
{8,MT_CONNECT_ACKNOWLEDGE,l3s17},
{8,MT_DISCONNECT,l3s7},
{8,MT_RELEASE_COMPLETE,l3s4_1},
{10,MT_STATUS_ENQUIRY,l3s21},
{10,MT_DISCONNECT,l3s7},
{10,MT_RELEASE,l3s19},
{10,MT_RELEASE_COMPLETE,l3s4_1},
{11,MT_STATUS_ENQUIRY,l3s21},
{11,MT_RELEASE,l3s19},
{11,MT_RELEASE_COMPLETE,l3s4},
{19,MT_STATUS_ENQUIRY,l3s21},
{19,MT_RELEASE_COMPLETE,l3s4},
};
static int datasllen = sizeof(datastatelist) /
sizeof(struct stateentry);
#ifdef P_1TR6
#include "l3_1TR6.c"
#endif
static void
l3up(struct PStack *st,
int pr, void *arg)
{
int i, mt, size;
byte *ptr;
struct BufHeader *ibh = arg;
if (pr == DL_DATA) {
ptr = DATAPTR(ibh);
ptr += st->l2.ihsize;
size = ibh->datasize - st->l2.ihsize;
mt = ptr[3];
switch (ptr[0]) {
#ifdef P_1TR6
case PROTO_DIS_N0:
BufPoolRelease(ibh);
break;
case PROTO_DIS_N1:
for (i = 0; i < datasl_1tr6t_len; i++)
if ((st->l3.state == datastatelist_1tr6t[i].state) &&
(mt == datastatelist_1tr6t[i].primitive))
break;
if (i == datasl_1tr6t_len) {
BufPoolRelease(ibh);
if (DEBUG_1TR6 > 0)
printk(KERN_INFO "isdnl3up unhandled 1tr6 state %d MT %x\n",
st->l3.state, mt);
} else
datastatelist_1tr6t[i].rout(st, pr, ibh);
break;
#endif
case PROTO_EURO: /* E-DSS1 */
for (i = 0; i < datasllen; i++)
if ((st->l3.state == datastatelist[i].state) &&
(mt == datastatelist[i].primitive))
break;
if (i == datasllen) {
BufPoolRelease(ibh);
if (DEBUG_1TR6 > 0)
printk(KERN_INFO "isdnl3up unhandled E-DSS1 state %d MT %x\n",
st->l3.state, mt);
} else
datastatelist[i].rout(st, pr, ibh);
break;
default:
BufPoolRelease(ibh);
break;
}
} else if (pr == DL_UNIT_DATA) {
ptr = DATAPTR(ibh);
ptr += st->l2.uihsize;
size = ibh->datasize - st->l2.uihsize;
mt = ptr[3];
switch (ptr[0]) {
#ifdef P_1TR6
case PROTO_DIS_N0:
BufPoolRelease(ibh);
break;
case PROTO_DIS_N1:
for (i = 0; i < datasl_1tr6t_len; i++)
if ((st->l3.state == datastatelist_1tr6t[i].state) &&
(mt == datastatelist_1tr6t[i].primitive))
break;
if (i == datasl_1tr6t_len) {
if (DEBUG_1TR6 > 0) {
printk(KERN_INFO "isdnl3up unhandled 1tr6 state %d MT %x\n"
,st->l3.state, mt);
}
BufPoolRelease(ibh);
} else
datastatelist_1tr6t[i].rout(st, pr, ibh);
break;
#endif
case PROTO_EURO: /* E-DSS1 */
for (i = 0; i < datasllen; i++)
if ((st->l3.state == datastatelist[i].state) &&
(mt == datastatelist[i].primitive))
break;
if (i == datasllen) {
BufPoolRelease(ibh);
if (DEBUG_1TR6 > 0)
printk(KERN_INFO "isdnl3up unhandled E-DSS1 state %d MT %x\n",
st->l3.state, mt);
} else
datastatelist[i].rout(st, pr, ibh);
break;
default:
BufPoolRelease(ibh);
break;
}
}
}
static void
l3down(struct PStack *st,
int pr, void *arg)
{
int i;
struct BufHeader *ibh = arg;
switch (st->protocol) {
#ifdef P_1TR6
case ISDN_PTYPE_1TR6:
for (i = 0; i < downsl_1tr6t_len; i++)
if ((st->l3.state == downstatelist_1tr6t[i].state) &&
(pr == downstatelist_1tr6t[i].primitive))
break;
if (i == downsl_1tr6t_len) {
if (DEBUG_1TR6 > 0) {
printk(KERN_INFO "isdnl3down unhandled 1tr6 state %d primitive %x\n", st->l3.state, pr);
}
} else
downstatelist_1tr6t[i].rout(st, pr, ibh);
break;
#endif
default:
for (i = 0; i < downsllen; i++)
if ((st->l3.state == downstatelist[i].state) &&
(pr == downstatelist[i].primitive))
break;
if (i == downsllen) {
if (DEBUG_1TR6 > 0) {
printk(KERN_INFO "isdnl3down unhandled E-DSS1 state %d primitive %x\n", st->l3.state, pr);
}
} else
downstatelist[i].rout(st, pr, ibh);
}
}
void
setstack_isdnl3(struct PStack *st)
{
st->l4.l4l3 = l3down;
st->l2.l2l3 = l3up;
st->l3.state = 0;
st->l3.callref = 0;
st->l3.debug = 0;
}

View File

@ -1,535 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.6 1996/09/25 18:34:57 keil
* missing states in 1TR6 Statemachine added
*
* Revision 1.5 1996/09/23 01:53:51 fritz
* Bugfix: discard unknown frames (non-EDSS1 and non-1TR6).
*
* Revision 1.4 1996/06/06 14:22:28 fritz
* Changed level of "non-digital call..." message, since
* with audio support, this is quite normal.
*
* Revision 1.3 1996/04/30 21:54:42 isdn4dev
* SPV, callback , remove some debugging code Karsten Keil
*
* Revision 1.2 1996/04/20 16:47:23 fritz
* Changed statemachine to allow reject of an incoming call.
* Report all incoming calls, not just those with Service = 7.
* Misc. typos
*
* Revision 1.1 1996/04/13 10:25:16 fritz
* Initial revision
*
*
*/
#include "proto.h"
static void
l3_1TR6_message(struct PStack *st, int mt, int pd)
{
struct BufHeader *dibh;
byte *p;
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 18);
p = DATAPTR(dibh);
p += st->l2.ihsize;
*p++ = pd;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = mt;
dibh->datasize = p - DATAPTR(dibh);
i_down(st, dibh);
}
static void
l3_1tr6_setup(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *dibh;
byte *p;
char *teln;
st->l3.callref = st->pa->callref;
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 19);
p = DATAPTR(dibh);
p += st->l2.ihsize;
*p++ = PROTO_DIS_N1;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = MT_N1_SETUP;
if ('S' == (st->pa->setup.phone[0] & 0x5f)) { /* SPV ??? */
/* NSF SPV */
*p++ = WE0_netSpecFac;
*p++ = 4; /* Laenge */
*p++ = 0;
*p++ = FAC_SPV; /* SPV */
*p++ = st->pa->setup.si1; /* 0 for all Services */
*p++ = st->pa->setup.si2; /* 0 for all Services */
*p++ = WE0_netSpecFac;
*p++ = 4; /* Laenge */
*p++ = 0;
*p++ = FAC_Activate; /* aktiviere SPV (default) */
*p++ = st->pa->setup.si1; /* 0 for all Services */
*p++ = st->pa->setup.si2; /* 0 for all Services */
}
if (st->pa->setup.eazmsn[0]) {
*p++ = WE0_origAddr;
*p++ = strlen(st->pa->setup.eazmsn) + 1;
/* Classify as AnyPref. */
*p++ = 0x81; /* Ext = '1'B, Type = '000'B, Plan = '0001'B. */
teln = st->pa->setup.eazmsn;
while (*teln)
*p++ = *teln++ & 0x7f;
}
*p++ = WE0_destAddr;
teln = st->pa->setup.phone;
if ('S' != (st->pa->setup.phone[0] & 0x5f)) { /* Keine SPV ??? */
*p++ = strlen(st->pa->setup.phone) + 1;
st->pa->spv = 0;
} else { /* SPV */
*p++ = strlen(st->pa->setup.phone);
teln++; /* skip S */
st->pa->spv = 1;
}
/* Classify as AnyPref. */
*p++ = 0x81; /* Ext = '1'B, Type = '000'B, Plan = '0001'B. */
while (*teln)
*p++ = *teln++ & 0x7f;
*p++ = WE_Shift_F6;
/* Codesatz 6 fuer Service */
*p++ = WE6_serviceInd;
*p++ = 2; /* len=2 info,info2 */
*p++ = st->pa->setup.si1;
*p++ = st->pa->setup.si2;
dibh->datasize = p - DATAPTR(dibh);
newl3state(st, 1);
i_down(st, dibh);
}
static void
l3_1tr6_tu_setup(struct PStack *st, byte pr, void *arg)
{
byte *p;
struct BufHeader *ibh = arg;
p = DATAPTR(ibh);
p += st->l2.uihsize;
st->pa->callref = getcallref(p);
st->l3.callref = 0x80 + st->pa->callref;
/* Channel Identification */
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize,
WE0_chanID, 0))) {
st->pa->bchannel = p[2] & 0x3;
} else
printk(KERN_INFO "l3tu_setup: Channel ident not found\n");
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize, WE6_serviceInd, 6))) {
st->pa->setup.si1 = p[2];
st->pa->setup.si2 = p[3];
} else
printk(KERN_INFO "l3s12(1TR6): ServiceIndicator not found\n");
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize,
WE0_destAddr, 0)))
iecpy(st->pa->setup.eazmsn, p, 1);
else
strcpy(st->pa->setup.eazmsn, "");
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize,
WE0_origAddr, 0))) {
iecpy(st->pa->setup.phone, p, 1);
} else
strcpy(st->pa->setup.phone, "");
p = DATAPTR(ibh);
st->pa->spv = 0;
if ((p = findie(p + st->l2.uihsize, ibh->datasize - st->l2.uihsize,
WE0_netSpecFac, 0))) {
if ((FAC_SPV == p[3]) || (FAC_Activate == p[3]))
st->pa->spv = 1;
}
BufPoolRelease(ibh);
/* Signal all services, linklevel takes care of Service-Indicator */
if (st->pa->setup.si1 != 7) {
printk(KERN_DEBUG "non-digital call: %s -> %s\n",
st->pa->setup.phone,
st->pa->setup.eazmsn);
}
newl3state(st, 6);
st->l3.l3l4(st, CC_SETUP_IND, NULL);
}
static void
l3_1tr6_tu_setup_ack(struct PStack *st, byte pr, void *arg)
{
byte *p;
struct BufHeader *ibh = arg;
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.ihsize, ibh->datasize - st->l2.ihsize,
WE0_chanID, 0))) {
st->pa->bchannel = p[2] & 0x3;
} else
printk(KERN_INFO "octect 3 not found\n");
BufPoolRelease(ibh);
newl3state(st, 2);
}
static void
l3_1tr6_tu_call_sent(struct PStack *st, byte pr, void *arg)
{
byte *p;
struct BufHeader *ibh = arg;
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.ihsize, ibh->datasize - st->l2.ihsize,
WE0_chanID, 0))) {
st->pa->bchannel = p[2] & 0x3;
} else
printk(KERN_INFO "octect 3 not found\n");
BufPoolRelease(ibh);
newl3state(st, 3);
st->l3.l3l4(st, CC_PROCEEDING_IND, NULL);
}
static void
l3_1tr6_tu_alert(struct PStack *st, byte pr, void *arg)
{
byte *p;
struct BufHeader *ibh = arg;
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.ihsize, ibh->datasize - st->l2.ihsize,
WE6_statusCalled, 6))) {
if (DEBUG_1TR6 > 2)
printk(KERN_INFO "status called %x\n", p[2]);
} else if (DEBUG_1TR6 > 0)
printk(KERN_INFO "statusCalled not found\n");
BufPoolRelease(ibh);
newl3state(st, 4);
st->l3.l3l4(st, CC_ALERTING_IND, NULL);
}
static void
l3_1tr6_tu_info(struct PStack *st, byte pr, void *arg)
{
byte *p;
int i,tmpcharge=0;
char a_charge[8];
struct BufHeader *ibh = arg;
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.ihsize, ibh->datasize - st->l2.ihsize,
WE6_chargingInfo, 6))) {
iecpy(a_charge, p, 1);
for (i = 0; i < strlen (a_charge); i++) {
tmpcharge *= 10;
tmpcharge += a_charge[i] & 0xf;
}
if (tmpcharge > st->pa->chargeinfo) {
st->pa->chargeinfo = tmpcharge;
st->l3.l3l4 (st, CC_INFO_CHARGE, NULL);
}
if (DEBUG_1TR6 > 2)
printk(KERN_INFO "chargingInfo %d\n", st->pa->chargeinfo);
} else if (DEBUG_1TR6 > 2)
printk(KERN_INFO "chargingInfo not found\n");
BufPoolRelease(ibh);
}
static void
l3_1tr6_tu_info_s2(struct PStack *st, byte pr, void *arg)
{
byte *p;
int i;
struct BufHeader *ibh = arg;
if (DEBUG_1TR6 > 4) {
p = DATAPTR(ibh);
for (i = 0; i < ibh->datasize; i++) {
printk(KERN_INFO "Info DATA %x\n", p[i]);
}
}
BufPoolRelease(ibh);
}
static void
l3_1tr6_tu_connect(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
st->pa->chargeinfo=0;
BufPoolRelease(ibh);
st->l3.l3l4(st, CC_SETUP_CNF, NULL);
newl3state(st, 10);
}
static void
l3_1tr6_tu_rel(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
l3_1TR6_message(st, MT_N1_REL_ACK, PROTO_DIS_N1);
st->l3.l3l4(st, CC_RELEASE_IND, NULL);
newl3state(st, 0);
}
static void
l3_1tr6_tu_rel_ack(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
newl3state(st, 0);
st->l3.l3l4(st, CC_RELEASE_CNF, NULL);
}
static void
l3_1tr6_tu_disc(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
byte *p;
int i,tmpcharge=0;
char a_charge[8];
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.ihsize, ibh->datasize - st->l2.ihsize,
WE6_chargingInfo, 6))) {
iecpy(a_charge, p, 1);
for (i = 0; i < strlen (a_charge); i++) {
tmpcharge *= 10;
tmpcharge += a_charge[i] & 0xf;
}
if (tmpcharge > st->pa->chargeinfo) {
st->pa->chargeinfo = tmpcharge;
st->l3.l3l4 (st, CC_INFO_CHARGE, NULL);
}
if (DEBUG_1TR6 > 2)
printk(KERN_INFO "chargingInfo %d\n", st->pa->chargeinfo);
} else if (DEBUG_1TR6 > 2)
printk(KERN_INFO "chargingInfo not found\n");
p = DATAPTR(ibh);
if ((p = findie(p + st->l2.ihsize, ibh->datasize - st->l2.ihsize,
WE0_cause, 0))) {
if (p[1] > 0) {
st->pa->cause = p[2];
} else {
st->pa->cause = 0;
}
if (DEBUG_1TR6 > 1)
printk(KERN_INFO "Cause %x\n", st->pa->cause);
} else if (DEBUG_1TR6 > 0)
printk(KERN_INFO "Cause not found\n");
BufPoolRelease(ibh);
newl3state(st, 12);
st->l3.l3l4(st, CC_DISCONNECT_IND, NULL);
}
static void
l3_1tr6_tu_connect_ack(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *ibh = arg;
BufPoolRelease(ibh);
st->pa->chargeinfo = 0;
st->l3.l3l4(st, CC_SETUP_COMPLETE_IND, NULL);
newl3state(st, 10);
}
static void
l3_1tr6_alert(struct PStack *st, byte pr,
void *arg)
{
l3_1TR6_message(st, MT_N1_ALERT, PROTO_DIS_N1);
newl3state(st, 7);
}
static void
l3_1tr6_conn(struct PStack *st, byte pr,
void *arg)
{
struct BufHeader *dibh;
byte *p;
st->l3.callref = 0x80 + st->pa->callref;
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 20);
p = DATAPTR(dibh);
p += st->l2.ihsize;
*p++ = PROTO_DIS_N1;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = MT_N1_CONN;
if (st->pa->spv) { /* SPV ??? */
/* NSF SPV */
*p++ = WE0_netSpecFac;
*p++ = 4; /* Laenge */
*p++ = 0;
*p++ = FAC_SPV; /* SPV */
*p++ = st->pa->setup.si1;
*p++ = st->pa->setup.si2;
*p++ = WE0_netSpecFac;
*p++ = 4; /* Laenge */
*p++ = 0;
*p++ = FAC_Activate; /* aktiviere SPV */
*p++ = st->pa->setup.si1;
*p++ = st->pa->setup.si2;
}
dibh->datasize = p - DATAPTR(dibh);
i_down(st, dibh);
newl3state(st, 8);
}
static void
l3_1tr6_reset(struct PStack *st, byte pr, void *arg)
{
newl3state(st, 0);
}
static void
l3_1tr6_disconn_req(struct PStack *st, byte pr, void *arg)
{
struct BufHeader *dibh;
byte *p;
byte rejflg;
BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 21);
p = DATAPTR(dibh);
p += st->l2.ihsize;
*p++ = PROTO_DIS_N1;
*p++ = 0x1;
*p++ = st->l3.callref;
*p++ = MT_N1_DISC;
if (st->l3.state == 7) {
rejflg = 1;
*p++ = WE0_cause; /* Anruf abweisen */
*p++ = 0x01; /* Laenge = 1 */
*p++ = CAUSE_CallRejected;
} else {
rejflg = 0;
*p++ = WE0_cause;
*p++ = 0x0; /* Laenge = 0 normales Ausloesen */
}
dibh->datasize = p - DATAPTR(dibh);
i_down(st, dibh);
newl3state(st, 11);
}
static void
l3_1tr6_rel_req(struct PStack *st, byte pr, void *arg)
{
l3_1TR6_message(st, MT_N1_REL, PROTO_DIS_N1);
newl3state(st, 19);
}
static struct stateentry downstatelist_1tr6t[] =
{
{0, CC_SETUP_REQ, l3_1tr6_setup},
{1, CC_DISCONNECT_REQ, l3_1tr6_disconn_req},
{1, CC_RELEASE_REQ, l3_1tr6_rel_req},
{1, CC_DLRL, l3_1tr6_reset},
{2, CC_DISCONNECT_REQ, l3_1tr6_disconn_req},
{2, CC_RELEASE_REQ, l3_1tr6_rel_req},
{2, CC_DLRL, l3_1tr6_reset},
{3, CC_DISCONNECT_REQ, l3_1tr6_disconn_req},
{3, CC_RELEASE_REQ, l3_1tr6_rel_req},
{3, CC_DLRL, l3_1tr6_reset},
{4, CC_DISCONNECT_REQ, l3_1tr6_disconn_req},
{4, CC_RELEASE_REQ, l3_1tr6_rel_req},
{4, CC_DLRL, l3_1tr6_reset},
{6, CC_REJECT_REQ, l3_1tr6_reset},
{6, CC_RELEASE_REQ, l3_1tr6_rel_req},
{6, CC_SETUP_RSP, l3_1tr6_conn},
{6, CC_ALERTING_REQ, l3_1tr6_alert},
{6, CC_DLRL, l3_1tr6_reset},
{7, CC_SETUP_RSP, l3_1tr6_conn},
{7, CC_RELEASE_REQ, l3_1tr6_rel_req},
{7, CC_DISCONNECT_REQ, l3_1tr6_disconn_req},
{7, CC_DLRL, l3_1tr6_reset},
{8, CC_DISCONNECT_REQ, l3_1tr6_disconn_req},
{8, CC_RELEASE_REQ, l3_1tr6_rel_req},
{8, CC_DLRL, l3_1tr6_reset},
{10, CC_DISCONNECT_REQ, l3_1tr6_disconn_req},
{10, CC_RELEASE_REQ, l3_1tr6_rel_req},
{10, CC_DLRL, l3_1tr6_reset},
{12, CC_RELEASE_REQ, l3_1tr6_rel_req},
{12, CC_DLRL, l3_1tr6_reset},
{19, CC_DLRL, l3_1tr6_reset},
};
static int downsl_1tr6t_len = sizeof(downstatelist_1tr6t) /
sizeof(struct stateentry);
static struct stateentry datastatelist_1tr6t[] =
{
{0, MT_N1_SETUP, l3_1tr6_tu_setup},
{0, MT_N1_REL, l3_1tr6_tu_rel},
{1, MT_N1_SETUP_ACK, l3_1tr6_tu_setup_ack},
{1, MT_N1_CALL_SENT, l3_1tr6_tu_call_sent},
{1, MT_N1_REL, l3_1tr6_tu_rel},
{1, MT_N1_DISC, l3_1tr6_tu_disc},
{2, MT_N1_CALL_SENT, l3_1tr6_tu_call_sent},
{2, MT_N1_ALERT, l3_1tr6_tu_alert},
{2, MT_N1_CONN, l3_1tr6_tu_connect},
{2, MT_N1_REL, l3_1tr6_tu_rel},
{2, MT_N1_DISC, l3_1tr6_tu_disc},
{2, MT_N1_INFO, l3_1tr6_tu_info_s2},
{3, MT_N1_ALERT, l3_1tr6_tu_alert},
{3, MT_N1_CONN, l3_1tr6_tu_connect},
{3, MT_N1_REL, l3_1tr6_tu_rel},
{3, MT_N1_DISC, l3_1tr6_tu_disc},
{4, MT_N1_ALERT, l3_1tr6_tu_alert},
{4, MT_N1_CONN, l3_1tr6_tu_connect},
{4, MT_N1_REL, l3_1tr6_tu_rel},
{4, MT_N1_DISC, l3_1tr6_tu_disc},
{7, MT_N1_REL, l3_1tr6_tu_rel},
{7, MT_N1_DISC, l3_1tr6_tu_disc},
{8, MT_N1_REL, l3_1tr6_tu_rel},
{8, MT_N1_DISC, l3_1tr6_tu_disc},
{8, MT_N1_CONN_ACK, l3_1tr6_tu_connect_ack},
{10, MT_N1_REL, l3_1tr6_tu_rel},
{10, MT_N1_DISC, l3_1tr6_tu_disc},
{10, MT_N1_INFO, l3_1tr6_tu_info},
{11, MT_N1_REL, l3_1tr6_tu_rel},
{12, MT_N1_REL, l3_1tr6_tu_rel},
{19, MT_N1_REL_ACK, l3_1tr6_tu_rel_ack}
};
static int datasl_1tr6t_len = sizeof(datastatelist_1tr6t) /
sizeof(struct stateentry);

View File

@ -1,157 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.3 1996/04/30 21:53:48 isdn4dev
* Bugs, SPV, Logging in q931.c Karsten Keil
*
* Revision 1.1 1996/04/13 10:25:42 fritz
* Initial revision
*
*
*/
#ifndef l3_1TR6
#define l3_1TR6
/*
* MsgType N0
*/
#define MT_N0_REG_IND 0x61
#define MT_N0_CANC_IND 0x62
#define MT_N0_FAC_STA 0x63
#define MT_N0_STA_ACK 0x64
#define MT_N0_STA_REJ 0x65
#define MT_N0_FAC_INF 0x66
#define MT_N0_INF_ACK 0x67
#define MT_N0_INF_REJ 0x68
#define MT_N0_CLOSE 0x75
#define MT_N0_CLO_ACK 0x77
/*
* MsgType N1
*/
#define MT_N1_ESC 0x00
#define MT_N1_ALERT 0x01
#define MT_N1_CALL_SENT 0x02
#define MT_N1_CONN 0x07
#define MT_N1_CONN_ACK 0x0F
#define MT_N1_SETUP 0x05
#define MT_N1_SETUP_ACK 0x0D
#define MT_N1_RES 0x26
#define MT_N1_RES_ACK 0x2E
#define MT_N1_RES_REJ 0x22
#define MT_N1_SUSP 0x25
#define MT_N1_SUSP_ACK 0x2D
#define MT_N1_SUSP_REJ 0x21
#define MT_N1_USER_INFO 0x20
#define MT_N1_DET 0x40
#define MT_N1_DISC 0x45
#define MT_N1_REL 0x4D
#define MT_N1_REL_ACK 0x5A
#define MT_N1_CANC_ACK 0x6E
#define MT_N1_CANC_REJ 0x67
#define MT_N1_CON_CON 0x69
#define MT_N1_FAC 0x60
#define MT_N1_FAC_ACK 0x68
#define MT_N1_FAC_CAN 0x66
#define MT_N1_FAC_REG 0x64
#define MT_N1_FAC_REJ 0x65
#define MT_N1_INFO 0x6D
#define MT_N1_REG_ACK 0x6C
#define MT_N1_REG_REJ 0x6F
#define MT_N1_STAT 0x63
/*
* W Elemente
*/
#define WE_Shift_F0 0x90
#define WE_Shift_F6 0x96
#define WE_Shift_OF0 0x98
#define WE_Shift_OF6 0x9E
#define WE0_cause 0x08
#define WE0_connAddr 0x0C
#define WE0_callID 0x10
#define WE0_chanID 0x18
#define WE0_netSpecFac 0x20
#define WE0_display 0x28
#define WE0_keypad 0x2C
#define WE0_origAddr 0x6C
#define WE0_destAddr 0x70
#define WE0_userInfo 0x7E
#define WE0_moreData 0xA0
#define WE0_congestLevel 0xB0
#define WE6_serviceInd 0x01
#define WE6_chargingInfo 0x02
#define WE6_date 0x03
#define WE6_facSelect 0x05
#define WE6_facStatus 0x06
#define WE6_statusCalled 0x07
#define WE6_addTransAttr 0x08
/*
* FacCodes
*/
#define FAC_Sperre 0x01
#define FAC_Sperre_All 0x02
#define FAC_Sperre_Fern 0x03
#define FAC_Sperre_Intl 0x04
#define FAC_Sperre_Interk 0x05
#define FAC_Forward1 0x02
#define FAC_Forward2 0x03
#define FAC_Konferenz 0x06
#define FAC_GrabBchan 0x0F
#define FAC_Reactivate 0x10
#define FAC_Konferenz3 0x11
#define FAC_Dienstwechsel1 0x12
#define FAC_Dienstwechsel2 0x13
#define FAC_NummernIdent 0x14
#define FAC_GBG 0x15
#define FAC_DisplayUebergeben 0x17
#define FAC_DisplayUmgeleitet 0x1A
#define FAC_Unterdruecke 0x1B
#define FAC_Deactivate 0x1E
#define FAC_Activate 0x1D
#define FAC_SPV 0x1F
#define FAC_Rueckwechsel 0x23
#define FAC_Umleitung 0x24
/*
* Cause codes
*/
#define CAUSE_InvCRef 0x01
#define CAUSE_BearerNotImpl 0x03
#define CAUSE_CIDunknown 0x07
#define CAUSE_CIDinUse 0x08
#define CAUSE_NoChans 0x0A
#define CAUSE_FacNotImpl 0x10
#define CAUSE_FacNotSubscr 0x11
#define CAUSE_OutgoingBarred 0x20
#define CAUSE_UserAccessBusy 0x21
#define CAUSE_NegativeGBG 0x22
#define CAUSE_UnknownGBG 0x23
#define CAUSE_NoSPVknown 0x25
#define CAUSE_DestNotObtain 0x35
#define CAUSE_NumberChanged 0x38
#define CAUSE_OutOfOrder 0x39
#define CAUSE_NoUserResponse 0x3A
#define CAUSE_UserBusy 0x3B
#define CAUSE_IncomingBarred 0x3D
#define CAUSE_CallRejected 0x3E
#define CAUSE_NetworkCongestion 0x59
#define CAUSE_RemoteUser 0x5A
#define CAUSE_LocalProcErr 0x70
#define CAUSE_RemoteProcErr 0x71
#define CAUSE_RemoteUserSuspend 0x72
#define CAUSE_RemoteUserResumed 0x73
#define CAUSE_UserInfoDiscarded 0x7F
#endif

View File

@ -1,148 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.6 1996/06/03 20:03:39 fritz
* Fixed typos.
*
* Revision 1.5 1996/05/31 00:58:47 fritz
* Errata: Reverted change from rev 1.4.
*
* Revision 1.4 1996/05/26 14:59:57 fritz
* Bugfix: maxbufsize had been set without respect to possible X.75 header.
*
* Revision 1.3 1996/05/01 14:19:57 fritz
* Added ISDN_FEATURE_L2_TRANS
*
* Revision 1.2 1996/04/29 23:01:46 fritz
* Added driverId and channel to readstatus().
*
* Revision 1.1 1996/04/13 10:26:29 fritz
* Initial revision
*
*
*/
#define __NO_VERSION__
#include "teles.h"
#include <linux/malloc.h>
#include <linux/timer.h>
extern struct Channel *chanlist;
int drid;
char *teles_id = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
isdn_if iif;
#define TELES_STATUS_BUFSIZE 4096
static byte *teles_status_buf = NULL;
static byte *teles_status_read = NULL;
static byte *teles_status_write = NULL;
static byte *teles_status_end = NULL;
int
teles_readstatus(byte * buf, int len, int user, int id, int channel)
{
int count;
byte *p;
for (p = buf, count = 0; count < len; p++, count++) {
if (user)
put_user(*teles_status_read++, p);
else
*p++ = *teles_status_read++;
if (teles_status_read > teles_status_end)
teles_status_read = teles_status_buf;
}
return count;
}
void
teles_putstatus(char *buf)
{
long flags;
int len, count, i;
byte *p;
isdn_ctrl ic;
save_flags(flags);
cli();
count = 0;
len = strlen(buf);
for (p = buf, i = len; i > 0; i--, p++) {
*teles_status_write++ = *p;
if (teles_status_write > teles_status_end)
teles_status_write = teles_status_buf;
count++;
}
restore_flags(flags);
if (count) {
ic.command = ISDN_STAT_STAVAIL;
ic.driver = drid;
ic.arg = count;
iif.statcallb(&ic);
}
}
int
ll_init(void)
{
isdn_ctrl ic;
teles_status_buf = Smalloc(TELES_STATUS_BUFSIZE,
GFP_KERNEL, "teles_status_buf");
if (!teles_status_buf) {
printk(KERN_ERR "teles: Could not allocate status-buffer\n");
return (-EIO);
} else {
teles_status_read = teles_status_buf;
teles_status_write = teles_status_buf;
teles_status_end = teles_status_buf + TELES_STATUS_BUFSIZE - 1;
}
iif.channels = CallcNewChan();
iif.maxbufsize = BUFFER_SIZE(HSCX_SBUF_ORDER, HSCX_SBUF_BPPS);
iif.features =
ISDN_FEATURE_L2_X75I |
ISDN_FEATURE_L2_HDLC |
ISDN_FEATURE_L2_TRANS |
ISDN_FEATURE_L3_TRANS |
ISDN_FEATURE_P_1TR6 |
ISDN_FEATURE_P_EURO;
iif.command = teles_command;
iif.writebuf = teles_writebuf;
iif.writecmd = NULL;
iif.readstat = teles_readstatus;
strncpy(iif.id, teles_id, sizeof(iif.id) - 1);
register_isdn(&iif);
drid = iif.channels;
ic.driver = drid;
ic.command = ISDN_STAT_RUN;
iif.statcallb(&ic);
return 0;
}
void
ll_stop(void)
{
isdn_ctrl ic;
ic.command = ISDN_STAT_STOP;
ic.driver = drid;
iif.statcallb(&ic);
CallcFreeChan();
}
void
ll_unload(void)
{
isdn_ctrl ic;
ic.command = ISDN_STAT_UNLOAD;
ic.driver = drid;
iif.statcallb(&ic);
}

View File

@ -1,157 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.2 1997/02/10 11:45:14 fritz
* More changes for Kernel 2.1.X compatibility.
*
* Revision 1.1 1996/04/13 10:27:02 fritz
* Initial revision
*
*
*/
#include "teles.h"
extern struct IsdnCard cards[];
extern char *teles_id;
int nrcards;
typedef struct {
byte *membase;
int interrupt;
unsigned int iobase;
unsigned int protocol;
} io_type;
io_type io[] =
{
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
};
#ifdef MODULE
#if (LINUX_VERSION_CODE > 0x020111)
MODULE_PARM(io, "1-64i");
MODULE_PARM(teles_id, "s");
#endif
#endif
void
teles_mod_dec_use_count(void)
{
MOD_DEC_USE_COUNT;
}
void
teles_mod_inc_use_count(void)
{
MOD_INC_USE_COUNT;
}
#ifdef MODULE
#define teles_init init_module
#else
void teles_setup(char *str, int *ints)
{
int i, j, argc;
static char sid[20];
argc = ints[0];
i = 0;
j = 1;
while (argc && (i<16)) {
if (argc) {
io[i].iobase = ints[j];
j++; argc--;
}
if (argc) {
io[i].interrupt = ints[j];
j++; argc--;
}
if (argc) {
io[i].membase = (byte *)ints[j];
j++; argc--;
}
if (argc) {
io[i].protocol = ints[j];
j++; argc--;
}
i++;
}
if (strlen(str)) {
strcpy(sid,str);
teles_id = sid;
}
}
#endif
int
teles_init(void)
{
int i;
nrcards = 0;
for (i = 0; i < 16; i++) {
if (io[i].protocol) {
cards[i].membase = io[i].membase;
cards[i].interrupt = io[i].interrupt;
cards[i].iobase = io[i].iobase;
cards[i].protocol = io[i].protocol;
}
}
for (i = 0; i < 16; i++)
if (cards[i].protocol)
nrcards++;
printk(KERN_DEBUG "teles: Total %d card%s defined\n",
nrcards, (nrcards > 1) ? "s" : "");
if (teles_inithardware()) {
/* Install only, if at least one card found */
Isdnl2New();
TeiNew();
CallcNew();
ll_init();
/* No symbols to export, hide all symbols */
#ifdef MODULE
#if (LINUX_VERSION_CODE < 0x020111)
register_symtab(NULL);
#else
EXPORT_NO_SYMBOLS;
#endif
printk(KERN_NOTICE "Teles module installed\n");
#endif
return (0);
} else
return -EIO;
}
#ifdef MODULE
void
cleanup_module(void)
{
ll_stop();
TeiFree();
Isdnl2Free();
CallcFree();
teles_closehardware();
ll_unload();
printk(KERN_NOTICE "Teles module removed\n");
}
#endif

View File

@ -1,15 +0,0 @@
/* $Id$
*
* not much now - just the l3 proto discriminator
*
* $Log$
*/
#ifndef PROTO_H
#define PROTO_H
#define PROTO_EURO 0x08
#define PROTO_DIS_N0 0x40
#define PROTO_DIS_N1 0x41
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,245 +0,0 @@
/* $Id$
*
* $Log$
*
*/
#define __NO_VERSION__
#include "teles.h"
extern struct IsdnCard cards[];
extern int nrcards;
static struct PStack *
findces(struct PStack *st, int ces)
{
struct PStack *ptr = *(st->l1.stlistp);
while (ptr)
if (ptr->l2.ces == ces)
return (ptr);
else
ptr = ptr->next;
return (NULL);
}
static struct PStack *
findtei(struct PStack *st, int tei)
{
struct PStack *ptr = *(st->l1.stlistp);
if (tei == 127)
return (NULL);
while (ptr)
if (ptr->l2.tei == tei)
return (ptr);
else
ptr = ptr->next;
return (NULL);
}
void
tei_handler(struct PStack *st,
byte pr, struct BufHeader *ibh)
{
byte *bp;
unsigned int tces;
struct PStack *otsp, *ptr;
unsigned int data;
if (st->l2.debug)
printk(KERN_DEBUG "teihandler %d\n", pr);
switch (pr) {
case (MDL_ASSIGN):
data = (unsigned int) ibh;
BufPoolGet(&ibh, st->l1.smallpool, GFP_ATOMIC, (void *) st, 6);
if (!ibh)
return;
bp = DATAPTR(ibh);
bp += st->l2.uihsize;
bp[0] = 0xf;
bp[1] = data >> 8;
bp[2] = data & 0xff;
bp[3] = 0x1;
bp[4] = 0xff;
ibh->datasize = 8;
st->l3.l3l2(st, DL_UNIT_DATA, ibh);
break;
case (DL_UNIT_DATA):
bp = DATAPTR(ibh);
bp += 3;
if (bp[0] != 0xf)
break;
switch (bp[3]) {
case (2):
tces = (bp[1] << 8) | bp[2];
BufPoolRelease(ibh);
if (st->l3.debug)
printk(KERN_DEBUG "tei identity assigned for %d=%d\n", tces,
bp[4] >> 1);
if ((otsp = findces(st, tces)))
otsp->ma.teil2(otsp, MDL_ASSIGN,
(void *)(bp[4] >> 1));
break;
case (4):
if (st->l3.debug)
printk(KERN_DEBUG "checking identity for %d\n", bp[4] >> 1);
if (bp[4] >> 1 == 0x7f) {
BufPoolRelease(ibh);
ptr = *(st->l1.stlistp);
while (ptr) {
if ((ptr->l2.tei & 0x7f) != 0x7f) {
if (BufPoolGet(&ibh, st->l1.smallpool, GFP_ATOMIC, (void *) st, 7))
break;
bp = DATAPTR(ibh);
bp += 3;
bp[0] = 0xf;
bp[1] = ptr->l2.ces >> 8;
bp[2] = ptr->l2.ces & 0xff;
bp[3] = 0x5;
bp[4] = (ptr->l2.tei << 1) | 1;
ibh->datasize = 8;
st->l3.l3l2(st, DL_UNIT_DATA, ibh);
}
ptr = ptr->next;
}
} else {
otsp = findtei(st, bp[4] >> 1);
BufPoolRelease(ibh);
if (!otsp)
break;
if (st->l3.debug)
printk(KERN_DEBUG "ces is %d\n", otsp->l2.ces);
if (BufPoolGet(&ibh, st->l1.smallpool, GFP_ATOMIC, (void *) st, 7))
break;
bp = DATAPTR(ibh);
bp += 3;
bp[0] = 0xf;
bp[1] = otsp->l2.ces >> 8;
bp[2] = otsp->l2.ces & 0xff;
bp[3] = 0x5;
bp[4] = (otsp->l2.tei << 1) | 1;
ibh->datasize = 8;
st->l3.l3l2(st, DL_UNIT_DATA, ibh);
}
break;
default:
BufPoolRelease(ibh);
if (st->l3.debug)
printk(KERN_DEBUG "tei message unknown %d ai %d\n", bp[3], bp[4] >> 1);
}
break;
default:
printk(KERN_WARNING "tei handler unknown primitive %d\n", pr);
break;
}
}
unsigned int
randomces(void)
{
int x = jiffies & 0xffff;
return (x);
}
static void
tei_man(struct PStack *sp, int i, void *v)
{
printk(KERN_DEBUG "tei_man\n");
}
static void
tei_l2tei(struct PStack *st, int pr, void *arg)
{
struct IsdnCardState *sp = st->l1.hardware;
tei_handler(sp->teistack, pr, arg);
}
void
setstack_tei(struct PStack *st)
{
st->l2.l2tei = tei_l2tei;
}
static void
init_tei(struct IsdnCardState *sp, int protocol)
{
struct PStack *st;
char tmp[128];
#define DIRTY_HACK_AGAINST_SIGSEGV
st = (struct PStack *) Smalloc(sizeof(struct PStack), GFP_KERNEL,
"struct PStack");
#ifdef DIRTY_HACK_AGAINST_SIGSEGV
sp->teistack = st; /* struct is not initialized yet */
sp->teistack->protocol = protocol; /* struct is not initialized yet */
#endif /* DIRTY_HACK_AGAINST_SIGSEGV */
setstack_teles(st, sp);
st->l2.extended = !0;
st->l2.laptype = LAPD;
st->l2.window = 1;
st->l2.orig = !0;
st->protocol = protocol;
/*
* the following is not necessary for tei mng. (broadcast only)
*/
st->l2.t200 = 500; /* 500 milliseconds */
st->l2.n200 = 4; /* try 4 times */
st->l2.sap = 63;
st->l2.tei = 127;
sprintf(tmp, "Card %d tei ", sp->cardnr);
setstack_isdnl2(st, tmp);
st->l2.debug = 0;
st->l3.debug = 0;
st->ma.manl2(st, MDL_NOTEIPROC, NULL);
st->l2.l2l3 = (void *) tei_handler;
st->l1.l1man = tei_man;
st->l2.l2man = tei_man;
st->l4.l2writewakeup = NULL;
teles_addlist(sp, st);
sp->teistack = st;
}
static void
release_tei(struct IsdnCardState *sp)
{
struct PStack *st = sp->teistack;
teles_rmlist(sp, st);
Sfree((void *) st);
}
void
TeiNew(void)
{
int i;
for (i = 0; i < nrcards; i++)
if (cards[i].sp)
init_tei(cards[i].sp, cards[i].protocol);
}
void
TeiFree(void)
{
int i;
for (i = 0; i < nrcards; i++)
if (cards[i].sp)
release_tei(cards[i].sp);
}

View File

@ -1,483 +0,0 @@
/* $Id$
*
* $Log$
* Revision 1.2 1996/04/30 21:52:04 isdn4dev
* SPV for 1TR6 - Karsten
*
* Revision 1.1 1996/04/13 10:29:00 fritz
* Initial revision
*
*
*/
#include <linux/module.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/major.h>
#include <asm/segment.h>
#include <asm/io.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/malloc.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/ioport.h>
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/isdnif.h>
#include <linux/tty.h>
#define PH_ACTIVATE 1
#define PH_DATA 2
#define PH_DEACTIVATE 3
#define MDL_ASSIGN 4
#define DL_UNIT_DATA 5
#define SC_STARTUP 6
#define CC_ESTABLISH 7
#define DL_ESTABLISH 8
#define DL_DATA 9
#define CC_S_STATUS_ENQ 10
#define CC_CONNECT 15
#define CC_CONNECT_ACKNOWLEDGE 16
#define CO_EOF 17
#define SC_DISCONNECT 18
#define CO_DTMF 19
#define DL_RELEASE 20
#define CO_ALARM 22
#define CC_REJECT 23
#define CC_SETUP_REQ 24
#define CC_SETUP_CNF 25
#define CC_SETUP_IND 26
#define CC_SETUP_RSP 27
#define CC_SETUP_COMPLETE_IND 28
#define CC_DISCONNECT_REQ 29
#define CC_DISCONNECT_IND 30
#define CC_RELEASE_CNF 31
#define CC_RELEASE_IND 32
#define CC_RELEASE_REQ 33
#define CC_REJECT_REQ 34
#define CC_PROCEEDING_IND 35
#define CC_DLRL 36
#define CC_DLEST 37
#define CC_ALERTING_REQ 38
#define CC_ALERTING_IND 39
#define DL_STOP 40
#define DL_START 41
#define MDL_NOTEIPROC 46
#define LC_ESTABLISH 47
#define LC_RELEASE 48
#define PH_REQUEST_PULL 49
#define PH_PULL_ACK 50
#define PH_DATA_PULLED 51
#define CC_INFO_CHARGE 52
/*
* Message-Types
*/
#define MT_ALERTING 0x01
#define MT_CALL_PROCEEDING 0x02
#define MT_CONNECT 0x07
#define MT_CONNECT_ACKNOWLEDGE 0x0f
#define MT_PROGRESS 0x03
#define MT_SETUP 0x05
#define MT_SETUP_ACKNOWLEDGE 0x0d
#define MT_RESUME 0x26
#define MT_RESUME_ACKNOWLEDGE 0x2e
#define MT_RESUME_REJECT 0x22
#define MT_SUSPEND 0x25
#define MT_SUSPEND_ACKNOWLEDGE 0x2d
#define MT_SUSPEND_REJECT 0x21
#define MT_USER_INFORMATION 0x20
#define MT_DISCONNECT 0x45
#define MT_RELEASE 0x4d
#define MT_RELEASE_COMPLETE 0x5a
#define MT_RESTART 0x46
#define MT_RESTART_ACKNOWLEDGE 0x4e
#define MT_SEGMENT 0x60
#define MT_CONGESTION_CONTROL 0x79
#define MT_INFORMATION 0x7b
#define MT_FACILITY 0x62
#define MT_NOTIFY 0x6e
#define MT_STATUS 0x7d
#define MT_STATUS_ENQUIRY 0x75
#define IE_CAUSE 0x08
struct HscxIoctlArg {
int channel;
int mode;
int transbufsize;
};
#ifdef __KERNEL__
#undef DEBUG_MAGIC
#define HSCX_SBUF_ORDER 1
#define HSCX_SBUF_BPPS 2
#define HSCX_SBUF_MAXPAGES 3
#define HSCX_RBUF_ORDER 1
#define HSCX_RBUF_BPPS 2
#define HSCX_RBUF_MAXPAGES 3
#define HSCX_SMALLBUF_ORDER 0
#define HSCX_SMALLBUF_BPPS 40
#define HSCX_SMALLBUF_MAXPAGES 1
#define ISAC_SBUF_ORDER 0
#define ISAC_SBUF_BPPS 16
#define ISAC_SBUF_MAXPAGES 1
#define ISAC_RBUF_ORDER 0
#define ISAC_RBUF_BPPS 16
#define ISAC_RBUF_MAXPAGES 1
#define ISAC_SMALLBUF_ORDER 0
#define ISAC_SMALLBUF_BPPS 40
#define ISAC_SMALLBUF_MAXPAGES 1
#define byte unsigned char
#define MAX_WINDOW 8
byte *Smalloc(int size, int pr, char *why);
void Sfree(byte * ptr);
/*
* Statemachine
*/
struct Fsm {
int *jumpmatrix;
int state_count, event_count;
char **strEvent, **strState;
};
struct FsmInst {
struct Fsm *fsm;
int state;
int debug;
void *userdata;
int userint;
void (*printdebug) (struct FsmInst *, char *);
};
struct FsmNode {
int state, event;
void (*routine) (struct FsmInst *, int, void *);
};
struct FsmTimer {
struct FsmInst *fi;
struct timer_list tl;
int event;
void *arg;
};
struct BufHeader {
#ifdef DEBUG_MAGIC
int magic;
#endif
struct BufHeader *next;
struct BufPool *bp;
int datasize;
byte primitive, where;
void *heldby;
};
struct Pages {
struct Pages *next;
};
struct BufPool {
#ifdef DEBUG_MAGIC
int magic;
#endif
struct BufHeader *freelist;
struct Pages *pageslist;
int pageorder;
int pagescount;
int bpps;
int bufsize;
int maxpages;
};
struct BufQueue {
#ifdef DEBUG_MAGIC
int magic;
#endif
struct BufHeader *head, *tail;
};
struct Layer1 {
void *hardware;
int hscx;
struct BufPool *sbufpool, *rbufpool, *smallpool;
struct PStack **stlistp;
int act_state;
void (*l1l2) (struct PStack *, int, struct BufHeader *);
void (*l1man) (struct PStack *, int, void *);
int hscxmode, hscxchannel, requestpull;
};
struct Layer2 {
int sap, tei, ces;
int extended, laptype;
int uihsize, ihsize;
int vs, va, vr;
struct BufQueue i_queue;
int window, orig;
int rejexp;
int debug;
struct BufHeader *windowar[MAX_WINDOW];
int sow;
struct FsmInst l2m;
void (*l2l1) (struct PStack *, int, struct BufHeader *);
void (*l2l1discardq) (struct PStack *, int, void *, int);
void (*l2man) (struct PStack *, int, void *);
void (*l2l3) (struct PStack *, int, void *);
void (*l2tei) (struct PStack *, int, void *);
struct FsmTimer t200_timer, t203_timer;
int t200, n200, t203;
int rc, t200_running;
char debug_id[32];
};
struct Layer3 {
void (*l3l4) (struct PStack *, int, struct BufHeader *);
void (*l3l2) (struct PStack *, int, void *);
int state, callref;
int debug;
};
struct Layer4 {
void (*l4l3) (struct PStack *, int, void *);
void *userdata;
void (*l1writewakeup) (struct PStack *);
void (*l2writewakeup) (struct PStack *);
};
struct Management {
void (*manl1) (struct PStack *, int, void *);
void (*manl2) (struct PStack *, int, void *);
void (*teil2) (struct PStack *, int, void *);
};
struct Param {
int cause;
int bchannel;
int callref; /* TEI-Number */
setup_parm setup; /* from isdnif.h numbers and Serviceindicator */
int chargeinfo; /* Charge Info - only for 1tr6 in
* the moment
*/
int spv; /* SPV Flag */
};
struct PStack {
struct PStack *next;
struct Layer1 l1;
struct Layer2 l2;
struct Layer3 l3;
struct Layer4 l4;
struct Management ma;
struct Param *pa;
int protocol; /* EDSS1 or 1TR6 */
};
struct HscxState {
byte *membase;
int iobase;
int inuse, init, active;
struct BufPool sbufpool, rbufpool, smallpool;
struct IsdnCardState *sp;
int hscx, mode;
int transbufsize, receive;
struct BufHeader *rcvibh, *xmtibh;
int rcvptr, sendptr;
struct PStack *st;
struct tq_struct tqueue;
int event;
struct BufQueue rq, sq;
int releasebuf;
#ifdef DEBUG_MAGIC
int magic; /* 301270 */
#endif
};
struct IsdnCardState {
#ifdef DEBUG_MAGIC
int magic;
#endif
byte *membase;
int iobase;
struct BufPool sbufpool, rbufpool, smallpool;
struct PStack *stlist;
struct BufHeader *xmtibh, *rcvibh;
int rcvptr, sendptr;
int event;
struct tq_struct tqueue;
int ph_active;
struct BufQueue rq, sq;
int cardnr, ph_state;
struct PStack *teistack;
struct HscxState hs[2];
int dlogflag;
char *dlogspace;
int debug;
int releasebuf;
};
struct IsdnCard {
byte *membase;
int interrupt;
unsigned int iobase;
int protocol; /* EDSS1 or 1TR6 */
struct IsdnCardState *sp;
};
#define DATAPTR(x) ((byte *)x+sizeof(struct BufHeader))
#define LAPD 0
#define LAPB 1
void BufPoolInit(struct BufPool *bp, int order, int bpps,
int maxpages);
int BufPoolAdd(struct BufPool *bp, int priority);
void BufPoolFree(struct BufPool *bp);
int BufPoolGet(struct BufHeader **bh,
struct BufPool *bp, int priority, void *heldby, int where);
void BufPoolRelease(struct BufHeader *bh);
void BufQueueLink(struct BufQueue *bq,
struct BufHeader *bh);
int BufQueueUnlink(struct BufHeader **bh, struct BufQueue *bq);
void BufQueueInit(struct BufQueue *bq);
void BufQueueRelease(struct BufQueue *bq);
void BufQueueDiscard(struct BufQueue *q, int pr, void *heldby,
int releasetoo);
int BufQueueLength(struct BufQueue *bq);
void BufQueueLinkFront(struct BufQueue *bq,
struct BufHeader *bh);
void l2down(struct PStack *st,
byte pr, struct BufHeader *ibh);
void l2up(struct PStack *st,
byte pr, struct BufHeader *ibh);
void acceptph(struct PStack *st,
struct BufHeader *ibh);
void setstack_isdnl2(struct PStack *st, char *debug_id);
int teles_inithardware(void);
void teles_closehardware(void);
void setstack_teles(struct PStack *st, struct IsdnCardState *sp);
unsigned int randomces(void);
void setstack_isdnl3(struct PStack *st);
void teles_addlist(struct IsdnCardState *sp,
struct PStack *st);
void releasestack_isdnl2(struct PStack *st);
void teles_rmlist(struct IsdnCardState *sp,
struct PStack *st);
void newcallref(struct PStack *st);
int ll_init(void);
void ll_stop(void), ll_unload(void);
int setstack_hscx(struct PStack *st, struct HscxState *hs);
void modehscx(struct HscxState *hs, int mode, int ichan);
byte *findie(byte * p, int size, byte ie, int wanted_set);
int getcallref(byte * p);
void FsmNew(struct Fsm *fsm,
struct FsmNode *fnlist, int fncount);
void FsmFree(struct Fsm *fsm);
int FsmEvent(struct FsmInst *fi,
int event, void *arg);
void FsmChangeState(struct FsmInst *fi,
int newstate);
void FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft);
int FsmAddTimer(struct FsmTimer *ft,
int millisec, int event, void *arg, int where);
void FsmDelTimer(struct FsmTimer *ft, int where);
int FsmTimerRunning(struct FsmTimer *ft);
void jiftime(char *s, long mark);
void CallcNew(void);
void CallcFree(void);
int CallcNewChan(void);
void CallcFreeChan(void);
int teles_command(isdn_ctrl * ic);
int teles_writebuf(int id, int chan, const u_char * buf, int count, int user);
void teles_putstatus(char *buf);
void teles_reportcard(int cardnr);
int ListLength(struct BufHeader *ibh);
void dlogframe(struct IsdnCardState *sp, byte * p, int size, char *comment);
void iecpy(byte * dest, byte * iestart, int ieoffset);
void setstack_transl2(struct PStack *st);
void releasestack_transl2(struct PStack *st);
void close_hscxstate(struct HscxState *);
void setstack_tei(struct PStack *st);
struct LcFsm {
struct FsmInst lcfi;
int type;
struct Channel *ch;
void (*lccall) (struct LcFsm *, int, void *);
struct PStack *st;
int l2_establish;
int l2_start;
struct FsmTimer act_timer;
char debug_id[32];
};
struct Channel {
struct PStack ds, is;
struct IsdnCardState *sp;
int hscx;
int chan;
int incoming;
struct FsmInst fi;
struct LcFsm lc_d, lc_b;
struct Param para;
int debug;
#ifdef DEBUG_MAGIC
int magic; /* 301272 */
#endif
int l2_protocol, l2_active_protocol;
int l2_primitive, l2_headersize;
int data_open;
int outcallref;
int impair;
};
#define PART_SIZE(order,bpps) (( (PAGE_SIZE<<order) -\
sizeof(void *))/bpps)
#define BUFFER_SIZE(order,bpps) (PART_SIZE(order,bpps)-\
sizeof(struct BufHeader))
#endif
void Isdnl2New(void);
void Isdnl2Free(void);
void TeiNew(void);
void TeiFree(void);

View File

@ -95,9 +95,6 @@ else
for i in drivers/isdn/pcbit/*.[ch] ; do
$DOCP $i $KERNELDIR/$i
done
for i in drivers/isdn/teles/*.[ch] ; do
$DOCP $i $KERNELDIR/$i
done
for i in drivers/isdn/hisax/*.[ch] ; do
$DOCP $i $KERNELDIR/$i
done
@ -119,7 +116,7 @@ else
$DOCP $i $KERNELDIR/$i
done
for i in drivers/isdn/Makefile drivers/isdn/icn/Makefile \
drivers/isdn/teles/Makefile drivers/isdn/hisax/Makefile \
drivers/isdn/hisax/Makefile \
drivers/isdn/pcbit/Makefile drivers/isdn/sc/Makefile \
drivers/isdn/avmb1/Makefile; do
if [ -f $i.kernel ] ; then

View File

@ -84,9 +84,6 @@ else
for i in drivers/isdn/icn/icn.[ch] ; do
dodiff $i $KERNELDIR/$i
done
for i in drivers/isdn/teles/*.[ch] ; do
dodiff $i $KERNELDIR/$i
done
for i in drivers/isdn/hisax/*.[ch] ; do
dodiff $i $KERNELDIR/$i
done
@ -108,7 +105,7 @@ else
dodiff $i $KERNELDIR/$i
done
for i in drivers/isdn/Makefile drivers/isdn/icn/Makefile \
drivers/isdn/teles/Makefile drivers/isdn/hisax/Makefile \
drivers/isdn/hisax/Makefile \
drivers/isdn/pcbit/Makefile ; do
if [ -f $i.kernel ] ; then
dodiff $i.kernel $KERNELDIR/$i