aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-03-06 12:22:35 +0000
committerFlorian Fainelli <florian@openwrt.org>2010-03-06 12:22:35 +0000
commitbca2709133d76eff637a7ddeea4f709f14762bbc (patch)
treebfe66dc134b337a72c93139eb03496f490757065 /package
parent908ffaaac7c3d9d2d24eb0e79fd099cef2500fc9 (diff)
downloadupstream-bca2709133d76eff637a7ddeea4f709f14762bbc.tar.gz
upstream-bca2709133d76eff637a7ddeea4f709f14762bbc.tar.bz2
upstream-bca2709133d76eff637a7ddeea4f709f14762bbc.zip
migrate acx to netdev_ops, required for later kernels
SVN-Revision: 20014
Diffstat (limited to 'package')
-rw-r--r--package/acx/patches/006-netdev_ops.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/package/acx/patches/006-netdev_ops.patch b/package/acx/patches/006-netdev_ops.patch
new file mode 100644
index 0000000000..92382a0cf2
--- /dev/null
+++ b/package/acx/patches/006-netdev_ops.patch
@@ -0,0 +1,41 @@
+Index: acx-20080210/pci.c
+===================================================================
+--- acx-20080210.orig/pci.c 2010-03-06 11:38:01.000000000 +0100
++++ acx-20080210/pci.c 2010-03-06 11:45:02.000000000 +0100
+@@ -4135,6 +4135,18 @@
+ { 0, 0, 0 },
+ };
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
++static const struct net_device_ops acx_netdev_ops = {
++ .ndo_open = &acxpci_e_open,
++ .ndo_stop = &acxpci_e_close,
++ .ndo_start_xmit = &acx_i_start_xmit,
++ .ndo_get_stats = &acx_e_get_stats,
++ .ndo_set_multicast_list = &acxpci_i_set_multicast_list,
++ .ndo_tx_timeout = &acxpci_i_tx_timeout,
++ .ndo_change_mtu = &acx_e_change_mtu,
++};
++#endif
++
+ static __devinit int vlynq_probe(struct vlynq_device *vdev,
+ struct vlynq_device_id *id)
+ {
+@@ -4191,6 +4203,7 @@
+ goto fail_alloc_netdev;
+ }
+ ether_setup(ndev);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+ ndev->open = &acxpci_e_open;
+ ndev->stop = &acxpci_e_close;
+ ndev->hard_start_xmit = &acx_i_start_xmit;
+@@ -4202,6 +4215,9 @@
+ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
+ ndev->tx_timeout = &acxpci_i_tx_timeout;
+ ndev->change_mtu = &acx_e_change_mtu;
++#else
++ ndev->netdev_ops = &acx_netdev_ops;
++#endif
+ ndev->watchdog_timeo = 4 * HZ;
+
+ adev = ndev2adev(ndev);