diff options
author | file <file@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-07-02 15:59:30 +0000 |
---|---|---|
committer | file <file@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-07-02 15:59:30 +0000 |
commit | b9efdd86de5817416fb0df4b1f0dfa04653ffc93 (patch) | |
tree | 7b945f749a4eced005afcc66ca7958627465f05b | |
parent | fac852bb8ee7df5e14af234e28ce06b94a03b17b (diff) |
Merged revisions 2676 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4
................
r2676 | file | 2007-07-02 12:58:23 -0300 (Mon, 02 Jul 2007) | 10 lines
Merged revisions 2675 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r2675 | file | 2007-07-02 12:56:18 -0300 (Mon, 02 Jul 2007) | 2 lines
Add support for the 2.6.22 kernel. (issue #10095 reported by Matti)
........
................
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2677 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | ztd-eth.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -94,7 +94,11 @@ static int ztdeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet { struct zt_span *span; struct ztdeth_header *zh; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + zh = (struct ztdeth_header *)skb_network_header(skb); +#else zh = (struct ztdeth_header *)skb->nh.raw; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) span = ztdeth_getspan(eth_hdr(skb)->h_source, zh->subaddr); #else @@ -173,7 +177,11 @@ static int ztdeth_transmit(void *pvt, unsigned char *msg, int msglen) /* Setup protocol and such */ skb->protocol = __constant_htons(ETH_P_ZTDETH); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + skb_set_network_header(skb, 0); +#else skb->nh.raw = skb->data; +#endif skb->dev = dev; if (dev->hard_header) dev->hard_header(skb, dev, ETH_P_ZTDETH, addr, dev->dev_addr, skb->len); |