[package] fix some openswan netdev_ops thinkos (#6183)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@18519 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2009-11-24 00:47:29 +00:00
parent b013ef293d
commit dc6f6a70b0

View File

@ -101,7 +101,7 @@ diff -urN openswan-2.6.23/linux/net/ipsec/ipsec_rcv.c openswan-2.6.23.new/linux/
if(skb->dev && skb->dev->get_stats) { if(skb->dev && skb->dev->get_stats) {
struct net_device_stats *stats = skb->dev->get_stats(skb->dev); struct net_device_stats *stats = skb->dev->get_stats(skb->dev);
+#else +#else
+#if !(defined CONFIG_COMPAT_NET_DEV_OPS) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) +#if !(defined CONFIG_COMPAT_NET_DEV_OPS) || LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
+ if(skb->dev && skb->dev->netdev_ops->ndo_get_stats) { + if(skb->dev && skb->dev->netdev_ops->ndo_get_stats) {
+ struct net_device_stats *stats = skb->dev->netdev_ops->ndo_get_stats(skb->dev); + struct net_device_stats *stats = skb->dev->netdev_ops->ndo_get_stats(skb->dev);
+#endif +#endif
@ -125,7 +125,7 @@ diff -urN openswan-2.6.23/linux/net/ipsec/ipsec_tunnel.c openswan-2.6.23.new/lin
{ {
int i; int i;
struct ipsecpriv *prv = netdev_priv(dev); struct ipsecpriv *prv = netdev_priv(dev);
+#if !(defined CONFIG_COMPAT_NET_DEV_OPS) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) +#if !(defined CONFIG_COMPAT_NET_DEV_OPS) || LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
+ struct net_device_ops *dev_ops; + struct net_device_ops *dev_ops;
+ struct net_device_ops *physdev_ops; + struct net_device_ops *physdev_ops;
+#endif +#endif
@ -143,7 +143,7 @@ diff -urN openswan-2.6.23/linux/net/ipsec/ipsec_tunnel.c openswan-2.6.23.new/lin
prv->hard_start_xmit = physdev->hard_start_xmit; prv->hard_start_xmit = physdev->hard_start_xmit;
prv->get_stats = physdev->get_stats; prv->get_stats = physdev->get_stats;
+#else +#else
+#if !(defined CONFIG_COMPAT_NET_DEV_OPS) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) +#if !(defined CONFIG_COMPAT_NET_DEV_OPS) || LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
+ dev_ops = (struct net_device_ops *)dev->netdev_ops; + dev_ops = (struct net_device_ops *)dev->netdev_ops;
+ dev_ops->ndo_set_mac_address = ipsec_tunnel_set_mac_address; + dev_ops->ndo_set_mac_address = ipsec_tunnel_set_mac_address;
+#endif +#endif