patch-2.1.42 linux/drivers/isdn/hisax/isdnl3.c
Next file: linux/drivers/isdn/hisax/isdnl3.h
Previous file: linux/drivers/isdn/hisax/isdnl2.h
Back to the patch index
Back to the overall index
- Lines: 104
- Date:
Wed May 28 10:49:09 1997
- Orig file:
v2.1.41/linux/drivers/isdn/hisax/isdnl3.c
- Orig date:
Thu Feb 27 10:57:29 1997
diff -u --recursive --new-file v2.1.41/linux/drivers/isdn/hisax/isdnl3.c linux/drivers/isdn/hisax/isdnl3.c
@@ -1,4 +1,4 @@
-/* $Id: isdnl3.c,v 1.6 1997/02/16 01:04:08 fritz Exp $
+/* $Id: isdnl3.c,v 1.10 1997/04/06 22:54:16 keil Exp $
* Author Karsten Keil (keil@temic-ech.spacenet.de)
* based on the teles driver from Jan den Ouden
@@ -7,6 +7,18 @@
* Fritz Elfert
*
* $Log: isdnl3.c,v $
+ * Revision 1.10 1997/04/06 22:54:16 keil
+ * Using SKB's
+ *
+ * Revision 1.9 1997/03/25 23:11:25 keil
+ * US NI-1 protocol
+ *
+ * Revision 1.8 1997/03/21 18:53:44 keil
+ * Report no protocol error to syslog too
+ *
+ * Revision 1.7 1997/03/17 18:34:38 keil
+ * fixed oops if no protocol selected during config
+ *
* Revision 1.6 1997/02/16 01:04:08 fritz
* Bugfix: Changed timer handling caused hang with 2.1.X
*
@@ -34,7 +46,7 @@
#include "isdnl3.h"
#include <linux/config.h>
-const char *l3_revision = "$Revision: 1.6 $";
+const char *l3_revision = "$Revision: 1.10 $";
void
l3_debug(struct PStack *st, char *s)
@@ -102,20 +114,39 @@
L3DelTimer(&st->l3.timer);
}
+struct sk_buff *
+l3_alloc_skb(int len)
+{
+ struct sk_buff *skb;
+
+ if (!(skb = alloc_skb(len + MAX_HEADER_LEN, GFP_ATOMIC))) {
+ printk(KERN_WARNING "HiSax: No skb for D-channel\n");
+ return (NULL);
+ }
+ skb_reserve(skb, MAX_HEADER_LEN);
+ return (skb);
+}
+
static void
no_l3_proto(struct PStack *st, int pr, void *arg)
{
- struct BufHeader *ibh = arg;
+ struct sk_buff *skb = arg;
l3_debug(st, "no protocol");
- if (ibh)
- BufPoolRelease(ibh);
+ if (skb) {
+ SET_SKB_FREE(skb);
+ dev_kfree_skb(skb, FREE_READ);
+ }
}
#ifdef CONFIG_HISAX_EURO
extern void setstack_dss1(struct PStack *st);
#endif
+#ifdef CONFIG_HISAX_NI1
+extern void setstack_ni1(struct PStack *st);
+#endif
+
#ifdef CONFIG_HISAX_1TR6
extern void setstack_1tr6(struct PStack *st);
#endif
@@ -134,6 +165,11 @@
setstack_dss1(st);
} else
#endif
+#ifdef CONFIG_HISAX_NI1
+ if (st->protocol == ISDN_PTYPE_NI1) {
+ setstack_ni1(st);
+ } else
+#endif
#ifdef CONFIG_HISAX_1TR6
if (st->protocol == ISDN_PTYPE_1TR6) {
setstack_1tr6(st);
@@ -144,10 +180,14 @@
st->l2.l2l3 = no_l3_proto;
printk(KERN_NOTICE "HiSax: Leased line mode\n");
} else {
+ st->l4.l4l3 = no_l3_proto;
+ st->l2.l2l3 = no_l3_proto;
sprintf(tmp, "protocol %s not supported",
(st->protocol == ISDN_PTYPE_1TR6) ? "1tr6" :
(st->protocol == ISDN_PTYPE_EURO) ? "euro" :
+ (st->protocol == ISDN_PTYPE_NI1) ? "ni1" :
"unknown");
+ printk(KERN_WARNING "HiSax: %s\n", tmp);
l3_debug(st, tmp);
st->protocol = -1;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov