diff --git a/drivers/isdn/act2000/capi.c b/drivers/isdn/act2000/capi.c
index 1f0a949..3f66ca2 100644
--- a/drivers/isdn/act2000/capi.c
+++ b/drivers/isdn/act2000/capi.c
@@ -5,7 +5,7 @@
  *
  * Author       Fritz Elfert
  * Copyright    by Fritz Elfert      <fritz@isdn4linux.de>
- * 
+ *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
  *
@@ -64,14 +64,14 @@
 	{{ 0x86, 0x00}, "DATA_B3_REQ"},
 	{{ 0xff, 0x00}, "MANUFACTURER_REQ"},
 	/* Responses */
-	{{ 0x01, 0x03}, "RESET_B3_RESP"},	
-	{{ 0x02, 0x03}, "CONNECT_RESP"},	
-	{{ 0x03, 0x03}, "CONNECT_ACTIVE_RESP"},	
-	{{ 0x04, 0x03}, "DISCONNECT_RESP"},	
-	{{ 0x07, 0x03}, "INFO_RESP"},	
-	{{ 0x08, 0x03}, "DATA_RESP"},	
-	{{ 0x82, 0x03}, "CONNECT_B3_RESP"},	
-	{{ 0x83, 0x03}, "CONNECT_B3_ACTIVE_RESP"},	
+	{{ 0x01, 0x03}, "RESET_B3_RESP"},
+	{{ 0x02, 0x03}, "CONNECT_RESP"},
+	{{ 0x03, 0x03}, "CONNECT_ACTIVE_RESP"},
+	{{ 0x04, 0x03}, "DISCONNECT_RESP"},
+	{{ 0x07, 0x03}, "INFO_RESP"},
+	{{ 0x08, 0x03}, "DATA_RESP"},
+	{{ 0x82, 0x03}, "CONNECT_B3_RESP"},
+	{{ 0x83, 0x03}, "CONNECT_B3_ACTIVE_RESP"},
 	{{ 0x84, 0x03}, "DISCONNECT_B3_RESP"},
 	{{ 0x86, 0x03}, "DATA_B3_RESP"},
 	{{ 0xff, 0x03}, "MANUFACTURER_RESP"},
@@ -88,7 +88,7 @@
  *   2 = Valid message, B-Channel-data
  */
 int
-actcapi_chkhdr(act2000_card * card, actcapi_msghdr *hdr)
+actcapi_chkhdr(act2000_card *card, actcapi_msghdr *hdr)
 {
 	int i;
 
@@ -99,33 +99,33 @@
 	for (i = 0; i < num_valid_imsg; i++)
 		if ((hdr->cmd.cmd == valid_msg[i].cmd.cmd) &&
 		    (hdr->cmd.subcmd == valid_msg[i].cmd.subcmd)) {
-			return (i?1:2);
+			return (i ? 1 : 2);
 		}
 	return 0;
 }
 
-#define ACTCAPI_MKHDR(l, c, s) { \
-	skb = alloc_skb(l + 8, GFP_ATOMIC); \
-	if (skb) { \
-	        m = (actcapi_msg *)skb_put(skb, l + 8); \
-		m->hdr.len = l + 8; \
-		m->hdr.applicationID = 1; \
-	        m->hdr.cmd.cmd = c; \
-	        m->hdr.cmd.subcmd = s; \
-	        m->hdr.msgnum = actcapi_nextsmsg(card); \
-	} else m = NULL;\
-}
+#define ACTCAPI_MKHDR(l, c, s) {				\
+		skb = alloc_skb(l + 8, GFP_ATOMIC);		\
+		if (skb) {					\
+			m = (actcapi_msg *)skb_put(skb, l + 8); \
+			m->hdr.len = l + 8;			\
+			m->hdr.applicationID = 1;		\
+			m->hdr.cmd.cmd = c;			\
+			m->hdr.cmd.subcmd = s;			\
+			m->hdr.msgnum = actcapi_nextsmsg(card); \
+		} else m = NULL;				\
+	}
 
-#define ACTCAPI_CHKSKB if (!skb) { \
-	printk(KERN_WARNING "actcapi: alloc_skb failed\n"); \
-	return; \
-}
+#define ACTCAPI_CHKSKB if (!skb) {					\
+		printk(KERN_WARNING "actcapi: alloc_skb failed\n");	\
+		return;							\
+	}
 
-#define ACTCAPI_QUEUE_TX { \
-	actcapi_debug_msg(skb, 1); \
-	skb_queue_tail(&card->sndq, skb); \
-	act2000_schedule_tx(card); \
-}
+#define ACTCAPI_QUEUE_TX {				\
+		actcapi_debug_msg(skb, 1);		\
+		skb_queue_tail(&card->sndq, skb);	\
+		act2000_schedule_tx(card);		\
+	}
 
 int
 actcapi_listen_req(act2000_card *card)
@@ -138,16 +138,16 @@
 	for (i = 0; i < ACT2000_BCH; i++)
 		eazmask |= card->bch[i].eazmask;
 	ACTCAPI_MKHDR(9, 0x05, 0x00);
-        if (!skb) {
-                printk(KERN_WARNING "actcapi: alloc_skb failed\n");
-                return -ENOMEM;
-        }
+	if (!skb) {
+		printk(KERN_WARNING "actcapi: alloc_skb failed\n");
+		return -ENOMEM;
+	}
 	m->msg.listen_req.controller = 0;
 	m->msg.listen_req.infomask = 0x3f; /* All information */
 	m->msg.listen_req.eazmask = eazmask;
-	m->msg.listen_req.simask = (eazmask)?0x86:0; /* All SI's  */
+	m->msg.listen_req.simask = (eazmask) ? 0x86 : 0; /* All SI's  */
 	ACTCAPI_QUEUE_TX;
-        return 0;
+	return 0;
 }
 
 int
@@ -159,7 +159,7 @@
 
 	ACTCAPI_MKHDR((11 + strlen(phone)), 0x02, 0x00);
 	if (!skb) {
-                printk(KERN_WARNING "actcapi: alloc_skb failed\n");
+		printk(KERN_WARNING "actcapi: alloc_skb failed\n");
 		chan->fsm_state = ACT2000_STATE_NULL;
 		return -ENOMEM;
 	}
@@ -168,7 +168,7 @@
 	m->msg.connect_req.infomask = 0x3f;
 	m->msg.connect_req.si1 = si1;
 	m->msg.connect_req.si2 = si2;
-	m->msg.connect_req.eaz = eaz?eaz:'0';
+	m->msg.connect_req.eaz = eaz ? eaz : '0';
 	m->msg.connect_req.addr.len = strlen(phone) + 1;
 	m->msg.connect_req.addr.tnp = 0x81;
 	memcpy(m->msg.connect_req.addr.num, phone, strlen(phone));
