summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-04-27 20:35:05 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-04-27 20:35:05 +0000
commit6b3c3dd9d8b272e86dbb059a97d41fab3cc4264d (patch)
tree34862447ea6c83469bf4015abb37f4be7545db7a
parentecd357d37d51ded1c4df4c690478106cd361f399 (diff)
HDLC compilation fixes. Tested to compile correctly for all HDLC changes
between 2.4.20 and 2.4.30 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@632 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xzaptel.c4
-rwxr-xr-xzconfig.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/zaptel.c b/zaptel.c
index 1bb0e32..fae7891 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -1268,7 +1268,9 @@ static void zt_net_close(hdlc_device *hdlc)
#ifdef LINUX26
hdlc_close(dev);
#else
+#ifndef CONFIG_OLD_HDLC_API
hdlc_close(hdlc);
+#endif
#endif
#ifndef LINUX26
MOD_DEC_USE_COUNT;
@@ -3187,7 +3189,7 @@ static int zt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd
chans[ch.chan]->hdlcnetdev->netdev.close = zt_net_close;
chans[ch.chan]->hdlcnetdev->netdev.set_mode = NULL;
chans[ch.chan]->hdlcnetdev->netdev.xmit = zt_xmit;
-#endif
+#endif /* NEW_HDLC_INTERFACE */
chans[ch.chan]->hdlcnetdev->netdev.netdev.irq = chans[ch.chan]->span->irq;
chans[ch.chan]->hdlcnetdev->netdev.netdev.tx_queue_len = 50;
res = register_hdlc_device(&chans[ch.chan]->hdlcnetdev->netdev);
diff --git a/zconfig.h b/zconfig.h
index da7cae6..b332050 100755
--- a/zconfig.h
+++ b/zconfig.h
@@ -70,8 +70,8 @@
/* We now use the linux kernel config to detect which options to use */
/* You can still override them below */
#if defined(CONFIG_HDLC) || defined(CONFIG_HDLC_MODULE)
-/* #define CONFIG_ZAPATA_NET */ /* NEVER implicitly turn on ZAPATA_NET */
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,19)
+/* #define CONFIG_ZAPATA_NET */ /* NEVER implicitly turn on ZAPATA_NET */
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,20)
#define CONFIG_OLD_HDLC_API
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)