[svn-commits] tzafrir: branch 1.4 r3578 - in /branches/1.4: ./ ztd-eth.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Dec 29 17:02:51 CST 2007


Author: tzafrir
Date: Sat Dec 29 17:02:50 2007
New Revision: 3578

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

Merged from branches/1.2 rev. 3577 .

Modified:
    branches/1.4/   (props changed)
    branches/1.4/ztd-eth.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/ztd-eth.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/ztd-eth.c?view=diff&rev=3578&r1=3577&r2=3578
==============================================================================
--- branches/1.4/ztd-eth.c (original)
+++ branches/1.4/ztd-eth.c Sat Dec 29 17:02:50 2007
@@ -183,8 +183,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
 			skb_queue_tail(&skbs, skb);
 		}
 	}
@@ -375,7 +379,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 svn-commits mailing list