patch-2.2.13 linux/drivers/isdn/hisax/l3dss1.c

Next file: linux/drivers/isdn/hisax/md5sums.asc
Previous file: linux/drivers/isdn/hisax/l3_1tr6.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.12/linux/drivers/isdn/hisax/l3dss1.c linux/drivers/isdn/hisax/l3dss1.c
@@ -1,4 +1,4 @@
-/* $Id: l3dss1.c,v 2.18 1999/08/11 20:54:39 keil Exp $
+/* $Id: l3dss1.c,v 2.19 1999/08/25 16:55:23 keil Exp $
 
  * EURO/DSS1 D-channel protocol
  *
@@ -13,6 +13,9 @@
  *              Fritz Elfert
  *
  * $Log: l3dss1.c,v $
+ * Revision 2.19  1999/08/25 16:55:23  keil
+ * Fix for test case TC10011
+ *
  * Revision 2.18  1999/08/11 20:54:39  keil
  * High layer compatibility is valid in SETUP
  *
@@ -87,7 +90,7 @@
 #include <linux/ctype.h>
 
 extern char *HiSax_getrev(const char *revision);
-const char *dss1_revision = "$Revision: 2.18 $";
+const char *dss1_revision = "$Revision: 2.19 $";
 
 #define EXT_BEARER_CAPS 1
 
@@ -764,11 +767,6 @@
 	int ret = 1;
 
 	while (*checklist != -1) {
-#if 0
-		if (pc->debug & L3_DEB_CHECK)
-			l3_debug(pc->st, "ie_in_set ie(%x) cl(%x)",
-				ie, *checklist);
-#endif
 		if ((*checklist & 0xff) == ie) {
 			if (ie & 0x80)
 				return(-ret);
@@ -1737,15 +1735,12 @@
 		return;
 	}
 	/* Now we are on none mandatory IEs */
-#if 1
-/* !!!!!! this check seems to be a problem ? info bugfix to Karsten */
 	err = check_infoelements(pc, skb, ie_SETUP);
 	if (ERR_IE_COMPREHENSION == err) {
 		pc->para.cause = 96;
 		l3dss1_msg_without_setup(pc, pr, NULL);
 		return;
 	}
-#endif
 	p = skb->data;
 	if ((p = findie(p, skb->len, 0x70, 0)))
 		iecpy(pc->para.setup.eazmsn, p, 1);
@@ -1787,29 +1782,10 @@
 		} else if (pc->debug & L3_DEB_WARN)
 			l3_debug(pc->st, "wrong calling subaddress");
 	}
-
-#if 0
-	if (bcfound) {
-		if ((pc->para.setup.si1 != 7) && (pc->debug & L3_DEB_WARN)) {
-			l3_debug(pc->st, "non-digital call: %s -> %s",
-			    pc->para.setup.phone, pc->para.setup.eazmsn);
-		}
-		if ((pc->para.setup.si1 != 7) &&
-		    test_bit(FLG_PTP, &pc->st->l2.flag)) {
-			pc->para.cause = 88; /* incompatible destination */
-			l3dss1_msg_without_setup(pc, pr, NULL);
-			return;
-		}
-		newl3state(pc, 6);
-		pc->st->l3.l3l4(pc->st, CC_SETUP | INDICATION, pc);
-	} else
-		dss1_release_l3_process(pc);
-#else
 	newl3state(pc, 6);
 	if (err) /* STATUS for none mandatory IE errors after actions are taken */
 		l3dss1_std_ie_err(pc, err);
 	pc->st->l3.l3l4(pc->st, CC_SETUP | INDICATION, pc);
-#endif
 }
 
 static void
@@ -2106,8 +2082,6 @@
 
 	ret = check_infoelements(pc, skb, ie_STATUS_ENQUIRY);
 	l3dss1_std_ie_err(pc, ret);
-// KKe 19.7.99 test eicon
-//        idev_kfree_skb(skb, FREE_READ);
 	pc->para.cause = 30; /* response to STATUS_ENQUIRY */
         l3dss1_status_send(pc, pr, NULL);
 }
@@ -2862,7 +2836,8 @@
 	 MT_STATUS, l3dss1_status},
 	{SBIT(0),
 	 MT_SETUP, l3dss1_setup},
