[zaptel-commits] tzafrir: branch 1.2 r3577 - /branches/1.2/ztd-eth.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Sat Dec 29 16:48:01 CST 2007


Author: tzafrir
Date: Sat Dec 29 16:48:00 2007
New Revision: 3577

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3577
Log:
Adapt ztd-eth to newer interfaces from kernel 2.6.24 .

Modified:
    branches/1.2/ztd-eth.c

Modified: branches/1.2/ztd-eth.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztd-eth.c?view=diff&rev=3577&r1=3576&r2=3577
==============================================================================
--- branches/1.2/ztd-eth.c (original)
+++ branches/1.2/ztd-eth.c Sat Dec 29 16:48:00 2007
@@ -181,8 +181,12 @@
 			skb->nh.raw = skb->data;
 #endif
 			skb->dev = dev;
+#if  LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+			dev_hard_header(skb, dev, ETH_P_ZTDETH, addr, dev->dev_addr, skb->len);
+#else
 			if (dev->hard_header)
 				dev->hard_header(skb, dev, ETH_P_ZTDETH, addr, dev->dev_addr, skb->len);
+#endif
 			dev_queue_xmit(skb);
 		}
 	}
@@ -359,7 +363,11 @@
 			}
 			z->subaddr = htons(sub);
 		}
-		z->dev = dev_get_by_name(z->ethdev);
+		z->dev = dev_get_by_name(
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+				&init_net,
+#endif
+				z->ethdev);
 		if (!z->dev) {
 			printk("TDMoE: Invalid device '%s'\n", z->ethdev);
 			kfree(z);




More information about the zaptel-commits mailing list