@@ -203,21 +203,21 @@
 	struct sk_buff *skb;
 
 	ACTCAPI_MKHDR(5, 0xff, 0x00);
-        if (!skb) {
-                printk(KERN_WARNING "actcapi: alloc_skb failed\n");
-                return -ENOMEM;
-        }
+	if (!skb) {
+		printk(KERN_WARNING "actcapi: alloc_skb failed\n");
+		return -ENOMEM;
+	}
 	m->msg.manufacturer_req_net.manuf_msg = 0x11;
 	m->msg.manufacturer_req_net.controller = 1;
-	m->msg.manufacturer_req_net.nettype = (card->ptype == ISDN_PTYPE_EURO)?1:0;
+	m->msg.manufacturer_req_net.nettype = (card->ptype == ISDN_PTYPE_EURO) ? 1 : 0;
 	ACTCAPI_QUEUE_TX;
 	printk(KERN_INFO "act2000 %s: D-channel protocol now %s\n",
-	       card->interface.id, (card->ptype == ISDN_PTYPE_EURO)?"euro":"1tr6");
+	       card->interface.id, (card->ptype == ISDN_PTYPE_EURO) ? "euro" : "1tr6");
 	card->interface.features &=
 		~(ISDN_FEATURE_P_UNKNOWN | ISDN_FEATURE_P_EURO | ISDN_FEATURE_P_1TR6);
 	card->interface.features |=
-		((card->ptype == ISDN_PTYPE_EURO)?ISDN_FEATURE_P_EURO:ISDN_FEATURE_P_1TR6);
-        return 0;
+		((card->ptype == ISDN_PTYPE_EURO) ? ISDN_FEATURE_P_EURO : ISDN_FEATURE_P_1TR6);
+	return 0;
 }
 
 /*
@@ -231,16 +231,16 @@
 	struct sk_buff *skb;
 
 	ACTCAPI_MKHDR(8, 0xff, 0x00);
-        if (!skb) {
+	if (!skb) {
 
-                printk(KERN_WARNING "actcapi: alloc_skb failed\n");
-                return -ENOMEM;
-        }
+		printk(KERN_WARNING "actcapi: alloc_skb failed\n");
+		return -ENOMEM;
+	}
 	m->msg.manufacturer_req_v42.manuf_msg = 0x10;
 	m->msg.manufacturer_req_v42.controller = 0;
-	m->msg.manufacturer_req_v42.v42control = (arg?1:0);
+	m->msg.manufacturer_req_v42.v42control = (arg ? 1 : 0);
 	ACTCAPI_QUEUE_TX;
-        return 0;
+	return 0;
 }
 #endif  /*  0  */
 
@@ -254,15 +254,15 @@
 	struct sk_buff *skb;
 
 	ACTCAPI_MKHDR(4, 0xff, 0x00);
-        if (!skb) {
+	if (!skb) {
 
-                printk(KERN_WARNING "actcapi: alloc_skb failed\n");
-                return -ENOMEM;
-        }
+		printk(KERN_WARNING "actcapi: alloc_skb failed\n");
+		return -ENOMEM;
+	}
 	m->msg.manufacturer_req_err.manuf_msg = 0x03;
 	m->msg.manufacturer_req_err.controller = 0;
 	ACTCAPI_QUEUE_TX;
-        return 0;
+	return 0;
 }
 
 /*
@@ -295,7 +295,7 @@
 		}
 		p = p->next;
 	}
-        return 0;
+	return 0;
 }
 
 void
@@ -311,24 +311,24 @@
 	       sizeof(m->msg.select_b2_protocol_req.dlpd));
 	m->msg.select_b2_protocol_req.dlpd.len = 6;
 	switch (chan->l2prot) {
-		case ISDN_PROTO_L2_TRANS:
-			m->msg.select_b2_protocol_req.protocol = 0x03;
-			m->msg.select_b2_protocol_req.dlpd.dlen = 4000;
-			break;
-		case ISDN_PROTO_L2_HDLC:
-			m->msg.select_b2_protocol_req.protocol = 0x02;
-			m->msg.select_b2_protocol_req.dlpd.dlen = 4000;
-			break;
-		case ISDN_PROTO_L2_X75I:
-		case ISDN_PROTO_L2_X75UI:
-		case ISDN_PROTO_L2_X75BUI:
-			m->msg.select_b2_protocol_req.protocol = 0x01;
-			m->msg.select_b2_protocol_req.dlpd.dlen = 4000;
-			m->msg.select_b2_protocol_req.dlpd.laa = 3;
-			m->msg.select_b2_protocol_req.dlpd.lab = 1;
-			m->msg.select_b2_protocol_req.dlpd.win = 7;
-			m->msg.select_b2_protocol_req.dlpd.modulo = 8;
-			break;
+	case ISDN_PROTO_L2_TRANS:
+		m->msg.select_b2_protocol_req.protocol = 0x03;
+		m->msg.select_b2_protocol_req.dlpd.dlen = 4000;
+		break;
+	case ISDN_PROTO_L2_HDLC:
+		m->msg.select_b2_protocol_req.protocol = 0x02;
+		m->msg.select_b2_protocol_req.dlpd.dlen = 4000;
+		break;
+	case ISDN_PROTO_L2_X75I:
+	case ISDN_PROTO_L2_X75UI:
+	case ISDN_PROTO_L2_X75BUI:
+		m->msg.select_b2_protocol_req.protocol = 0x01;
+		m->msg.select_b2_protocol_req.dlpd.dlen = 4000;
+		m->msg.select_b2_protocol_req.dlpd.laa = 3;
+		m->msg.select_b2_protocol_req.dlpd.lab = 1;
+		m->msg.select_b2_protocol_req.dlpd.win = 7;
+		m->msg.select_b2_protocol_req.dlpd.modulo = 8;
+		break;
 	}
 	ACTCAPI_QUEUE_TX;
 }
@@ -345,11 +345,11 @@
 	memset(&m->msg.select_b3_protocol_req.ncpd, 0,
 	       sizeof(m->msg.select_b3_protocol_req.ncpd));
 	switch (chan->l3prot) {
-		case ISDN_PROTO_L3_TRANS:
-			m->msg.select_b3_protocol_req.protocol = 0x04;
-			m->msg.select_b3_protocol_req.ncpd.len = 13;
-			m->msg.select_b3_protocol_req.ncpd.modulo = 8;
-			break;
+	case ISDN_PROTO_L3_TRANS:
+		m->msg.select_b3_protocol_req.protocol = 0x04;
+		m->msg.select_b3_protocol_req.ncpd.len = 13;
+		m->msg.select_b3_protocol_req.ncpd.modulo = 8;
+		break;
 	}
 	ACTCAPI_QUEUE_TX;
 }
@@ -434,7 +434,7 @@
 	actcapi_msg *m;
 	struct sk_buff *skb;
 
-	ACTCAPI_MKHDR((rejectcause?3:17), 0x82, 0x03);
+	ACTCAPI_MKHDR((rejectcause ? 3 : 17), 0x82, 0x03);
 	ACTCAPI_CHKSKB;
 	m->msg.connect_b3_resp.ncci = chan->ncci;
 	m->msg.connect_b3_resp.rejectcause = rejectcause;
@@ -563,10 +563,10 @@
 	blocknr = msg->msg.data_b3_ind.blocknr;
 	skb_pull(skb, 19);
 	card->interface.rcvcallb_skb(card->myid, chan, skb);
-        if (!(skb = alloc_skb(11, GFP_ATOMIC))) {
-                printk(KERN_WARNING "actcapi: alloc_skb failed\n");
-                return 1;
-        }
+	if (!(skb = alloc_skb(11, GFP_ATOMIC))) {
+		printk(KERN_WARNING "actcapi: alloc_skb failed\n");
+		return 1;
+	}
 	msg = (actcapi_msg *)skb_put(skb, 11);
 	msg->hdr.len = 11;
 	msg->hdr.applicationID = 1;
@@ -595,34 +595,34 @@
 	spin_lock_irqsave(&card->lock, flags);
 	skb = skb_peek(&card->ackq);
 	spin_unlock_irqrestore(&card->lock, flags);
-        if (!skb) {
+	if (!skb) {
 		printk(KERN_WARNING "act2000: handle_ack nothing found!\n");
 		return 0;
 	}
-        tmp = skb;
-        while (1) {
-                m = (actcapi_msg *)tmp->data;
-                if ((((m->msg.data_b3_req.fakencci >> 8) & 0xff) == chan->ncci) &&
+	tmp = skb;
+	while (1) {
+		m = (actcapi_msg *)tmp->data;
+		if ((((m->msg.data_b3_req.fakencci >> 8) & 0xff) == chan->ncci) &&
 		    (m->msg.data_b3_req.blocknr == blocknr)) {
 			/* found corresponding DATA_B3_REQ */