-	{SBIT(6) | SBIT(7),
+	{SBIT(6) | SBIT(7) | SBIT(8) | SBIT(9) | SBIT(10) | SBIT(11) | SBIT(12) |
+	 SBIT(15) | SBIT(17) | SBIT(19) | SBIT(25),
 	 MT_SETUP, l3dss1_dummy},
 	{SBIT(1) | SBIT(2),
 	 MT_CALL_PROCEEDING, l3dss1_call_proc},
@@ -2885,8 +2860,6 @@
 	{SBIT(19),  MT_RELEASE, l3dss1_release_ind},
 	{SBIT(1) | SBIT(2) | SBIT(3) | SBIT(4) | SBIT(7) | SBIT(8) | SBIT(9) | SBIT(10) | SBIT(11) | SBIT(15) | SBIT(17) | SBIT(25),
 	 MT_DISCONNECT, l3dss1_disconnect},
-//	{SBIT(11),
-//	 MT_DISCONNECT, l3dss1_release_req},
 	{SBIT(19),
 	 MT_DISCONNECT, l3dss1_dummy},
 	{SBIT(1) | SBIT(2) | SBIT(3) | SBIT(4),
@@ -3003,7 +2976,7 @@
 	}
 	if (skb->len < 3) {
 		l3_debug(st, "dss1up frame too short(%d)", skb->len);
-		idev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	}
 
@@ -3013,13 +2986,13 @@
 				 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ",
 				 skb->data[0], skb->len);
 		}
-		idev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	}
 	cr = getcallref(skb->data);
 	if (skb->len < ((skb->data[1] & 0x0f) + 3)) {
 		l3_debug(st, "dss1up frame too short(%d)", skb->len);
-		idev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	}
 	mt = skb->data[skb->data[1] + 2];
@@ -3028,26 +3001,26 @@
 	if (cr == -2) {  /* wrong Callref */
 		if (st->l3.debug & L3_DEB_WARN)
 			l3_debug(st, "dss1up wrong Callref");
-		idev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	} else if (cr == -1) {	/* Dummy Callref */
 		if (mt == MT_FACILITY)
 			if ((p = findie(skb->data, skb->len, IE_FACILITY, 0))) {
 				l3dss1_parse_facility(st, NULL, 
 					(pr == (DL_DATA | INDICATION)) ? -1 : -2, p); 
-				idev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 				return;  
 			}
 		if (st->l3.debug & L3_DEB_WARN)
 			l3_debug(st, "dss1up dummy Callref (no facility msg or ie)");
-		idev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	} else if ((((skb->data[1] & 0x0f) == 1) && (0==(cr & 0x7f))) ||
 		(((skb->data[1] & 0x0f) == 2) && (0==(cr & 0x7fff)))) {	/* Global CallRef */
 		if (st->l3.debug & L3_DEB_STATE)
 			l3_debug(st, "dss1up Global CallRef");
 		global_handler(st, mt, skb);
-		idev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	} else if (!(proc = getl3proc(st, cr))) {
 		/* No transaction process exist, that means no call with
@@ -3059,7 +3032,7 @@
 				/* Setup with wrong CREF flag */
 				if (st->l3.debug & L3_DEB_STATE)
 					l3_debug(st, "dss1up wrong CRef flag");
-				idev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 				return;
 			}
 			if (!(proc = dss1_new_l3_process(st, cr))) {
@@ -3067,7 +3040,7 @@
 				 * CAUSE 0x2f "Resource unavailable", but this
 				 * need a new_l3_process too ... arghh
 				 */
-				idev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 				return;
 			}
 		} else if (mt == MT_STATUS) {
@@ -3101,17 +3074,17 @@
 					l3dss1_msg_without_setup(proc, 0, NULL);
 				}
 			}
-			idev_kfree_skb(skb, FREE_READ);
+			dev_kfree_skb(skb);
 			return;
 		} else if (mt == MT_RELEASE_COMPLETE) {
-			idev_kfree_skb(skb, FREE_READ);
+			dev_kfree_skb(skb);
 			return;
 		} else {
 			/* ETS 300-104 part 2
 			 * if setup has not been made and a message type
 			 * (except MT_SETUP and RELEASE_COMPLETE) is received,
 			 * we must send MT_RELEASE_COMPLETE cause 81 */
-			idev_kfree_skb(skb, FREE_READ);
+			dev_kfree_skb(skb);
 			if ((proc = dss1_new_l3_process(st, cr))) {
 				proc->para.cause = 81;
 				l3dss1_msg_without_setup(proc, 0, NULL);
@@ -3120,7 +3093,7 @@
 		}
 	}
 	if (l3dss1_check_messagetype_validity(proc, mt, skb)) {
-		idev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	}
 	if ((p = findie(skb->data, skb->len, IE_DISPLAY, 0)) != NULL) 
@@ -3147,7 +3120,7 @@
 		}
 		datastatelist[i].rout(proc, pr, skb);
 	}
-	idev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	return;
 }
 

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