Summary: | DAHLIN-00044: [patch] CONFIG_DAHDI_NET compiling error | ||
Reporter: | Pavel Selivanov (biohumanoid) | Labels: | |
Date Opened: | 2008-09-23 00:49:41 | Date Closed: | 2008-10-03 15:25:22 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | dahdi (the module) |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) dahdi_config.h ( 1) dahdi_net_2622.diff ( 2) dahdi-base.c.hdlc.patch | |
Description: | It seems that it has been a while since anybody has tried to actually build dahdi with support for data connections. Enabling CONFIG_DAHDI_NET in drivers/dahdi/dahdi_config.h immediately triggers build errors in dahdi-base.c . | ||
Comments: | By: Pavel Selivanov (biohumanoid) 2008-09-23 00:50:42 BTW: why don't you enable HDLC in dahdi by the default (if it's enabled in Kernel) ? By: Tusar Ahmed (tusar) 2008-09-23 04:20:23 After applying your patch , now DAHDI-linux is compiling with HDLC enabled . But not compiling DAHDI-tools . Something related to .. http://bugs.digium.com/view.php?id=13427 By: Pavel Selivanov (biohumanoid) 2008-09-23 04:37:52 I haven't patched any header files, so, compiling error of DAHDI-tools is not my fault... By: Tzafrir Cohen (tzafrir) 2008-09-25 06:28:35 On what platform did you build this? What kernel? By: Pavel Selivanov (biohumanoid) 2008-09-25 08:59:31 Debian 4.0 Linux unicorn 2.6.24-etchnhalf.1-686 #1 SMP Mon Sep 8 06:19:11 UTC 2008 i686 GNU/Linux But this bug isn't kernel/dist dependent ! The is no ms pointer. There are the chan pointer. By: Tzafrir Cohen (tzafrir) 2008-09-25 09:31:06 + fasthdlc_init(&ms->rxhdlc, (ms->flags & DAHDI_FLAG_HDLC56) ? FASTHDLC_MODE_56 : FASTHDLC_MODE_64); + fasthdlc_init(&ms->txhdlc, (ms->flags & DAHDI_FLAG_HDLC56) ? FASTHDLC_MODE_56 : FASTHDLC_MODE_64); ms->infcs = PPP_INITFCS; Those two lines repeat themselves too many times in the code. By: Tzafrir Cohen (tzafrir) 2008-09-29 03:23:57 It appears I'm missing something obvious: what do you need to do to enable HDLC mode? THe build does not fail on the same platform here. By: Pavel Selivanov (biohumanoid) 2008-09-29 03:46:08 Uncomment CONFIG_DAHDI_NET in dahdi_config.h , or use http://bugs.digium.com/file_download.php?file_id=20258&type=bug&download Try to compile. I'm wondering, why don't you enable DAHDI_NET by default (if HDLC support is enabled in kernel/module) ? You do this for PPP: #ifdef CONFIG_PPP #define CONFIG_DAHDI_PPP #endif Why not to do the same for HDLC ? The same for DAHDI_NET would be: #if defined(CONFIG_HDLC) || defined(CONFIG_HDLC_MODULE) #define DAHDI_HDLC_TYPE_TRANS #define CONFIG_DAHDI_NET #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3) #define HDLC_MAINTAINERS_ARE_MORE_STUPID_THAN_I_THOUGHT #endif #endif By: Tzafrir Cohen (tzafrir) 2008-09-29 04:01:48 And another fun error on kernel 2.6.22: drivers/dahdi/dahdi-base.c: In function ‘__putbuf_chunk’: drivers/dahdi/dahdi-base.c:7063: error: ‘struct sk_buff’ has no member named ‘mac’ The network interface access needs fixing. By: Tzafrir Cohen (tzafrir) 2008-09-29 04:12:39 My little extra patch should fix building with kernel 2.6.22, I suppose. I'm not sure I'll have time in the coming days for further tests. By: Tusar Ahmed (tusar) 2008-09-29 14:24:07 Yes, I was trying and still trying ... http://bugs.digium.com/view.php?id=13427 http://bugs.digium.com/view.php?id=13508 Regards, //Tusar\\ By: Digium Subversion (svnbot) 2008-10-03 15:22:18 Repository: dahdi Revision: 5051 U linux/trunk/drivers/dahdi/dahdi-base.c ------------------------------------------------------------------------ r5051 | tzafrir | 2008-10-03 15:22:17 -0500 (Fri, 03 Oct 2008) | 5 lines Fix building with CONFIG_DAHDI_NET in kernel 2.6.22 The leftovers of issues DAHLIN-44 (which was mostly resolved in previous committ. This closes it. ------------------------------------------------------------------------ http://svn.digium.com/view/dahdi?view=rev&revision=5051 By: Tzafrir Cohen (tzafrir) 2008-10-03 15:25:18 Fixed in dahdi-linux r5046 and r5051. |