210e929352b9dd469c3fea21b5613310f3c9d23b
[openwrt.git] / package / acx / patches / 006-netdev_ops.patch
1 --- a/pci.c
2 +++ b/pci.c
3 @@ -4135,6 +4135,18 @@ static struct vlynq_device_id acx_vlynq_
4 { 0, 0, 0 },
5 };
6
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
8 +static const struct net_device_ops acx_netdev_ops = {
9 + .ndo_open = &acxpci_e_open,
10 + .ndo_stop = &acxpci_e_close,
11 + .ndo_start_xmit = &acx_i_start_xmit,
12 + .ndo_get_stats = &acx_e_get_stats,
13 + .ndo_set_multicast_list = &acxpci_i_set_multicast_list,
14 + .ndo_tx_timeout = &acxpci_i_tx_timeout,
15 + .ndo_change_mtu = &acx_e_change_mtu,
16 +};
17 +#endif
18 +
19 static __devinit int vlynq_probe(struct vlynq_device *vdev,
20 struct vlynq_device_id *id)
21 {
22 @@ -4191,17 +4203,24 @@ static __devinit int vlynq_probe(struct
23 goto fail_alloc_netdev;
24 }
25 ether_setup(ndev);
26 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
27 ndev->open = &acxpci_e_open;
28 ndev->stop = &acxpci_e_close;
29 ndev->hard_start_xmit = &acx_i_start_xmit;
30 ndev->get_stats = &acx_e_get_stats;
31 + ndev->set_multicast_list = &acxpci_i_set_multicast_list;
32 + ndev->tx_timeout = &acxpci_i_tx_timeout;
33 + ndev->change_mtu = &acx_e_change_mtu;
34 + ndev->set_multicast_list = &acxpci_i_set_multicast_list;
35 + ndev->tx_timeout = &acxpci_i_tx_timeout;
36 + ndev->change_mtu = &acx_e_change_mtu;
37 +#else
38 + ndev->netdev_ops = &acx_netdev_ops;
39 +#endif
40 #if IW_HANDLER_VERSION <= 5
41 ndev->get_wireless_stats = &acx_e_get_wireless_stats;
42 #endif
43 ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
44 - ndev->set_multicast_list = &acxpci_i_set_multicast_list;
45 - ndev->tx_timeout = &acxpci_i_tx_timeout;
46 - ndev->change_mtu = &acx_e_change_mtu;
47 ndev->watchdog_timeo = 4 * HZ;
48
49 adev = ndev2adev(ndev);
This page took 0.044951 seconds and 3 git commands to generate.