-                        skb_unlink(tmp, &card->ackq);
+			skb_unlink(tmp, &card->ackq);
 			chan->queued -= m->msg.data_b3_req.datalen;
 			if (m->msg.data_b3_req.flags)
 				ret = m->msg.data_b3_req.datalen;
 			dev_kfree_skb(tmp);
 			if (chan->queued < 0)
 				chan->queued = 0;
-                        return ret;
-                }
-                spin_lock_irqsave(&card->lock, flags);
-                tmp = skb_peek((struct sk_buff_head *)tmp);
-                spin_unlock_irqrestore(&card->lock, flags);
-                if ((tmp == skb) || (tmp == NULL)) {
+			return ret;
+		}
+		spin_lock_irqsave(&card->lock, flags);
+		tmp = skb_peek((struct sk_buff_head *)tmp);
+		spin_unlock_irqrestore(&card->lock, flags);
+		if ((tmp == skb) || (tmp == NULL)) {
 			/* reached end of queue */
 			printk(KERN_WARNING "act2000: handle_ack nothing found!\n");
-                        return 0;
+			return 0;
 		}
-        }
+	}
 }
 
 void
@@ -644,294 +644,294 @@
 		msg = (actcapi_msg *)skb->data;
 		ccmd = ((msg->hdr.cmd.cmd << 8) | msg->hdr.cmd.subcmd);
 		switch (ccmd) {
-			case 0x8602:
-				/* DATA_B3_IND */
-				if (actcapi_data_b3_ind(card, skb))
-					return;
-				break;
-			case 0x8601:
-				/* DATA_B3_CONF */
-				chan = find_ncci(card, msg->msg.data_b3_conf.ncci);
-				if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_ACTIVE)) {
-					if (msg->msg.data_b3_conf.info != 0)
-						printk(KERN_WARNING "act2000: DATA_B3_CONF: %04x\n",
-						       msg->msg.data_b3_conf.info);
-					len = handle_ack(card, &card->bch[chan],
-							 msg->msg.data_b3_conf.blocknr);
-					if (len) {
-						cmd.driver = card->myid;
-						cmd.command = ISDN_STAT_BSENT;
-						cmd.arg = chan;
-						cmd.parm.length = len;
-						card->interface.statcallb(&cmd);
-					}
+		case 0x8602:
+			/* DATA_B3_IND */
+			if (actcapi_data_b3_ind(card, skb))
+				return;
+			break;
+		case 0x8601:
+			/* DATA_B3_CONF */
+			chan = find_ncci(card, msg->msg.data_b3_conf.ncci);
+			if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_ACTIVE)) {
+				if (msg->msg.data_b3_conf.info != 0)
+					printk(KERN_WARNING "act2000: DATA_B3_CONF: %04x\n",
+					       msg->msg.data_b3_conf.info);
+				len = handle_ack(card, &card->bch[chan],
+						 msg->msg.data_b3_conf.blocknr);
+				if (len) {
+					cmd.driver = card->myid;
+					cmd.command = ISDN_STAT_BSENT;
+					cmd.arg = chan;
+					cmd.parm.length = len;
+					card->interface.statcallb(&cmd);
 				}
-				break;
-			case 0x0201:
-				/* CONNECT_CONF */
-				chan = find_dialing(card, msg->hdr.msgnum);
-				if (chan >= 0) {
-					if (msg->msg.connect_conf.info) {
-						card->bch[chan].fsm_state = ACT2000_STATE_NULL;
+			}
+			break;
+		case 0x0201:
+			/* CONNECT_CONF */
+			chan = find_dialing(card, msg->hdr.msgnum);
+			if (chan >= 0) {
+				if (msg->msg.connect_conf.info) {
+					card->bch[chan].fsm_state = ACT2000_STATE_NULL;
+					cmd.driver = card->myid;
+					cmd.command = ISDN_STAT_DHUP;
+					cmd.arg = chan;
+					card->interface.statcallb(&cmd);
+				} else {
+					card->bch[chan].fsm_state = ACT2000_STATE_OWAIT;
+					card->bch[chan].plci = msg->msg.connect_conf.plci;
+				}
+			}
+			break;
+		case 0x0202:
+			/* CONNECT_IND */
+			chan = new_plci(card, msg->msg.connect_ind.plci);
+			if (chan < 0) {
+				ctmp = (act2000_chan *)tmp;
+				ctmp->plci = msg->msg.connect_ind.plci;
+				actcapi_connect_resp(card, ctmp, 0x11); /* All Card-Cannels busy */
+			} else {
+				card->bch[chan].fsm_state = ACT2000_STATE_ICALL;
+				cmd.driver = card->myid;
+				cmd.command = ISDN_STAT_ICALL;
+				cmd.arg = chan;
+				cmd.parm.setup.si1 = msg->msg.connect_ind.si1;
+				cmd.parm.setup.si2 = msg->msg.connect_ind.si2;
+				if (card->ptype == ISDN_PTYPE_EURO)
+					strcpy(cmd.parm.setup.eazmsn,
+					       act2000_find_eaz(card, msg->msg.connect_ind.eaz));
+				else {
+					cmd.parm.setup.eazmsn[0] = msg->msg.connect_ind.eaz;
+					cmd.parm.setup.eazmsn[1] = 0;
+				}
+				memset(cmd.parm.setup.phone, 0, sizeof(cmd.parm.setup.phone));
+				memcpy(cmd.parm.setup.phone, msg->msg.connect_ind.addr.num,
+				       msg->msg.connect_ind.addr.len - 1);
+				cmd.parm.setup.plan = msg->msg.connect_ind.addr.tnp;
+				cmd.parm.setup.screen = 0;
+				if (card->interface.statcallb(&cmd) == 2)
+					actcapi_connect_resp(card, &card->bch[chan], 0x15); /* Reject Call */
+			}
+			break;
+		case 0x0302:
+			/* CONNECT_ACTIVE_IND */
+			chan = find_plci(card, msg->msg.connect_active_ind.plci);
+			if (chan >= 0)
+				switch (card->bch[chan].fsm_state) {
+				case ACT2000_STATE_IWAIT:
+					actcapi_connect_active_resp(card, &card->bch[chan]);
+					break;
+				case ACT2000_STATE_OWAIT:
+					actcapi_connect_active_resp(card, &card->bch[chan]);
+					actcapi_select_b2_protocol_req(card, &card->bch[chan]);
+					break;
+				}
+			break;
+		case 0x8202:
+			/* CONNECT_B3_IND */
+			chan = find_plci(card, msg->msg.connect_b3_ind.plci);
+			if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_IBWAIT)) {
+				card->bch[chan].ncci = msg->msg.connect_b3_ind.ncci;
+				actcapi_connect_b3_resp(card, &card->bch[chan], 0);
+			} else {
+				ctmp = (act2000_chan *)tmp;
+				ctmp->ncci = msg->msg.connect_b3_ind.ncci;
+				actcapi_connect_b3_resp(card, ctmp, 0x11); /* All Card-Cannels busy */
+			}
+			break;
+		case 0x8302:
+			/* CONNECT_B3_ACTIVE_IND */
+			chan = find_ncci(card, msg->msg.connect_b3_active_ind.ncci);
+			if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_BWAIT)) {
+				actcapi_connect_b3_active_resp(card, &card->bch[chan]);
+				cmd.driver = card->myid;
+				cmd.command = ISDN_STAT_BCONN;
+				cmd.arg = chan;
+				card->interface.statcallb(&cmd);
+			}
+			break;
+		case 0x8402:
+			/* DISCONNECT_B3_IND */
+			chan = find_ncci(card, msg->msg.disconnect_b3_ind.ncci);
+			if (chan >= 0) {
+				ctmp = &card->bch[chan];
+				actcapi_disconnect_b3_resp(card, ctmp);
+				switch (ctmp->fsm_state) {
+				case ACT2000_STATE_ACTIVE:
+					ctmp->fsm_state = ACT2000_STATE_DHWAIT2;
+					cmd.driver = card->myid;
+					cmd.command = ISDN_STAT_BHUP;
+					cmd.arg = chan;
+					card->interface.statcallb(&cmd);
+					break;
+				case ACT2000_STATE_BHWAIT2:
+					actcapi_disconnect_req(card, ctmp);
+					ctmp->fsm_state = ACT2000_STATE_DHWAIT;
+					cmd.driver = card->myid;
+					cmd.command = ISDN_STAT_BHUP;
+					cmd.arg = chan;
+					card->interface.statcallb(&cmd);
+					break;
+				}
+			}
+			break;
+		case 0x0402:
+			/* DISCONNECT_IND */
+			chan = find_plci(card, msg->msg.disconnect_ind.plci);
+			if (chan >= 0) {
+				ctmp = &card->bch[chan];
+				actcapi_disconnect_resp(card, ctmp);
+				ctmp->fsm_state = ACT2000_STATE_NULL;
+				cmd.driver = card->myid;
+				cmd.command = ISDN_STAT_DHUP;
+				cmd.arg = chan;
+				card->interface.statcallb(&cmd);
+			} else {
+				ctmp = (act2000_chan *)tmp;
+				ctmp->plci = msg->msg.disconnect_ind.plci;
+				actcapi_disconnect_resp(card, ctmp);
+			}
+			break;
+		case 0x4001:
+			/* SELECT_B2_PROTOCOL_CONF */
+			chan = find_plci(card, msg->msg.select_b2_protocol_conf.plci);
+			if (chan >= 0)
+				switch (card->bch[chan].fsm_state) {
+				case ACT2000_STATE_ICALL:
+				case ACT2000_STATE_OWAIT:
+					ctmp = &card->bch[chan];
+					if (msg->msg.select_b2_protocol_conf.info == 0)
+						actcapi_select_b3_protocol_req(card, ctmp);
+					else {
+						ctmp->fsm_state = ACT2000_STATE_NULL;
 						cmd.driver = card->myid;
 						cmd.command = ISDN_STAT_DHUP;
 						cmd.arg = chan;
 						card->interface.statcallb(&cmd);
-					} else {
-						card->bch[chan].fsm_state = ACT2000_STATE_OWAIT;
-						card->bch[chan].plci = msg->msg.connect_conf.plci;
 					}
+					break;
 				}
