patch-2.3.15 linux/drivers/isdn/hisax/config.c

Next file: linux/drivers/isdn/hisax/elsa.c
Previous file: linux/drivers/isdn/hisax/callc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.14/linux/drivers/isdn/hisax/config.c linux/drivers/isdn/hisax/config.c
@@ -1,10 +1,13 @@
-/* $Id: config.c,v 2.30 1999/08/05 20:43:14 keil Exp $
+/* $Id: config.c,v 2.31 1999/08/25 16:47:43 keil Exp $
 
  * Author       Karsten Keil (keil@isdn4linux.de)
  *              based on the teles driver from Jan den Ouden
  *
  *
  * $Log: config.c,v $
+ * Revision 2.31  1999/08/25 16:47:43  keil
+ * Support new __setup; allow to add FEATURES after register_isdn
+ *
  * Revision 2.30  1999/08/05 20:43:14  keil
  * ISAR analog modem support
  *
@@ -117,6 +120,10 @@
 #include <linux/stddef.h>
 #include <linux/timer.h>
 #include <linux/config.h>
+#include <linux/isdn_compat.h>
+#ifdef COMPAT_HAS_NEW_SETUP
+#include <linux/init.h>
+#endif
 #include "hisax.h"
 #include <linux/module.h>
 #include <linux/kernel_stat.h>
@@ -546,12 +553,24 @@
 #ifdef MODULE
 #define HiSax_init init_module
 #else
+#ifdef COMPAT_HAS_NEW_SETUP
+#define MAX_ARG	(HISAX_MAX_CARDS*5)
+__initfunc(int
+HiSax_setup(char *line))
+{
+	int i, j, argc;
+	int ints[MAX_ARG + 1];
+	char *str;
+
+	str = get_options(line, MAX_ARG, ints);
+#else
 __initfunc(void
 HiSax_setup(char *str, int *ints))
 {
 	int i, j, argc;
-
+#endif        
 	argc = ints[0];
+	printk(KERN_DEBUG"HiSax_setup: argc(%d) str(%s)\n", argc, str);
 	i = 0;
 	j = 1;
 	while (argc && (i < HISAX_MAX_CARDS)) {
@@ -589,8 +608,15 @@
 		strcpy(HiSaxID, "HiSax");
 		HiSax_id = HiSaxID;
 	}
+#ifdef COMPAT_HAS_NEW_SETUP
+	return(1);
 }
-#endif
+
+__setup("hisax=", HiSax_setup);
+#else
+}
+#endif /* COMPAT_HAS_NEW_SETUP */
+#endif /* MODULES */
 
 #if CARD_TELES0
 extern int setup_teles0(struct IsdnCard *card);
@@ -875,7 +901,7 @@
 }
 
 int
-ll_run(struct IsdnCardState *cs)
+ll_run(struct IsdnCardState *cs, int addfeatures)
 {
 	long flags;
 	isdn_ctrl ic;
@@ -884,6 +910,7 @@
 	cli();
 	ic.driver = cs->myid;
 	ic.command = ISDN_STAT_RUN;
+	cs->iif.features |= addfeatures;
 	cs->iif.statcallb(&ic);
 	restore_flags(flags);
 	return 0;
@@ -1053,7 +1080,6 @@
 		cs->iif.features =
 			ISDN_FEATURE_L2_X75I |
 			ISDN_FEATURE_L2_HDLC |
-			ISDN_FEATURE_L2_MODEM |
 			ISDN_FEATURE_L2_TRANS |
 			ISDN_FEATURE_L3_TRANS |
 #ifdef	CONFIG_HISAX_1TR6
@@ -1269,7 +1295,7 @@
 	CallcNewChan(cs);
 	/* ISAR needs firmware download first */
 	if (!test_bit(HW_ISAR, &cs->HW_Flags))
-		ll_run(cs);
+		ll_run(cs, 0);
 	restore_flags(flags);
 	return (1);
 }

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