Merge with Linu 2.4.0-test6-pre6.
[linux-2.6/linux-mips.git] / drivers / isdn / hisax / lmgr.c
blob99afed2e6ba63fc6b66ef09978c356479829fbeb
1 /* $Id: lmgr.c,v 1.7 2000/06/26 08:59:14 keil Exp $
3 * Author Karsten Keil (keil@isdn4linux.de)
5 * Layermanagement module
7 * This file is (c) under GNU PUBLIC LICENSE
9 */
11 #define __NO_VERSION__
12 #include "hisax.h"
14 static void
15 error_handling_dchan(struct PStack *st, int Error)
17 switch (Error) {
18 case 'C':
19 case 'D':
20 case 'G':
21 case 'H':
22 st->l2.l2tei(st, MDL_ERROR | REQUEST, NULL);
23 break;
27 static void
28 hisax_manager(struct PStack *st, int pr, void *arg)
30 long Code;
32 switch (pr) {
33 case (MDL_ERROR | INDICATION):
34 Code = (long) arg;
35 HiSax_putstatus(st->l1.hardware, "manager: MDL_ERROR",
36 " %c %s", (char)Code,
37 test_bit(FLG_LAPD, &st->l2.flag) ?
38 "D-channel" : "B-channel");
39 if (test_bit(FLG_LAPD, &st->l2.flag))
40 error_handling_dchan(st, Code);
41 break;
45 void
46 setstack_manager(struct PStack *st)
48 st->ma.layer = hisax_manager;