-				break;
-			case 0x0202:
-				/* CONNECT_IND */
-				chan = new_plci(card, msg->msg.connect_ind.plci);
-				if (chan < 0) {
-					ctmp = (act2000_chan *)tmp;
-					ctmp->plci = msg->msg.connect_ind.plci;
-					actcapi_connect_resp(card, ctmp, 0x11); /* All Card-Cannels busy */
-				} else {
-					card->bch[chan].fsm_state = ACT2000_STATE_ICALL;
-					cmd.driver = card->myid;
-					cmd.command = ISDN_STAT_ICALL;
-					cmd.arg = chan;
-					cmd.parm.setup.si1 = msg->msg.connect_ind.si1;
-					cmd.parm.setup.si2 = msg->msg.connect_ind.si2;
-					if (card->ptype == ISDN_PTYPE_EURO)
-						strcpy(cmd.parm.setup.eazmsn,
-						       act2000_find_eaz(card, msg->msg.connect_ind.eaz));
+			break;
+		case 0x8001:
+			/* SELECT_B3_PROTOCOL_CONF */
+			chan = find_plci(card, msg->msg.select_b3_protocol_conf.plci);
+			if (chan >= 0)
+				switch (card->bch[chan].fsm_state) {
+				case ACT2000_STATE_ICALL:
+				case ACT2000_STATE_OWAIT:
+					ctmp = &card->bch[chan];
+					if (msg->msg.select_b3_protocol_conf.info == 0)
+						actcapi_listen_b3_req(card, ctmp);
 					else {
-						cmd.parm.setup.eazmsn[0] = msg->msg.connect_ind.eaz;
-						cmd.parm.setup.eazmsn[1] = 0;
+						ctmp->fsm_state = ACT2000_STATE_NULL;
+						cmd.driver = card->myid;
+						cmd.command = ISDN_STAT_DHUP;
+						cmd.arg = chan;
+						card->interface.statcallb(&cmd);
 					}
-					memset(cmd.parm.setup.phone, 0, sizeof(cmd.parm.setup.phone));
-					memcpy(cmd.parm.setup.phone, msg->msg.connect_ind.addr.num,
-					       msg->msg.connect_ind.addr.len - 1);
-					cmd.parm.setup.plan = msg->msg.connect_ind.addr.tnp;
-					cmd.parm.setup.screen = 0;
-					if (card->interface.statcallb(&cmd) == 2)
-						actcapi_connect_resp(card, &card->bch[chan], 0x15); /* Reject Call */
 				}
-				break;
-			case 0x0302:
-				/* CONNECT_ACTIVE_IND */
-				chan = find_plci(card, msg->msg.connect_active_ind.plci);
-				if (chan >= 0)
-					switch (card->bch[chan].fsm_state) {
-						case ACT2000_STATE_IWAIT:
-							actcapi_connect_active_resp(card, &card->bch[chan]);
-							break;
-						case ACT2000_STATE_OWAIT:
-							actcapi_connect_active_resp(card, &card->bch[chan]);
-							actcapi_select_b2_protocol_req(card, &card->bch[chan]);
-							break;
-					}
-				break;
-			case 0x8202:
-				/* CONNECT_B3_IND */
-				chan = find_plci(card, msg->msg.connect_b3_ind.plci);
-				if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_IBWAIT)) {
-					card->bch[chan].ncci = msg->msg.connect_b3_ind.ncci;
-					actcapi_connect_b3_resp(card, &card->bch[chan], 0);
-				} else {
-					ctmp = (act2000_chan *)tmp;
-					ctmp->ncci = msg->msg.connect_b3_ind.ncci;
-					actcapi_connect_b3_resp(card, ctmp, 0x11); /* All Card-Cannels busy */
-				}
-				break;
-			case 0x8302:
-				/* CONNECT_B3_ACTIVE_IND */
-				chan = find_ncci(card, msg->msg.connect_b3_active_ind.ncci);
-				if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_BWAIT)) {
-					actcapi_connect_b3_active_resp(card, &card->bch[chan]);
-					cmd.driver = card->myid;
-					cmd.command = ISDN_STAT_BCONN;
-					cmd.arg = chan;
-					card->interface.statcallb(&cmd);
-				}
-				break;
-			case 0x8402:
-				/* DISCONNECT_B3_IND */
-				chan = find_ncci(card, msg->msg.disconnect_b3_ind.ncci);
-				if (chan >= 0) {
+			break;
+		case 0x8101:
+			/* LISTEN_B3_CONF */
+			chan = find_plci(card, msg->msg.listen_b3_conf.plci);
+			if (chan >= 0)
+				switch (card->bch[chan].fsm_state) {
+				case ACT2000_STATE_ICALL:
 					ctmp = &card->bch[chan];
-					actcapi_disconnect_b3_resp(card, ctmp);
-					switch (ctmp->fsm_state) {
-						case ACT2000_STATE_ACTIVE:
-							ctmp->fsm_state = ACT2000_STATE_DHWAIT2;
-							cmd.driver = card->myid;
-							cmd.command = ISDN_STAT_BHUP;
-							cmd.arg = chan;
-							card->interface.statcallb(&cmd);
-							break;
-						case ACT2000_STATE_BHWAIT2:
-							actcapi_disconnect_req(card, ctmp);
-							ctmp->fsm_state = ACT2000_STATE_DHWAIT;
-							cmd.driver = card->myid;
-							cmd.command = ISDN_STAT_BHUP;
-							cmd.arg = chan;
-							card->interface.statcallb(&cmd);
-							break;
+					if (msg->msg.listen_b3_conf.info == 0)
+						actcapi_connect_resp(card, ctmp, 0);
+					else {
+						ctmp->fsm_state = ACT2000_STATE_NULL;
+						cmd.driver = card->myid;
+						cmd.command = ISDN_STAT_DHUP;
+						cmd.arg = chan;
+						card->interface.statcallb(&cmd);
 					}
-				}
-				break;
-			case 0x0402:
-				/* DISCONNECT_IND */
-				chan = find_plci(card, msg->msg.disconnect_ind.plci);
-				if (chan >= 0) {
+					break;
+				case ACT2000_STATE_OWAIT:
 					ctmp = &card->bch[chan];
-					actcapi_disconnect_resp(card, ctmp);
+					if (msg->msg.listen_b3_conf.info == 0) {
+						actcapi_connect_b3_req(card, ctmp);
+						ctmp->fsm_state = ACT2000_STATE_OBWAIT;
+						cmd.driver = card->myid;
+						cmd.command = ISDN_STAT_DCONN;
+						cmd.arg = chan;
+						card->interface.statcallb(&cmd);
+					} else {
+						ctmp->fsm_state = ACT2000_STATE_NULL;
+						cmd.driver = card->myid;
+						cmd.command = ISDN_STAT_DHUP;
+						cmd.arg = chan;
+						card->interface.statcallb(&cmd);
+					}
+					break;
+				}
+			break;
+		case 0x8201:
+			/* CONNECT_B3_CONF */
+			chan = find_plci(card, msg->msg.connect_b3_conf.plci);
+			if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_OBWAIT)) {
+				ctmp = &card->bch[chan];
+				if (msg->msg.connect_b3_conf.info) {
 					ctmp->fsm_state = ACT2000_STATE_NULL;
 					cmd.driver = card->myid;
 					cmd.command = ISDN_STAT_DHUP;
 					cmd.arg = chan;
 					card->interface.statcallb(&cmd);
 				} else {
-					ctmp = (act2000_chan *)tmp;
-					ctmp->plci = msg->msg.disconnect_ind.plci;
-					actcapi_disconnect_resp(card, ctmp);
+					ctmp->ncci = msg->msg.connect_b3_conf.ncci;
+					ctmp->fsm_state = ACT2000_STATE_BWAIT;
 				}
-				break;
-			case 0x4001:
-				/* SELECT_B2_PROTOCOL_CONF */
-				chan = find_plci(card, msg->msg.select_b2_protocol_conf.plci);
-				if (chan >= 0)
-					switch (card->bch[chan].fsm_state) {
-						case ACT2000_STATE_ICALL:
-						case ACT2000_STATE_OWAIT:
-							ctmp = &card->bch[chan];
-							if (msg->msg.select_b2_protocol_conf.info == 0)
-								actcapi_select_b3_protocol_req(card, ctmp);
-							else {
-								ctmp->fsm_state = ACT2000_STATE_NULL;
-								cmd.driver = card->myid;
-								cmd.command = ISDN_STAT_DHUP;
-								cmd.arg = chan;
-								card->interface.statcallb(&cmd);
-							}
-							break;
-					}
-				break;
-			case 0x8001:
-				/* SELECT_B3_PROTOCOL_CONF */
-				chan = find_plci(card, msg->msg.select_b3_protocol_conf.plci);
-				if (chan >= 0)
-					switch (card->bch[chan].fsm_state) {
-						case ACT2000_STATE_ICALL:
-						case ACT2000_STATE_OWAIT:
-							ctmp = &card->bch[chan];
-							if (msg->msg.select_b3_protocol_conf.info == 0)
-								actcapi_listen_b3_req(card, ctmp);
-							else {
-								ctmp->fsm_state = ACT2000_STATE_NULL;
-								cmd.driver = card->myid;
-								cmd.command = ISDN_STAT_DHUP;
-								cmd.arg = chan;
-								card->interface.statcallb(&cmd);
-							}
-					}
-				break;
-			case 0x8101:
-				/* LISTEN_B3_CONF */
-				chan = find_plci(card, msg->msg.listen_b3_conf.plci);
-				if (chan >= 0)
-					switch (card->bch[chan].fsm_state) {
-						case ACT2000_STATE_ICALL:
-							ctmp = &card->bch[chan];
-							if (msg->msg.listen_b3_conf.info == 0)
-								actcapi_connect_resp(card, ctmp, 0);
-							else {
-								ctmp->fsm_state = ACT2000_STATE_NULL;
-								cmd.driver = card->myid;
-								cmd.command = ISDN_STAT_DHUP;
-								cmd.arg = chan;
-								card->interface.statcallb(&cmd);
-							}
-							break;
-						case ACT2000_STATE_OWAIT:
-							ctmp = &card->bch[chan];
-							if (msg->msg.listen_b3_conf.info == 0) {
-								actcapi_connect_b3_req(card, ctmp);
-								ctmp->fsm_state = ACT2000_STATE_OBWAIT;
-								cmd.driver = card->myid;
-								cmd.command = ISDN_STAT_DCONN;
-								cmd.arg = chan;
-								card->interface.statcallb(&cmd);
-							} else {
-								ctmp->fsm_state = ACT2000_STATE_NULL;
-								cmd.driver = card->myid;
-								cmd.command = ISDN_STAT_DHUP;
-								cmd.arg = chan;
-								card->interface.statcallb(&cmd);
-							}
-							break;
-					}
-				break;
-			case 0x8201:
-				/* CONNECT_B3_CONF */
-				chan = find_plci(card, msg->msg.connect_b3_conf.plci);
-				if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_OBWAIT)) {
-					ctmp = &card->bch[chan];
-					if (msg->msg.connect_b3_conf.info) {
-						ctmp->fsm_state = ACT2000_STATE_NULL;
+			}
+			break;
+		case 0x8401:
+			/* DISCONNECT_B3_CONF */
+			chan = find_ncci(card, msg->msg.disconnect_b3_conf.ncci);
+			if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_BHWAIT))
+				card->bch[chan].fsm_state = ACT2000_STATE_BHWAIT2;
+			break;
+		case 0x0702:
+			/* INFO_IND */
+			chan = find_plci(card, msg->msg.info_ind.plci);
+			if (chan >= 0)
+				/* TODO: Eval Charging info / cause */
+				actcapi_info_resp(card, &card->bch[chan]);
+			break;
+		case 0x0401:
+			/* LISTEN_CONF */
+		case 0x0501:
+			/* LISTEN_CONF */
+		case 0xff01:
+			/* MANUFACTURER_CONF */
+			break;
+		case 0xff02:
+			/* MANUFACTURER_IND */
+			if (msg->msg.manuf_msg == 3) {
+				memset(tmp, 0, sizeof(tmp));
+				strncpy(tmp,
+					&msg->msg.manufacturer_ind_err.errstring,
+					msg->hdr.len - 16);
+				if (msg->msg.manufacturer_ind_err.errcode)
+					printk(KERN_WARNING "act2000: %s\n", tmp);
+				else {
+					printk(KERN_DEBUG "act2000: %s\n", tmp);
+					if ((!strncmp(tmp, "INFO: Trace buffer con", 22)) ||
+					    (!strncmp(tmp, "INFO: Compile Date/Tim", 22))) {
+						card->flags |= ACT2000_FLAGS_RUNNING;
+						cmd.command = ISDN_STAT_RUN;
 						cmd.driver = card->myid;
-						cmd.command = ISDN_STAT_DHUP;
-						cmd.arg = chan;
+						cmd.arg = 0;
+						actcapi_manufacturer_req_net(card);
+						actcapi_manufacturer_req_msn(card);
+						actcapi_listen_req(card);
 						card->interface.statcallb(&cmd);
-					} else {
-						ctmp->ncci = msg->msg.connect_b3_conf.ncci;
-						ctmp->fsm_state = ACT2000_STATE_BWAIT;
 					}
 				}
-				break;
-			case 0x8401:
-				/* DISCONNECT_B3_CONF */
-				chan = find_ncci(card, msg->msg.disconnect_b3_conf.ncci);
-				if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_BHWAIT))
-					card->bch[chan].fsm_state = ACT2000_STATE_BHWAIT2;
-				break;
-			case 0x0702:
-				/* INFO_IND */
-				chan = find_plci(card, msg->msg.info_ind.plci);
-				if (chan >= 0)
-					/* TODO: Eval Charging info / cause */
-					actcapi_info_resp(card, &card->bch[chan]);
-				break;
-			case 0x0401:
-				/* LISTEN_CONF */
-			case 0x0501:
-				/* LISTEN_CONF */
-			case 0xff01:
-				/* MANUFACTURER_CONF */
-				break;
-			case 0xff02:
-				/* MANUFACTURER_IND */
-				if (msg->msg.manuf_msg == 3) {
-					memset(tmp, 0, sizeof(tmp));
-					strncpy(tmp,
-						&msg->msg.manufacturer_ind_err.errstring,
-						msg->hdr.len - 16);
-					if (msg->msg.manufacturer_ind_err.errcode)
-						printk(KERN_WARNING "act2000: %s\n", tmp);
-					else {
-						printk(KERN_DEBUG "act2000: %s\n", tmp);
-						if ((!strncmp(tmp, "INFO: Trace buffer con", 22)) ||
-						    (!strncmp(tmp, "INFO: Compile Date/Tim", 22))) {
-							card->flags |= ACT2000_FLAGS_RUNNING;
-							cmd.command = ISDN_STAT_RUN;
-							cmd.driver = card->myid;
-							cmd.arg = 0;
-							actcapi_manufacturer_req_net(card);
-							actcapi_manufacturer_req_msn(card);
-							actcapi_listen_req(card);
-							card->interface.statcallb(&cmd);
-						}
-					}
-				}
-				break;
-			default:
-				printk(KERN_WARNING "act2000: UNHANDLED Message %04x\n", ccmd);
-				break;
+			}
+			break;
+		default:
+			printk(KERN_WARNING "act2000: UNHANDLED Message %04x\n", ccmd);
+			break;
 		}
 		dev_kfree_skb(skb);
 	}
