[zaptel-commits] kpfleming: branch 1.4 r3737 - /branches/1.4/zaptel-base.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Jan 25 16:56:49 CST 2008


Author: kpfleming
Date: Fri Jan 25 16:56:48 2008
New Revision: 3737

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3737
Log:
Make CONFIG_ZAPATA_NET compatible with kernels 2.6.22 and above.

(closes issue #11846)
Reported by: japple

Modified:
    branches/1.4/zaptel-base.c

Modified: branches/1.4/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel-base.c?view=diff&rev=3737&r1=3736&r2=3737
==============================================================================
--- branches/1.4/zaptel-base.c (original)
+++ branches/1.4/zaptel-base.c Fri Jan 25 16:56:48 2008
@@ -3564,7 +3564,9 @@
 				chans[ch.chan]->hdlcnetdev->netdev = alloc_hdlcdev(chans[ch.chan]->hdlcnetdev);
 				if (chans[ch.chan]->hdlcnetdev->netdev) {
 					chans[ch.chan]->hdlcnetdev->chan = chans[ch.chan];
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
 					SET_MODULE_OWNER(chans[ch.chan]->hdlcnetdev->netdev);
+#endif
 					chans[ch.chan]->hdlcnetdev->netdev->irq = chans[ch.chan]->span->irq;
 					chans[ch.chan]->hdlcnetdev->netdev->tx_queue_len = 50;
 					chans[ch.chan]->hdlcnetdev->netdev->do_ioctl = zt_net_ioctl;
@@ -6567,7 +6569,11 @@
 		if (skb && (ms->flags & ZT_FLAG_NETDEV))
 #ifdef NEW_HDLC_INTERFACE
 		{
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)
 			skb->mac.raw = skb->data;
+#else
+			skb_reset_mac_header(skb);
+#endif
 			skb->dev = ztchan_to_dev(ms);
 #ifdef ZAP_HDLC_TYPE_TRANS
 			skb->protocol = hdlc_type_trans(skb, ztchan_to_dev(ms));




More information about the zaptel-commits mailing list