1997-06-26 11:21:41 +00:00
|
|
|
/* $Id$
|
|
|
|
|
1998-11-15 23:55:28 +00:00
|
|
|
* Author Karsten Keil (keil@isdn4linux.de)
|
1997-06-26 11:21:41 +00:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Layermanagement module
|
|
|
|
*
|
|
|
|
* $Log$
|
1999-07-01 08:12:15 +00:00
|
|
|
* Revision 1.5 1998/11/15 23:55:12 keil
|
|
|
|
* changes from 2.0
|
|
|
|
*
|
1998-11-15 23:55:28 +00:00
|
|
|
* Revision 1.4 1998/05/25 12:58:19 keil
|
|
|
|
* HiSax golden code from certification, Don't use !!!
|
|
|
|
* No leased lines, no X75, but many changes.
|
|
|
|
*
|
1998-05-25 12:58:26 +00:00
|
|
|
* Revision 1.3 1998/03/07 22:57:06 tsbogend
|
|
|
|
* made HiSax working on Linux/Alpha
|
|
|
|
*
|
1998-03-07 22:57:08 +00:00
|
|
|
* Revision 1.2 1997/10/29 19:09:34 keil
|
|
|
|
* new L1
|
|
|
|
*
|
1997-10-29 19:09:34 +00:00
|
|
|
* Revision 1.1 1997/06/26 11:17:25 keil
|
|
|
|
* first version
|
|
|
|
*
|
1997-06-26 11:21:41 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define __NO_VERSION__
|
|
|
|
#include "hisax.h"
|
|
|
|
|
|
|
|
static void
|
|
|
|
error_handling_dchan(struct PStack *st, int Error)
|
|
|
|
{
|
|
|
|
switch (Error) {
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'G':
|
|
|
|
case 'H':
|
1998-05-25 12:58:26 +00:00
|
|
|
st->l2.l2tei(st, MDL_ERROR | REQUEST, NULL);
|
1997-06-26 11:21:41 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
hisax_manager(struct PStack *st, int pr, void *arg)
|
|
|
|
{
|
1998-03-07 22:57:08 +00:00
|
|
|
long Code;
|
1997-06-26 11:21:41 +00:00
|
|
|
|
|
|
|
switch (pr) {
|
1998-05-25 12:58:26 +00:00
|
|
|
case (MDL_ERROR | INDICATION):
|
1998-03-07 22:57:08 +00:00
|
|
|
Code = (long) arg;
|
1998-11-15 23:55:28 +00:00
|
|
|
HiSax_putstatus(st->l1.hardware, "manager: MDL_ERROR",
|
1999-07-01 08:12:15 +00:00
|
|
|
" %c %s", (char)Code,
|
1998-11-15 23:55:28 +00:00
|
|
|
test_bit(FLG_LAPD, &st->l2.flag) ?
|
1997-06-26 11:21:41 +00:00
|
|
|
"D-channel" : "B-channel");
|
1997-10-29 19:09:34 +00:00
|
|
|
if (test_bit(FLG_LAPD, &st->l2.flag))
|
1997-06-26 11:21:41 +00:00
|
|
|
error_handling_dchan(st, Code);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
setstack_manager(struct PStack *st)
|
|
|
|
{
|
|
|
|
st->ma.layer = hisax_manager;
|
|
|
|
}
|