@@ -1015,7 +1015,7 @@
 	char *descr;
 	int i;
 	char tmp[170];
-	
+
 #ifndef DEBUG_DATA_MSG
 	if (msg->hdr.cmd.cmd == 0x86)
 		return;
@@ -1030,151 +1030,151 @@
 			descr = valid_msg[i].description;
 			break;
 		}
-	printk(KERN_DEBUG "%s %s msg\n", direction?"Outgoing":"Incoming", descr);
+	printk(KERN_DEBUG "%s %s msg\n", direction ? "Outgoing" : "Incoming", descr);
 	printk(KERN_DEBUG " ApplID = %d\n", msg->hdr.applicationID);
 	printk(KERN_DEBUG " Len    = %d\n", msg->hdr.len);
 	printk(KERN_DEBUG " MsgNum = 0x%04x\n", msg->hdr.msgnum);
 	printk(KERN_DEBUG " Cmd    = 0x%02x\n", msg->hdr.cmd.cmd);
 	printk(KERN_DEBUG " SubCmd = 0x%02x\n", msg->hdr.cmd.subcmd);
 	switch (i) {
-		case 0:
-			/* DATA B3 IND */
-			printk(KERN_DEBUG " BLOCK = 0x%02x\n",
-			       msg->msg.data_b3_ind.blocknr);
-			break;
-		case 2:
-			/* CONNECT CONF */
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.connect_conf.plci);
-			printk(KERN_DEBUG " Info = 0x%04x\n",
-			       msg->msg.connect_conf.info);
-			break;
+	case 0:
+		/* DATA B3 IND */
+		printk(KERN_DEBUG " BLOCK = 0x%02x\n",
+		       msg->msg.data_b3_ind.blocknr);
+		break;
+	case 2:
+		/* CONNECT CONF */
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.connect_conf.plci);
+		printk(KERN_DEBUG " Info = 0x%04x\n",
+		       msg->msg.connect_conf.info);
+		break;
+	case 3:
+		/* CONNECT IND */
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.connect_ind.plci);
+		printk(KERN_DEBUG " Contr = %d\n",
+		       msg->msg.connect_ind.controller);
+		printk(KERN_DEBUG " SI1   = %d\n",
+		       msg->msg.connect_ind.si1);
+		printk(KERN_DEBUG " SI2   = %d\n",
+		       msg->msg.connect_ind.si2);
+		printk(KERN_DEBUG " EAZ   = '%c'\n",
+		       msg->msg.connect_ind.eaz);
+		actcapi_debug_caddr(&msg->msg.connect_ind.addr);
+		break;
+	case 5:
+		/* CONNECT ACTIVE IND */
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.connect_active_ind.plci);
+		actcapi_debug_caddr(&msg->msg.connect_active_ind.addr);
+		break;
+	case 8:
+		/* LISTEN CONF */
+		printk(KERN_DEBUG " Contr = %d\n",
+		       msg->msg.listen_conf.controller);
+		printk(KERN_DEBUG " Info = 0x%04x\n",
+		       msg->msg.listen_conf.info);
+		break;
+	case 11:
+		/* INFO IND */
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.info_ind.plci);
+		printk(KERN_DEBUG " Imsk = 0x%04x\n",
+		       msg->msg.info_ind.nr.mask);
+		if (msg->hdr.len > 12) {
+			int l = msg->hdr.len - 12;
+			int j;
+			char *p = tmp;
+			for (j = 0; j < l; j++)
+				p += sprintf(p, "%02x ", msg->msg.info_ind.el.display[j]);
+			printk(KERN_DEBUG " D = '%s'\n", tmp);
+		}
+		break;
+	case 14:
+		/* SELECT B2 PROTOCOL CONF */
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.select_b2_protocol_conf.plci);
+		printk(KERN_DEBUG " Info = 0x%04x\n",
+		       msg->msg.select_b2_protocol_conf.info);
+		break;
+	case 15:
+		/* SELECT B3 PROTOCOL CONF */
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.select_b3_protocol_conf.plci);
+		printk(KERN_DEBUG " Info = 0x%04x\n",
+		       msg->msg.select_b3_protocol_conf.info);
+		break;
+	case 16:
+		/* LISTEN B3 CONF */
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.listen_b3_conf.plci);
+		printk(KERN_DEBUG " Info = 0x%04x\n",
+		       msg->msg.listen_b3_conf.info);
+		break;
+	case 18:
+		/* CONNECT B3 IND */
+		printk(KERN_DEBUG " NCCI = 0x%04x\n",
+		       msg->msg.connect_b3_ind.ncci);
+		printk(KERN_DEBUG " PLCI = 0x%04x\n",
+		       msg->msg.connect_b3_ind.plci);
+		actcapi_debug_ncpi(&msg->msg.connect_b3_ind.ncpi);
+		break;
+	case 19:
+		/* CONNECT B3 ACTIVE IND */
+		printk(KERN_DEBUG " NCCI = 0x%04x\n",
+		       msg->msg.connect_b3_active_ind.ncci);
+		actcapi_debug_ncpi(&msg->msg.connect_b3_active_ind.ncpi);
+		break;
+	case 26:
+		/* MANUFACTURER IND */
+		printk(KERN_DEBUG " Mmsg = 0x%02x\n",
+		       msg->msg.manufacturer_ind_err.manuf_msg);
+		switch (msg->msg.manufacturer_ind_err.manuf_msg) {
 		case 3:
-			/* CONNECT IND */
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.connect_ind.plci);
 			printk(KERN_DEBUG " Contr = %d\n",
-			       msg->msg.connect_ind.controller);
-			printk(KERN_DEBUG " SI1   = %d\n",
-			       msg->msg.connect_ind.si1);
-			printk(KERN_DEBUG " SI2   = %d\n",
-			       msg->msg.connect_ind.si2);
-			printk(KERN_DEBUG " EAZ   = '%c'\n",
-			       msg->msg.connect_ind.eaz);
-			actcapi_debug_caddr(&msg->msg.connect_ind.addr);
+			       msg->msg.manufacturer_ind_err.controller);
+			printk(KERN_DEBUG " Code = 0x%08x\n",
+			       msg->msg.manufacturer_ind_err.errcode);
+			memset(tmp, 0, sizeof(tmp));
+			strncpy(tmp, &msg->msg.manufacturer_ind_err.errstring,
+				msg->hdr.len - 16);
+			printk(KERN_DEBUG " Emsg = '%s'\n", tmp);
 			break;
