patch-2.2.15 linux/drivers/isdn/pcbit/layer2.c

Next file: linux/drivers/isdn/pcbit/layer2.h
Previous file: linux/drivers/isdn/pcbit/drv.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/drivers/isdn/pcbit/layer2.c linux/drivers/isdn/pcbit/layer2.c
@@ -8,6 +8,11 @@
  */
 
 /*
+ * 19991203 - Fernando Carvalho - takion@superbofh.org
+ * Hacked to compile with egcs and run with current version of isdn modules
+*/
+
+/*
  *        PCBIT-D low-layer interface
  */
 
@@ -205,7 +210,7 @@
 
 			/* Type 0 frame */
 
-			struct msg_fmt *msg;
+			ulong 	msg;
 
 			if (frame->skb)
 				totlen = FRAME_HDR_LEN + PREHDR_LEN + frame->skb->len;
@@ -214,7 +219,7 @@
 
 			flen = MIN(totlen, free);
 
-			msg = (struct msg_fmt *) &(frame->msg);
+			msg = frame->msg;
 
 			/*
 			 *  Board level 2 header
@@ -222,9 +227,9 @@
 
 			pcbit_writew(dev, flen - FRAME_HDR_LEN);
 
-			pcbit_writeb(dev, msg->cpu);
+			pcbit_writeb(dev, GET_MSG_CPU(msg));
 
-			pcbit_writeb(dev, msg->proc);
+			pcbit_writeb(dev, GET_MSG_PROC(msg));
 
 			/* TH */
 			pcbit_writew(dev, frame->hdr_len + PREHDR_LEN);
@@ -244,8 +249,8 @@
 			pcbit_writew(dev, 0);
 
 			/* C + S */
-			pcbit_writeb(dev, msg->cmd);
-			pcbit_writeb(dev, msg->scmd);
+			pcbit_writeb(dev, GET_MSG_CMD(msg));
+			pcbit_writeb(dev, GET_MSG_SCMD(msg));
 
 			/* NUM */
 			pcbit_writew(dev, frame->refnum);
@@ -312,8 +317,7 @@
 pcbit_deliver(void *data)
 {
 	struct frame_buf *frame;
-	unsigned long flags;
-	struct msg_fmt msg;
+	unsigned long flags, msg;
 	struct pcbit_dev *dev = (struct pcbit_dev *) data;
 
 	save_flags(flags);
@@ -323,10 +327,10 @@
 		dev->read_queue = frame->next;
 		restore_flags(flags);
 
-		msg.cpu = 0;
-		msg.proc = 0;
-		msg.cmd = frame->skb->data[2];
-		msg.scmd = frame->skb->data[3];
+		SET_MSG_CPU(msg, 0);
+		SET_MSG_PROC(msg, 0);
+		SET_MSG_CMD(msg, frame->skb->data[2]);
+		SET_MSG_SCMD(msg, frame->skb->data[3]);
 
 		frame->refnum = *((ushort *) frame->skb->data + 4);
 		frame->msg = *((ulong *) & msg);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)