[ar7] migrate acx to netdev_ops, required for later kernels
[openwrt/svn-archive/archive.git] / package / acx / patches / 006-netdev_ops.patch
1 Index: acx-20080210/pci.c
2 ===================================================================
3 --- acx-20080210.orig/pci.c 2010-03-06 11:38:01.000000000 +0100
4 +++ acx-20080210/pci.c 2010-03-06 11:45:02.000000000 +0100
5 @@ -4135,6 +4135,18 @@
6 { 0, 0, 0 },
7 };
8
9 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
10 +static const struct net_device_ops acx_netdev_ops = {
11 + .ndo_open = &acxpci_e_open,
12 + .ndo_stop = &acxpci_e_close,
13 + .ndo_start_xmit = &acx_i_start_xmit,
14 + .ndo_get_stats = &acx_e_get_stats,
15 + .ndo_set_multicast_list = &acxpci_i_set_multicast_list,
16 + .ndo_tx_timeout = &acxpci_i_tx_timeout,
17 + .ndo_change_mtu = &acx_e_change_mtu,
18 +};
19 +#endif
20 +
21 static __devinit int vlynq_probe(struct vlynq_device *vdev,
22 struct vlynq_device_id *id)
23 {
24 @@ -4191,6 +4203,7 @@
25 goto fail_alloc_netdev;
26 }
27 ether_setup(ndev);
28 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
29 ndev->open = &acxpci_e_open;
30 ndev->stop = &acxpci_e_close;
31 ndev->hard_start_xmit = &acx_i_start_xmit;
32 @@ -4202,6 +4215,9 @@
33 ndev->set_multicast_list = &acxpci_i_set_multicast_list;
34 ndev->tx_timeout = &acxpci_i_tx_timeout;
35 ndev->change_mtu = &acx_e_change_mtu;
36 +#else
37 + ndev->netdev_ops = &acx_netdev_ops;
38 +#endif
39 ndev->watchdog_timeo = 4 * HZ;
40
41 adev = ndev2adev(ndev);