-		case 5:
-			/* CONNECT ACTIVE IND */
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.connect_active_ind.plci);
-			actcapi_debug_caddr(&msg->msg.connect_active_ind.addr);
-			break;
-		case 8:
-			/* LISTEN CONF */
-			printk(KERN_DEBUG " Contr = %d\n",
-			       msg->msg.listen_conf.controller);
-			printk(KERN_DEBUG " Info = 0x%04x\n",
-			       msg->msg.listen_conf.info);
-			break;
-		case 11:
-			/* INFO IND */
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.info_ind.plci);
-			printk(KERN_DEBUG " Imsk = 0x%04x\n",
-			       msg->msg.info_ind.nr.mask);
-			if (msg->hdr.len > 12) {
-				int l = msg->hdr.len - 12;
-				int j;
-				char *p = tmp;
-				for (j = 0; j < l ; j++)
-					p += sprintf(p, "%02x ", msg->msg.info_ind.el.display[j]);
-				printk(KERN_DEBUG " D = '%s'\n", tmp);
-			}
-			break;
-		case 14:
-			/* SELECT B2 PROTOCOL CONF */
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.select_b2_protocol_conf.plci);
-			printk(KERN_DEBUG " Info = 0x%04x\n",
-			       msg->msg.select_b2_protocol_conf.info);
-			break;
-		case 15:
-			/* SELECT B3 PROTOCOL CONF */
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.select_b3_protocol_conf.plci);
-			printk(KERN_DEBUG " Info = 0x%04x\n",
-			       msg->msg.select_b3_protocol_conf.info);
-			break;
-		case 16:
-			/* LISTEN B3 CONF */
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.listen_b3_conf.plci);
-			printk(KERN_DEBUG " Info = 0x%04x\n",
-			       msg->msg.listen_b3_conf.info);
-			break;
-		case 18:
-			/* CONNECT B3 IND */
-			printk(KERN_DEBUG " NCCI = 0x%04x\n",
-			       msg->msg.connect_b3_ind.ncci);
-			printk(KERN_DEBUG " PLCI = 0x%04x\n",
-			       msg->msg.connect_b3_ind.plci);
-			actcapi_debug_ncpi(&msg->msg.connect_b3_ind.ncpi);
-			break;
-		case 19:
-			/* CONNECT B3 ACTIVE IND */
-			printk(KERN_DEBUG " NCCI = 0x%04x\n",
-			       msg->msg.connect_b3_active_ind.ncci);
-			actcapi_debug_ncpi(&msg->msg.connect_b3_active_ind.ncpi);
-			break;
-		case 26:
-			/* MANUFACTURER IND */
-			printk(KERN_DEBUG " Mmsg = 0x%02x\n",
-			       msg->msg.manufacturer_ind_err.manuf_msg);
-			switch (msg->msg.manufacturer_ind_err.manuf_msg) {
-				case 3:
-					printk(KERN_DEBUG " Contr = %d\n",
-					       msg->msg.manufacturer_ind_err.controller);
-					printk(KERN_DEBUG " Code = 0x%08x\n",
-					       msg->msg.manufacturer_ind_err.errcode);
-					memset(tmp, 0, sizeof(tmp));
-					strncpy(tmp, &msg->msg.manufacturer_ind_err.errstring,
-						msg->hdr.len - 16);
-					printk(KERN_DEBUG " Emsg = '%s'\n", tmp);
-					break;
-			}
-			break;
-		case 30:
-			/* LISTEN REQ */
-			printk(KERN_DEBUG " Imsk = 0x%08x\n",
-			       msg->msg.listen_req.infomask);
-			printk(KERN_DEBUG " Emsk = 0x%04x\n",
-			       msg->msg.listen_req.eazmask);
-			printk(KERN_DEBUG " Smsk = 0x%04x\n",
-			       msg->msg.listen_req.simask);
-			break;
-		case 35:
-			/* SELECT_B2_PROTOCOL_REQ */
-			printk(KERN_DEBUG " PLCI  = 0x%04x\n",
-			       msg->msg.select_b2_protocol_req.plci);
-			printk(KERN_DEBUG " prot  = 0x%02x\n",
-			       msg->msg.select_b2_protocol_req.protocol);
-			if (msg->hdr.len >= 11)
-				printk(KERN_DEBUG "No dlpd\n");
-			else
-				actcapi_debug_dlpd(&msg->msg.select_b2_protocol_req.dlpd);
-			break;
-		case 44:
-			/* CONNECT RESP */
-			printk(KERN_DEBUG " PLCI  = 0x%04x\n",
-			       msg->msg.connect_resp.plci);
-			printk(KERN_DEBUG " CAUSE = 0x%02x\n",
-			       msg->msg.connect_resp.rejectcause);
-			break;
-		case 45:
-			/* CONNECT ACTIVE RESP */
-			printk(KERN_DEBUG " PLCI  = 0x%04x\n",
-			       msg->msg.connect_active_resp.plci);
-			break;
+		}
+		break;
+	case 30:
+		/* LISTEN REQ */
+		printk(KERN_DEBUG " Imsk = 0x%08x\n",
+		       msg->msg.listen_req.infomask);
+		printk(KERN_DEBUG " Emsk = 0x%04x\n",
+		       msg->msg.listen_req.eazmask);
+		printk(KERN_DEBUG " Smsk = 0x%04x\n",
+		       msg->msg.listen_req.simask);
+		break;
+	case 35:
+		/* SELECT_B2_PROTOCOL_REQ */
+		printk(KERN_DEBUG " PLCI  = 0x%04x\n",
+		       msg->msg.select_b2_protocol_req.plci);
+		printk(KERN_DEBUG " prot  = 0x%02x\n",
+		       msg->msg.select_b2_protocol_req.protocol);
+		if (msg->hdr.len >= 11)
+			printk(KERN_DEBUG "No dlpd\n");
+		else
+			actcapi_debug_dlpd(&msg->msg.select_b2_protocol_req.dlpd);
+		break;
+	case 44:
+		/* CONNECT RESP */
+		printk(KERN_DEBUG " PLCI  = 0x%04x\n",
+		       msg->msg.connect_resp.plci);
+		printk(KERN_DEBUG " CAUSE = 0x%02x\n",
+		       msg->msg.connect_resp.rejectcause);
+		break;
+	case 45:
+		/* CONNECT ACTIVE RESP */
+		printk(KERN_DEBUG " PLCI  = 0x%04x\n",
+		       msg->msg.connect_active_resp.plci);
+		break;
 	}
 }
 #endif
